[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev A Missing >...
Re: lynx-dev A Missing >...
Wed, 2 Aug 2000 15:20:36 -0500 (CDT)
On Mon, 24 Jul 2000, pAb-032871 wrote:
> Thomas Dickey wrote:
> > On Wed, Jul 19, 2000 at 02:45:10PM -0500, Klaus Weide wrote:
> > > If the '>' is completely missing from the '</SCRIPT>' tag, some stuff
> > > after the defective tag will just be junked - until the next '>';
> > > this isn't different from missing '>' in other situations.
> If someone forgets to put a ">" after their tag, it'll screw ay
> browser up, and they're likely to fix it as soon as they find
> out about it.
Indeed. Unless the next '>' in the input stream happens very soon,
at which point the unclosed tag will get closed, and whatever got
junked in between was "nothing important" (say, just a </HEAD> tag
that has no direct impact in most browsers anyway).
> > > I don't think this is the best way. It may also prematurely end the
> > > SCRIPT contents on '</SOMETHING' that isn't '</SCRIPT', and while that's
> > > not valid input (any '</SOMETHING' in the script content should have been
> > > written with some form of escaping), it is probably more useful to
> > > continue
> Not neccesarily. See below.
The HTML 4.01 Specification disagrees with you:
Linkname: Performance, Implementation, and Design Notes
> > > looking for a '</SCRIPT' in that case.
> > shouldn't the tag end when it sees a new "<", unless it's quoted?
> This would cause some problems if there was some kind of
> document.write("<B>bold text</B>")
> content in the script itself. . .
it can be written as
document.write("<B>bold text<" + "/B>")
> Unless this is what you meant by "quoted".
I meant the backslash.
> Also, it's generally recomended that anything between <SCRIPT>
> tags be commented-out so browsers that don't support scripting
> form. That doesn't guarantee it's going to happen, but most of
> the HTML source I've seen has been pretty good about it.
> A very simple example:
> <!-- Begin hiding from non-scriptable browsers
> document.write("some HTML\, including <TAGS> and")
> document.write("<TAG ATTRIBUTE=\"value\">")
> // End -->
> These sorts of <!-- comments --> are allowed within scripts, because
> The "//" comment is needed at the end, however.
> It's a valid comment in HTML,
No, it isn't parsed as a comment in HTML. It's CDATA. CDATA isn't
parsed for SGML comment declarations.
This is only for browsers that don't understand that SCRIPT (and
STYLE) content has to be parsed differently from other elements.
It isn't necessary for lynx (of any recent version).
> except that some browsers might
> begin rendering everything after "some HTML\, including <TAGS>"
> [including Lynx if its HTML-parsing options are set to do that],
I doubt it. Have you tried it?
> reading the closing ">" as the end of the comment.
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
- Re: lynx-dev A Missing >...,
Klaus Weide <=