From: konn Date: Thu, 24 Apr 2008 13:46:54 +0000 (+0000) Subject: * Added attribute for CHTML3.0 converter. X-Git-Tag: v0.12.20~328 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e9a4bb777d3599d72e02e7f3021c489c0fde95f7;p=modchxj%2Fmod_chxj.git * Added attribute for CHTML3.0 converter. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/branches/RELEASE_0_12_0@2475 1a406e8e-add9-4483-a2c8-d8cac5b7c224 --- diff --git a/src/chxj_chtml30.c b/src/chxj_chtml30.c index 6394c0d9..54ca7c99 100644 --- a/src/chxj_chtml30.c +++ b/src/chxj_chtml30.c @@ -1689,14 +1689,21 @@ s_chtml30_start_img_tag(void *pdoc, Node *node) /*----------------------------------------------------------------------*/ /* CHTML 1.0 */ /*----------------------------------------------------------------------*/ - if (value && (STRCASEEQ('t','T',"top", value) || - STRCASEEQ('m','M',"middle",value) || - STRCASEEQ('b','B',"bottom",value) || - STRCASEEQ('l','L',"left", value) || - STRCASEEQ('r','R',"right", value))) { - W_L(" align=\""); - W_V(value); - W_L("\""); + if (value) { + if (STRCASEEQ('t','T',"top", value) || + STRCASEEQ('m','M',"middle",value) || + STRCASEEQ('b','B',"bottom",value) || + STRCASEEQ('l','L',"left", value) || + STRCASEEQ('r','R',"right", value)) { + W_L(" align=\""); + W_V(value); + W_L("\""); + } + else if (STRCASEEQ('c','C',"center", value)) { + W_L(" align=\""); + W_L("middle"); + W_L("\""); + } } } else if (STRCASEEQ('w','W',"width", name) && value && *value) { diff --git a/src/chxj_chtml50.c b/src/chxj_chtml50.c index 86409657..2829d408 100644 --- a/src/chxj_chtml50.c +++ b/src/chxj_chtml50.c @@ -1695,15 +1695,17 @@ s_chtml50_start_img_tag(void *pdoc, Node *node) /*----------------------------------------------------------------------*/ /* CHTML 1.0 */ /*----------------------------------------------------------------------*/ - if (value && (STRCASEEQ('t','T',"top", value) || - STRCASEEQ('m','M',"middle",value) || - STRCASEEQ('b','B',"bottom",value) || - STRCASEEQ('l','L',"left", value) || - STRCASEEQ('c','C',"center", value) || - STRCASEEQ('r','R',"right", value))) { - W_L(" align=\""); - W_V(value); - W_L("\""); + if (value) { + if (STRCASEEQ('t','T',"top", value) || + STRCASEEQ('m','M',"middle",value) || + STRCASEEQ('b','B',"bottom",value) || + STRCASEEQ('l','L',"left", value) || + STRCASEEQ('c','C',"center", value) || + STRCASEEQ('r','R',"right", value)) { + W_L(" align=\""); + W_V(value); + W_L("\""); + } } } else if (STRCASEEQ('w','W',"width", name) && value && *value) {