Actions
Feature #94162
openUpdate Slughelper to allow both dash and lodash Characters
Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
Start date:
2021-05-19
Due date:
% Done:
0%
Estimated time:
PHP Version:
Tags:
routing fallbackCharacter
Complexity:
easy
Sprint Focus:
Description
Hi there,
at the moment, the slughelper converts both dash and lodash to the fallback character -
typo3/sysext/core/Classes/DataHandling/SlugHelper.php:115
// Convert some special tokens (space, "_" and "-") to the space character
$fallbackCharacter = (string)($this->configuration['fallbackCharacter'] ?? '-');
$slug = preg_replace('/[ \t\x{00A0}\-+_]+/u', $fallbackCharacter, $slug);
Page title with - and _ xis converted to:
page-title-with-and-x
Since both Characters are valid for urls, it would be good if there would be at least the option to keep these characters,
so that the result would be
page-title-with-and-_-x
Files
Actions