Redirect is broken with Hebrew chars on Linux (#15261)

* add HttpUtility.UrlPathEncode encode so paths that are not in english will not throw errors of NON-ASCII characters

* remove unnecessary using
This commit is contained in:
Yuval-Amidror
2023-11-23 01:43:18 +02:00
committed by GitHub
parent 1dacab8b9a
commit e80d117a2a

View File

@@ -1,3 +1,4 @@
using System.Web;
using Microsoft.Extensions.Logging;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.PublishedContent;
@@ -89,7 +90,7 @@ public class ContentFinderByRedirectUrl : IContentFinder
}
frequest
.SetRedirectPermanent(url)
.SetRedirectPermanent(HttpUtility.UrlPathEncode(url))
// From: http://stackoverflow.com/a/22468386/5018
// See http://issues.umbraco.org/issue/U4-8361#comment=67-30532