Hi,
How it is possible to allow <br />
in strip_tags() or any way I can get around to it?
<?php
$text = '<p>Test <br />paragraph.</p><!-- Comment --> <a href="#fragment">Other text</a>';
echo strip_tags($text);
echo "\n";
// Allow <p>, <a>, <br />
echo strip_tags($text, '<p><a><br />');
echo "\n";
// Allow <br /> only
echo strip_tags($text, '<br />');
?>
result:
Test paragraph. Other text
<p>Test paragraph.</p> <a href="#fragment">Other text</a>
Test paragraph. Other text
Thanks, Lau