W3C home > Mailing lists > Public > www-validator@w3.org > March 2013

Re: escaped & not validated correctly

From: Michael[tm] Smith <mike@w3.org>
Date: Mon, 4 Mar 2013 11:50:05 +0900
To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Cc: Markus Schicketanz <markus@schicketanz.com>, www-validator@w3.org
Message-ID: <20130304024345.GA16125@sideshowbarker>
"Jukka K. Korpela" <jkorpela@cs.tut.fi>, 2013-03-04 00:55 +0200:

> After Markus posted a complete document to me, I was able to confirm that
> there is a bug in the validator. It is apparently in the parsing of textarea
> element content, and it can be demonstrated with the following:
> 
> <!doctype html><title></title>
> <textarea cols='18' rows='4'>&me</textarea>
> &you
> 
> The erroneous reference &you is correctly reported with line number, but the
> reference &me is reported without line number and without echoing the source
> code fragment:

Actually, as far as conformance to the current HTML spec goes, it should
not be reporting either of those as an error. The spec says:

  An ambiguous ampersand is a U+0026 AMPERSAND character (&) that is
  followed by one or more alphanumeric ASCII characters, followed by a ";"
  (U+003B) character, where these characters do not match any of the names
  given in the named character references section.

Neither of those strings above is followed by a ";" character, so those
instances are not instances of an ambiguous ampersand, and therefore
they are not document-conformance errors.

I have a patch for the validator for bringing it into line with the current
requirements in the spec for handling of ampersands; you can try it at
http://qa-dev.w3.org:8888/

  --Mike

-- 
Michael[tm] Smith http://people.w3.org/mike
Received on Monday, 4 March 2013 02:50:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 4 March 2013 02:50:29 GMT