Changeset 33525 for branches/3.7/src/wp-includes/class-wp-embed.php
- Timestamp:
- 07/31/2015 01:45:34 AM (10 years ago)
- File:
-
- 1 edited
-
branches/3.7/src/wp-includes/class-wp-embed.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7/src/wp-includes/class-wp-embed.php
r33389 r33525 281 281 */ 282 282 function autoembed( $content ) { 283 // Strip newlines from all elements.284 $content = wp_replace_in_html_tags( $content, array( "\n" => " ") );283 // Replace line breaks from all HTML elements with placeholders. 284 $content = wp_replace_in_html_tags( $content, array( "\n" => '<!-- wp-line-break -->' ) ); 285 285 286 286 // Find URLs that are on their own line. 287 return preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array( $this, 'autoembed_callback' ), $content ); 287 $content = preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array( $this, 'autoembed_callback' ), $content ); 288 289 // Put the line breaks back. 290 return str_replace( '<!-- wp-line-break -->', "\n", $content ); 288 291 } 289 292
Note: See TracChangeset
for help on using the changeset viewer.