W3C home > Mailing lists > Public > www-validator@w3.org > February 2018

Re: Google Font

From: Mark Rogers <mark.rogers@powermapper.com>
Date: Thu, 8 Feb 2018 16:36:09 +0000
To: W3C WWW Validator <www-validator@w3.org>
Message-ID: <3560229F-3DEC-4986-91AF-247ECECC10E9@powermapper.com>
The fragment doesn’t produce any validation errors with the HTML 4 validator, because the legacy DTD validator doesn’t check the syntax of most attribute values (IDs and IDREFs are an exception)

The fragment does produce validation errors when checked as HTML 5, because the HTML 5 validator does check attribute syntax.

The | character has a special meaning in a URL and isn’t allowed in the query string part after ? so needs percent encoded as %7C

The characters allowed are listed here:
https://url.spec.whatwg.org/#url-code-points


Best Regards
Mark

Mark Rogers - mark.rogers@powermapper.com
PowerMapper Software Ltd - www.powermapper.com
Registered in Scotland No 362274 Quartermile 2 Edinburgh EH3 9GL




From: "Philip Taylor (RHUoL)" <P.Taylor@Rhul.Ac.Uk>
Date: Thursday, 8 February 2018 at 15:21
To: "Trucsweb.com" <webmestre@trucsweb.com>
Cc: "www-validator@w3.org" <www-validator@w3.org>
Subject: Re: Google Font
Resent-From: "www-validator@w3.org" <www-validator@w3.org>
Resent-Date: Thursday, 8 February 2018 at 15:20


You could always URL-encode the "|".  But for me, your fragment validates when properly embedded :

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd"<http://www.w3.org/TR/html4/strict.dtd>>
<html>
<head>
   <link href="https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono|Playfair+Display:700,900"<https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono|Playfair+Display:700,900> rel="stylesheet">
   <title>I AM YOUR DOCUMENT TITLE REPLACE ME</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
</head>
<body>
   <div>
   </div>
</body>
</html>

Philip Taylor
--------
Trucsweb.com wrote:
Hi,

  1.  Error: Bad value https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono|Playfair+Display:700,900 for attribute href on element link<http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-link-element>: Illegal character in query: | is not allowed.

From line 36, column 5; to line 36, column 120

t" />↩ <link href="https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono|Playfair+Display:700,900"<https://fonts.googleapis.com/css?family=Roboto%7CRoboto+Mono%7CPlayfair+Display:700,900> rel="stylesheet" />↩ <
It's may be the time for autorise |?

Tx


Received on Thursday, 8 February 2018 16:36:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:00:03 UTC