mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-01-16 20:08:14 +01:00
Use normal replacement for @ in slugify
This commit is contained in:
parent
eb13cc35d6
commit
f22117862b
@ -1166,6 +1166,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess
|
||||
{
|
||||
$stringy = $this->toAscii();
|
||||
|
||||
$stringy->str = str_replace('@', $replacement, $stringy);
|
||||
$quotedReplacement = preg_quote($replacement);
|
||||
$pattern = "/[^a-zA-Z\d\s-_$quotedReplacement]/u";
|
||||
$stringy->str = preg_replace($pattern, '', $stringy);
|
||||
|
@ -1108,7 +1108,7 @@ class StringyTestCase extends PHPUnit_Framework_TestCase
|
||||
['another-foo-bar', 'another..& foo -.-"-...bar'],
|
||||
['foo-dbar', " Foo d'Bar "],
|
||||
['a-string-with-dashes', 'A string-with-dashes'],
|
||||
['userhost', 'user@host'],
|
||||
['user-host', 'user@host'],
|
||||
['using-strings-like-foo-bar', 'Using strings like fòô bàř'],
|
||||
['numbers-1234', 'numbers 1234'],
|
||||
['perevirka-ryadka', 'перевірка рядка'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user