WordPress.org

Make WordPress Core

Ticket #17764: autoembed-core-diff.diff

File autoembed-core-diff.diff, 958 bytes (added by dzver, 3 years ago)
  • media.php

     
    12571257         * @return string Potentially modified $content. 
    12581258         */ 
    12591259        function autoembed( $content ) { 
    1260                 return preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array(&$this, 'autoembed_callback'), $content ); 
     1260                return preg_replace_callback( '!^\s*(?:<a href="[^"]+">)?(https?://[^\s<"]+)(?:</a>)?\s*$!im', array(&$this, 'autoembed_callback'), $content ); 
    12611261        } 
    12621262 
    12631263        /** 
     
    14381438        return apply_filters( 'embed_googlevideo', '<embed type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docid=' . esc_attr($matches[2]) . '&amp;hl=en&amp;fs=true" style="width:' . esc_attr($width) . 'px;height:' . esc_attr($height) . 'px" allowFullScreen="true" allowScriptAccess="always" />', $matches, $attr, $url, $rawattr ); 
    14391439} 
    14401440 
    1441 ?> 
    1442  No newline at end of file 
     1441?>