diff options
author | Andrey Andreev <narf@devilix.net> | 2015-07-15 14:30:31 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-07-15 14:30:31 +0200 |
commit | 6f371aeb25ad3b8b2934401661632aec468540f1 (patch) | |
tree | f1196bcb279d1cf9fb76d1780acea41a38e770c3 | |
parent | 7013cd2514b98c168f8edb402792b4d55c0323d6 (diff) | |
parent | 1dfc20da1d2f30f086f9489393141491ccfeed4c (diff) |
Merge branch 'feature/unicode_url_title' into develop
-rw-r--r-- | system/helpers/url_helper.php | 4 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 6a033d6ba..d65f92f1b 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.'#i'.(UTF8_ENABLED ? 'u' : ''), $val, $str); } if ($lowercase === TRUE) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8457d8f65..d431d49ca 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -25,6 +25,9 @@ Release Date: Not Released - Added 'is_resource' to the available expectations in :doc:`Unit Testing Library <libraries/unit_testing>`. +- Helpers + + - Added Unicode support to :doc:`URL Helper <helpers/url_helper>` function :php:func:`url_title()`. Bug fixes for 3.0.1 ------------------- |