diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index d596500330..9a34aebc08 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -42,6 +42,7 @@ add_filter('comment_url', 'clean_url'); add_filter('comment_text', 'convert_chars'); add_filter('comment_text', 'make_clickable'); +add_filter('comment_text', 'force_balance_tags', 25); add_filter('comment_text', 'wpautop', 30); add_filter('comment_text', 'convert_smilies', 20); diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 7d52ed9e6b..bb6ea45632 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -505,6 +505,9 @@ function balanceTags($text, $is_comment = 0, $force = false) { return $newtext; } +function force_balance_tags($text) { + return balanceTags($text, 0, true); +} function format_to_edit($content, $richedit = false) { $content = apply_filters('format_to_edit', $content);