commit 3d0f4eb8b2e96334a9cb69ccfa1934564c210bf0
parent f405b747743860be8d1d3ecd19b3407594adae17
Author: ukai <ukai>
Date: Wed, 16 Oct 2002 18:11:15 +0000
[w3m-dev 03341] white space is needed to close an empty-element tag
* parsetagx.c (parse_tag): extract tagname until '/'
From: Daiki Ueno <ueno@unixuser.org>
Diffstat:
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-17 Daiki Ueno <ueno@unixuser.org>
+
+ * [w3m-dev 03341] white space is needed to close an empty-element tag
+ * parsetagx.c (parse_tag): extract tagname until '/'
+
2002-10-11 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev 03339] Re: Debian Bug#164098 w3m: <sup> is not properly supported
diff --git a/html.c b/html.c
@@ -216,10 +216,10 @@ TagInfo TagMAP[MAX_HTMLTAG] = {
{"noframes", ALST_NOFRAMES, MAXA_NOFRAMES, 0}, /* 98 HTML_NOFRAMES */
{"/noframes", NULL, 0, TFLG_END}, /* 99 HTML_N_NOFRAMES */
- {"sup", NULL, 0, 0}, /* 100 HTML_SUP */
- {"/sup", NULL, 0, 0}, /* 101 HTML_N_SUP */
- {"sub", NULL, 0, 0}, /* 102 HTML_SUB */
- {"/sub", NULL, 0, 0}, /* 103 HTML_N_SUB */
+ {"sup", NULL, 0, 0}, /* 100 HTML_SUP */
+ {"/sup", NULL, 0, 0}, /* 101 HTML_N_SUP */
+ {"sub", NULL, 0, 0}, /* 102 HTML_SUB */
+ {"/sub", NULL, 0, 0}, /* 103 HTML_N_SUB */
{NULL, NULL, 0, 0}, /* 104 Undefined */
{NULL, NULL, 0, 0}, /* 105 Undefined */
diff --git a/parsetagx.c b/parsetagx.c
@@ -126,7 +126,8 @@ parse_tag(char **s, int internal)
*(p++) = *(q++);
SKIP_BLANKS(q);
}
- while (*q && !IS_SPACE(*q) && *q != '>' && p - tagname < MAX_TAG_LEN - 1) {
+ while (*q && !IS_SPACE(*q) && !(tagname[0] != '/' && *q == '/') &&
+ *q != '>' && p - tagname < MAX_TAG_LEN - 1) {
*(p++) = tolower(*(q++));
}
*p = '\0';