Skip to content
Permalink
Browse files

Fix Text::slug()

Brackets are now replaced from string when using "preserve" option.
  • Loading branch information...
ADmad committed Oct 3, 2017
1 parent a72fcae commit da8ad481be805a8adc2f0f9574aedc70c932ae63
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Utility/Text.php
@@ -1108,7 +1108,7 @@ public static function slug($string, $options = [])
$regex = '^\s\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}';
if ($options['preserve']) {
$regex .= '(' . preg_quote($options['preserve'], '/') . ')';
$regex .= '|' . preg_quote($options['preserve'], '/');
}
$quotedReplacement = preg_quote($options['replacement'], '/');
$map = [

0 comments on commit da8ad48

Please sign in to comment.
You can’t perform that action at this time.