From 37745efcae4d24e53886ce1b80d665fdb2baff85 Mon Sep 17 00:00:00 2001 From: rob1n Date: Wed, 2 May 2007 04:26:57 +0000 Subject: [PATCH] Spring cleaning, extreme edition. git-svn-id: http://svn.automattic.com/wordpress/trunk@5374 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/kses.php | 190 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 152 insertions(+), 38 deletions(-) diff --git a/wp-includes/kses.php b/wp-includes/kses.php index 5a2e2ff391..fe7aa38212 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -20,66 +20,180 @@ if (!defined('CUSTOM_TAGS')) if (!CUSTOM_TAGS) { $allowedposttags = array( 'address' => array(), - 'a' => array('href' => array(), 'title' => array(), 'rel' => array(), 'rev' => array(), 'name' => array()), - 'abbr' => array('title' => array()), - 'acronym' => array('title' => array()), + 'a' => array( + 'href' => array(), 'title' => array(), + 'rel' => array(), 'rev' => array(), + 'name' => array() + ), + 'abbr' => array( + 'title' => array() + ), + 'acronym' => array( + 'title' => array() + ), 'b' => array(), 'big' => array(), - 'blockquote' => array('cite' => array()), + 'blockquote' => array( + 'cite' => array() + ), 'br' => array(), - 'button' => array('disabled' => array(), 'name' => array(), 'type' => array(), 'value' => array()), - 'caption' => array('align' => array()), + 'button' => array( + 'disabled' => array(), 'name' => array(), + 'type' => array(), 'value' => array() + ), + 'caption' => array( + 'align' => array() + ), 'code' => array(), - 'col' => array('align' => array(), 'char' => array(), 'charoff' => array(), 'span' => array(), 'valign' => array(), 'width' => array()), - 'del' => array('datetime' => array()), + 'col' => array( + 'align' => array(), 'char' => array(), + 'charoff' => array(), 'span' => array(), + 'valign' => array(), 'width' => array() + ), + 'del' => array( + 'datetime' => array() + ), 'dd' => array(), - 'div' => array('align' => array()), + 'div' => array( + 'align' => array() + ), 'dl' => array(), 'dt' => array(), 'em' => array(), 'fieldset' => array(), - 'font' => array('color' => array(), 'face' => array(), 'size' => array()), - 'form' => array('action' => array(), 'accept' => array(), 'accept-charset' => array(), 'enctype' => array(), 'method' => array(), 'name' => array(), 'target' => array()), - 'h1' => array('align' => array()), - 'h2' => array('align' => array()), - 'h3' => array('align' => array()), - 'h4' => array('align' => array()), - 'h5' => array('align' => array()), - 'h6' => array('align' => array()), - 'hr' => array('align' => array(), 'noshade' => array(), 'size' => array(), 'width' => array()), + 'font' => array( + 'color' => array(), 'face' => array(), + 'size' => array() + ), + 'form' => array( + 'action' => array(), 'accept' => array(), + 'accept-charset' => array(), 'enctype' => array(), + 'method' => array(), 'name' => array(), + 'target' => array() + ), + 'h1' => array( + 'align' => array() + ), + 'h2' => array( + 'align' => array() + ), + 'h3' => array( + 'align' => array() + ), + 'h4' => array( + 'align' => array() + ), + 'h5' => array( + 'align' => array() + ), + 'h6' => array( + 'align' => array() + ), + 'hr' => array( + 'align' => array(), 'noshade' => array(), + 'size' => array(), 'width' => array() + ), 'i' => array(), - 'img' => array('alt' => array(), 'align' => array(), 'border' => array(), 'height' => array(), 'hspace' => array(), 'longdesc' => array(), 'vspace' => array(), 'src' => array(), 'width' => array()), - 'ins' => array('datetime' => array(), 'cite' => array()), + 'img' => array( + 'alt' => array(), 'align' => array(), + 'border' => array(), 'height' => array(), + 'hspace' => array(), 'longdesc' => array(), + 'vspace' => array(), 'src' => array(), + 'width' => array() + ), + 'ins' => array( + 'datetime' => array(), 'cite' => array() + ), 'kbd' => array(), - 'label' => array('for' => array()), - 'legend' => array('align' => array()), + 'label' => array( + 'for' => array() + ), + 'legend' => array( + 'align' => array() + ), 'li' => array(), - 'p' => array('align' => array()), - 'pre' => array('width' => array()), - 'q' => array('cite' => array()), + 'p' => array( + 'align' => array() + ), + 'pre' => array( + 'width' => array() + ), + 'q' => array( + 'cite' => array() + ), 's' => array(), 'strike' => array(), 'strong' => array(), 'sub' => array(), 'sup' => array(), - 'table' => array('align' => array(), 'bgcolor' => array(), 'border' => array(), 'cellpadding' => array(), 'cellspacing' => array(), 'rules' => array(), 'summary' => array(), 'width' => array()), - 'tbody' => array('align' => array(), 'char' => array(), 'charoff' => array(), 'valign' => array()), - 'td' => array('abbr' => array(), 'align' => array(), 'axis' => array(), 'bgcolor' => array(), 'char' => array(), 'charoff' => array(), 'colspan' => array(), 'headers' => array(), 'height' => array(), 'nowrap' => array(), 'rowspan' => array(), 'scope' => array(), 'valign' => array(), 'width' => array()), - 'textarea' => array('cols' => array(), 'rows' => array(), 'disabled' => array(), 'name' => array(), 'readonly' => array()), - 'tfoot' => array('align' => array(), 'char' => array(), 'charoff' => array(), 'valign' => array()), - 'th' => array('abbr' => array(), 'align' => array(), 'axis' => array(), 'bgcolor' => array(), 'char' => array(), 'charoff' => array(), 'colspan' => array(), 'headers' => array(), 'height' => array(), 'nowrap' => array(), 'rowspan' => array(), 'scope' => array(), 'valign' => array(), 'width' => array()), - 'thead' => array('align' => array(), 'char' => array(), 'charoff' => array(), 'valign' => array()), + 'table' => array( + 'align' => array(), 'bgcolor' => array(), + 'border' => array(), 'cellpadding' => array(), + 'cellspacing' => array(), 'rules' => array(), + 'summary' => array(), 'width' => array() + ), + 'tbody' => array( + 'align' => array(), 'char' => array(), + 'charoff' => array(), 'valign' => array() + ), + 'td' => array( + 'abbr' => array(), 'align' => array(), + 'axis' => array(), 'bgcolor' => array(), + 'char' => array(), 'charoff' => array(), + 'colspan' => array(), 'headers' => array(), + 'height' => array(), 'nowrap' => array(), + 'rowspan' => array(), 'scope' => array(), + 'valign' => array(), 'width' => array() + ), + 'textarea' => array( + 'cols' => array(), 'rows' => array(), + 'disabled' => array(), 'name' => array(), + 'readonly' => array() + ), + 'tfoot' => array( + 'align' => array(), 'char' => array(), + 'charoff' => array(), 'valign' => array() + ), + 'th' => array( + 'abbr' => array(), 'align' => array(), + 'axis' => array(), 'bgcolor' => array(), + 'char' => array(), 'charoff' => array(), + 'colspan' => array(), 'headers' => array(), + 'height' => array(), 'nowrap' => array(), + 'rowspan' => array(), 'scope' => array(), + 'valign' => array(), 'width' => array() + ), + 'thead' => array( + 'align' => array(), 'char' => array(), + 'charoff' => array(), 'valign' => array() + ), 'title' => array(), - 'tr' => array('align' => array(), 'bgcolor' => array(), 'char' => array(), 'charoff' => array(), 'valign' => array()), - 'tt' => array(), 'u' => array(), 'ul' => array(), 'ol' => array(), 'var' => array() + 'tr' => array( + 'align' => array(), 'bgcolor' => array(), + 'char' => array(), 'charoff' => array(), + 'valign' => array() + ), + 'tt' => array(), + 'u' => array(), + 'ul' => array(), + 'ol' => array(), + 'var' => array() ); $allowedtags = array( - 'a' => array('href' => array(), 'title' => array()), - 'abbr' => array('title' => array()), - 'acronym' => array('title' => array()), + 'a' => array( + 'href' => array(), 'title' => array() + ), + 'abbr' => array( + 'title' => array() + ), + 'acronym' => array( + 'title' => array() + ), 'b' => array(), - 'blockquote' => array('cite' => array()), + 'blockquote' => array( + 'cite' => array() + ), // 'br' => array(), 'code' => array(), // 'del' => array('datetime' => array()),