File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919
2020 function importContent ( newWidget , elementCode , container ) {
2121
22- var elementCodeStringify = JSON . stringify ( elementCode ) ;
22+ var elementCodeStringify = encodeURIComponent ( JSON . stringify ( elementCode ) ) ;
2323 var containsMedia = / p n g | g i f | w e b p | t i f f | p s d | r a w | b m p | h e i f | s v g | j p g / . test ( elementCodeStringify ) ;
2424
2525 if ( containsMedia ) {
4343 } )
4444 . catch ( function ( error ) {
4545 console . log ( 'Something went wrong!' ) ;
46- console . log ( JSON . stringify ( error ) ) ;
46+ console . log ( error ) ;
4747
4848 elementor . notifications . showToast ( {
4949 message : elementor . translate ( '#2 Something went wrong!' )
200200 } )
201201 . catch ( function ( error ) {
202202 console . log ( 'Something went wrong!' ) ;
203- console . log ( JSON . stringify ( error ) ) ;
203+ console . log ( error ) ;
204204 elementor . notifications . showToast ( {
205205 message : elementor . translate ( '#4 Something went wrong!' )
206206 } ) ;
You can’t perform that action at this time.
0 commit comments