diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/core/URI.php | 2 | ||||
-rw-r--r-- | system/core/Utf8.php | 2 |
2 files changed, 2 insertions, 2 deletions
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); } diff --git a/system/core/Utf8.php b/system/core/Utf8.php index a78616d40..828a8aeba 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -66,7 +66,7 @@ class CI_Utf8 { } if ( - @preg_match('/./u', 'é') === 1 // PCRE must support UTF-8 + defined('PREG_BAD_UTF8_ERROR') // PCRE must support UTF-8 && function_exists('iconv') // iconv must be installed && MB_ENABLED === TRUE // mbstring must be enabled && $charset === 'UTF-8' // Application charset must be UTF-8 |