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

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

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 22 May 2008 11:29:13 +0000 (UTC)
To: Philip Taylor <pjt47@cam.ac.uk>
Cc: HTML WG <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0805221128090.12911@hixie.dreamhostps.com>

On Fri, 7 Mar 2008, Philip Taylor wrote:
> 
> 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.

I've fixed this. I've also tried to fix something that I think was wrong 
with another part of the algorithm, but I'm not sure that part was 
correct. Please let me know if r1667 was completely right.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 22 May 2008 11:29:50 GMT

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