]> saetta.ns0.it Git - libzakcgi/commitdiff
Use of function ZakFormElement::unformat in ZakCgiForm::bind.
authorAndrea Zagli <azagli@libero.it>
Sun, 15 May 2016 09:44:24 +0000 (11:44 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 15 May 2016 09:44:24 +0000 (11:44 +0200)
src/form.c

index 8cc1b5226d5298deca0d75c9522c0ba701a3fe57..6b9852d5f60ba92374a5a8c2091dc449842a559e 100644 (file)
@@ -138,6 +138,7 @@ zak_cgi_form_bind (ZakCgiForm *zakcgiform)
        guint i;
 
        GValue *gval;
+       gchar *value;
 
        ZakCgiFormPrivate *priv;
 
@@ -153,7 +154,8 @@ zak_cgi_form_bind (ZakCgiForm *zakcgiform)
                                        gval = zak_cgi_main_get_stdin_field (priv->zakcgimain, zak_cgi_form_element_get_id (element));
                                        if (gval != NULL)
                                                {
-                                                       zak_form_element_set_value (ZAK_FORM_ELEMENT (element), g_value_get_string (gval));
+                                                       value = zak_form_element_unformat (ZAK_FORM_ELEMENT (element), g_value_get_string (gval));
+                                                       zak_form_element_set_value (ZAK_FORM_ELEMENT (element), value);
                                                }
                                }
                }