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

fragid navigation and pct-encoded

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 04 Sep 2008 15:05:33 +0200
To: "HTML WG" <public-html@w3.org>
Message-ID: <op.ugyjzjdx64w2qv@annevk-t60.oslo.opera.com>


Apparently there are some differences between browsers in the handling of  
percent escaped characters in fragment identifiers. I made a few tests to  
figure out the different behavior:


I was able to test in Opera 9.5, Firefox 3.0, and Internet Explorer 6.0.  

IE does not handle pct-encoded in fragment which is in violation of RFC  
3986. It does nothing special with either the name or id attributes;  
simple literal matching.

Firefox does handle pct-encoded in fragment. It also handles pct-encoded  
in the name attribute. It effectively performs pct-encoded handling in  
fragment and name attributes and after that performs literal matching.  
Thus a fragment of ? and a name attribute of %3FC match and vice versa.  
Likewise, a fragment of %253F does not match a name attribute of %3FC. The  
id attribute is not affected by pct-encoded handling. So a fragment of ?  
does not match an id attribute of %3F.

Opera does handle pct-encoded in fragment. It does not have special  
handling of attributes. This is the behavior prescribed by HTML5 but  
breaks sites. Eg,


The test suite assumes Firefox is correct as that seems the most  
"sensible" behavior if you want to be compliant with RFC 3986 and  
compatible with the Web. I suggest we change HTML5 to perform pct-encoded  
handling for name attributes. I have not checked whether this affects the  
usemap attribute.

Kind regards,

Anne van Kesteren
Received on Thursday, 4 September 2008 13:06:09 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:38 UTC