Changeset 37627 for trunk/src/wp-includes/class-wp-embed.php
- Timestamp:
- 06/02/2016 09:23:43 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-embed.php
r37539 r37627 335 335 $content = wp_replace_in_html_tags( $content, array( "\n" => '<!-- wp-line-break -->' ) ); 336 336 337 // Find URLs that are on their own line. 338 $content = preg_replace_callback( '|^(\s*)(https?://[^\s"]+)(\s*)$|im', array( $this, 'autoembed_callback' ), $content ); 337 if ( preg_match( '#(^|\s|>)https?://#i', $content ) ) { 338 // Find URLs on their own line. 339 $content = preg_replace_callback( '|^(\s*)(https?://[^\s<>"]+)(\s*)$|im', array( $this, 'autoembed_callback' ), $content ); 340 // Find URLs in their own paragraph. 341 $content = preg_replace_callback( '|(<p(?: [^>]*)?>\s*)(https?://[^\s<>"]+)(\s*<\/p>)|i', array( $this, 'autoembed_callback' ), $content ); 342 } 339 343 340 344 // Put the line breaks back.
Note: See TracChangeset
for help on using the changeset viewer.