diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Minz/Request.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php index 7e3c59990..755784522 100644 --- a/lib/Minz/Request.php +++ b/lib/Minz/Request.php @@ -28,6 +28,9 @@ class Minz_Request { return self::$params; } static function htmlspecialchars_utf8 ($p) { + if (is_array($p)) { + return array_map('self::htmlspecialchars_utf8', $p); + } return htmlspecialchars($p, ENT_COMPAT, 'UTF-8'); } public static function param ($key, $default = false, $specialchars = false) { @@ -35,8 +38,6 @@ class Minz_Request { $p = self::$params[$key]; if(is_object($p) || $specialchars) { return $p; - } elseif(is_array($p)) { - return array_map('self::htmlspecialchars_utf8', $p); } else { return self::htmlspecialchars_utf8($p); } |
