W3C home > Mailing lists > Public > public-html@w3.org > March 2008

Quoted strings in "encoding sniffing algorithm" "get an attribute"

From: Philip Taylor <pjt47@cam.ac.uk>
Date: Fri, 07 Mar 2008 22:54:02 +0000
Message-ID: <47D1C78A.6070303@cam.ac.uk>
To: HTML WG <public-html@w3.org>

It's not uncommon to see pages with:

   <meta http-equiv="Content-Type"content="text/html; charset=windows-1252">

The encoding sniffing algorithm fails to detect this. "Get an attribute" 
gets the 'http-equiv' attribute, and stops when 'position' is the second 
'"'. The case "If the attribute's name is neither "charset" nor 
"content", then return to step 2 in these inner steps" applies, so it 
gets another attribute starting from 'position', getting name 
'"content', which is wrong.

"Get an attribute" should be changed to increment 'position' before 
returning after a quoted string.

-- 
Philip Taylor
pjt47@cam.ac.uk
Received on Friday, 7 March 2008 22:54:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:13 GMT