W3C标记验证器&符号(&)错误 [英] w3c markup validator ampersand (&) error

查看:104
本文介绍了W3C标记验证器&符号(&)错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于URL中的& 存在的w3c验证错误,是否有任何解决方法?或者HTML标记中的其他位置?

它说:


&没有开始一个字符引用。 (&可能应该已被转义为& amp; 。)

我的情况中的&符号是gravatar缩略图的url的一部分。这是url的问题部分:


c91588793296e2?s = 50& d = http%3A%2F %



解决方案

签署你在你的例子中写了& amp; amp; amp; amp; amp; amp; amp; amp; amp $ amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; c91588793296e2?s = 50& d = http%3A%2F%


Is there any workaround for the w3c validation error for an & present in urls or some other place in HTML markup?
It says:

& did not start a character reference. (& probably should have been escaped as &.)

The ampersand in my case is a part of a url for gravatar thumbnail. This is the problematic part of a url:

c91588793296e2?s=50&d=http%3A%2F%.

解决方案

for each & sign you got write & in your example it would be:

c91588793296e2?s=50&d=http%3A%2F%

这篇关于W3C标记验证器&符号(&)错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆