Changeset 14249
- Timestamp:
- 04/27/2010 05:21:39 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-oembed.php
r14109 r14249 57 57 ) ); 58 58 59 // Fix Scribd and Viddler embeds. Theycontain new lines in the middle of the HTML which breaks wpautop().59 // Fix any embeds that contain new lines in the middle of the HTML which breaks wpautop(). 60 60 add_filter( 'oembed_dataparse', array(&$this, '_strip_newlines'), 10, 3 ); 61 61 } … … 264 264 265 265 /** 266 * Strip new lines from the HTML if it's a Scribd or Viddler embed.266 * Strip any new lines from the HTML. 267 267 * 268 268 * @access private … … 273 273 */ 274 274 function _strip_newlines( $html, $data, $url ) { 275 if ( preg_match( '#http://(www\.)?scribd.com/.*#i', $url ) || preg_match( '#http://(www\.)?viddler\.com/.*#i', $url ) )275 if ( false !== strpos( "\n", $html ) ) 276 276 $html = str_replace( array( "\r\n", "\n" ), '', $html ); 277 277
Note: See TracChangeset
for help on using the changeset viewer.