How to use PHP html_entity_decode()with exception for numeric HTML objects 60 and 62?
My code currently looks something like this:
$t = mysqli_real_escape_string($db,html_entity_decode($_POST['title'],ENT_COMPAT,'UTF-8'));
However, if I have ones that are encoded to be displayed as templates in the content (just like you show the ampersand directly to the client), they also become encoded, and this leads to HTML distortion. So I need to make some kind of exception, although I'm not sure how to do it; replacing a string with a temporary placeholder? I am sure there is a better way.
source
share