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);