From ae78ff79ce153db50f606ff3910e4aab91910611 Mon Sep 17 00:00:00 2001 From: konn Date: Fri, 9 Jun 2006 08:11:24 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/trunk@355 1a406e8e-add9-4483-a2c8-d8cac5b7c224 --- src/chxj_hdml.c | 56 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/src/chxj_hdml.c b/src/chxj_hdml.c index 314ffb2d..2b844100 100644 --- a/src/chxj_hdml.c +++ b/src/chxj_hdml.c @@ -277,35 +277,45 @@ s_hdml_node_exchange(hdml_t* hdml, Node* node, int indent) if (hdml->hdml_end_flag == 1) continue; - /*------------------------------------------------------------------------*/ - /* */ - /*------------------------------------------------------------------------*/ - if (strcasecmp(name, "html") == 0) { - hdml->out = s_hdml_start_html_tag(hdml, child); - hdml->hdml_br_flag = 0; - hdml->out = s_hdml_node_exchange(hdml, child,indent+1); - hdml->out = s_hdml_end_html_tag(hdml, child); + if (*name == 'h' || *name == 'H') { + /*----------------------------------------------------------------------*/ + /* */ + /*----------------------------------------------------------------------*/ + if (strcasecmp(name, "html") == 0) { + hdml->out = s_hdml_start_html_tag(hdml, child); + hdml->hdml_br_flag = 0; + hdml->out = s_hdml_node_exchange(hdml, child,indent+1); + hdml->out = s_hdml_end_html_tag(hdml, child); + } + /*----------------------------------------------------------------------*/ + /* */ + /*----------------------------------------------------------------------*/ + else + if (strcasecmp(name, "head") == 0) { + hdml->out = s_hdml_start_head_tag(hdml, child); + hdml->hdml_br_flag = 0; + hdml->out = s_hdml_node_exchange(hdml, child,indent+1); + hdml->out = s_hdml_end_head_tag(hdml, child); + } + /*----------------------------------------------------------------------*/ + /*
*/ + /*----------------------------------------------------------------------*/ + else + if (strcasecmp(name, "hr") == 0) { + hdml->out = s_hdml_start_hr_tag(hdml, child); + hdml->out = s_hdml_end_hr_tag(hdml, child); + } } /*------------------------------------------------------------------------*/ /* */ /*------------------------------------------------------------------------*/ else - if (strcasecmp(name, "meta") == 0) { + if ((*name == 'm' || *name == 'M') && strcasecmp(name, "meta") == 0) { hdml->out = s_hdml_start_meta_tag(hdml, child); hdml->hdml_br_flag = 0; hdml->out = s_hdml_end_meta_tag(hdml, child); } /*------------------------------------------------------------------------*/ - /* */ - /*------------------------------------------------------------------------*/ - else - if (strcasecmp(name, "head") == 0) { - hdml->out = s_hdml_start_head_tag(hdml, child); - hdml->hdml_br_flag = 0; - hdml->out = s_hdml_node_exchange(hdml, child,indent+1); - hdml->out = s_hdml_end_head_tag(hdml, child); - } - /*------------------------------------------------------------------------*/ /* */ /*------------------------------------------------------------------------*/ else @@ -413,14 +423,6 @@ s_hdml_node_exchange(hdml_t* hdml, Node* node, int indent) hdml->out = s_hdml_end_div_tag(hdml, child); } /*------------------------------------------------------------------------*/ - /* <HR> */ - /*------------------------------------------------------------------------*/ - else - if (strcasecmp(name, "hr") == 0) { - hdml->out = s_hdml_start_hr_tag(hdml, child); - hdml->out = s_hdml_end_hr_tag(hdml, child); - } - /*------------------------------------------------------------------------*/ /* <CENTER> */ /*------------------------------------------------------------------------*/ else -- 2.11.0