summaryrefslogtreecommitdiffstats
path: root/wp-includes/wpmu-functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-03-27 11:36:31 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-03-27 11:36:31 +0000
commitf650f48c048bfbbb2ae702b6425d87e39358d748 (patch)
treea5f20c6f3697640968245ac5001ee84e8e4cf92c /wp-includes/wpmu-functions.php
parent7cb97c7fc538ee0564e80e3adf1ddf40e28aca26 (diff)
downloadwordpress-mu-f650f48c048bfbbb2ae702b6425d87e39358d748.tar.gz
wordpress-mu-f650f48c048bfbbb2ae702b6425d87e39358d748.tar.xz
wordpress-mu-f650f48c048bfbbb2ae702b6425d87e39358d748.zip
Strip class and id from html tags in kses
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1217 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/wpmu-functions.php')
-rw-r--r--wp-includes/wpmu-functions.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index 2c3f481..32900a7 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -1899,4 +1899,17 @@ function upload_is_file_too_big( $upload ) {
return $upload;
}
add_filter( "wp_upload_bits", "upload_is_file_too_big" );
+
+function wordpressmu_kses( $tags ) {
+ foreach( $tags as $tag => $attr ) {
+ if( is_array( $attr[ 'class' ] ) )
+ unset( $attr[ 'class' ] );
+ if( is_array( $attr[ 'id' ] ) )
+ unset( $attr[ 'id' ] );
+ $tags[ $tag ] = $attr;
+ }
+ return $tags;
+}
+add_filter( 'edit_allowedtags', 'wordpressmu_kses' );
+add_filter( 'edit_allowedposttags', 'wordpressmu_kses' );
?>