Takes third-party HTML and produces HTML that is safe to embed in your web application. Fast and easy to configure.
Browse cluster: Static Analysis & Code Quality →The OWASP Java HTML Sanitizer is a fast and configurable Java library that sanitizes third-party HTML to make it safe for embedding in web applications while protecting against cross-site scripting (XSS) attacks. Built in Java with a minimal compile-time dependency on JSR 305 for annotations, the project provides prepackaged policies for common use cases as well as a flexible policy builder API that allows developers to define custom sanitization rules at the element and attribute levels. The code was developed with security best practices in mind, includes an extensive test suite, and has undergone adversarial security review. The project is maintained under the Apache 2.0 License and welcomes community contributions through issue reports and pull requests.