Browse > Home /

| Subcribe via RSS

Hacking Kses

April 11th, 2008 | 4 Comments | Posted in Tutorials, development

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

As I spent a great deal of time (and hunting on the Internets) on this I thought I would share the result of my efforts and hopefully save your sanity and hairline.

kses is an HTML/XHTML filter written in PHP. It removes all unwanted HTML elements and attributes, and it also does several checks on attribute values. kses can be used to avoid Cross-Site Scripting (XSS).

It is built into WordPress and WordPress MU and acts on all the content you enter into your posts and pages and strips out all the nasties that WordPress doesn’t think you should be using. 99% of the time you won’t even notice that it is there, but everynow and then you will try to include something in your post and it just won’t save. In a round-a-bout way, this is the situation I found myself in earlier this week.

Try as I might, I just couldn’t get WordPress MU to accept style attributes (this is also the case for normal WordPress). Everytime I saved a post the style would be stripped out completely (MU also removes class and id attributes as well). Most annoying and after pulling out what little hair I had left I turned to the Oracle of all knowledge.

More »

Tags: , , , , ,

WordPress 2.5

March 29th, 2008 | 1 Comment | Posted in wordpress

Hi all
I’ve been busy beavering away behind the scenes on a few new plugins and websites which I hope to be announcing shortly. In the meantime, the WordPress team have announced the release of WordPress 2.5. They haven’t made a 2.5 tag for this release in their SVN repository yet, so those of us who are upgrading via SVN will need to use the Trunk for now (if you don’t know what this all means read here).

I’ve just installed the latest version on my development server, and can report that so far the latest version of MyDashboard looks to be working correctly. If anyone would like to write a “Right Now” dashboard gadget or work on a style to emulate the new WordPress dashboard then please let me know and I will look to include your work in a new release.

In the meantime, it’s back to the grindstone for me.

Tags: , , , ,