OSDN Git Service

* Changed au XHTML Converter.
authorAtsushi Konno <konn@users.sourceforge.jp>
Sat, 15 Nov 2008 17:52:17 +0000 (02:52 +0900)
committerAtsushi Konno <konn@users.sourceforge.jp>
Sat, 15 Nov 2008 17:52:17 +0000 (02:52 +0900)
    - to use cookie sims.

src/chxj_xhtml_mobile_1_0.c
test/chxj_xhtml_mobile_1_0/test_chxj_xhtml_mobile_1_0.c

index 2c5cc2d..4ca9c77 100644 (file)
@@ -1548,6 +1548,8 @@ s_xhtml_1_0_start_form_tag(void *pdoc, Node *node)
 
   W_L("<form");
   if (attr_action) {
+    attr_action = chxj_encoding_parameter(r, attr_action, 1);
+    attr_action = chxj_add_cookie_parameter(r, attr_action, xhtml->cookie);
     char *q;
     q = strchr(attr_action, '?');
     if (q) {
index 6d8be9f..6f735b3 100644 (file)
@@ -4125,7 +4125,7 @@ void test_xhtml_form_tag_006()
 #define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Windows-31J\"?>" \
                        "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Basic 1.0//EN\" \"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd\">" \
                        "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
-                       "<form action=\"\"></form></html>"
+                       "<form action=\"\"><input type=\"hidden\" name=\"_chxj_cc\" value=\"test_cookie_id\" /></form></html>"
   char  *ret;
   char  *tmp;
   device_table spec;
@@ -4212,7 +4212,7 @@ void test_xhtml_form_tag_008()
 void test_xhtml_form_tag_009() 
 {
 #define  TEST_STRING "<form method=\"post\" action=\"hogehoge\"></form>"
-#define  RESULT_STRING "<form action=\"hogehoge\" method=\"post\"></form>"
+#define  RESULT_STRING "<form action=\"hogehoge\" method=\"post\"><input type=\"hidden\" name=\"_chxj_cc\" value=\"test_cookie_id\" /></form>"
   char  *ret;
   char  *tmp;
   device_table spec;