Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/finn-no/xss-html-filter

Open Sourced HTML filtering utility for Java. Used to parse user-submitted input and sanitize it against potential cross site scripting attacks, malicious html, or simply badly formed html.
https://github.com/finn-no/xss-html-filter

Last synced: about 2 months ago
JSON representation

Open Sourced HTML filtering utility for Java. Used to parse user-submitted input and sanitize it against potential cross site scripting attacks, malicious html, or simply badly formed html.

Awesome Lists containing this project

README

        

Open Sourced HTML filtering utility for Java

Front page: http://finn-no.github.com/xss-html-filter

This utility is a single class, HTMLFilter, which can be used to parse user-submitted input and sanitize it against potential cross site scripting attacks, malicious html, or simply badly formed html. This version, written in Java, is largely a translation of
lib_filter ( http://code.iamcal.com/php/lib_filter/ ), the original work of Cal Henderson ( http://www.iamcal.com/ ) written in PHP.

Processing HTML Input

Sample usage:

// retrieve input from user...
String input = ...
String clean = new HTMLInputFilter().filter( input );

There's also an example using constretto: https://github.com/finn-no/xss-html-filter/wiki/Using-Constretto

Building with maven

To include xss-html-filter into a maven built project add the following to your pom.xml (in the corresponding sections)


net.sf.xss-html-filter
xss-html-filter
1.5


xss-html-filter releases
xss-html-filter Releases Repository
http://xss-html-filter.sf.net/releases/