From 2158110429d1927b2a0f8fc3904a7edab0559e90 Mon Sep 17 00:00:00 2001 From: Thomas Mudrunka Date: Mon, 22 Oct 2012 19:23:41 +0200 Subject: [PATCH] Escapovani v Query knihovne --- lib/Query.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.30.2