W3C home > Mailing lists > Public > www-validator-css@w3.org > September 2004

Re: FYI: Pipe character in stylesheet url replaced with pipe and space causes error

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 7 Sep 2004 22:14:43 +0300 (EEST)
To: "Paul Bryant <GAP66>" <paul@gap66.com>
Cc: www-validator-css@w3.org
Message-ID: <Pine.GSO.4.58.0409072209230.17503@korppi.cs.tut.fi>

On Tue, 7 Sep 2004, Paul Bryant <GAP66> wrote:

> I have been linking to stylesheets with code similar to:
>
> <link rel="stylkesheet" type="text/css" href="/.i/css-3D/3D|3D/3DBl" />
>
> I found that when trying to validate the css the validator returned 404 File
> Not Found for the url:
>
> "/.i/css-3D/3D| 3D/3DBl" (note the space after the pipe character)

I don't know what the "CSS Validator" does with the URL, but by URL
specifications, the vertical line, or "pipe", character "|" is disallowed
in URLs. It may only appear as URL encoded (%7C). Ref.: RFC 2396,
available as hypertext at http://www.cs.tut.fi/~jkorpela/rfc/2396/toc.html

Maybe the "CSS Validator" treats "|" as terminating a URL. This is
suboptimal; ideally, when a program processes a construct like an
href attribute value, it should first verify that it complies with URL
syntax and either issue an error message or take some appropriate, planned
error recovery action if it does not. But this is far from easy.

> I have now changed my code to use underscores instead of pipes and the
> validator works fine - (and my css passes ;-).

If you can use "_" instead of "|", that's fine - the underline
(underscore) character is permitted in URLs as such.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Tuesday, 7 September 2004 19:15:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:15 GMT