mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 13:56:11 +01:00
Merge remote-tracking branch 'origin/stable'
This commit is contained in:
@@ -12,6 +12,7 @@ const sanitizeFilename = require('sanitize-filename');
|
||||
const noteRevisionService = require('./note_revisions');
|
||||
const isSvg = require('is-svg');
|
||||
const isAnimated = require('is-animated');
|
||||
const htmlSanitizer = require("./html_sanitizer");
|
||||
|
||||
async function processImage(uploadBuffer, originalName, shrinkImageSwitch) {
|
||||
const compressImages = optionService.getOptionBool("compressImages");
|
||||
@@ -66,6 +67,8 @@ function getImageMimeFromExtension(ext) {
|
||||
function updateImage(noteId, uploadBuffer, originalName) {
|
||||
log.info(`Updating image ${noteId}: ${originalName}`);
|
||||
|
||||
originalName = htmlSanitizer.sanitize(originalName);
|
||||
|
||||
const note = becca.getNote(noteId);
|
||||
|
||||
note.saveNoteRevision();
|
||||
|
||||
Reference in New Issue
Block a user