a search of the codex would have displayed a nicely written answer…
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.
Thread Starter
dmd
(@dmd)
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.
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.
Thread Starter
dmd
(@dmd)
Then why, when I paste, say, a Flickr badge into WordPress, does it escape all the HTML tags and add linebreak tags?
Thread Starter
dmd
(@dmd)
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.
Go to Options/Writing and deselect “WordPress should correct invalidly nested XHTML automatically”.
Thread Starter
dmd
(@dmd)
That was already deselected.
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.
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.