I have a string that might look like this
$str = "<p>Me & Mrs Jones <br /> live in <strong style="color:#FFF;">España</strong></p>";
htmlentities($str,ENT_COMPAT,'UTF-8',false);
How can I convert the text to HTML entities without converting the HTML tags?
note: I need to keep the HTML intact