I have a strange problem: htmlspecialchars(with ENT_QUOTES) and mysql_real_escape_string functions aren't translating sin开发者_如何学运维gle quote in i've
(and some others words), all others are translated, what is the reason of that result?
It may be that what you think is a normal quote (', or HTML '
) is actually a curly apostrophe (’, or HTML ’
). This will not be transformed by htmlspecialchars
(nor mysql_real_escape_string
, as it is not a valid quote for MySQL). htmlentities
should escape this.
If you want escaping use htmlentities()
精彩评论