Bug #93764
closedSlugHelper can create bad urls
100%
Description
This happens if the user types title in a certain way in some browsers. Usually there are different ways to types letters with umlauts: either by using a dedicated key on the keyboard, or by typing a "dead key" followed by a normal key, or by typing a key and a sequence that adds umlauts to the previously typed key. The last case creates problems with slugs.
It is possible to reproduce this artificially for those who do not have keyboard layouts that produce characters with umlauts. Assuming that page uid is 12345, use this sql:
update pages set title=x'667275cc88686e65757a6569746c6963' where uid=12345;
This sets the title field to "frühneuzeitlichen" where the "ü" character is represented as 0x75+0xCC88. Here 0x75 is "u", 0xCC88 is a "combining diaeresis" (https://www.fileformat.info/info/unicode/char/0308/index.htm).
Now if you open the page and press double sided arrows near the slug field, it will make wrong "/frühneuzeitlichen" instead of correct "/fruehneuzeitlichen" and in frontend it will look even worse, like "/fruiˆhneuzeitlichen".
This happens because TYPO3 cannot process such characters.
Note that some browsers will make an interesting side effect out of this: Safari, for example, will normalize the title to the "C" form automatically when you submit the form. Internally TYPO3 compares submitted values with values in the database and updates modified fields. So even though you did not modify the title, it will be updated in the database due to Safari's automatic Unicode normalization. I got information that other browsers do not behave like this. Thus some users will be stuck with wrong slugs and URLs.
This bug can be easily fixed with the help of "Normalize" class, which is a standard PHP class.
This should be fixe din the SlugHelper, before calling convertSpecCharsToAscii. Note that convertSpecCharsToAscii would not be a right place for it because by definition it does not do any normalizations.
The issue was discovered and the fix is created by the University of Basel.