开发者

HTML5 "A numeric character reference expanded to the C1 controls range" error when using “

i have this html code:

<span class="comma_left">&#147;</span>

And

<span class="comma_right">&#148;</span>

As well, both representing left & right commas.

Strange thing though, HTML5 validation throws the error:

"A numeric character reference expanded to the C1 controls range."

I really don't want to just avoid this error, what can i 开发者_开发技巧do?


The C1 control range refers to characters mapped to byte encodings 0x80 to 0x9f (128 to 159) in Latin-1, or to Unicode code points U+0080 to U+009F. Unicode considers these to be "control characters", which are explicitly disallowed by the HTML5 parsing algorithm.

Your problem is occurring because you're using the Windows code page 1252 encodings of directed double-quote marks, which are incompatible with both Latin-1 and Unicode. You could try these compatible variants:

  • Left double-quote: &ldquo; or &#8220;
  • Right double-quote: &rdquo; or &#8221;


Try to change &#147; by &#8220; and &#148; by &#8221; it seen to be the same caracter and valid W3C.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜