Div balance across more. Props skeltoac. fixes #2348

git-svn-id: https://develop.svn.wordpress.org/trunk@3751 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-04-25 08:46:19 +00:00
parent aa850594af
commit d983d337d4
2 changed files with 4 additions and 4 deletions

View File

@ -404,9 +404,9 @@ function funky_javascript_fix($text) {
Added Cleaning Hooks Added Cleaning Hooks
1.0 First Version 1.0 First Version
*/ */
function balanceTags($text, $is_comment = 0) { function balanceTags($text, $is_comment = 0, $force = false) {
if ( get_option('use_balanceTags') == 0) if ( !$force && get_option('use_balanceTags') == 0 )
return $text; return $text;
$tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = ''; $tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = '';

View File

@ -83,7 +83,7 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
$content = $pages[$page-1]; $content = $pages[$page-1];
$content = explode('<!--more-->', $content, 2); $content = explode('<!--more-->', $content, 2);
if ( (preg_match('/<!--noteaser-->/', $post->post_content) && ((!$multipage) || ($page==1))) ) if ( (false !== strpos($post->post_content, '<!--noteaser-->') && ((!$multipage) || ($page==1))) )
$stripteaser = 1; $stripteaser = 1;
$teaser = $content[0]; $teaser = $content[0];
if ( ($more) && ($stripteaser) ) if ( ($more) && ($stripteaser) )
@ -93,7 +93,7 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
if ( $more ) if ( $more )
$output .= '<a id="more-'.$id.'"></a>'.$content[1]; $output .= '<a id="more-'.$id.'"></a>'.$content[1];
else else
$output .= ' <a href="'. get_permalink() . "#more-$id\">$more_link_text</a>"; $output = balanceTags($output . ' <a href="'. get_permalink() . "#more-$id\">$more_link_text</a>");
} }
if ( $preview ) // preview fix for javascript bug with foreign languages if ( $preview ) // preview fix for javascript bug with foreign languages
$output = preg_replace('/\%u([0-9A-F]{4,4})/e', "'&#'.base_convert('\\1',16,10).';'", $output); $output = preg_replace('/\%u([0-9A-F]{4,4})/e', "'&#'.base_convert('\\1',16,10).';'", $output);