lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev non-bug in non-comments (was bug in comments process)


From: Klaus Weide
Subject: lynx-dev non-bug in non-comments (was bug in comments process)
Date: Sat, 31 Jul 1999 17:11:39 -0500 (CDT)

On Sat, 31 Jul 1999, Vlad Harchev wrote:
> On Sat, 31 Jul 1999, Klaus Weide wrote:
> > On Sat, 31 Jul 1999, Vlad Harchev wrote:
> > > On Fri, 30 Jul 1999, Klaus Weide wrote:
> > > 
> > > > > >   http://www.brunching.com/features/feature-disneywarnings.html
> > > > 
> > > > By the way, this is apparently parsed differently with -prettysrc,
> > 
> > THEY ARE NOT NORMAL HTML COMMENTS.  As I already wrote.
> 
>  Yes, reading HTML 4.0 specs I understood that. 

And you still want to treat them as comments anyway.

>                                           SGML comments in the <script>
> are used to delimit scripts from old browsers that don't know the <script>
> attribute to prevent rendering it by them. But ..
>  Experimenting with NS 4.51 showed that:
> * it renders original file without problems 
> * removing terminating --> makes that page blank

It's broken then - not a big surprise.

> * removing both <!-- and --> makes the page to look similar to what the lynx
>    does (the same parts of script are shown)
> 
>  I didn't tested IE, but IMO it will do the same. And seems that NS is wiser
> than lynx in "skipping" scripts. 

It is violating the specs, it is broken.  I don't know why you want to
call that wise.  I call lynx wiser for following the specs here.
No, I don't know what IE does, it doesn't really matter.  How often
do you see pages that are broken in this way?  I don't think one page
is enough for breaking parsing, just to be "compatible".

Since you are speculating, let me speculate, too:  IE does not do the
same, and that's the reason why we don't see these errors more often;
and when we see them, it's a quite reliable warning "you are entering 
a site on which many and various things are broken".

Actually, I think they do it on purpose, they're some kind of comedians
after all...  Together with the link that just says "Click Here", but
when I actually tried to follow the link, I was directed to load more
than 8KB of scripts, pictures, and whatnot in a file labeled as text/plain, 
which, when finally decoded, yielded the all-important message (one line):

     There was an error processing your click-thru. We apologize for the
     inconvenience.

It's a bit too obvious, nobody can manage to screw a page up so much
just by accident, right? ...

>                               May be this behaviour should be simulated by
> the lynx (ie handle any "comments" in scripts as comments and skip any
> non-commented stuff)?

But they aren't comments.  Only bad things come from treating them as
such.  Instead of looking for "</SCRIPT>", you want to look for
the end of a "comment" (or both).  Do you have any reason to assume
that misleading "--" occurs less often in SCRIPT content than a bogus
"</SCRIPT>"?  You know that lynx has various modes for detecting comment
ends, which are necessary for some authors' broken comments - if these are
necessary for "real" comments, do you think reliable detection of the
intended end of a comment-like non-comment (which validation against
HTML 4.0 cannot catch if they are broken) will be easier?

>  Can anybody try that page in IE (and making modiifcations I made to it too)?
> 
>  Now I understand that my patch made things worth (so it shouldn't be
> applied), but seems that we can place 'fixing handling of comments in
> <script>' to our TODO list (seems that major number of pages use commented 
> scripts).

Then we also need to place immediately after that 'undoing the "fix" when
the next version of a Netscape browser comes out and has correct handling
of comment-lookalikes in <script>'.


   Klaus


reply via email to

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