nexuslinkservices / html-tag-purifier
v1.0.0
2016-09-17 12:15 UTC
Requires
- php: >=5.6.2
Requires (Dev)
- phpunit/phpunit: 5.5.*
This package is not auto-updated.
Last update: 2024-11-09 20:17:39 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.