htmlspecialchars - Why htmlspecialchars_decode in PHP does not have the charset parameter as in its counterpart? -
htmlspecialchars has charset parameters but not in decode version. Compared to similar value, both encode and decoded functions have charset parameters. So I can not choose which color I am decoding back to?
htmlspecialchars ()
requires charset parameter when the pigment is changed The special characters that do are not in the 'default' position, hence ISO-8859-1, ISO-8859-15, UTF-8, CP 866, CP1251, CP1252 and KoI8-R do not require charset parameters. is.
htmlspecialchars_decode ()
entities ( & amp; amp; amp; quot; & amp; 039; & amp; lift; & gt; < / Code>) changes in the equivalent form of their character and therefore there is no need to pass the pigment.
As htmlentities ()
transforms 'all' characters in its equal unit, charset can be passed in html_entity_decode ()
To ensure that the related characters are decoded in the charsets, the bodies are decoded.
Comments
Post a Comment