From: Thomas Mudrunka Date: Mon, 22 Oct 2012 17:23:41 +0000 (+0200) Subject: Escapovani v Query knihovne X-Git-Url: http://git.harvie.cz/?p=mirrors%2FSokoMan.git;a=commitdiff_plain;h=2158110429d1927b2a0f8fc3904a7edab0559e90 Escapovani v Query knihovne --- diff --git a/lib/Query.class.php b/lib/Query.class.php index 48a2bb0..12e423a 100755 --- a/lib/Query.class.php +++ b/lib/Query.class.php @@ -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; }