From a5778e0b30347c6436d4ede5ccb2bd391aed96b0 Mon Sep 17 00:00:00 2001 From: konn Date: Sat, 12 Apr 2008 17:23:19 +0000 Subject: [PATCH] * Added test code of the tag for au XHTML converter. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/branches/RELEASE_0_11_0@2133 1a406e8e-add9-4483-a2c8-d8cac5b7c224 --- src/chxj_xhtml_mobile_1_0.c | 5 ++--- test/chxj_xhtml_mobile_1_0/test_chxj_xhtml_mobile_1_0.c | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/chxj_xhtml_mobile_1_0.c b/src/chxj_xhtml_mobile_1_0.c index 85a11a1f..fa0f1128 100644 --- a/src/chxj_xhtml_mobile_1_0.c +++ b/src/chxj_xhtml_mobile_1_0.c @@ -996,13 +996,12 @@ s_xhtml_1_0_start_a_tag(void *pdoc, Node *node) attr = qs_get_next_attr(doc,attr)) { char* name = qs_get_attr_name(doc,attr); char* value = qs_get_attr_value(doc,attr); - - if (STRCASEEQ('n','N',"name",name)) { + if (STRCASEEQ('n','N',"name",name) && value && *value) { WX_L(" id=\""); WX_V(value); WX_L("\""); } - else if (STRCASEEQ('h','H',"href", name)) { + else if (STRCASEEQ('h','H',"href", name) && value && *value) { value = chxj_encoding_parameter(r, value); WX_L(" href=\""); WX_V(value); diff --git a/test/chxj_xhtml_mobile_1_0/test_chxj_xhtml_mobile_1_0.c b/test/chxj_xhtml_mobile_1_0/test_chxj_xhtml_mobile_1_0.c index 0f10b3d6..9e03603a 100644 --- a/test/chxj_xhtml_mobile_1_0/test_chxj_xhtml_mobile_1_0.c +++ b/test/chxj_xhtml_mobile_1_0/test_chxj_xhtml_mobile_1_0.c @@ -1136,7 +1136,7 @@ void test_xhtml_a_tag_name_attribute_004() void test_xhtml_a_tag_href_attribute_001() { #define TEST_STRING "abc" -#define RESULT_STRING "abc" +#define RESULT_STRING "abc" char *ret; char *tmp; device_table spec; @@ -1192,7 +1192,7 @@ void test_xhtml_a_tag_href_attribute_002() void test_xhtml_a_tag_href_attribute_003() { #define TEST_STRING "abc" -#define RESULT_STRING "abc" +#define RESULT_STRING "abc" char *ret; char *tmp; device_table spec; @@ -1220,7 +1220,7 @@ void test_xhtml_a_tag_href_attribute_003() void test_xhtml_a_tag_href_attribute_004() { #define TEST_STRING "abc" -#define RESULT_STRING "abc" +#define RESULT_STRING "abc" char *ret; char *tmp; device_table spec; @@ -1248,7 +1248,7 @@ void test_xhtml_a_tag_href_attribute_004() void test_xhtml_a_tag_href_attribute_005() { #define TEST_STRING "abc" -#define RESULT_STRING "abc" +#define RESULT_STRING "abc" char *ret; char *tmp; device_table spec; -- 2.11.0