lynx-dev
[Top][All Lists]
Advanced

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

[Lynx-dev] A patch for lynx.


From: Zephaniah E. Hull
Subject: [Lynx-dev] A patch for lynx.
Date: Thu, 19 Apr 2007 03:41:20 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

lynx is fairly good at HTML parsing, however there are a few areas where
it has, issues, mostly because the syntax has mutated a good bit over
time.

The case that has bitten me enough times to make me want to fix it
fairly badly, and which is even more obvious with color styles, is that
of '<tag some_attributes />', which means fairly exactly
'<tag some_attributes></tag>'.

Some valid examples of this are '<a name="chapter1" />', and much worse
for lynx '<script type="text/javascript" src="dhtml.js" />', the latter
is especially bad because lynx simply won't render anything past it.
(And it in the header is absolute death for rendering the page.)

So, with that in mind, the attached patch causes lynx to parse
'<tag attributes />' as '<tag attributes></tag>', this properly renders
the above cases, and I have not found a test that it breaks on.

It still parses '<tag/foo/>' the same way as well.

Reviews, flames, and grumbles are all welcome.

Zephaniah E. Hull.

-- 
          1024D/E65A7801 Zephaniah E. Hull <address@hidden>
           92ED 94E4 B1E6 3624 226D  5727 4453 008B E65A 7801
            CCs of replies from mailing lists are requested.

Ken Thompson claims that he started developing UNIX so he could play
Space War, but the end product shows he was really much more interested
in cheating at Scrabble.
  -- Seen in the SDM.

Attachment: lynx_parsing.diff
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

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