PHP Package: ezyang/htmlpurifier

HTMLPurifier is a popular PHP library for sanitizing and cleaning HTML input to prevent XSS attacks and ensure secure output. It offers comprehensive filtering and customization options, making it a top choice for developers focusing on web security.

Current Version: 4.18.0
Last Updated: 2024-11-01
PHP Requirement: ~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0
Dependencies:
ezyang/htmlpurifier-dependency1
ezyang/htmlpurifier-dependency2
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

HTMLPurifier is a robust PHP library designed to sanitize and filter HTML content, ensuring that user-generated input is safe from malicious scripts and vulnerabilities. With a wide range of configuration settings and filters, HTMLPurifier provides a reliable solution for maintaining clean and secure HTML output in web applications. Whether you're building a blog, forum, or any web platform that deals with user input, HTMLPurifier helps you enforce strict standards and protect your website from potential security threats.

🔗 View on GitHub

Download Latest Version: 4.18.0

Download Download v4.18.0

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/ezyang/htmlpurifier/4.18.0/loader.php';
require_once 'libs/ezyang/htmlpurifier-dependency1/{lib_version}/loader.php';
require_once 'libs/ezyang/htmlpurifier-dependency2/{lib_version}/loader.php';

use HTMLPurifier\HTMLPurifier;
use HTMLPurifier\Config;

$obj = new HTMLPurifier();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.