Feature #97962
openAllow more / special chars in slug creation
0%
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.
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!
Updated by Oliver Hader about 2 years ago
- Sprint Focus set to On Location Sprint
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.