File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
lib/web/mage/adminhtml/wysiwyg/tiny_mce Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -186,11 +186,19 @@ define([
186
186
} ) ;
187
187
188
188
_ . each ( compiled , function ( node , nodeName ) {
189
- var attributes = node . attributes . join ( '|' ) ,
190
- children = node . children . join ( '|' ) ;
189
+ var filteredAttributes = [ ] ;
191
190
192
- validElements . push ( nodeName + '[' + attributes + ']' ) ;
193
- validChildren . push ( nodeName + '[' + children + ']' ) ;
191
+ _ . each ( node . attributes , function ( attribute ) { //eslint-disable-line max-nested-callbacks
192
+ // Disallowing usage of 'on*' attributes.
193
+ if ( ! / ^ o n / . test ( attribute ) ) {
194
+ filteredAttributes . push ( attribute ) ;
195
+ }
196
+ } ) ;
197
+
198
+ node . attributes = filteredAttributes ;
199
+
200
+ validElements . push ( nodeName + '[' + node . attributes . join ( '|' ) + ']' ) ;
201
+ validChildren . push ( nodeName + '[' + node . children . join ( '|' ) + ']' ) ;
194
202
} ) ;
195
203
196
204
return {
You can’t perform that action at this time.
0 commit comments