@@ -2452,6 +2452,10 @@ MediumEditor.extensions = {};
24522452 'use strict' ;
24532453
24542454 function isElementDescendantOfExtension ( extensions , element ) {
2455+ if ( ! extensions ) {
2456+ return false ;
2457+ }
2458+
24552459 return extensions . some ( function ( extension ) {
24562460 if ( typeof extension . getInteractionElements !== 'function' ) {
24572461 return false ;
@@ -2502,7 +2506,7 @@ MediumEditor.extensions = {};
25022506 win = this . base . options . contentWindow ,
25032507 doc = this . base . options . ownerDocument ;
25042508
2505- if ( targets !== null ) {
2509+ if ( targets ) {
25062510 targets = MediumEditor . util . isElement ( targets ) || [ win , doc ] . indexOf ( targets ) > - 1 ? [ targets ] : targets ;
25072511
25082512 Array . prototype . forEach . call ( targets , function ( target ) {
@@ -5345,6 +5349,10 @@ MediumEditor.extensions = {};
53455349 return this . cleanPaste ( pastedHTML ) ;
53465350 }
53475351
5352+ if ( ! pastedPlain ) {
5353+ return ;
5354+ }
5355+
53485356 if ( ! ( this . getEditorOption ( 'disableReturn' ) || ( editable && editable . getAttribute ( 'data-disable-return' ) ) ) ) {
53495357 paragraphs = pastedPlain . split ( / [ \r \n ] + / g) ;
53505358 // If there are no \r\n in data, don't wrap in <p>
@@ -6935,7 +6943,7 @@ MediumEditor.extensions = {};
69356943 for ( var i = 0 , n = atts . length ; i < n ; i ++ ) {
69366944 // do not re-create existing attributes
69376945 if ( ! div . hasAttribute ( atts [ i ] . nodeName ) ) {
6938- div . setAttribute ( atts [ i ] . nodeName , atts [ i ] . nodeValue ) ;
6946+ div . setAttribute ( atts [ i ] . nodeName , atts [ i ] . value ) ;
69396947 }
69406948 }
69416949
@@ -7878,7 +7886,7 @@ MediumEditor.parseVersionString = function (release) {
78787886
78797887MediumEditor . version = MediumEditor . parseVersionString . call ( this , ( {
78807888 // grunt-bump looks for this:
7881- 'version' : '5.23.2 '
7889+ 'version' : '5.23.3 '
78827890} ) . version ) ;
78837891
78847892 return MediumEditor ;
0 commit comments