From 390ad6d813e2577a6687af5347ccf3f542c1ebaf Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 9 Jan 2024 23:38:44 +0100 Subject: [PATCH] fix rendering image title in share renderer, closes #4578 --- src/share/content_renderer.js | 4 ++-- src/share/shaca/entities/snote.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/share/content_renderer.js b/src/share/content_renderer.js index 2c17e68c3..0466fbdd6 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 = ` - +
Chart source @@ -146,7 +146,7 @@ function renderMermaid(result, note) { } function renderImage(result, note) { - result.content = ``; + result.content = ``; } function renderFile(note, result) { diff --git a/src/share/shaca/entities/snote.js b/src/share/shaca/entities/snote.js index 06d4e3dc4..b639d3829 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,