PHPackages                             athoshun/html-filter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. athoshun/html-filter

AbandonedArchivedLibrary[Search &amp; Filtering](/categories/search)

athoshun/html-filter
====================

Remove tags or attributes based on a whitelist from a snippet of well-formatted HTML text using PHP's DOM library

v2.0.4(11y ago)2042.0k↓30%4[1 issues](https://github.com/attilammagyar/html-filter/issues)1BSDPHPPHP &gt;=5.3.0

Since Feb 2Pushed 11y ago3 watchersCompare

[ Source](https://github.com/attilammagyar/html-filter)[ Packagist](https://packagist.org/packages/athoshun/html-filter)[ Docs](https://github.com/attilammagyar/html-filter)[ RSS](/packages/athoshun-html-filter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (9)Used By (1)

HTMLFilter
==========

[](#htmlfilter)

[![Build Status](https://camo.githubusercontent.com/89ca29db8e6e0b02acef2044630b02088304fbfe8d067175cc72fba8d4380249/68747470733a2f2f7472617669732d63692e6f72672f617474696c616d6d61677961722f68746d6c2d66696c7465722e737667)](https://travis-ci.org/attilammagyar/html-filter) [Latest build report](http://attilammagyar.github.io/html-filter/)

Remove tags or attributes based on a whitelist from a snippet of somewhat well-formatted HTML text using PHP's DOM library.

Example:

```
