Browse Source

remove UTF-8 string conversion

tags/2.0.0-beta
Antonio Ramirez 11 years ago
parent
commit
8c1715d5a7
  1. 2
      framework/yii/helpers/BaseInflector.php

2
framework/yii/helpers/BaseInflector.php

@ -449,8 +449,6 @@ class BaseInflector
*/
public static function slug($string, $replacement = '-', $lowercase = true)
{
// ensure UTF-8 and remove invalid UTF-8 chars.
$string = mb_convert_encoding((string) $string, 'UTF-8', mb_list_encodings());
if (extension_loaded('intl') === true) {
$options = 'Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove;';
$string = transliterator_transliterate($options, $string);

Loading…
Cancel
Save