From 5f42cf0cf7143fb65415cd770aa0beaf067a3789 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 8 Sep 2022 09:47:00 +0200 Subject: [PATCH] Revert "Replace uppercase chars to make behaviour consistent" This reverts commit 68cf80168937a8a8050905504c0856ee72091480. --- .../Models/RequestHandlerSettings.cs | 54 +++++++++---------- .../RequestHandlerSettingsExtension.cs | 9 ++-- 2 files changed, 29 insertions(+), 34 deletions(-) diff --git a/src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs b/src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs index dee888edf0..0c5d39f47a 100644 --- a/src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs @@ -19,36 +19,30 @@ public class RequestHandlerSettings internal static readonly CharItem[] DefaultCharCollection = { - new() { Char = " ", Replacement = "-" }, - new() { Char = "\"", Replacement = string.Empty }, - new() { Char = "'", Replacement = string.Empty }, - new() { Char = "%", Replacement = string.Empty }, - new() { Char = ".", Replacement = string.Empty }, - new() { Char = ";", Replacement = string.Empty }, - new() { Char = "/", Replacement = string.Empty }, - new() { Char = "\\", Replacement = string.Empty }, - new() { Char = ":", Replacement = string.Empty }, - new() { Char = "#", Replacement = string.Empty }, - new() { Char = "&", Replacement = string.Empty }, - new() { Char = "?", Replacement = string.Empty }, - new() { Char = "<", Replacement = string.Empty }, - new() { Char = ">", Replacement = string.Empty }, - new() { Char = "+", Replacement = "plus" }, - new() { Char = "*", Replacement = "star" }, - new() { Char = "æ", Replacement = "ae" }, - new() { Char = "Æ", Replacement = "ae" }, - new() { Char = "ä", Replacement = "ae" }, - new() { Char = "Ä", Replacement = "ae" }, - new() { Char = "ø", Replacement = "oe" }, - new() { Char = "Ø", Replacement = "oe" }, - new() { Char = "ö", Replacement = "oe" }, - new() { Char = "Ö", Replacement = "oe" }, - new() { Char = "å", Replacement = "aa" }, - new() { Char = "Å", Replacement = "aa" }, - new() { Char = "ü", Replacement = "ue" }, - new() { Char = "Ü", Replacement = "ue" }, - new() { Char = "ß", Replacement = "ss" }, - new() { Char = "|", Replacement = "-" }, + new () { Char = " ", Replacement = "-" }, + new () { Char = "\"", Replacement = string.Empty }, + new () { Char = "'", Replacement = string.Empty }, + new () { Char = "%", Replacement = string.Empty }, + new () { Char = ".", Replacement = string.Empty }, + new () { Char = ";", Replacement = string.Empty }, + new () { Char = "/", Replacement = string.Empty }, + new () { Char = "\\", Replacement = string.Empty }, + new () { Char = ":", Replacement = string.Empty }, + new () { Char = "#", Replacement = string.Empty }, + new () { Char = "+", Replacement = "plus" }, + new () { Char = "*", Replacement = "star" }, + new () { Char = "&", Replacement = string.Empty }, + new () { Char = "?", Replacement = string.Empty }, + new () { Char = "æ", Replacement = "ae" }, + new () { Char = "ä", Replacement = "ae" }, + new () { Char = "ø", Replacement = "oe" }, + new () { Char = "ö", Replacement = "oe" }, + new () { Char = "å", Replacement = "aa" }, + new () { Char = "ü", Replacement = "ue" }, + new () { Char = "ß", Replacement = "ss" }, + new () { Char = "|", Replacement = "-" }, + new () { Char = "<", Replacement = string.Empty }, + new () { Char = ">", Replacement = string.Empty }, }; /// diff --git a/src/Umbraco.Core/Extensions/RequestHandlerSettingsExtension.cs b/src/Umbraco.Core/Extensions/RequestHandlerSettingsExtension.cs index 10ea5a02ed..475f093785 100644 --- a/src/Umbraco.Core/Extensions/RequestHandlerSettingsExtension.cs +++ b/src/Umbraco.Core/Extensions/RequestHandlerSettingsExtension.cs @@ -7,13 +7,13 @@ namespace Umbraco.Extensions; /// /// Get concatenated user and default character replacements -/// taking into account . +/// taking into account /// public static class RequestHandlerSettingsExtension { /// /// Get concatenated user and default character replacements - /// taking into account . + /// taking into account /// public static IEnumerable GetCharReplacements(this RequestHandlerSettings requestHandlerSettings) { @@ -34,7 +34,7 @@ public static class RequestHandlerSettingsExtension } /// - /// Merges CharCollection and UserDefinedCharCollection, prioritizing UserDefinedCharCollection. + /// Merges CharCollection and UserDefinedCharCollection, prioritizing UserDefinedCharCollection /// internal static void MergeReplacements( this RequestHandlerSettings requestHandlerSettings, @@ -71,7 +71,8 @@ public static class RequestHandlerSettingsExtension } /// - /// Merges two IEnumerable of CharItem without any duplicates, items in priorityReplacements will override those in alternativeReplacements. + /// Merges two IEnumerable of CharItem without any duplicates, items in priorityReplacements will override those in + /// alternativeReplacements /// private static IEnumerable MergeUnique( IEnumerable priorityReplacements,