Update usage

Update string helper to use new method that uses user defined replacements
This commit is contained in:
Matthew Care
2021-10-15 23:23:56 +01:00
parent 1ee4e379e7
commit 12e89a01ba

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Umbraco.Cms.Core.Configuration.Models;
@@ -60,7 +60,7 @@ namespace Umbraco.Cms.Core.Strings
/// <returns>The short string helper.</returns>
public DefaultShortStringHelperConfig WithDefault(RequestHandlerSettings requestHandlerSettings)
{
UrlReplaceCharacters = requestHandlerSettings.CharCollection
UrlReplaceCharacters = requestHandlerSettings.GetCharReplacements()
.Where(x => string.IsNullOrEmpty(x.Char) == false)
.ToDictionary(x => x.Char, x => x.Replacement);