IE8 is not rendering some of the HTML name entities

六月ゝ 毕业季﹏ 提交于 2019-12-07 12:01:26

问题


Some HTML name entities are not rendering in IE8 and instead I can see the not rendered HTML entity! For example ş or ı.

I found a solution to use HTML number entities such as ş instead of ş.

I was wondering if anyone knows about the reason of this issue and if there is a way to see ş or ı or similar entities correctly in IE8?

Here is my code on jsfiddle: (If you copy this code to a HTML file, it will not render in IE8)

http://jsfiddle.net/7uBrd/

<HTML lang="TR">
 <HEAD>
  <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> 
  <TITLE>test</TITLE>
 </HEAD>
 <BODY>
  <p>This is not working in IE8: afi&scedil;ler, e&scedil;yalar&inodot;, k&inodot; </p>
  <p> This is working: afi&;#351;ler, e&#351;yalar&#305;, k&#305; </p>    
  <p>This is Working as well: test&nbsp;test&ndash;</p>
 </BODY>
</HTML>

回答1:


Browser support for named HTML entities has always been worse than support for numeric entities. After all, the number is the Unicode code point for the character while the name requires manual update of a lookup table in the browser's source code. Those entities you mention are just not supported by Internet Explorer as of version 8 (or even version 9, no idea about 10).

You already have a workaround but I recommend that you just switch to UTF-8 and avoid entities completely (save for &amp; and other reasonable exceptions).




回答2:


The HTML4 specification does not contain the scedil entity. http://www.w3.org/TR/html4/sgml/entities.html

However, the HTML5 specification does. http://www.w3.org/TR/2011/WD-html5-20110113/named-character-references.html



来源:https://stackoverflow.com/questions/15207604/ie8-is-not-rendering-some-of-the-html-name-entities

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!