faf0-addepar / antisamy

a library for performing fast, configurable cleansing of HTML coming from untrusted sources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

antisamy

A library for performing fast, configurable cleansing of HTML coming from untrusted sources.

Another way of saying that could be: It's an API that helps you make sure that clients don't supply malicious cargo code in the HTML they supply for their profile, comments, etc., that get persisted on the server. The term "malicious code" in regards to web applications usually mean "JavaScript." Mostly, Cascading Stylesheets are only considered malicious when they invoke the JavaScript. However, there are many situations where "normal" HTML and CSS can be used in a malicious manner.

How to Use

First, add the dependency from Maven:

<dependency>
   <groupId>org.owasp.antisamy</groupId>
   <projectId>antisamy</projectId>
</dependency>

How to Build

You can build and test from source pretty easily:

$ git clone https://github.com/nahsra/antisamy
$ cd antisamy
$ mvn package

About

a library for performing fast, configurable cleansing of HTML coming from untrusted sources


Languages

Language:DIGITAL Command Language 34.7%Language:HTML 30.9%Language:Java 15.2%Language:JavaScript 7.5%Language:CSS 6.4%Language:Shell 4.7%Language:Roff 0.6%Language:Hack 0.0%Language:ASP 0.0%