如何在 achor 链接中编写 url,以免引发错误/警告 @ w3c 验证器
只是一个带有参数的简单链接
<a href="http://domainame.com/?bla=ble&bli=blo">hey!</a>
就会使 w3c 验证器跳转两个错误,一个用于等于 (=),一个用于 and (&)
Error Line 1, Column 43: reference to entity "bli" for which no system identifier could be generated
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.
Info Line 1, Column 39: entity was defined here
我如何编写它们并获得 0 个错误/警告?
just a simple link with parameters
<a href="http://domainame.com/?bla=ble&bli=blo">hey!</a>
would make the w3c validator jump two errors, one for the equeal (=) and one for the and (&)
Error Line 1, Column 43: reference to entity "bli" for which no system identifier could be generated
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.
Info Line 1, Column 39: entity was defined here
How can i write them and get 0 errors/warnings?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
等号不会引发错误。将
&
替换为&
,如下所示:The equal sign throws no errors. Replace the
&
with&
like so:我认为你只需要转义字符
例如
=
将是%3D
和&
将是&< /code>
在此处了解更多信息HTML url 编码
i think you just need to escape the characters
For example
=
will be%3D
and&
will be&
Read more here HTML url encoding