[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV Comment parsing bug in lynx, and fix.
From: |
Foteos Macrides |
Subject: |
Re: LYNX-DEV Comment parsing bug in lynx, and fix. |
Date: |
Mon, 18 Nov 1996 14:46:12 -0500 (EST) |
address@hidden (Brian Borowski) wrote:
>I have found a bug (sort-of) in lynx's comment parsing code.
>For us blind people here, (like myself) we find lynx important and useful,
>and we couldn't figure out why some html was not being rendered at all.
>The problem was, after I did some checking around, that the comments in some
>people's pages consisted of things like,
><!--------------->
>Where there was a '<!--' followed by no blanks. Lynx was
>not finding this, and seemed to be missing chunks of the document.
>
>I noted, that in 'HTML.c' you were doing a strncmp(data, "<!--", 4), and
>then calling LYFindEndOfComment after that.
>In 'LYFindEndOfComment' you were doing a strcmp(str, "<!--"),
>and I have changed this to '(strncmp(str, "<!--", 4) to be consistant and
>also to find comments in strings that went on with no blanks.
>The fix has done wonders, and I have included a patch to the file
>'LYCharUtils.c' below.
>
>I could have erred in this thing, but I don't think so.
>Use patch to apply it.
That *is* a bug in LYFindEndOfComment(), but the code in HTML.c
and LYCharUtils.c is used solely for handling of nested OBJECT tags, and
not for general comment parsing. The latter is done in SGML.c. I
suspect what you really want is to troggle among "historical" (any
'>' terminates the comment), "minimal" (any "-->" with nothing or only
WHITE between the "--" and '>' terminates the comment) or "valid" SGML
comment parsing, until you hit on what the document is using.
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.
;