Revert [26050], stop trying to balance open HTML tags across nextpage and more tags for now.

see #6297.

Built from https://develop.svn.wordpress.org/trunk@26557


git-svn-id: http://core.svn.wordpress.org/trunk@26448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-12-03 17:08:10 +00:00
parent e46662b6ae
commit 98215089b9
1 changed files with 3 additions and 14 deletions

View File

@ -1237,21 +1237,10 @@ function convert_chars($content, $deprecated = '') {
*/
function balanceTags( $text, $force = false ) {
if ( $force || get_option('use_balanceTags') == 1 ) {
/**
* Filter the list of delimiters to be used before tags are balanced.
*
* @since 3.8.0
*
* @param array $delimiters An array of delimiters, e.g '<!--more.*?-->', '<!--nextpage-->'.
*/
$balance_tags_delimiters = apply_filters( 'balance_tags_delimiters', array( '<!--more.*?-->', '<!--nextpage-->' ) );
// Capture lets PREG_SPLIT_DELIM_CAPTURE return the delimiters
$delimiters_regex = '/(' . implode( '|', $balance_tags_delimiters ) . ')/';
$parts = preg_split( $delimiters_regex, $text, -1, PREG_SPLIT_DELIM_CAPTURE );
return implode( '', array_map( 'force_balance_tags', $parts ) );
return force_balance_tags( $text );
} else {
return $text;
}
return $text;
}
/**