added Str::ascii method and fixed accented character problem in URL::slug.
This commit is contained in:
@@ -109,6 +109,8 @@ class URL {
|
||||
*/
|
||||
public static function slug($title, $separator = '-')
|
||||
{
|
||||
$title = html_entity_decode(Str::ascii($title), ENT_QUOTES, Config::get('application.encoding'));
|
||||
|
||||
// Remove all characters that are not the separator, letters, numbers, or whitespace.
|
||||
$title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', Str::lower($title));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user