开发者

Are HTML entities necessary for anything besides escaping?

Obviously &开发者_如何学Go;lt; and > are necessary for escaping user input. But is there any reason to use, say, ™ instead of ™?


No. This is usually a product of people confused about either encoding or their OS's input methods. If you use a modern encoding (e.g. UTF-8) and learn how to type special characters, you'll very rarely have to go beyond <, >, and &. For instance, with the Compose key, entering ™ usually requires just Compose-t-m.

See my previous answer on this.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜