Skip to content

afc: Normalize URL better

Kai Uwe Broulik requested to merge work/kbroulik/afc-sanitize-name-better into master

According to RFC 1738 there's additional unsafe characters, such as curly brackets, pipe, quotes, etc that are disallowed for host names.

Just filter all non-word characters to avoid them slipping in.

BUG: 462381

I don't fully understand why the fallback doesn't work in the bug report but this should make cases like apostrophes work.

Any non-Latin1 character is replaced by a question mark "?" by toLatin1, so those are also filtered this way.

The underscore used as replacement for space is preserved by this regex.

Edited by ivan tkachenko

Merge request reports