File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,16 @@ protected function _node($doc, $node)
352352 $ node ->setAttribute ('style ' , $ style . 'width:auto !important ' );
353353 break ;
354354
355+ case 'source ' :
356+ if ($ this ->_imgBlock () &&
357+ $ node ->hasAttribute ('srcset ' ))
358+ {
359+ $ node ->setAttribute (self ::SRCSETBLOCK , $ node ->getAttribute ('srcset ' ));
360+ $ node ->setAttribute ('srcset ' , '' );
361+ $ this ->_imptmp ['imgblock ' ] = true ;
362+ break ;
363+ }
364+
355365 case 'img ' :
356366 case 'input ' :
357367 if ($ node ->hasAttribute ('src ' )) {
@@ -454,6 +464,9 @@ protected function _node($doc, $node)
454464 $ node ->parentNode ->removeChild ($ node );
455465 break ;
456466 }
467+ if ($ node ->parentNode ) {
468+ $ node ->parentNode ->removeChild ($ node );
469+ }
457470 break ;
458471
459472 case 'table ' :
You can’t perform that action at this time.
0 commit comments