Escapovani v Query knihovne
authorThomas Mudrunka <tomas@mudrunka.cz>
Mon, 22 Oct 2012 17:23:41 +0000 (19:23 +0200)
committerThomas Mudrunka <tomas@mudrunka.cz>
Mon, 22 Oct 2012 17:23:41 +0000 (19:23 +0200)
lib/Query.class.php

index 48a2bb0e805f5ad6910ce90607e0f0c98b72dc2e..12e423a28a6ef2455e73324ca85d3779b5f40983 100755 (executable)
@@ -28,10 +28,11 @@ class Query {
        static function build($query=array(),$prefix=false) {
                $q='';
                if(is_array($query)) foreach($query as $key => $val) {
+                       $key=urlencode($key);
                        $pre = !$prefix ? $key : $prefix.'['.$key.']';
                        $q.=Query::build($val,$pre);
                } else {
-                       return $prefix.'='.$query.'&';
+                       return $prefix.'='.urlencode($query).'&';
                }
                return $q;
        }
This page took 0.357483 seconds and 4 git commands to generate.