Issue Feature Under Review

#94162Update Slughelper to allow both dash and lodash Characters

Markus Timtner 05/19/21, 17:18 updated 11/20/26, 15:25

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 _ 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

Reviews 2

Files 2

History 1327

Show 2 earlier messages
  1. Stefan Bürk commented <span data-processor="relativetime" data-value="2021-08-12T11:19:41+00:00" > 08/12/21, 11:19 </span>

    @Christine

    Forget to note here … I worked on it to .. but as you wrote in general/general in discord, and I’m in remote sprint/general did not see it.

    I’m ready to push a patch, done the work with tests .. wrote in discord.

    Should i push mine ? or how should we solve this “double work conflict” ?

  2. Christine Zoglmeier commented <span data-processor="relativetime" data-value="2021-08-12T11:34:02+00:00" > 08/12/21, 11:34 </span>

    Go ahead and push yours. I will compare your solution with mine.

  3. Gerrit Code Review pushed patch set 1 for master to change 70481 status New Under Review <span data-processor="relativetime" data-value="2021-08-12T11:45:26+00:00" > 08/12/21, 11:45 </span>

  4. Eric Harrer commented and changed attached core-10.4.21.patch <span data-processor="relativetime" data-value="2021-12-06T15:11:54+00:00" > 12/06/21, 15:11 </span>

    Is it possible to extend the official support for this feature to typo3 10 and 11?

    Based on this patch, I created a patch file for TYPO3 version 10. Maybe it will be of use to someone.

  5. Simon Gilli commented <span data-processor="relativetime" data-value="2021-12-06T16:05:19+00:00" > 12/06/21, 16:05 </span>

    @eric as we are talking about a feature here the chances are really small to get the permission for a backport. The policy is clear, no features are backported normally.

  6. Markus Timtner commented and changed attached core-11.5.41.patch <span data-processor="relativetime" data-value="2025-05-21T09:09:00+00:00" > 05/21/25, 09:09 </span>

    Since I just found this isn’t available for v11, I created a patch for that, too.

  7. Benni Mack commented and changed status Under Review New <span data-processor="relativetime" data-value="2026-03-16T16:40:07+00:00" > 03/16/26, 16:40 </span>

    Setting this to new, since Stefan set the patch as abandoned.