Issue Bug Rejected

#98601typolink with parameter "/"

Peter Linzenkirchner 10/13/22, 09:13 updated 06/27/24, 17:57

Description

the following viewhelper:

<f:link.typolink parameter="/" ></f:link.typolink>

results in an empty link

This affects especially the language menus because the language data handler delivers “link: /” for the homepage in the default language.

In constructions like

<f:link.typolink parameter="{languagemenu.link}" ></f:link.typolink>

this results in empty links for the homepage in the default language.

Reason is a modification in typo3/systext/frontend/Classes/Service/TypoLinkCodecService.php. This line from Typo3 vs. 10:

$value = str_replace(['\\', '"'], ['\\\\', '\\"'], $value);

changes to:

$parts = str_replace(['\\\\', '\\"'], ['\\', '"'], str_getcsv($typoLink, static::$partDelimiter));

str_getcsv removes single slashes.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.