Created
December 11, 2009 16:09
-
-
Save padraic/254299 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'Zend/Filter/StripTags.php'; | |
$source = <<<string | |
<img src=http://www.example.com/image.png></img> | |
string; | |
$filter = new Zend_Filter_StripTags; | |
$allowed = array( | |
'img'=>array('src') | |
); | |
$filter->setTagsAllowed($allowed); | |
$out = $filter->filter($source); // <img></img> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment