lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV error recovery for form parsing


From: Foteos Macrides
Subject: Re: LYNX-DEV error recovery for form parsing
Date: Mon, 07 Apr 1997 11:28:39 -0500 (EST)

Laura Eaves <address@hidden> wrote:
>[...]
>I incorporated Fote's patch into my copy of 2-7-1 and it seems to wrok on all
>the broken URLs.
>
>Thank you for taking the time to make this fix (which I think is a very
>important fix affecting a lot of pages) and for the info about the 2 parsers...
>I took a look at HTML.c and GridText.c and have a better picture of the
>interdependence.  (Amazing how the SGML hack seemed to work so well on so
>many pages...:-)
>
>Anyway, looking at HTML_end_element(), I did notice some minor oversights
>and made a couple of 1-line changes that I think could be added to your
>patch....  Diff included below for your  perusal.
>[...]
>*** fm/HTML.c  Mon Apr  7 07:08:20 1997
>--- src/HTML.c Mon Apr  7 07:30:51 1997
>[...]
>  #ifdef CAREFUL                       /* parser assumed to produce good 
> nesting */
>!     if (element_number != me->sp[0].tag_number && element_number != 
>HTML_FORM) {
>          fprintf(stderr, 
>               "HTMLText: end of element %s when expecting end of %s\n",
>               HTML_dtd.tags[element_number].name,

        That #ifdef'ed code isn't used, and can't be used since v2.0, but
yes you would need that bypass if for some reason that code section were
revived.


>[...]
>!     } else if ( TRACE ) fprintf(stderr,"HTML:end_element: end form\n");
>[...]

        My patch issues the corresponding TRACE massage, appropriately
phased for the circumstances, in SGML_character() or HTML_start_element()
before calling HTML_end_element(), so it's redundant there, and doesn't
vary appropriately for the circumstances.


        The important thing is to exercise the patch to see if it's
still as crash safe as the vanilla v2.7.1 for bad HTML affecting
FORM markup.   It probably is, but it's impossible to think through
all possible consequences of bad HTML in one's head, and it took
two years of tweaking to make the FORM code as crash safe from bad
HTML as it is in the formal releases.

                                Fote

=========================================================================
 Foteos Macrides            Worcester Foundation for Biomedical Research
 address@hidden         222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

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