Chris Shiflett has a post today, Allowing HTML and Preventing XSS. The problem is how to allow users to format their contributed content without introducing security vulnerabilities. The answer is usually some sort of markup language or filtering and sanitization of HTML.
BBCODE was designed for this purpose. There is no actual standard, [...]
The Problem with Markup Languages
March 14th, 2007Two preg_replace Escaping Gotchas
November 13th, 2005preg_replace is a workhorse PHP function, but it has a couple of escaping gotchas that can cause it to yield unexpected or undesirable results.
The Usability of Input Filtering
March 31st, 2005There seems to be much interest lately in input filtering in PHP, especially in cross site scripting prevention. I’ve always preferred input validation to input filtering, but I am giving filtering a new examination. My problem with filtering is with usability. The comments to this post are a good example. There [...]