WordPress.org

Support

Support » Requests and Feedback » A modified KSES (kses.php) with bug-fixes and extra features

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

  • alpha2zee
    Member

    @alpha2zee

    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.)

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘A modified KSES (kses.php) with bug-fixes and extra features’ is closed to new replies.