i am trying to covert HTML to entities using PHP, but i need to except <br> and <a> tags.
here's an example of my code
<?php
$string[0] = "<a href='http://hidd3n.tk'>Needs to stay</a> Filler text in between
<br><br> <script src='http://malicious.com/'></script> NEEDS to go";
$string[1] = htmlentities($string[0], ENT_QUOTES, "UTF-8");
?>