Bugzilla – Bug 943
Bad value when validating mailto href tag - Illegal character in query component
Last modified: 2012-10-01 21:41:14 CEST
I am using http://validator.nu/ to check the following web page: http://origin.opc.ncep.noaa.gov/opc_mobile_cj.php I get this error message: Bad value mailto:ncep.list.opc_web@noaa.gov?subject=[OPC%20mobile%20feedback] for attribute href on element a: Illegal character in query component. The validator fails on this exact HTML syntax: Feedback: <a href="mailto:ncep.list.opc_web@noaa.gov?subject=[OPC%20mobile%20feedback]">ncep.list.opc_web@noaa.gov</a><br> However, if I remove the bracket characters [ and ] in that syntax so that the HTML is now the following: Feedback: <a href="mailto:ncep.list.opc_web@noaa.gov?subject=OPC%20mobile%20feedback">ncep.list.opc_web@noaa.gov</a><br> then the validator does not report errors. It appears that a special character such as a bracket or a parenthesis before the quote in the closing a href tag is causing the validator to report an incorrect error. I believe the existence of the bracket characters should not cause the validator to fail. Thank you for making this tool available. Regards, Christopher Juckins
The IRI spec requires [ and ] to be percent-escaped. See the BNF in http://tools.ietf.org/html/rfc3987
Thank you for letting me know; I made the change and now it validates.