File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1892,16 +1892,16 @@ Readability.prototype = {
18921892 var noscripts = Array . from ( doc . getElementsByTagName ( "noscript" ) ) ;
18931893 this . _forEachNode ( noscripts , function ( noscript ) {
18941894 // Parse content of noscript and make sure it only contains image
1895+ if ( ! this . _isSingleImage ( noscript ) ) {
1896+ return ;
1897+ }
18951898 var tmp = doc . createElement ( "div" ) ;
18961899 // We're running in the document context, and using unmodified
18971900 // document contents, so doing this should be safe.
18981901 // (Also we heavily discourage people from allowing script to
18991902 // run at all in this document...)
19001903 // eslint-disable-next-line no-unsanitized/property
19011904 tmp . innerHTML = noscript . innerHTML ;
1902- if ( ! this . _isSingleImage ( tmp ) ) {
1903- return ;
1904- }
19051905
19061906 // If noscript has previous sibling and it only contains image,
19071907 // replace it with noscript content. However we also keep old
You can’t perform that action at this time.
0 commit comments