Feature #94162

Update Slughelper to allow both dash and lodash Characters

Added by Markus Timtner about 1 year ago. Updated 6 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & 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 _ x
is 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

core-10.4.21.patch (2.52 KB) core-10.4.21.patch Eric Bode, 2021-12-06 15:09

Related issues

Related to TYPO3 Core - Bug #94693: Slug fieldSeparator (and replacements) replaced by fallbackCharacterClosed2021-08-02

Actions
#1

Updated by Benni Mack 11 months ago

  • Target version changed from 11.3 to 11.4
#2

Updated by Christine Zoglmeier 10 months ago

Working on it

#3

Updated by Stefan Bürk 10 months ago

Christine Rochelt

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" ?

#4

Updated by Christine Zoglmeier 10 months ago

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

#5

Updated by Gerrit Code Review 10 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70481

#6

Updated by Gerrit Code Review 10 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70481

#7

Updated by Gerrit Code Review 9 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70481

#8

Updated by Gerrit Code Review 9 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70481

#9

Updated by Gerrit Code Review 9 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70481

#10

Updated by Gerrit Code Review 9 months ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70481

#11

Updated by Gerrit Code Review 9 months ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70481

#12

Updated by Benni Mack 9 months ago

  • Target version changed from 11.4 to 12 LTS
#13

Updated by Gerrit Code Review 6 months ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70481

#14

Updated by Gerrit Code Review 6 months ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70481

#15

Updated by Gerrit Code Review 6 months ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70481

#16

Updated by Gerrit Code Review 6 months ago

Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70481

#17

Updated by Oliver Hader 6 months ago

  • Related to Bug #94693: Slug fieldSeparator (and replacements) replaced by fallbackCharacter added
#18

Updated by Eric Bode 6 months ago

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.

#19

Updated by Simon Gilli 6 months ago

@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.

Also available in: Atom PDF