Skip to content

Commit e80d117

Browse files
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
1 parent 1dacab8 commit e80d117

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Umbraco.Core/Routing/ContentFinderByRedirectUrl.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Web;
12
using Microsoft.Extensions.Logging;
23
using Umbraco.Cms.Core.Models;
34
using Umbraco.Cms.Core.Models.PublishedContent;
@@ -89,7 +90,7 @@ public async Task<bool> TryFindContent(IPublishedRequestBuilder frequest)
8990
}
9091

9192
frequest
92-
.SetRedirectPermanent(url)
93+
.SetRedirectPermanent(HttpUtility.UrlPathEncode(url))
9394

9495
// From: http://stackoverflow.com/a/22468386/5018
9596
// See http://issues.umbraco.org/issue/U4-8361#comment=67-30532

0 commit comments

Comments
 (0)