Skip to content

Commit

Permalink
Merge branch 'hotfix/replace-patchwork-utf8'
Browse files Browse the repository at this point in the history
  • Loading branch information
dmolineus committed Jul 4, 2022
2 parents 2a5cd27 + 5de6969 commit 262a004
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"beberlei/assert": "^2.7 || ^3.0",
"contao/core-bundle": "^4.9.10",
"doctrine/dbal": "^2.11 || ^3.1",
"patchwork/utf8": "^1.2",
"psr/log": "^1.1",
"symfony/asset": "^4.4 || ^5.1",
"symfony/config": "^4.4 || ^5.1",
Expand All @@ -38,6 +37,7 @@
"symfony/http-kernel": "^4.4.13 || ^5.1",
"symfony/routing": "^4.4 || ^5.1",
"symfony/security-csrf": "^4.4 || ^5.0",
"symfony/string": "^5.4 || ^6.0",
"symfony/templating": "^4.4 || ^5.0",
"symfony/translation-contracts": "^1.1.6 || ^2.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions src/Data/Alias/Filter/SlugifyFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Netzmacht\Contao\Toolkit\Data\Alias\Filter;

use Contao\StringUtil;
use Patchwork\Utf8;
use Symfony\Component\String\UnicodeString;

use function html_entity_decode;
use function preg_replace;
Expand Down Expand Up @@ -82,7 +82,7 @@ private function slugify(string $value, string $separator): string

$value = html_entity_decode($value, ENT_QUOTES, $this->charset);
$value = StringUtil::stripInsertTags($value);
$value = Utf8::toAscii($value);
$value = (new UnicodeString($value))->ascii()->toString();
$value = preg_replace($arrSearch, $arrReplace, $value);

if (! $this->preserveUppercase) {
Expand Down

0 comments on commit 262a004

Please sign in to comment.