Project

General

Profile

Actions

Feature #97962

open

Allow more / special chars in slug creation

Added by Andreas Kießling over 2 years ago. Updated over 1 year ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2022-07-16
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

For a relaunch project with TYPO3 11, the urls are migrated from a previous realurl setup with .html urls to the now standard without .html, / etc.

There are however some special pages that need to be kept with their previous url - meaning abc/def.html since external applications, mobile apps etc. load them and i can't risk or even properly test the behavior when they are served a redirect to a new url.

When i enter that slug in the page properties, the regex from the slughelper kicks in and removes all special characters
https://github.com/TYPO3/typo3/blob/597a92fd55221caaccd28628b5e03024a319ef7a/typo3/sysext/core/Classes/DataHandling/SlugHelper.php#L125

Is there a technical reason not to allow more chars like uppercase and unreserved chars?
See https://datatracker.ietf.org/doc/html/rfc3986#section-2.3
I'm fine with lowercasing and removing special chars when the slug is generated from TCA fields, but for manual editing we should try allow everything that is technically allowed.

Actions #1

Updated by Oliver Hader about 2 years ago

  • Status changed from New to Needs Feedback

Can you please add examples and/or screenshots, which makes it easier to understand and reproduce the scenario? Thanks in advance!

Actions #2

Updated by Oliver Hader about 2 years ago

  • Sprint Focus set to On Location Sprint
Actions #3

Updated by Andreas Kießling about 2 years ago

The slug config for a site is by default configured to create urls like https://www.example.com/foo
I need some of the URLs to end with .html because they are hardcoded somewhere else, don't follow redirects etc. and i can not test the behavior of these applications beforehand.

Now when you enter bar.html in the slug field to get an url like https://www.example.com/bar.html, this will be changed to barhtml since https://github.com/TYPO3/typo3/blob/597a92fd55221caaccd28628b5e03024a319ef7a/typo3/sysext/core/Classes/DataHandling/SlugHelper.php#L125 does not allow it, as well as other chars like _ ~. or uppercase chars.

Actions #4

Updated by Benni Mack over 1 year ago

  • Sprint Focus deleted (On Location Sprint)
Actions

Also available in: Atom PDF