Extend KSES

v 2.3

This plugin extends the HTML functionality of the WordPress kses.php file, which states the allowable HTML that the post/page content editor will accept. It allows the site administrator to optionally enable support for currently disallowed HTML tags. Those tags include: object, embed, param, iframe and map. We also added additional support to the div and img tags.

Keep in mind, that by allowing a tag, you are making it acceptable to post said HTML and save it. If your users contribute to your blog, it is important that you make sure you are not enabling any HTML that could be malicious, wreaking havoc to your environment. If there is a tag that is missing or that you would like us to add and support, please drop us a note.

Installation:

  1. Upload extend-kses to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Check the boxes next to the HTML tag you wish to enable and click save options
  4. Paste HTML code into the HTML version – NOT the visual version – of the post/page editor and save.

Change Log:

v2.3

  • Adding support for additional image map tags.

v2.2

  • Adding support for Google Syntax Highlighter using the ‘pre’ tag.

9 Responses to “Extend KSES”

  1. Jason Miller says:

    Hi, we are running WPMU 3.01 and when a normal site user tries to insert an image map the area tags are removed. We are able to correct this by adding the area tag with attributes shape, coords, href, target, alt, id to the $allowedposttags and $allowedtags array within the get_option(‘allow_kses_map’) around Line 339. Would you consider including this in your next update. Thank You

    Report this comment

  2. [...] I have found that the plugin Extend KSES works a whole lot [...]

    Report this comment

  3. Ralf says:

    Hi – in order to get work the “Google Syntax Highlighter for WordPress” we have to change the kses.php after every update of WordPress. The ‘pre’ array has to be extended to include the attributes ‘name’, ‘class’ and ‘lang’ (see http://wordpress.org/support/topic/276152). It would be a pleasure if your plugin would support ‘pre’ tag too. Thanks in advance.

    Report this comment

    • Todd Stowell says:

      @Ralf – I have just checked in version 2.2 to WordPress. Once it shows, it will have support for Google Syntax Highlighter.

  4. Kevin Cooke says:

    We’re running wpmu version 2.8.6 — sorry for the delay in replying!

    Report this comment

  5. Kevin Cooke says:

    Hi – I tried the plugin but it did not behave as expected in our WPMU installation. Users still saw their IFRAME tags disappear even after activation and configuration. I had modified our kses include to allow other tags — could that be the issue?

    Report this comment

    • Todd Stowell says:

      @Kevin Cooke – What version of WPMU are you currently running? I haven’t seen / experienced an issue with a custom kses.php file and the plugin conflicting, but we’re always looking for additional tags to add for greater support. If we’re missing some tags that you frequently use, feel free to let us know what they are. We’d love to add them. If you can also send along an example of the iframe code you’re using, perhaps we are missing one of the values that is set, which if so, will certainly kill off the iframe tag completely.

Leave a Reply

Want to receive announcements about the latest plugin releases? Sign up for our email newsletter: