فهرست منبع

make 'transliterate' do only that rather than transliterate && urlize, make the urlization happen after transliteration all the time to allow using other transliterator that are not urlizers

Seb Armand 13 سال پیش
والد
کامیت
88e390ceaa
2فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 0
      lib/Gedmo/Sluggable/SluggableListener.php
  2. 0 1
      lib/Gedmo/Sluggable/Util/Urlizer.php

+ 1 - 0
lib/Gedmo/Sluggable/SluggableListener.php

@@ -250,6 +250,7 @@ class SluggableListener extends MappedEventSubscriber
                     $this->transliterator,
                     array($slug, $options['separator'], $object)
                 );
+                $slug = Util\Urlizer::urlize($slug, $options['separator']);
                 // stylize the slug
                 switch ($options['style']) {
                     case 'camel':

+ 0 - 1
lib/Gedmo/Sluggable/Util/Urlizer.php

@@ -276,7 +276,6 @@ class Urlizer
         if (preg_match('/[\x80-\xff]/', $text) && self::validUtf8($text)) {
             $text = self::utf8ToAscii($text);
         }
-        return self::postProcessText($text, $separator);
     }
 
     /**