Permalink
Browse files

Adding and updating path encoding logic.

  • Loading branch information...
ai-fwd committed Oct 9, 2018
1 parent f2fd055 commit c9c7680dc4fe79aebf1790dfab289bd394b366cc
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 c9c7680

Please sign in to comment.