简体   繁体   English

替换为&和&W3C验证器仍然显示错误

[英]Replaced & with & W3C validator Still Showing Error

I'm trying to fix w3 validator based errors on my site but i'm shocked when i see this error 我正在尝试修复基于w3验证程序的网站上的错误,但看到此错误我感到震惊

Error: & did not start a character reference. 错误:&未启动字符引用。 (& probably should have been escaped as &.) (&可能应该以&amp ;.进行转义。)

I'm using & 我正在使用& as a replaced tag with & in site HTML. 作为在网站HTML中用&替换的标记。 So why w3c validator showing errors to replace & with & 那么,为什么w3c验证程序显示错误,用&替换& & because i already done it. 因为我已经做到了。

Can anyone help this issue ? 谁能解决这个问题?

Reference URL: https://validator.w3.org/nu/?doc=http%3A%2F%2Fwww.urgentfiles.com%2F 参考网址: https : //validator.w3.org/nu/?doc=http%3A%2F%2Fwww.urgentfiles.com%2F

It looks like you're probably using & unescaped in href attributes. 看来您可能在href属性中使用&转义。

Error: & did not start a character reference. 错误:&未启动字符引用。 (& probably should have been escaped as &.) (&可能应该以&进行转义。)

At line 1647, column 65 在第1647行的第65列

bel/Simulation?&max-results=6'

It's often overlooked, but & should also become & 它经常被忽略,但是&也应该成为& in all similar locations: 在所有类似的位置:

bel/Simulation?&max-results=6
<!-- becomes -->
bel/Simulation?&amp;max-results=6

In all of those validation errors (from number 6 to 49), the ampersand is not necessary because you are passing a unique parameter. 在所有这些验证错误(从6到49)中,由于您传递的是唯一参数,所以不需要&号。

<a href='//www.urgentfiles.com/search/label/Action?max-results=6'>
    Action
</a>

In cases with a URL containing two or more parameters, you need a double escape like &amp;amp; 如果网址包含两个或多个参数,则需要使用&amp;amp; to correct the issue. 纠正问题。 For example. 例如。

<a href='//www.urgentfiles.com/search/label/Action?max-results=6&amp;amp;other-param=demo'>
    Action
</a>

You need to change the URLs and the parameters too. 您还需要更改URL参数 Consider two examples: 考虑两个例子:

<link type='text/css' rel='stylesheet' href='https://www.blogger.com/dyn-css/authorization.css?targetBlogID=1668100655847438073&zx=0bb1bf52-b577-4cae-9e5b-60d9a3bd54cf' />

Should be replaced with: 应替换为:

<link type='text/css' rel='stylesheet' href='https://www.blogger.com/dyn-css/authorization.css?targetBlogID=1668100655847438073&amp;zx=0bb1bf52-b577-4cae-9e5b-60d9a3bd54cf' />

And the next series of ones: 接下来的一系列:

<li><a href='http://www.urgentfiles.com/search/label/Action?&max-results=6' title='Action'>Action</a></li>
<li><a href='http://www.urgentfiles.com/search/label/Adventure?&max-results=6' title='Adventure'>Adventure</a></li>

Should be: 应该:

<li><a href='http://www.urgentfiles.com/search/label/Action?&amp;max-results=6' title='Action'>Action</a></li>
<li><a href='http://www.urgentfiles.com/search/label/Adventure?&amp;max-results=6' title='Adventure'>Adventure</a></li>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM