lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev A Missing >...


From: pAb-032871
Subject: Re: lynx-dev A Missing >...
Date: Mon, 24 Jul 2000 06:21:34 -0700

This thread's been down for a while, but there's something I meant
to add:

In "Re: lynx-dev A Missing >..."
[19/Jul/2000 Wed 15:14:21]
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.

> > 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.

> > 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
        if(whatever){
        document.write("<B>bold text</B>")
        }
content in the script itself. . .  Unless this is what you meant
by "quoted".

Also, it's generally recomended that anything between <SCRIPT>
tags be commented-out so browsers that don't support scripting
won't try to display a bunch of JavaScript gibberish in source
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:

<SCRIPT LANGUAGE="JavaScript1.1">
<!-- Begin hiding from non-scriptable browsers
document.write("some HTML\, including <TAGS> and")
document.write("<TAG ATTRIBUTE=\"value\">")
// End -->
</SCRIPT>

These sorts of <!-- comments --> are allowed within scripts, because
JavaScript recognizes them as commenting-out *only one line*.
The "//" comment is needed at the end, however.

It's a valid comment in HTML, 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],
reading the closing ">" as the end of the comment.  But then again,
you'd also have that problem with ordinary HTML.



                          Patrick
                <mailto:address@hidden>
 

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]