diff --git a/src/public/app/widgets/dialogs/revisions.js b/src/public/app/widgets/dialogs/revisions.js index 51cd5a83e..cdd37af38 100644 --- a/src/public/app/widgets/dialogs/revisions.js +++ b/src/public/app/widgets/dialogs/revisions.js @@ -138,7 +138,7 @@ export default class RevisionsDialog extends BasicWidget { }); this.$revisionSettingsButton.on('click', async () => { - appContext.tabManager.openContextWithNote('_optionsOther', {activate: true}); + appContext.tabManager.openContextWithNote('_optionsOther', { activate: true }); }); } @@ -268,12 +268,19 @@ export default class RevisionsDialog extends BasicWidget { } else if (revisionItem.type === 'code') { this.$content.html($("
").text(fullRevision.content));
} else if (revisionItem.type === 'image') {
- this.$content.html($("
")
- // the reason why we put this inline as base64 is that we do not want to let user copy this
- // as a URL to be used in a note. Instead, if they copy and paste it into a note, it will be uploaded as a new note
- .attr("src", `data:${fullRevision.mime};base64,${fullRevision.content}`)
- .css("max-width", "100%")
- .css("max-height", "100%"));
+ if (fullRevision.mime === "image/svg+xml") {
+ this.$content.html($("
")
+ .attr("src", `data:${fullRevision.mime};utf8,${fullRevision.content}`)
+ .css("max-width", "100%")
+ .css("max-height", "100%"));
+ } else {
+ this.$content.html($("
")
+ // the reason why we put this inline as base64 is that we do not want to let user copy this
+ // as a URL to be used in a note. Instead, if they copy and paste it into a note, it will be uploaded as a new note
+ .attr("src", `data:${fullRevision.mime};base64,${fullRevision.content}`)
+ .css("max-width", "100%")
+ .css("max-height", "100%"));
+ }
} else if (revisionItem.type === 'file') {
const $table = $("