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&#63;cnid&#61;efcb9a458fb823ba877ef53b7162598f&#38;ldtype&#61;grid&#38;cl&#61;alist&#38;tpl&#61;&#38;fnc&#61;executefilter&#38;fname&#61;&#38;attrfilter&#91;3a5d1ca314a5205fa7b7b3baa5d2f94e&#93;&#91;2f143d22ce421269b5c7d01a160f6541&#93;&#61;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&#93;&#61;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. 

      

+3


source to share


1 answer


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&amp;ldtype=grid&amp;cl=alist&amp;tpl=&amp;fnc=executefilter&amp;fname=&amp;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").

+3


source







All Articles