ivecommons.org/licenses/by-sa/2.5/ This code is a Java port of the original work in PHP by Cal Hendersen. http://code.iamcal.com/php/lib_filter/ The trickiest part of the translation was handling the differences in regex handling between PHP and Java. These resources were helpful in the process: http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html http://us2.php.net/manual/en/reference.pcre.pattern.modifiers.php http://www.regular-expressions.info/modifiers.html A note on naming conventions: instance variables are prefixed with a "v"; global constants are in all caps. Sample use: String input = ... String clean = new HTMLInputFilter().filter( input ); If you find bugs or have suggestions on improvement (especially regarding perfomance), please contact me at the email below. The latest version of this source can be found at http://josephoconnell.com/java/xss-html-filter/
@author Joseph O'Connell
@version 1.0
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.