On Sun, 2007-11-11 at 10:59 +0000, Richard Torrens (RiscOS) wrote: > > I presume the original poster was referring to viewing said pages in an > > offline mode, whereby the SSIs won't be executed and NetSurf will see the > > 'raw', original HTML code? > > Correct. > > But my feeling is that logically the browser should ignore the two <-- --> > comments and be left with an empty <A HREF="http://"> > > It isn't an issue in itself, but may be a useful clue to a bug.
By my understanding, NetSurf is doing its best to parse broken HTML. HTML comments are not valid inside attribute values. Thus, NetSurf's HTML parser does not skip them. The double-quote inside the first comment is then treated as the end of the attribute value, and the rest of the text until the next > that's outside another element is treated as just nonsense inside the <a> tag, causing the confusion. B.