wysiwyg escape insert link

This commit is contained in:
Yuri Kuznetsov
2024-06-16 10:38:15 +03:00
parent 19638dd649
commit ee7c7046ac
@@ -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);