Formatting: make the removal of white space around <option> greedy, see #28217.
git-svn-id: https://develop.svn.wordpress.org/trunk@29316 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5fa36977a0
commit
01051b4e2f
|
@ -249,8 +249,8 @@ window.switchEditors = {
|
|||
pee = pee.replace( new RegExp( '(<(?:' + blocklist + ')(?: [^>]*)?>)', 'gi' ), '\n$1' );
|
||||
pee = pee.replace( new RegExp( '(</(?:' + blocklist + ')>)', 'gi' ), '$1\n\n' );
|
||||
pee = pee.replace( /<hr( [^>]*)?>/gi, '<hr$1>\n\n' ); // hr is self closing block element
|
||||
pee = pee.replace( /\s<option/gi, '<option' ); // No <p> or <br> around <option>
|
||||
pee = pee.replace( /<\/option>\s/gi, '</option>' );
|
||||
pee = pee.replace( /\s*<option/gi, '<option' ); // No <p> or <br> around <option>
|
||||
pee = pee.replace( /<\/option>\s*/gi, '</option>' );
|
||||
pee = pee.replace( /\r\n|\r/g, '\n' );
|
||||
pee = pee.replace( /\n\s*\n+/g, '\n\n' );
|
||||
pee = pee.replace( /([\s\S]+?)\n\n/g, '<p>$1</p>\n' );
|
||||
|
|
|
@ -394,8 +394,8 @@ function wpautop($pee, $br = true) {
|
|||
|
||||
if ( strpos( $pee, '<option' ) !== false ) {
|
||||
// no P/BR around option
|
||||
$pee = preg_replace( '|\s<option|', '<option', $pee );
|
||||
$pee = preg_replace( '|</option>\s|', '</option>', $pee );
|
||||
$pee = preg_replace( '|\s*<option|', '<option', $pee );
|
||||
$pee = preg_replace( '|</option>\s*|', '</option>', $pee );
|
||||
}
|
||||
|
||||
if ( strpos( $pee, '</object>' ) !== false ) {
|
||||
|
|
Loading…
Reference in New Issue