validator icon indicating copy to clipboard operation
validator copied to clipboard

Mistake in "Illegal character in scheme" validation error

Open jribbens opened this issue 4 years ago • 3 comments

URL being validated or code to reproduce error:

<a href="tel: 12345">tel</a>
Error: Bad value tel: 12345 for attribute href on element a: Illegal character in scheme data: space is not allowed.

I do not think it is not wrong that an error is produced, however it is wrong that the error message mentions the data: scheme as no URLs of this scheme are involved.

jribbens avatar Jul 26 '21 11:07 jribbens

Thanks for raising this. I agree the error message is a bit confusing — but the message doesn’t say “data: scheme” and it’s not about the scheme. It says “scheme data” — with a colon after it — and that means “the data associated with the given scheme”. The scheme in this case is the tel: scheme, and the data the error message refers to is the data “ 12345”.

sideshowbarker avatar Jul 26 '21 11:07 sideshowbarker

Oh wow. Yes that is spectacularly confusing ;-)

jribbens avatar Jul 26 '21 12:07 jribbens

Oh wow. Yes that is spectacularly confusing ;-)

Yeah, sorry — I’ll make time to make it less confusing

sideshowbarker avatar Jul 28 '21 06:07 sideshowbarker