开发者

Non-translated single quote

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()

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜