-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace uppercase chars to make behaviour consistent in RequestHandler - DefaultCharReplacements #12850
Replace uppercase chars to make behaviour consistent in RequestHandler - DefaultCharReplacements #12850
Conversation
Hi there @bjarnef, thank you for this contribution! 👍 While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
Thanks @bjarnef for this update, it makes the replacements more consistent indeed 👍 Cheers! |
Unfortunately this causes a breaking change when URL tracking is disabled:
I've reverted this commit 5f42cf0 and cherry-picked it to v11 instead 68ff7b2. |
I also find it weird that Just thinking out loud here, we should probably have better defaults in general. |
Documented this change in our announcements umbraco/Announcements#4 Normally we wouldn't announce a behavioral change but since it can lead to quite the SEO headaches if you're not aware of this, we decided to document it in the Announcements repo this time. |
@nul800sebastiaan not sure if Not sure what the best practice is to replace this chars, if they should be replaced by empty string, hyphen or something else. |
Just FYI @nul800sebastiaan , this PR just introduced the replace of the capital letters, the rest of the replaces were already there. But indeed, it might be worth reconsidering the list in its whole, especially if introduced as a breaking change in V11 anyway. |
@bjarnef Yeah I know, it's all a bit arbitrary, I personally would probably just turn them into dashes, and then filter the whole URL one more time to remove duplicate dashes (so that we don't get Ah I didn't notice @mikecp, but I think that might be because of the other option |
Prerequisites
If there's an existing issue for this PR then this fixes #12798
Description
Currently it seems there are some inconsistent behaviour in char replacements regarding URL's.
In older versions of Umbraco I recall æ, ø and å were replaced, but later I think it only happened to lowercase chars.
I think if a char is replaced by default, it should be consistent where char replacements are handled.
In a new project on v10 I noticed
Æ
andæ
by default was replaced byae
, but not regardingØ
andÅ
.Furthermore
oe
should be more SEO friendly URL instead ofo
, e.g. for a page "Søg" (Search in English).This is probably a breaking change, so it would probably only be relavant to a minor og major version.