Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix rendering image title in share renderer, closes #4578
zadam390ad6d813e2
diff --git a/src/share/content_renderer.js b/src/share/content_renderer.jsindex 2c17e68c3f..0466fbdd61 100644--- a/src/share/content_renderer.js+++ b/src/share/content_renderer.js@@ -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) {diff --git a/src/share/shaca/entities/snote.js b/src/share/shaca/entities/snote.jsindex 06d4e3dc4c..b639d38290 100644--- a/src/share/shaca/entities/snote.js+++ b/src/share/shaca/entities/snote.js@@ -490,6 +490,10 @@ class SNote extends AbstractShacaEntity {return escape(this.title);}+ get encodedTitle() {+ return encodeURIComponent(this.title);+ }+getPojo() {return {noteId: this.noteId,