The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

A modified KSES (kses.php) with bug-fixes and extra features (6 posts)

  1. alpha2zee
    Posted 9 years ago #

    A modified version of the kses filter is available at Sourceforge.net -- http://sourceforge.net/tracker/index.php?func=detail&aid=1752954&group_id=81853&atid=564260

    WordPress developers should think of using that code.

    Bug-fixes (compared to oirignal kses 0.2.2):

    * Lone < characters are taken care of

    * Takes care of single-tag elements like img and br that do not have a space before their closing tag (e.g., <hr/>)

    * Output is more XHTML standard-compliant. E.g., attributes are declared only once, tags and attributes are lowercased, check for named XHTML entities, etc.

    Extra features

    * Inline styling is now possible. Earlier, CSS declarations like background-color: yellow were removed because of the so-called 'colon bug.'

    * Option to balance tags for well-formedness of (X)HTML

    * Option to 'entitify' unallowed tags instead of removing them. The original kses always strips them.

    (A test.php script is in the download and it shows many test-results.)

  2. Chris_K
    Posted 9 years ago #

    I wonder if that's something you might add a trac ticket about?

  3. alpha2zee
    Posted 9 years ago #

    I have added a trac ticket.

  4. ladynada
    Posted 9 years ago #

    any news?


  5. alpha2zee
    Posted 8 years ago #

    This modified kses has evolved into the htmLawed HTML filter / purifier.

  6. imagiscapeca
    Posted 8 years ago #

    I want these features combined with WP-SuperEdit and SexyComments so users can click buttons, not have to type in the allowed code.
    e.g. img src="" alt="" /
    e.g. style="background-color:#ccbbaa;"

    Is that coming?

Topic Closed

This topic has been closed to new replies.

About this Topic