From ee7c7046acaea502ce35b19c8dbfd323eea93f8c Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sun, 16 Jun 2024 10:38:15 +0300 Subject: [PATCH] wysiwyg escape insert link --- client/src/helpers/misc/summernote-custom.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/helpers/misc/summernote-custom.js b/client/src/helpers/misc/summernote-custom.js index 5ca47c4451..8125d14905 100644 --- a/client/src/helpers/misc/summernote-custom.js +++ b/client/src/helpers/misc/summernote-custom.js @@ -29,6 +29,7 @@ import $ from 'jquery'; import EditTableModalView from 'views/wysiwyg/modals/edit-table'; import EditCellModalView from 'views/wysiwyg/modals/edit-cell'; +import Handlebars from 'handlebars'; /** * @type {{ @@ -721,6 +722,7 @@ function init(langSets) { }; }, + // Not used? 'linkDialog': function (context) { const options = context.options; const self = options.espoView; @@ -745,6 +747,8 @@ function init(langSets) { view.render(); self.listenToOnce(view, 'insert', (data) => { + data.text = Handlebars.Utils.escapeExpression(data.text); + self.$summernote.summernote('createLink', data); }); @@ -815,6 +819,8 @@ function init(langSets) { container.scrollY : container.scrollTop; + data.text = Handlebars.Utils.escapeExpression(data.text); + self.$summernote.summernote('createLink', data); setTimeout(() => container.scroll(0, scrollY), 20);