diff options
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | file.c | 16 | ||||
-rw-r--r-- | table.c | 4 | ||||
-rw-r--r-- | table.h | 3 |
4 files changed, 25 insertions, 8 deletions
@@ -1,3 +1,11 @@ +2002-11-26 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + + * [w3m-dev 03476] Re: Bug#170506: w3m: Unable to use mozilla bugzilla + * file.c (HTMLtagproc1): initialize ignore_tag in table_mode + (HTMLtagproc0): check table_level + * table.c (feed_table_tag): set mode->ignore_tag + * table.h (struct table_mode): add ignore_tag + 2002-11-25 Fumitoshi UKAI <ukai@debian.or.jp> * [w3m-dev 03471] Re: SETPGRP() @@ -5069,4 +5077,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.551 2002/11/24 16:02:22 ukai Exp $ +$Id: ChangeLog,v 1.552 2002/11/25 16:39:52 ukai Exp $ @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.127 2002/11/24 16:02:22 ukai Exp $ */ +/* $Id: file.c,v 1.128 2002/11/25 16:39:52 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include "myctype.h" @@ -4467,6 +4467,7 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) table_mode[obuf->table_level].indent_level = 0; table_mode[obuf->table_level].nobr_level = 0; table_mode[obuf->table_level].caption = 0; + table_mode[obuf->table_level].ignore_tag = NULL; #ifndef TABLE_EXPAND tables[obuf->table_level]->total_width = width; #else @@ -5452,7 +5453,8 @@ HTMLlineproc0(char *str, struct html_feed_environ *h_env, int internal) read_token(h_env->tagbuf, &str, &obuf->status, pre_mode, 0); } if (ST_IS_COMMENT(obuf->status)) { - if (obuf->flag & RB_IGNORE) + if ((obuf->table_level >= 0) ? tbl_mode->pre_mode & TBLM_IGNORE + : obuf->flag & RB_IGNORE) /* within ignored tag, such as * * <script>..</script>, don't process comment. */ obuf->status = R_ST_NORMAL; @@ -5467,9 +5469,13 @@ HTMLlineproc0(char *str, struct html_feed_environ *h_env, int internal) if (ST_IS_REAL_TAG(obuf->status)) Strcat_char(h_env->tagbuf, ' '); } - if ((obuf->flag & RB_IGNORE) && - !TAG_IS(h_env->tagbuf->ptr, obuf->ignore_tag->ptr, - obuf->ignore_tag->length - 1)) + if ((obuf->table_level >= 0) + ? ((tbl_mode->pre_mode & TBLM_IGNORE) && + !TAG_IS(h_env->tagbuf->ptr, tbl_mode->ignore_tag->ptr, + tbl_mode->ignore_tag->length - 1)) + : ((obuf->flag & RB_IGNORE) && + !TAG_IS(h_env->tagbuf->ptr, obuf->ignore_tag->ptr, + obuf->ignore_tag->length - 1))) /* within ignored tag, such as * * <script>..</script>, don't process tag. */ obuf->status = R_ST_NORMAL; @@ -1,4 +1,4 @@ -/* $Id: table.c,v 1.30 2002/11/15 16:00:33 ukai Exp $ */ +/* $Id: table.c,v 1.31 2002/11/25 16:39:53 ukai Exp $ */ /* * HTML table */ @@ -2969,9 +2969,11 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode, break; case HTML_SCRIPT: mode->pre_mode |= TBLM_SCRIPT; + mode->ignore_tag = Strnew_charp("</script>"); break; case HTML_STYLE: mode->pre_mode |= TBLM_STYLE; + mode->ignore_tag = Strnew_charp("</style>"); break; case HTML_N_A: table_close_anchor0(tbl, mode); @@ -1,4 +1,4 @@ -/* $Id: table.h,v 1.7 2002/11/15 16:00:34 ukai Exp $ */ +/* $Id: table.h,v 1.8 2002/11/25 16:39:53 ukai Exp $ */ #if (defined(MESCHACH) && !defined(MATRIX)) #define MATRIX #endif /* (defined(MESCHACH) && !defined(MATRIX)) */ @@ -139,6 +139,7 @@ struct table_mode { short nobr_offset; char nobr_level; short anchor_offset; + Str ignore_tag; }; /* Local Variables: */ |