Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/finn-no/xss-html-filter
- Owner: finn-no
- License: lgpl-3.0
- Archived: true
- Created: 2011-11-25T12:55:14.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2015-05-27T08:04:57.000Z (over 9 years ago)
- Last Synced: 2024-04-14T11:55:14.187Z (5 months ago)
- Language: Java
- Homepage: http://finn-no.github.com/xss-html-filter
- Size: 450 KB
- Stars: 118
- Watchers: 57
- Forks: 100
- Open Issues: 3
-
Metadata Files:
- Readme: README
- License: LICENSE.txt
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/