typo3-realurl icon indicating copy to clipboard operation
typo3-realurl copied to clipboard

replace hyphen and supercript sign with SpaceCharacter

Open ilomedia opened this issue 7 years ago • 5 comments

Hi,

in french (and maybe other languages) hyphen (‘) and superscript (') signs are often used as word separator. As for now, realurl removes them and the url contains unwanted concatenated words. Couls you add those character to the convertToSafeString method?

For the moment i extended \DmitryDulepov\Realurl\Utility::convertToSafeString and added those two lines but this is not ideal in case of updates :

$processedTitle = str_replace("'", $spaceCharacter, $processedTitle); $processedTitle = str_replace("’", $spaceCharacter, $processedTitle);

NB : post processing can not be done since characters are removed before

thanks

ilomedia avatar Oct 07 '16 07:10 ilomedia

Yes, may affect existing URLs... On the other hand, if entries are in the cache already, they will be used and pages will not show 404s.

dmitryd avatar Oct 31 '16 10:10 dmitryd

The change will go to 2.2.0 I think. I plan to release 2.1.5 and than go for 2.2.0.

dmitryd avatar Nov 01 '16 10:11 dmitryd

thanks

ilomedia avatar Nov 02 '16 08:11 ilomedia

Hi,

Thanks for this change! Same here for me for french page titles.

Perhaps changing the empty replacement by the $spaceCharacter is enough? (saying that without knowing other implications ;-) ) https://github.com/dmitryd/typo3-realurl/blob/development/Classes/Utility.php#L101

Thanks a lot for this awesome ext by the way!

sruegg avatar Nov 09 '16 08:11 sruegg

Hi,

any news on this? does not seem to be in 2.2.1 :(

ilomedia avatar Jun 12 '17 16:06 ilomedia