nexuslinkservices / html-tag-purifier
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/nexuslinkservices/html-tag-purifier
Requires
- php: >=5.6.2
Requires (Dev)
- phpunit/phpunit: 5.5.*
This package is not auto-updated.
Last update: 2025-10-12 01:14:32 UTC
README
Remove specific html tags from content.
Installation
If you use composer, you can add this package by running
composer require galiteintechnologies/html-tag-purifier
Usage
<?php
use HtmlTagPurifier\HtmlTagFilter;
$htmlTagFilter = new HtmlTagFilter();
$content = "<p>Thanks for coming.</p><br/><p>I have a special plan for picnic</p>. <b>Super <i>Excited!!</i></b>";
$tags = array("i", "p");
$result = $htmlTagFilter->purify($content, $tags);
Output
Thanks for coming.<br/>I have a special plan for picnic. <b>Super Excited!!</b>
CONTRIBUTING:
Pull requests are always welcome.