Re: HTML5: "Bad value": "Percentage ("%") is not followed by two hexadecimal digits"

lepf@gmx.de, 2018-11-19 08:47 +0100:
> Archived-At: <https://www.w3.org/mid/a58f5943-de3c-f2bc-2b64-63726d2b8db0@gmx.de>
> 
> I get an error message in an HTML5 document with
> <https://validator.w3.org/nu/> with the following code:
> ...
> <p><a href="http://google.com/search?q=cache:%s">Lorem</a></p>
> ...
> The message:
> 
> Bad value http://google.com/search?q=cache:%s for attribute href on element
> a: Percentage ("%") is not followed by two hexadecimal digits.
> 
> Is the result correct?

Yes

> If so, how should I encode the "%" please?

As "%25":

<p><a href="http://google.com/search?q=cache:%25s">Lorem</a></p>

-- 
Michael[tm] Smith https://people.w3.org/mike

Received on Monday, 19 November 2018 10:42:56 UTC