Are HTML entities necessary for anything besides e

2019-05-26 12:24发布

问题:

Obviously < and > are necessary for escaping user input. But is there any reason to use, say, ™ instead of ™?

回答1:

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.



标签: html encoding