Re: color: NCSA Mosaic, Netscape, and HTML3

Michael Johnson (michaelj@relay.relay.com)
Fri, 21 Jul 95 10:18:05 EDT


Subject: Re: color: NCSA Mosaic, Netscape, and HTML3
Message-Id: <MICHAELJ.950721101805@relay.relay.com>
From: michaelj@relay.relay.com (Michael Johnson)
To: terry@ora.com (Terry Allen)
Cc: www-html@www10.w3.org (HTML discussion list)
Date:    Fri, 21 Jul 95 10:18:05 EDT

Terry Allen writes:
>>  Unmatched quote in tag (which means it saw something like <foo "bar>
>    which I realize is not really an error)
>
>why not?  I haven't consulted the standard, but sgmls doesn't find
>the end of the literal:
>
>Document ended invalidly within a literal; parsing ended

Perhaps I should have been more explicit. The following:

  <img alt="> some text <">

is, according to [1], a valid construct. However, my parser will look at
this and assume that it's more likely to be an erroneously unclosed literal
inside of a tag than a literal that happens to contain '<'.

I deliberately chose to do it this way because people rarely (probably never)
use '>' and '<' in literals, but they often forget to close literals, thanks
to the brain-dead parsers in Mosaic and Netscape.

I do something similar in a case like this:

  <a href="http://foo.bar.org/" <img alt="some text"></a>

When I see this, I assume that the author omitted the trailing '>' on the
anchor tag. I flag this as a lexical syntax error and implicitly insert the
missing '>' character.

References:

  [1] http://www.iaf.nl/~abigail/HTML/Myth/myth.html

Michael Johnson
Relay Technology, Inc.