Skip to content

Adding Non-break space to separator substitution

Closes #2986375

There are some scenarios where a node title could have a No-break space (Unicode U+00A0, Html entity:  , etc...). In those cases, the spaces are left in the path alias generating urls like: /2021/03/09/رغم-المعاناة-أطفال-سوريا-لا-يريدون-العودة-بلادهم%C2%A0.

So I've simply added the unicode modifier to the space pattern, so no-break spaces get to the preg_replace that replaces the spaces with the separator.

I am not quite sure yet if those nbsp could end up there from arabic (rtl) copy/pasting or what, but I think the replace should cover those cases, even if they are quite odd.

Edited by mariana paz

Merge request reports

Loading