Re: non-recursion
Doug Kaufman [EMAIL PROTECTED] writes: On Thu, 18 Sep 2003, Hrvoje Niksic wrote: modifying advance_declaration() in html-parse.c. A future version of Wget will probably parse comments in a non-compliant fashion, by considering everything between !-- and -- to be a comment, which is what most other browsers have been doing since the beginnings of the web. The lynx browser is configurable as to how it parses comments. So is Wget, as of last night. The default is minimal (non-compliant) comment parsing, and that can be changed with `--strict-comments'. It can change on the fly from minimal comments to historical comments to valid comments. Which browsers act in non-compliant fashion all the time? Those that display http://www.hro.org/docs/rlex/uk/index.htm (unless I'm mistaken), and that would mean pretty much all of them. Of course, that page is but one example out of many. Some browsers have more complex heuristics for comment parsing, but adding that to Wget would probably be overdoing it.
Re: non-recursion
Ilya N. Golubev [EMAIL PROTECTED] writes: Duplicating my [EMAIL PROTECTED] sent on Wed, 10 Sep 2003 19:48:56 +0400 since mailer reports that [EMAIL PROTECTED] does not work. wget -mLd http://www.hro.org/docs/rlex/uk/index.htm does not follow `A HREF=uk1.htm#1' links contained in the resource. That's because Wget thinks those links are part of a huge comment that spans the better part of the document. Unlike most browsers, Wget implements a (too) strict comment parsing, which breaks pages that use non-SGML-compliant comments. As http://www.htmlhelp.com/reference/wilbur/misc/comment.html explains: [...] There is also the problem with the -- sequence. Some people have a habit of using things like !-- as separators in their source. Unfortunately, in most cases, the number of - characters is not a multiple of four. This means that a browser who tries to get it right will actually get it wrong here and actually hide the rest of the document. Currently the only workaround is to alter the source, e.g. by modifying advance_declaration() in html-parse.c. A future version of Wget will probably parse comments in a non-compliant fashion, by considering everything between !-- and -- to be a comment, which is what most other browsers have been doing since the beginnings of the web.
Re: non-recursion
On Thu, 18 Sep 2003, Hrvoje Niksic wrote: modifying advance_declaration() in html-parse.c. A future version of Wget will probably parse comments in a non-compliant fashion, by considering everything between !-- and -- to be a comment, which is what most other browsers have been doing since the beginnings of the web. The lynx browser is configurable as to how it parses comments. It can change on the fly from minimal comments to historical comments to valid comments. Which browsers act in non-compliant fashion all the time? Doug -- Doug Kaufman Internet: [EMAIL PROTECTED]