Registry / serialization / antisamy

antisamy

JSON →
library1.7.8javamavenunverified

A library for fast, configurable cleansing of HTML from untrusted sources to prevent XSS attacks.

<dependency> <groupId>org.owasp.antisamy</groupId> <artifactId>antisamy</artifactId> <version>1.7.8</version> </dependency>
INSTALL
IMPORT
SIG · ANTISAMY
A
antisamy
serializationjavav1.7.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AntiSamy
org.owasp.antisamy.AntiSamy

Scans and cleanses HTML input using a policy file.

import org.owasp.antisamy.AntiSamy; import org.owasp.antisamy.Policy; import org.owasp.antisamy.ScanResults; AntiSamy as = new AntiSamy(); Policy policy = Policy.getInstance("antisamy.xml"); ScanResults results = as.scan("<script>alert('xss')</script>", policy); System.out.println(results.getCleanHTML());
Debug
Known issues
gotchaPolicy files must be properly configured; default policies may be too restrictive or permissive.
fix
Customize the policy file to match your application's requirements.
affects: *
Upgrade
Version history
1.7.8latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
24
OpenAI (training)
1
Resources
antisamy — mvn dependency:get antisamy · libregistry