Jonas Fonseca <[EMAIL PROTECTED]> wrote Mon, May 23, 2005:
> Peter Gervai <[EMAIL PROTECTED]> 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 &#13; so maybe you could give the attached
> patch a try. Completely untested apart from testing that it compiles.

This one should skip the right number of characters...

-- 
Jonas Fonseca
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:58:57 -0000
@@ -691,9 +691,10 @@ next_break:
                                int length = html - base_pos;
                                int newlines = 0;
 
-                               while (html + 5 < eof && !memcmp(html, "&#13;", 
5)) {
+                               while ((html + 5 < eof && !memcmp(html, 
"&#13;", 5))
+                                      || (html + 6 < eof && !strncasecmp(html, 
"&#x0a;", 6))) {
                                        newlines++;
-                                       html += 5;
+                                       html += 5 + (html[4] != ';');
                                }
 
                                if (newlines) {
_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev

Reply via email to