Ticket #28217: 28217.2.patch
| File 28217.2.patch, 1.5 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/js/editor.js
244 244 pee = pee.replace( new RegExp( '(<(?:' + blocklist + ')(?: [^>]*)?>)', 'gi' ), '\n$1' ); 245 245 pee = pee.replace( new RegExp( '(</(?:' + blocklist + ')>)', 'gi' ), '$1\n\n' ); 246 246 pee = pee.replace( /<hr( [^>]*)?>/gi, '<hr$1>\n\n' ); // hr is self closing block element 247 pee = pee.replace( /\s<option/gi, '<option' ); // No <p> or <br> around <option> 248 pee = pee.replace( /<\/option>\s/gi, '</option>' ); 247 249 pee = pee.replace( /\r\n|\r/g, '\n' ); 248 250 pee = pee.replace( /\n\s*\n+/g, '\n\n' ); 249 251 pee = pee.replace( /([\s\S]+?)\n\n/g, '<p>$1</p>\n' ); -
src/wp-includes/formatting.php
340 340 $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee); 341 341 $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines 342 342 343 if ( strpos( $pee, '</select>' ) !== false ) { 344 // no P/BR around option 345 $pee = preg_replace( '|\s<option|', '<option', $pee ); 346 $pee = preg_replace( '|</option>\s|', '</option>', $pee ); 347 } 348 343 349 if ( strpos( $pee, '</object>' ) !== false ) { 344 350 // no P/BR around param and embed 345 351 $pee = preg_replace( '|(<object[^>]*>)\s*|', '$1', $pee );