Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 9, 2024 via composer

ezyang/htmlpurifier v4.17.0

Standards compliant HTML filter written in PHP
Package summary
Share
1
issue
1
moderate severity
license
1
1
license
1
LGPL-2.1-or-later
Package created
16 Mar 2012
Version published
17 Nov 2023
Maintainers
2
Total deps
1
Direct deps
0
License
LGPL-2.1-or-later

Issues

1

1 moderate severity issue

moderate
Recommendation: Validate that the package complies with your license policy
via: ezyang/htmlpurifier@v4.17.0
Collapse
Expand

Licenses

GNU Lesser General Public License v2.1 or later

Weakly Protective
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
Cannot
Must
1 Packages, Including:
ezyang/htmlpurifier@v4.17.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of ezyang/htmlpurifier 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does ezyang/htmlpurifier do?

The ezyang/htmlpurifier is a comprehensive filtering solution that assures standards-compliant HTML code. By leveraging an optimal blend of stringent whitelists and aggressive parsing, the purifier effectively counteracts Cross-Site Scripting (XSS) attacks while guaranteeing standards-compliant resultant HTML. Created primarily for richly-designed documents from dubious sources that need CSS and an extensive tag set, it offers customizable configurations for accepting a narrower tag set, while adhering steadfastly to delivering flawless results.

How do you use ezyang/htmlpurifier?

Utilizing the ezyang/htmlpurifier is straightforward thanks to its compatibility with Composer, a tool for dependency management in PHP. You need to install Composer, then simply run the command $ composer require ezyang/htmlpurifier in your terminal. This action automatically installs the HTML Purifier package into your project, thus enabling you to use it as per your requirements. For example, you may use it in your PHP code like so:

require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php';

$config = HTMLPurifier_Config::createDefault();
$purifier = new HTMLPurifier($config);
$clean_html = $purifier->purify($dirty_html);

In this case, $dirty_html is the unfiltered user-submitted content that you want to clean.

Where are the ezyang/htmlpurifier docs?

The ezyang/htmlpurifier documentation is primarily located in the docs/ directory of the project repository on GitHub. It offers developer-oriented documentation, code examples, and a detailed installation guide. For contributors and users who prefer web-based accessibility, an online version of the documentation and additional resources are maintained on the package's official website. For specifics regarding the implementation of the purifier with WYSIWYG editors like TinyMCE and FCKeditor, refer to the WYSIWYG documentation in the repository.