Skip to content

Commit 5635217

Browse files
author
Oleksandr Dubovyk
committed
MC-30586: TinyMCE4: some HTML code breaks the editor
-fixed
1 parent 9f27000 commit 5635217

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,13 @@ define([
171171
widgetCode;
172172

173173
if (attributes.id) {
174-
widgetCode = Base64.idDecode(attributes.id);
174+
try {
175+
widgetCode = Base64.idDecode(attributes.id);
176+
} catch (e) {
177+
// Ignore and continue.
178+
}
175179

176-
if (widgetCode.indexOf('{{widget') !== -1) {
180+
if (widgetCode && widgetCode.indexOf('{{widget') !== -1) {
177181
return widgetCode;
178182
}
179183
}

0 commit comments

Comments
 (0)