mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix rendering image title in share renderer, closes #4578
This commit is contained in:
parent
77800d073f
commit
390ad6d813
@ -137,7 +137,7 @@ function renderCode(result) {
|
||||
|
||||
function renderMermaid(result, note) {
|
||||
result.content = `
|
||||
<img src="api/images/${note.noteId}/${note.escapedTitle}?${note.utcDateModified}">
|
||||
<img src="api/images/${note.noteId}/${note.encodedTitle}?${note.utcDateModified}">
|
||||
<hr>
|
||||
<details>
|
||||
<summary>Chart source</summary>
|
||||
@ -146,7 +146,7 @@ function renderMermaid(result, note) {
|
||||
}
|
||||
|
||||
function renderImage(result, note) {
|
||||
result.content = `<img src="api/images/${note.noteId}/${note.escapedTitle}?${note.utcDateModified}">`;
|
||||
result.content = `<img src="api/images/${note.noteId}/${note.encodedTitle}?${note.utcDateModified}">`;
|
||||
}
|
||||
|
||||
function renderFile(note, result) {
|
||||
|
@ -490,6 +490,10 @@ class SNote extends AbstractShacaEntity {
|
||||
return escape(this.title);
|
||||
}
|
||||
|
||||
get encodedTitle() {
|
||||
return encodeURIComponent(this.title);
|
||||
}
|
||||
|
||||
getPojo() {
|
||||
return {
|
||||
noteId: this.noteId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user