File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
lib/plugins/system/oembed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -49,14 +49,16 @@ function _getOembedIframe(oembed) {
4949 var $iframe = cheerio . load ( html ) ( 'iframe' ) ;
5050 } catch ( ex ) { }
5151
52- if ( $iframe && $iframe . length === 2 && / < i f r a m e > $ / i. test ( html ) ) {
53- // Forgive mis-closed iFrame tag
54- $iframe = $iframe . first ( ) ;
55- }
56-
57- if ( $iframe && $iframe . length === 1 ) {
58- _iframe = fixOembedIframeAttributes ( $iframe [ 0 ] . attribs ) ;
59- _iframe . placeholder = oembed . thumbnail_url ;
52+ if ( $iframe ) {
53+ if ( $iframe . length === 2 && / < i f r a m e > $ / i. test ( html ) ) {
54+ // Forgive mis-closed iFrame tag
55+ $iframe = $iframe . first ( ) ;
56+ }
57+
58+ if ( $iframe . length === 1 ) {
59+ _iframe = fixOembedIframeAttributes ( $iframe [ 0 ] . attribs ) ;
60+ _iframe . placeholder = oembed . thumbnail_url ;
61+ }
6062 }
6163
6264 // When oembed is in fact iframe from domain fallbacks on oEmbedError
You can’t perform that action at this time.
0 commit comments