Skip to content

Commit f221178

Browse files
committed
Use normal replacement for @ in slugify
1 parent eb13cc3 commit f221178

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Stringy.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,7 @@ public function slugify($replacement = '-')
11661166
{
11671167
$stringy = $this->toAscii();
11681168

1169+
$stringy->str = str_replace('@', $replacement, $stringy);
11691170
$quotedReplacement = preg_quote($replacement);
11701171
$pattern = "/[^a-zA-Z\d\s-_$quotedReplacement]/u";
11711172
$stringy->str = preg_replace($pattern, '', $stringy);

tests/StringyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ public function slugifyProvider()
11081108
['another-foo-bar', 'another..& foo -.-"-...bar'],
11091109
['foo-dbar', " Foo d'Bar "],
11101110
['a-string-with-dashes', 'A string-with-dashes'],
1111-
['userhost', 'user@host'],
1111+
['user-host', 'user@host'],
11121112
['using-strings-like-foo-bar', 'Using strings like fòô bàř'],
11131113
['numbers-1234', 'numbers 1234'],
11141114
['perevirka-ryadka', 'перевірка рядка'],

0 commit comments

Comments
 (0)