Removing WPMu (WordPress MU) Post HTML/JavaScript filter
January 4, 2009 in Blogging, Tutorials by Deepanshu Goel
Today, I spend almost 3 hours to find out a way to remove boring WPMU(Wordpress Multi Users)’s post html tags filtering. I love the javascripts coz of their functionality and that’s why I used them many times in my previous WordPress install but since shifting to WordPress multiuser, I have been missing javascripts.
I searched a lot on net, only few info was helpful. The official “how to use Javascript” suggest to install “text-control plugin” and then turn off rich editor, its totally useless in WPMU. I found a lot of people asking help on how to:
- enable JavaScript for WordPress MU post;
- remove WordPress MU HTML filter; or
- enable advanced HTML tags and attributes, like embedded object, flash, video, etc?
Finally I got a simple solution from somewhere by hack some code:
- Go to: wp-include
- open kses.php in an editor like notepad.
- go to around line 742 and simply do the following commenting out:
function kses_init_filters() {
// Normal filtering.
add_filter(’pre_comment_content’, ‘wp_filter_kses’);
add_filter(’title_save_pre’, ‘wp_filter_kses’);
// Post filtering
// add_filter(’content_save_pre’, ‘wp_filter_post_kses’);
// add_filter(’excerpt_save_pre’, ‘wp_filter_post_kses’);
// add_filter(’content_filtered_save_pre’, ‘wp_filter_post_kses’);
}
This solution will allow you to only stop filtering of the POST, but the comments will still get filtered out.









