diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-01-23 18:01:01 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-01-23 18:01:01 +0000 |
commit | e718702d1281d1e92d162d9846081364ebb5f4df (patch) | |
tree | 350ea449c040ceb034822f742c7774b09e811c8c /parsetagx.c | |
parent | [w3m-dev 03680] showProgress() on fast system (diff) | |
download | w3m-e718702d1281d1e92d162d9846081364ebb5f4df.tar.gz w3m-e718702d1281d1e92d162d9846081364ebb5f4df.zip |
* etc.c (next_status): after = is R_ST_VALUE
R_ST_VALUE > => R_ST_NORMAL
R_ST_VALUE SP => R_ST_TAG
(read_token): R_ST_VALUE
(correct_irrtag): R_ST_VALUE
* rm.h (R_ST_VALUE): added
(ST_IS_REAL_TAG): rewrite
(ST_IS_COMMENT): deleted
(ST_IS_TAG): deleted
* parsetagx.c (parse_tag): skip too long tagname
skip too long attrname
if attrvalue has quote char, need reconstruct
if unknown attr, need reconstruct
* table.c (visible_length): R_ST_VALUE
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r-- | parsetagx.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/parsetagx.c b/parsetagx.c index de51801..bda980d 100644 --- a/parsetagx.c +++ b/parsetagx.c @@ -1,4 +1,4 @@ -/* $Id: parsetagx.c,v 1.12 2002/12/24 17:20:48 ukai Exp $ */ +/* $Id: parsetagx.c,v 1.13 2003/01/23 18:01:07 ukai Exp $ */ #include "fm.h" #include "myctype.h" #include "indep.h" @@ -132,6 +132,9 @@ parse_tag(char **s, int internal) q++; } *p = '\0'; + while (*q && !IS_SPACE(*q) && !(tagname[0] != '/' && *q == '/') && + *q != '>') + q++; tag_id = getHash_si(&tagtable, tagname, HTML_UNKNOWN); @@ -165,11 +168,9 @@ parse_tag(char **s, int internal) *(p++) = TOLOWER(*q); q++; } - if (q == p) { - q++; - continue; - } *p = '\0'; + while (*q && *q != '=' && !IS_SPACE(*q) && *q != '>') + q++; SKIP_BLANKS(q); if (*q == '=') { /* get value */ @@ -201,8 +202,12 @@ parse_tag(char **s, int internal) q++; } else if (*q) { - while (*q && !IS_SPACE(*q) && *q != '>') - Strcat_char(value, *q++); + while (*q && !IS_SPACE(*q) && *q != '>') { + Strcat_char(value, *q); + if (!tag->need_reconstruct && html_quote_char(*q)) + tag->need_reconstruct = TRUE; + q++; + } } } for (i = 0; i < nattr; i++) { @@ -227,6 +232,9 @@ parse_tag(char **s, int internal) else tag->value[i] = NULL; } + else { + tag->need_reconstruct = TRUE; + } } skip_parse_tagarg: |