diff --git a/wp-includes/functions-formatting.php b/wp-includes/functions-formatting.php
index 8b4f9da1eb..72d0971f4f 100644
--- a/wp-includes/functions-formatting.php
+++ b/wp-includes/functions-formatting.php
@@ -404,9 +404,9 @@ function funky_javascript_fix($text) {
Added Cleaning Hooks
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;
$tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = '';
diff --git a/wp-includes/template-functions-post.php b/wp-includes/template-functions-post.php
index 461d6e551b..40e3b325f4 100644
--- a/wp-includes/template-functions-post.php
+++ b/wp-includes/template-functions-post.php
@@ -83,7 +83,7 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
$content = $pages[$page-1];
$content = explode('', $content, 2);
- if ( (preg_match('//', $post->post_content) && ((!$multipage) || ($page==1))) )
+ if ( (false !== strpos($post->post_content, '') && ((!$multipage) || ($page==1))) )
$stripteaser = 1;
$teaser = $content[0];
if ( ($more) && ($stripteaser) )
@@ -93,7 +93,7 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
if ( $more )
$output .= ''.$content[1];
else
- $output .= ' $more_link_text";
+ $output = balanceTags($output . ' $more_link_text");
}
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);