Skip to content

Commit 810025d

Browse files
[2.4.8-beta2] Downgrade TinyMCE dependency from version 7 to version 6.8.5
1 parent d97b9a9 commit 810025d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymceAdapter.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,11 +668,13 @@ define([
668668
*/
669669
encodeDirectives: function (content) {
670670
// collect all HTML tags with attributes that contain directives
671+
// eslint-disable-next-line no-useless-escape
671672
return content.gsub(/<([a-z0-9\-\_]+[^>]+?)([a-z0-9\-\_]+="[^"]*?\{\{.+?\}\}.*?".*?)>/i, function (match) {
672673
var attributesString = match[2],
673674
decodedDirectiveString;
674-
675675
// process tag attributes string
676+
// eslint-disable-next-line no-useless-escape
677+
676678
attributesString = attributesString.gsub(/([a-z0-9\-\_]+)="(.*?)(\{\{.+?\}\})(.*?)"/i, function (m) {
677679
decodedDirectiveString = encodeURIComponent(Base64.mageEncode(m[3].replace(/&quot;/g, '"') + m[4]));
678680

@@ -691,11 +693,12 @@ define([
691693
decodeDirectives: function (content) {
692694
var directiveUrl = this.makeDirectiveUrl('%directive%').split('?')[0], // remove query string from directive
693695
// escape special chars in directives url to use in regular expression
696+
// eslint-disable-next-line no-useless-escape
694697
regexEscapedDirectiveUrl = directiveUrl.replace(/([$^.?*!+:=()\[\]{}|\\])/g, '\\$1'),
695698
regexDirectiveUrl = regexEscapedDirectiveUrl
696699
.replace(
697700
'%directive%',
698-
'([a-zA-Z0-9,_-]+(?:%2[A-Z]|)+\/?)(?:(?!").)*'
701+
'([a-zA-Z0-9,_-]+(?:%2[A-Z]|)+\/?)(?:(?!").)*' // eslint-disable-next-line no-useless-escape
699702
) + '/?(\\\\?[^"]*)?', // allow optional query string
700703
reg = new RegExp(regexDirectiveUrl);
701704

0 commit comments

Comments
 (0)