chars - PHP is there a built-in function to render ' as ’ etc -
Is there an underlying function to present characters as identifiers (& rsquo;)?
Also, is it unsafe to output raw characters (like ') to HTML?
Thank you.
Try htmlentities ()
:
< Code> HTMLentities ("'", ENT_QUOTES,' UTF-8 ', true);
Regarding your second question, yes (as a general rule).
To output user input / raw input you should always htmlspecialchars ()
at least.
Comments
Post a Comment