mdi*_*n18 5 html w3c-validation
href我得到了元素上属性的错误值a:查询中的非法字符:不是带有以下a标记的 W3C 上的 URL 代码点:
<a href="/edit_booking.php?requestID=84&moduleID=109&no_rooms=2&parks=Central,East&rooms=1,39&weeks=1,3,5,7,9,11,13,15&day=1&semester=1&start_time=09:00&end_time=10:00&length=1&students=100&type=Lecture&Priority=N&metaID=&comments=Crappy Booking&status=1&round=1&date_submitted=2015-02-16 05:01:17&year=2015/2016&" title="This is a link edit the booking"><i class="fa fa-edit"></i></a>
Run Code Online (Sandbox Code Playgroud)
该链接是由 PHP 生成的;现在,如果不允许使用逗号,我可以进行替换,但我不确定是否允许使用这种格式。
有什么东西我错过了,因为它对我来说看起来不错吗?
查询字符串中的空格导致了错误。在您的示例中,它们出现在两个位置:comments=Crappy Booking和date_submitted=2015-02-16 05:01:17。
%20按照验证器的建议,将空格 URL 编码为,允许您的标记进行验证:
<a href="/edit_booking.php? ... &comments=Crappy%20Booking&status=1&round=1&date_submitted=2015-02-16%2005:01:17&year=2015/2016&" title="This is a link edit the booking"><i class="fa fa-edit"></i></a>
Run Code Online (Sandbox Code Playgroud)