HTML5 a href validation error (NFC)
I masked all special characters in the following url, but w3c-validator still throws an error. I have checked all the NFC tutorials but I don't know where the error is. Any idea?
Url
<a href="http://www.example.de/index.php?cnid=efcb9a458fb823ba877ef53b7162598f&ldtype=grid&cl=alist&tpl=&fnc=executefilter&fname=&attrfilter[3a5d1ca314a5205fa7b7b3baa5d2f94e][2f143d22ce421269b5c7d01a160f6541]=2f143d22ce421269b5c7d01a160f6541">Asche</a>
w3c error
Line 618, Column 441: Bad value http://www.example.de/index.php?cnid=efcb9a458fb823ba877ef53b7162598f&ldtype=grid&cl=alist&tpl=&fnc=executefilter&fname=&attrfilter[3a5d1ca314a5205fa7b7b3baa5d2f94e][2f143d22ce421269b5c7d01a160f6541]=2f143d22ce421269b5c7d01a160f6541 for attribute href on element a: Illegal character in query component.
β¦21269b5c7d01a160f6541]=2f143d22ce421269b5c7d01a160f6541">Asche</a></li>
IRI link syntax
Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.
source to share
The [
and characters ]
must be% -encoded in the URL, as %5B
and %5D
according to STD 66 (where Appendix A contains a syntax summary showing that the parentheses are "gen-delims" characters, which are not allowed in the query part except% - encoded).
You should have posted an HTML document as this works. The following test document (which verifies) contains the url you provide, correctly encoded:
<!doctype html>
<meta charset=utf-8>
<title></title>
<a href=
"http://www.example.de/index.php?cnid=efcb9a458fb823ba877ef53b7162598f&ldtype=grid&cl=alist&tpl=&fnc=executefilter&fname=&attrfilter%5B3a5d1ca314a5205fa7b7b3baa5d2f94e%5D%5B2f143d22ce421269b5c7d01a160f6541%5D=2f143d22ce421269b5c7d01a160f6541">foo</a>
Also, the url doesn't work; it prompts a "Multiple Choice" response, which is rather odd (such a message should be posted when the server is doing some content negotiation that does not find an acceptable alternative, and a list of alternatives should be presented, but there are more or less "Not Found").
source to share