User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; af; rv:184.108.40.206) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; af; rv:220.127.116.11) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729) when http://www.example.com#%22%3E (or any hash with %22 and %3E) is entered and a link is created from the hash it is not parsed correctly. Please see steps to reproduce: Works in all other browsers (Chrome,Opera,Safari and IE) Reproducible: Always Steps to Reproduce: 1. Run the following: <div id="a"></div> <script> document.getElementById("a").innerHTML="<a href=\""+document.location.hash+"\">"+document.location.href+"</a>"; </script> 2. Enter the hash as #"> or #%22%3E 3. The generated link is malformed and does not go to #%22%3E Actual Results: Link: ">http://www.example.com#%22%3E goes to: http://www.example.com# Expected Results: link should be: http://www.example.com#%22%3E should go to http://www.example.com#%22%3E
http://tools.ietf.org/html/rfc2616#section-3.2.2 >If the abs_path is not present in the URL, it MUST be given as "/" when used as a Request-URI for a resource http://tools.ietf.org/html/rfc2396#section-4 # is used for URL fragments You have an absolute URL without a absolute Path (no "/") and a URL fragment. >goes to: >http://www.example.com# As link the URL bar shows http://www.example.com/#"> which seems correct to me. your hash is used as fragment and the escaped chars are unescaped. Is this report only about the Firefox URL bar which does it's own URL fixing and where you filed this report or for Gecko/Networking which would be the case for all URLs inside documents as link or for the DOM ?
This is actually known as bug 483304.