mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-09 15:28:40 +00:00
Standards compliant HTML filter written in PHP.
http://htmlpurifier.org
1db36fb09d
* Define HTMLPurifier_Lexer::$_entity_parser property This fixes a PHP 8.2 deprecation. * Define HTMLPurifier_URIFilterHarness::$filter property This fixes a PHP 8.2 deprecation. * Define HTMLPurifier_AttrTransform_NameSync::$idDef property This fixes a PHP 8.2 deprecation. * Define HTMLPurifier_AttrTransform_NameSyncTest::$accumulator property This fixes a PHP 8.2 deprecation. * Define HTMLPurifier_AttrValidator_ErrorsTest::$language property This fixes a PHP 8.2 deprecation. * Define HTMLPurifier_ChildDef_List::$whitespace property This fixes a PHP 8.2 deprecation. * Do not modify incoming tokens in RemoveSpansWithoutAttributes Previously the undefined property `->markForDeletion` was added to the incoming tokens. This causes a deprecation in PHP 8.2. Fix this by storing to-be-deleted tokens inside SplObjectStorage. In PHP 8 a WeakMap would be preferable, as that prevents leaks if `handleEnd` is never called for the token. |
||
---|---|---|
.github/workflows | ||
art | ||
benchmarks | ||
configdoc | ||
docs | ||
extras | ||
library | ||
maintenance | ||
plugins | ||
smoketests | ||
tests | ||
.gitattributes | ||
.gitignore | ||
composer.json | ||
CREDITS | ||
Doxyfile | ||
INSTALL | ||
INSTALL.fr.utf8 | ||
LICENSE | ||
NEWS | ||
package.php | ||
phpdoc.ini | ||
README.md | ||
test-settings.sample.php | ||
test-settings.travis.php | ||
TODO | ||
update-for-release | ||
VERSION | ||
WHATSNEW | ||
WYSIWYG |
HTML Purifier
HTML Purifier is an HTML filtering solution that uses a unique combination of robust whitelists and aggressive parsing to ensure that not only are XSS attacks thwarted, but the resulting HTML is standards compliant.
HTML Purifier is oriented towards richly formatted documents from untrusted sources that require CSS and a full tag-set. This library can be configured to accept a more restrictive set of tags, but it won't be as efficient as more bare-bones parsers. It will, however, do the job right, which may be more important.
Places to go:
- See INSTALL for a quick installation guide
- See docs/ for developer-oriented documentation, code examples and an in-depth installation guide.
- See WYSIWYG for information on editors like TinyMCE and FCKeditor
HTML Purifier can be found on the web at: http://htmlpurifier.org/
Installation
Package available on Composer.
If you're using Composer to manage dependencies, you can use
$ composer require ezyang/htmlpurifier