diff --git a/src/public/app/services/note_content_renderer.js b/src/public/app/services/note_content_renderer.js index 771f860b7..61966b0b4 100644 --- a/src/public/app/services/note_content_renderer.js +++ b/src/public/app/services/note_content_renderer.js @@ -61,9 +61,11 @@ async function getRenderedContent(note, options = {}) { $renderedContent.append($("
").text(trim(fullNote.content, options.trim)));
     }
     else if (type === 'image') {
+        const sanitizedTitle = note.title.replace(/[^a-z0-9-.]/gi, "");
+
         $renderedContent.append(
             $("")
-                .attr("src", `api/images/${note.noteId}/${note.title}`)
+                .attr("src", `api/images/${note.noteId}/${sanitizedTitle}`)
                 .css("max-width", "100%")
         );
     }
@@ -144,7 +146,7 @@ async function getRenderedContent(note, options = {}) {
     else if (type === 'canvas') {
         // make sure surrounding container has size of what is visible. Then image is shrinked to its boundaries
         $renderedContent.css({height: "100%", width:"100%"});
-        
+
         const noteComplement = await froca.getNoteComplement(note.noteId);
         const content = noteComplement.content || "";
 
diff --git a/src/public/app/services/note_list_renderer.js b/src/public/app/services/note_list_renderer.js
index 705a0d31f..1006374a5 100644
--- a/src/public/app/services/note_list_renderer.js
+++ b/src/public/app/services/note_list_renderer.js
@@ -266,7 +266,7 @@ class NoteListRenderer {
                     .append($expander)
                     .append($('').addClass(note.getIcon()))
                     .append(this.viewType === 'grid'
-                        ? note.title
+                        ? $("").text(note.title)
                         : await linkService.createNoteLink(notePath, {showTooltip: false, showNotePath: this.showNotePath})
                     )
                     .append($renderedAttributes)
diff --git a/src/public/app/services/tab_manager.js b/src/public/app/services/tab_manager.js
index 2156400c7..9f8189a17 100644
--- a/src/public/app/services/tab_manager.js
+++ b/src/public/app/services/tab_manager.js
@@ -503,7 +503,7 @@ export default class TabManager extends Component {
 
     updateDocumentTitle(activeNoteContext) {
         const titleFragments = [
-            // it helps navigating in history if note title is included in the title
+            // it helps to navigate in history if note title is included in the title
             activeNoteContext.note?.title,
             "Trilium Notes"
         ].filter(Boolean);
diff --git a/src/public/app/services/toast.js b/src/public/app/services/toast.js
index d51cad528..ff2871044 100644
--- a/src/public/app/services/toast.js
+++ b/src/public/app/services/toast.js
@@ -4,16 +4,17 @@ import utils from "./utils.js";
 function toast(options) {
     const $toast = $(``);
 
+    $toast.find('.toast-title').text(options.title);
+    $toast.find('.toast-body').text(options.message);
+
     if (options.id) {
         $toast.attr("id", "toast-" + options.id);
     }
diff --git a/src/public/app/widgets/dialogs/options/appearance.js b/src/public/app/widgets/dialogs/options/appearance.js
index 514477228..18f548df6 100644
--- a/src/public/app/widgets/dialogs/options/appearance.js
+++ b/src/public/app/widgets/dialogs/options/appearance.js
@@ -297,7 +297,7 @@ export default class ApperanceOptions {
             this.$themeSelect.append($("