diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-03-27 11:36:31 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-03-27 11:36:31 +0000 |
commit | f650f48c048bfbbb2ae702b6425d87e39358d748 (patch) | |
tree | a5f20c6f3697640968245ac5001ee84e8e4cf92c /wp-includes/wpmu-functions.php | |
parent | 7cb97c7fc538ee0564e80e3adf1ddf40e28aca26 (diff) | |
download | wordpress-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.php | 13 |
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' ); ?> |