lynx-dev
[Top][All Lists]
Advanced

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

LYNX-DEV more on parsing error recovery


From: Laura Eaves
Subject: LYNX-DEV more on parsing error recovery
Date: Thu, 8 May 1997 23:42:57 -0400 (EDT)

The new parser seems to handle <form>s in pre blocks, but still
doesn't close the pre block at </pre> if it's expecting a </form>:
        ...
        <pre><form ...>
        ...
        </pre>...</form>
While it doesn't close the form prematurely like in 2.7.1, I think it should
be able to close the PRE block even when it's expecting a </form>.
I noticed the new parser puts FORM tags back on the stack.  Since forms don't
affect style and don't nest, I think Fote's approach to remove them from the
stack is better than trying to treat it link other stacked elements.
BTW -- The old parser closes the pre block.

<html>
<head><title>testing form</title></head>
<body>
A bunch of text before a PRE block...
<pre>
<form method="post" action="mailto:address@hidden";>
<input type="text" size=30 maxlength=50 name="info">
<select name=color size=3>
<option value="(1)__RED">red
<option value=2>blue
<option value=3>green
</select>
<input type="reset">
Some text after reset button...
</pre>
Some text after PRE block...<br>
<input type="submit" value="This Submit Button after PRE block">
</form>
</body>
</html>

Also, I havan't run into this on a "real" webpage, but I noticed that
HText_endAnchor() assumes that the last anchor was a link.  So I tried
the following bad html which "forgets" a </a> before an input field.
The new parser correctly closes the anchor before the field, but the old parser
doesn't, and the page is corrupted.
In my code i test for link_type==INPUT_ANCHOR in HText_endNnchor().
This doens't fix the problem, but at least avoids executing inappropriate code.
(I didn't bother trying to close the anchor before processing the input
field...)

<html>
<head><title>testing bad html</title></head>
<body>
<h1>input field inside anchor...</h1>
<form method="post" action="mailto:address@hidden";>
Click <a href="http://www.intac.com/~leaves/qqq";>here
for quote of the day...
<input type="text" size=30 maxlength=50 name="info">
<input type="submit">
</form>
</body>
</html>

--le

;
; 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]