OSDN Git Service

*** empty log message ***
authorkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Wed, 7 Jun 2006 18:21:15 +0000 (18:21 +0000)
committerkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Wed, 7 Jun 2006 18:21:15 +0000 (18:21 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/trunk@257 1a406e8e-add9-4483-a2c8-d8cac5b7c224

src/chxj_xhtml_mobile_1_0.c

index 58269b5..b6fbb75 100644 (file)
@@ -1669,25 +1669,22 @@ s_xhtml_1_0_start_div_tag(xhtml_t* xhtml, Node* child)
   xhtml->out = apr_pstrcat(r->pool, xhtml->out, "<div", NULL);
   for (attr = qs_get_attr(doc,child);
        attr;
-       attr = qs_get_next_attr(doc,attr)) 
-  {
+       attr = qs_get_next_attr(doc,attr)) {
     char* nm  = qs_get_attr_name(doc,attr);
     char* val = qs_get_attr_value(doc,attr);
 
-    if (strcasecmp(nm, "align") == 0)
-    {
+    if ((*nm == 'a' || *nm == 'A') && strcasecmp(nm, "align") == 0) {
       /* CHTML version 3.2 */
       align = apr_pstrdup(r->pool, val);
     }
   }
 
-  if (align != NULL)
-  {
+  if (align)
     xhtml->out = apr_pstrcat(r->pool, 
                     xhtml->out, " align=\"", align, "\"", NULL);
-  }
 
   xhtml->out = apr_pstrcat(r->pool, xhtml->out, ">", NULL);
+
   return xhtml->out;
 }
 
@@ -1726,8 +1723,7 @@ s_xhtml_1_0_chxjif_tag(xhtml_t* xhtml, Node* node)
 
   for (child = qs_get_child_node(doc, node);
        child;
-       child = qs_get_next_node(doc, child))
-  {
+       child = qs_get_next_node(doc, child)) {
     xhtml->out = apr_pstrcat(r->pool, xhtml->out, child->otext, NULL);
     s_xhtml_1_0_chxjif_tag(xhtml, child);
   }