Permalink
Browse files

Merge pull request #625 from ai-fwd/defaultpageurlprovider-path-encod…

…ing-fix

Adding and updating path encoding logic in the DefaultPageUrlProvider
  • Loading branch information...
napernik committed Oct 11, 2018
2 parents f2fd055 + c9c7680 commit 2eeed30dd5f7f6c352930fffc8d0d14b7f0d3246
Showing with 9 additions and 1 deletion.
  1. +8 −0 Composite/Core/UrlBuilder.cs
  2. +1 −1 Composite/Plugins/Routing/Pages/DefaultPageUrlProvider.cs
@@ -92,6 +92,14 @@ public static string UrlEncode(string urlPart)
}
}
public static string UrlPathEncode(string urlPart)
{
using (new NoHttpContext())
{
return HttpUtility.UrlPathEncode(urlPart);
}
}
public static string UrlDecode(string urlPart)
{
using (new NoHttpContext())
@@ -883,7 +883,7 @@ private static StringBuilder AppendPathInfo(StringBuilder sb, string pathInfo)
sb.Append('/');
}
sb.Append(UrlBuilder.DefaultHttpEncoder.UrlEncode(pathInfoPart));
sb.Append(UrlBuilder.DefaultHttpEncoder.UrlPathEncode(pathInfoPart));
isFirst = false;
}

0 comments on commit 2eeed30

Please sign in to comment.