From f4e3970ec1b3bff940c8862dca6dd38e306f5039 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Sat, 3 Jan 2004 23:48:16 +0000 Subject: [PATCH] Comment_allowed_tags fixup. git-svn-id: http://svn.automattic.com/wordpress/trunk@709 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-comments-popup.php | 2 +- wp-comments.php | 2 +- wp-includes/kses.php | 6 +++--- wp-includes/template-functions.php | 16 +++++++++++++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/wp-comments-popup.php b/wp-comments-popup.php index 2209aed35..89ae1b9bd 100644 --- a/wp-comments-popup.php +++ b/wp-comments-popup.php @@ -53,7 +53,7 @@ if (!empty($commentstatus->post_password) && $HTTP_COOKIE_VARS['wp-postpass_'.$c comment_status) { ?>

Leave a Comment

-

Line and paragraph breaks automatic, website trumps email, HTML allowed:

+

Line and paragraph breaks automatic, website trumps email, HTML allowed:

diff --git a/wp-comments.php b/wp-comments.php index cb8770d8c..4fbbaa32c 100644 --- a/wp-comments.php +++ b/wp-comments.php @@ -44,7 +44,7 @@

Leave a Comment

comment_status) { ?> -

Line and paragraph breaks automatic, website trumps email, HTML allowed:

+

Line and paragraph breaks automatic, website trumps email, HTML allowed:

diff --git a/wp-includes/kses.php b/wp-includes/kses.php index e0b0d9ee0..f9660a556 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -18,10 +18,10 @@ $allowedtags = array('b' => array(), 'abbr' => array('title'), 'em' => array(), 'strike' => array(), - 'a' => array('href' => array('minlen' => 6, 'maxlen' => 250), + 'a' => array('href', 'title', - 'rel' => array('minlen' => 3, 'maxlen' => 250)), - 'blockquote' => array('cite' => array()), + 'rel'), + 'blockquote' => array('cite'), 'del' => array('datetime'), 'br' => array()); diff --git a/wp-includes/template-functions.php b/wp-includes/template-functions.php index 33863f765..8ed4cfaac 100644 --- a/wp-includes/template-functions.php +++ b/wp-includes/template-functions.php @@ -1879,4 +1879,18 @@ function permalink_single_rss($file = '') { /***** // Permalink tags *****/ -?> +function allowed_tags() { + global $allowedtags; + foreach($allowedtags as $tag => $attributes) { + $allowed .= "<$tag"; + if (0 < count($attributes)) { + foreach ($attributes as $attribute) { + $allowed .= " $attribute=\"\""; + } + } + $allowed .= "> "; + } + return htmlentities($allowed); +} + +?> \ No newline at end of file