w3c 验证错误消息 - Facebook 小部件 [英] w3c Validation error message - Facebook widget
问题描述
我从 xml 文件中回显了一个 url
I echo a url from xml file
$mapurl = '"../villas-crete.php?adults='.$getadults.'&arrival='.$getarrival.'&departure='.$getdeparture.'&avail='.$getavail.'"';
echo '<a href='.$mapurl.'>» Crete</a>
'
;
当我验证页面时,我收到以下错误:
When I validate the page I get following errors:
第 3182 行,第 43 列:未定义一般实体到达"且无默认实体
Line 3182, Column 43: general entity "arrival" not defined and no default entity
…<a href="../villas-crete.php?adults=2&arrival=&departure=&avail=0">» Cre…
错误行 3182,第 50 列:对无法为其生成系统标识符的实体到达"的引用
Error Line 3182, Column 50: reference to entity "arrival" for which no system identifier could be generated
…ef="../villas-crete.php?adults=2&arrival=&departure=&avail=0">» Crete</a>
继续……
我也有 Facebook 小部件的错误
Also I have erors for Facebook widget
小部件是:
<script type="text/javascript">
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like-box" data-href="http://www.facebook.com/pages/..mypage" data-width="364" data-show-faces="true" data-stream="false" data-header="true"></div>
没有属性data-href"
there is no attribute "data-href"
<div class="fb-like-box" data-href="http://www.facebook.com/pages/
没有属性数据宽度"
…-" data-width="364" data-show-faces="true" data-stream…
推荐答案
我快速浏览了一下:http://validator.w3.org/docs/errors.html
25:通用实体 X 未定义且无默认实体
25: general entity X not defined and no default entity
这通常是由未定义的实体引用或在 URL 或正文中使用未编码的与符号 (&) 引起的级联错误.
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.
325:对无法为其生成系统标识符的实体 X 的引用
325: reference to entity X for which no system identifier could be generated
这通常是由未定义的实体引用或在 URL 或正文中使用未编码的与符号 (&) 引起的级联错误.
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.
也许可以尝试用 &
替换那些 & 符号,然后看看效果如何?
Perhaps try replacing those ampersands with &
and see how you get on?
编辑 facebook 问题:认为您需要一个支持 data-href 等的文档类型.请参阅:data-href 的 W3C 验证错误
Edit for facebook question: think you need a doctype that supports data-href etc. See: W3C validation error with data-href
这篇关于w3c 验证错误消息 - Facebook 小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!