From 32bdf1c1e3c8ec6c0ccf38a947ff01c06eb9152f Mon Sep 17 00:00:00 2001 From: dimonneon Date: Fri, 10 Jul 2015 21:47:04 +0300 Subject: Add unicode support in url_title function --- system/helpers/url_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/helpers/url_helper.php') diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 6a033d6ba..41ded94ee 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -492,7 +492,7 @@ if ( ! function_exists('url_title')) $trans = array( '&.+?;' => '', - '[^a-z0-9 _-]' => '', + '[^\w\d _-]' => '', '\s+' => $separator, '('.$q_separator.')+' => $separator ); @@ -500,7 +500,7 @@ if ( ! function_exists('url_title')) $str = strip_tags($str); foreach ($trans as $key => $val) { - $str = preg_replace('#'.$key.'#i', $val, $str); + $str = preg_replace('#'.$key.'#ui', $val, $str); } if ($lowercase === TRUE) -- cgit v1.2.3-24-g4f1b