WordPress.org

Ready to get started?Download WordPress

Forums

How to disable KSES? (11 posts)

  1. dmd
    Member
    Posted 9 years ago #

    I just imported all my entries from MovableType, only to find that hundreds of entries look horrible because the HTML in them is blocked by KSES. Since I am the only user of this blog, and I do not allow commenters, I would like to simply turn off KSES entirely. I can't seem to find any explanation of how to do that. Help!

  2. Beel
    Member
    Posted 9 years ago #

    a search of the codex would have displayed a nicely written answer...

  3. Beel
    Member
    Posted 9 years ago #

    If you would like to override the $allowedtags variable in kses.php you may do so in your my-hacks.php file, provided you add the following code after you set up the $allowedtags array.

    define('CUSTOM_TAGS', true);

    You can also just uncomment the tags you want displayed in kses.php but the above will not be overwritten upon the next upgrade.

  4. dmd
    Member
    Posted 9 years ago #

    That's exactly the answer I got when I searched. I'm not looking for a way to add more allowed tags. I'm looking for a way to turn off KSES entirely - that is, have it not be looking for things to allow in the first place, but instead simply get out of the way and not be disallowing anything at all.

  5. Matt Mullenweg
    Troublemaker
    Posted 9 years ago #

    KSES has nothing to do with the content of your entries, it only effects comments. If you still want to disable it you can remove the filters using the remove_filter function.

  6. dmd
    Member
    Posted 9 years ago #

    Then why, when I paste, say, a Flickr badge into WordPress, does it escape all the HTML tags and add linebreak tags?

  7. dmd
    Member
    Posted 9 years ago #

    What I would like to do is be able to paste code - for instance, a Flickr badge ( http://www.flickr.com/badge_new.gne , if you have a Flickr account ) - into a post.

  8. Go to Options/Writing and deselect "WordPress should correct invalidly nested XHTML automatically".

  9. dmd
    Member
    Posted 9 years ago #

    That was already deselected.

  10. Well, when WordPress' lead developer says that it isn't KSES, you can be assured that it isn't KSES. As for what it is? If it's not WP's XHTML correction, then I don't know what it is.

  11. mstewart14
    Member
    Posted 8 years ago #

    dmd's problem stems from wpautop filtering on content. I too am in the middle of a migration from MT to WP and found this quite frustrating since the imported content looked right but the output was wrong. I found the "text-control" plugin and my life is much better, once installed choose "unformatted" for your default.

Topic Closed

This topic has been closed to new replies.

About this Topic