Skip to content

Commit 3221a7f

Browse files
author
Hwashiang Yu
committed
MAGETWO-96941: TinyMCE editor JSOON attribute improvement
- Reverted JSON value changes - Updated JSON utility method
1 parent 4bc36cb commit 3221a7f

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

lib/web/tiny_mce/classes/util/JSON.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
*/
9393
parse: function(s) {
9494
try {
95-
return eval('(' + s + ')');
95+
return JSON.parse(s);
9696
} catch (ex) {
9797
// Ignore
9898
}

lib/web/tiny_mce/plugins/media/editor_plugin_src.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,9 @@
372372
};
373373

374374
data = node.attr('data-mce-json');
375-
if (!data || !data.isJSON())
375+
if (!data)
376376
return;
377377

378-
try {
379-
data.evalJSON(true);
380-
} catch {
381-
return;
382-
}
383-
384378
data = JSON.parse(data);
385379
typeItem = this.getType(node.attr('class'));
386380

0 commit comments

Comments
 (0)