Title: remove kses filter
Last modified: August 18, 2016

---

# remove kses filter

 *  [Marco Buttarini](https://wordpress.org/support/users/webgrafia/)
 * (@webgrafia)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/remove-kses-filter/)
 * Is there a way to remove kses filter via plugin, without hacking code?
 * I tryed
    remove_filter(‘content_save_pre’, ‘wp_filter_post_kses’);
 * But it’s not working, and wp_filter_post_kses is still called
 * I also tryed to use
 * add_action(‘init’,’kses_remove_filters’);
 * But nothing happened.
 * I need to extend allowed protocols, but the call at wp_kses (inside wp_filter_post_kses)
   use the original array ($allowed_protocols) that is not global, so to do that
   I was tryng to override the original call.
 * Also a way to extend $allowed_protocols is a solution for me..
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [alpha2zee](https://wordpress.org/support/users/alpha2zee/)
 * (@alpha2zee)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/remove-kses-filter/#post-619624)
 * Try using [htmLawed](http://bioinformatics.org/phplabware/internal_utilities/htmLawed),
   a highly modified version of the kses filter with many extra features.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [18 years, 3 months ago](https://wordpress.org/support/topic/remove-kses-filter/#post-619663)
 * remove_filter would work, if you called it in the right place. kses is not turned
   on until the init filter.
 * Anyway, this should work. The key is to delay it until after the init action 
   hook enables kses.
 *     ```
       function disable_kses_content() {
       remove_filter('content_save_pre', 'wp_filter_post_kses');
       }
       add_action('init','disable_kses_content',20);
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘remove kses filter’ is closed to new replies.

 * 2 replies
 * 3 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [18 years, 3 months ago](https://wordpress.org/support/topic/remove-kses-filter/#post-619663)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
