[elinks-dev] Fw: Bug#211588: 
 and newlines

Jonas Fonseca fonseca at diku.dk
Mon May 23 09:56:17 PDT 2005


Peter Gervai <grin at grin.hu> wrote Mon, May 23, 2005:
> Version: 0.10.4
> 
> Please see:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=211588
> 
> Basically:
> PS: elinks doesn't know what to do with the &#x0A; it sees in the
> <pre>-tagged part.  Since <pre> contains PCDATA, it should be parsed and,
> presumably, acted upon.
> 
> It seems that this problem screws up "dokuwiki" form input too,
> as a later report informed.

We had a similar problem with 
 so maybe you could give the attached
patch a try. Completely untested apart from testing that it compiles.

-- 
Jonas Fonseca
-------------- next part --------------
Index: document/html/parser/parse.c
===================================================================
RCS file: /home/cvs/elinks/elinks/src/document/html/parser/parse.c,v
retrieving revision 1.109
diff -u -d -p -u -p -r1.109 parse.c
--- document/html/parser/parse.c	28 Feb 2005 11:20:01 -0000	1.109
+++ document/html/parser/parse.c	23 May 2005 16:55:45 -0000
@@ -691,7 +691,8 @@ next_break:
 				int length = html - base_pos;
 				int newlines = 0;
 
-				while (html + 5 < eof && !memcmp(html, "
", 5)) {
+				while ((html + 5 < eof && !memcmp(html, "
", 5))
+				       || (html + 6 < eof && !strncasecmp(html, "&#x0a;", 6))) {
 					newlines++;
 					html += 5;
 				}


More information about the elinks-dev mailing list