Re: anchor tag

Admin-Pacific_Blue (admin@pacificblue.software) wrote:

> Hi Jukka,
>
> Oops,    I had mis-interpreted what it was telling me.  I thought it was
> telling me to put a slash at the end.  I had assumed that the return was
> the arrow pointing to where the problem was.
>
>
>
>    1.
>
>    *Error*: Bad value https:\\pacificblue.kiwi for attribute href on
>    element a <https://html.spec.whatwg.org/multipage/#the-a-element>:
>    Expected a slash ("/").
>
>    From line 54, column 13; to line 54, column 47
>    <https://validator.w3.org/nu/?showsource=yes&doc=https%3A%2F%2Fpacificblue.kiwi%2Fcarbon-credits#l54c47>
>
>    *<a href="https:\\pacificblue.kiwi" <https:%5C%5Cpacificblue.kiwi>>*↩
>
>
>
> Regards
>
> *Admin*
> 🏝 Pacific Blue Software 2011 Ltd <https://pacificblue.software>
>
Thank you for providing the information. I’m Cc’ing the list to indicate
that the issue has apparently been resolved and to suggest considering some
changes to the error message(s).

In practical terms, the problem is the use of β€œ\\” instead of β€œ//” in the
URL. Fixing this makes the error message go away. Browsers often silently
process URLs beginning with https:\\ as if they started with the correct
https://. but it is of course still a good idea to use the right form.

The validator checks the URL after parsing the tag, including the href
attribute value, and probably the program code for this does not allow a
more specific error location indication. So the validator refers to the
point after the tag, rather than the specific point where β€œ\\” appears. I
wonder if this could be improved by modifying the error message to be more
explicit about the type of the error.

Jukka

Received on Monday, 27 December 2021 12:17:31 UTC