Changeset 33523 for branches/3.9/src/wp-includes/class-wp-embed.php
- Timestamp:
- 07/31/2015 01:44:04 AM (10 years ago)
- File:
-
- 1 edited
-
branches/3.9/src/wp-includes/class-wp-embed.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.9/src/wp-includes/class-wp-embed.php
r33386 r33523 292 292 */ 293 293 function autoembed( $content ) { 294 // Strip newlines from all elements.295 $content = wp_replace_in_html_tags( $content, array( "\n" => " ") );294 // Replace line breaks from all HTML elements with placeholders. 295 $content = wp_replace_in_html_tags( $content, array( "\n" => '<!-- wp-line-break -->' ) ); 296 296 297 297 // Find URLs that are on their own line. 298 return preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array( $this, 'autoembed_callback' ), $content ); 298 $content = preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array( $this, 'autoembed_callback' ), $content ); 299 300 // Put the line breaks back. 301 return str_replace( '<!-- wp-line-break -->', "\n", $content ); 299 302 } 300 303
Note: See TracChangeset
for help on using the changeset viewer.