开发者

Are HTML entities necessary for anything besides escaping?

开发者 https://www.devze.com 2023-01-03 14:22 出处:网络
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 abo

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

精彩评论

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