small politically incorrect html parser patch
when you want to use dillo for browsing instead of html test tool, then this little patch is useful for many stupid webs, which randomly close or not close font tags whenever happens and whereever happens... diff -pru -x CVS -x configure -x 'aclocal*' -x 'Makefile*' -x config.h.in dillo-tab/src/html.c dillo/src/html.c --- dillo-tab/src/html.c 2004-01-25 04:37:21.000000000 +0200 +++ dillo/src/html.c 2004-01-27 04:27:18.000000000 +0200 @@ -4280,7 +4372,7 @@ static const TagInfo Tags[] = { {"dt", 'O', Html_tag_open_dt, Html_tag_close_par}, {"em", 'R', Html_tag_open_em, Html_tag_close_default}, /* fieldset */ - {"font", 'R', Html_tag_open_font, Html_tag_close_default}, + {"font", 'O', Html_tag_open_font, Html_tag_close_default}, {"form", 'R', Html_tag_open_form, Html_tag_close_form}, {"frame", 'F', Html_tag_open_frame, Html_tag_close_nop}, {"frameset", 'R', Html_tag_open_frameset, Html_tag_close_default}, It makes a bit less likely, that the font tags screw up every other one (like tables and forms)...
On Tue, 27 Jan 2004, Madis Janson wrote:
when you want to use dillo for browsing instead of html test tool, then this little patch is useful for many stupid webs, which randomly close or not close font tags whenever happens and whereever happens...
sorry for spam, but in the mean time i (re)found better one... diff -pru -x CVS -x configure -x 'aclocal*' -x 'Makefile*' -x config.h.in dillo-tab/src/html.c dillo/src/html.c --- dillo-tab/src/html.c 2004-01-25 04:37:21.000000000 +0200 +++ dillo/src/html.c 2004-01-27 04:27:18.000000000 +0200 @@ -1176,7 +1183,8 @@ static void Html_tag_cond_cleanup(DilloH while (stack_idx && strcmp(Html_tags_get_name(html->CurrTagIdx), html->stack[stack_idx].tag) && - (old_mode || + ((old_mode && + !Html_match_tag(html->stack[stack_idx].tag, "table>", 6)) || Html_tags_get_endtag(html->stack[stack_idx].tag_idx) == 'O')){ --stack_idx; e_pop = 1; and to the dillorc file: use_old_parser=YES only note: when you use it, don't whine to list that it renders something incorrectly - look the output with use_old_parser=NO and you'll probably discover why...
participants (1)
-
Madis Janson