Force balanced tags in comments. Props Nazgul. fixes #2714

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@3964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-07-04 22:10:32 +00:00
parent 3c4edd4079
commit 7befc5a652
2 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,7 @@ add_filter('comment_url', 'clean_url');
add_filter('comment_text', 'convert_chars'); add_filter('comment_text', 'convert_chars');
add_filter('comment_text', 'make_clickable'); add_filter('comment_text', 'make_clickable');
add_filter('comment_text', 'force_balance_tags', 25);
add_filter('comment_text', 'wpautop', 30); add_filter('comment_text', 'wpautop', 30);
add_filter('comment_text', 'convert_smilies', 20); add_filter('comment_text', 'convert_smilies', 20);

View File

@ -501,6 +501,9 @@ function balanceTags($text, $is_comment = 0) {
return $newtext; return $newtext;
} }
function force_balance_tags($text) {
return balanceTags($text, 0, true);
}
function format_to_edit($content, $richedit = false) { function format_to_edit($content, $richedit = false) {
$content = apply_filters('format_to_edit', $content); $content = apply_filters('format_to_edit', $content);