Re: Parsing HREFs?

On Sun, 19 Feb 2006, Jukka K. Korpela wrote:

> (I think the validator's FAQ should have a self-contained explanation
> that contains the same information as the WDG FAQ entry, in a more modern 
> style. A reference to Netscape 3.x, historically interesting as it 
> might be, does not make a document very convincing these days.)

I have updated the text at 
http://www.htmlhelp.com/tools/validator/problems.html#amp to also discuss 
cases that are problems for modern browsers:

   <!-- This is invalid! --> <a
   href="foo.cgi?chapter=1&section=2&copy=3&lang=en">...</a>

   This example generates an error for "unknown entity section" because
   the "&" is assumed to begin an entity. Browsers often recover safely
   from this kind of error, but real problems do occur in some cases. In
   this example, many browsers convert &copy=3 to ©=3, which may cause
   the link to fail. Since &lang; is the HTML entity for the
   left-pointing angle bracket, some browsers also convert &lang=en to 
   </=en. And one old browser even finds the entity &sect;, converting   
   &section=2 to §ion=2.

Please let me know if you have further suggestions for improvement.

-- 
Liam Quinn

Received on Sunday, 19 February 2006 21:15:56 UTC