From 08fef7de41cb06785cdb1024769892d9510e6e6b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 15 Jan 2014 18:37:01 +0200 Subject: Fix #2799 by adding conditional PCRE UTF-8 support to CI_URI::filter_uri() Also did a tiny micro-optimization in the Utf8 class. --- system/core/URI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/core/URI.php') diff --git a/system/core/URI.php b/system/core/URI.php index 3d6d202c0..c83b7a74f 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -320,7 +320,7 @@ class CI_URI { */ public function filter_uri($str) { - if ( ! empty($str) && ! empty($this->_permitted_uri_chars) && ! preg_match('/^['.$this->_permitted_uri_chars.']+$/i', $str)) + if ( ! empty($str) && ! empty($this->_permitted_uri_chars) && ! preg_match('/^['.$this->_permitted_uri_chars.']+$/i'.(UTF8_ENABLED ? 'u' : ''), $str)) { show_error('The URI you submitted has disallowed characters.', 400); } -- cgit v1.2.3-24-g4f1b