Removing WordPress MU Post HTML/JavaScript filter

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 using a little hack in wordpress:

  1. Go to: wp-include
  2. open kses.php in an editor like notepad.
  3. 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.

2 thoughts on “Removing WordPress MU Post HTML/JavaScript filter”

  1. hello!This was a really quality Topics!

    I come from roma, I was fortunate to seek your theme in wordpress

    Also I learn much in your topic really thanks very much i will come later

Comments are closed.