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

Hi.

I get an error message in an HTML5 document with 
<https://validator.w3.org/nu/> with the following code:

<!DOCTYPE html>
<html lang="de-DE">
<head>
<meta charset="UTF-8">
<title>Lorem</title>
</head>
<body>
<p><a href="http://google.com/search?q=cache:%s">Lorem</a></p>
</body>
</html>

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?
If so, how should I encode the "%" please?

When I validate the same content as XHTML I do not an error message.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="de" xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Lorem</title>
</head>
<body>
<p><a href="http://google.com/search?q=cache:%s">Lorem</a></p>
</body>
</html>

Thanks and kind regards!

Andreas

Received on Monday, 19 November 2018 10:25:22 UTC