File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -168,17 +168,22 @@ define([
168
168
/ ( < s p a n c l a s s = " [ ^ " ] * m a g e n t o - w i d g e t [ ^ " ] * " [ ^ > ] * > ) ? < i m g ( [ ^ > ] + i d = " [ ^ > ] + ) > ( ( [ ^ > ] * ) < \/ s p a n > ) ? / i,
169
169
function ( match ) {
170
170
var attributes = wysiwyg . parseAttributesString ( match [ 2 ] ) ,
171
- widgetCode ;
171
+ widgetCode ,
172
+ result = match [ 0 ] ;
172
173
173
174
if ( attributes . id ) {
174
- widgetCode = Base64 . idDecode ( attributes . id ) ;
175
+ try {
176
+ widgetCode = Base64 . idDecode ( attributes . id ) ;
177
+ } catch ( e ) {
178
+ // Ignore and continue.
179
+ }
175
180
176
- if ( widgetCode . indexOf ( '{{widget' ) !== - 1 ) {
177
- return widgetCode ;
181
+ if ( widgetCode && widgetCode . indexOf ( '{{widget' ) !== - 1 ) {
182
+ result = widgetCode ;
178
183
}
179
184
}
180
185
181
- return match [ 0 ] ;
186
+ return result ;
182
187
}
183
188
) ;
184
189
} ,
You can’t perform that action at this time.
0 commit comments