From 331a086b9e06928d2113c8a75c24e1d10b2b612f Mon Sep 17 00:00:00 2001 From: mark van tilburg Date: Sun, 12 Apr 2015 22:41:15 +0200 Subject: [PATCH] Update FileContentProvider.cs Use httpUtility file: mark van.html Rendered with: http://localhost:8080/mark+van.html http://localhost:8080/mark%20van.html fixes #125 http://blogs.msdn.com/b/yangxind/archive/2006/11/09/don-t-use-net-system-uri-unescapedatastring-in-url-decoding.aspx --- src/Pretzel/WebHost/FileContentProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pretzel/WebHost/FileContentProvider.cs b/src/Pretzel/WebHost/FileContentProvider.cs index d82c6f6b3..4219c0715 100644 --- a/src/Pretzel/WebHost/FileContentProvider.cs +++ b/src/Pretzel/WebHost/FileContentProvider.cs @@ -127,7 +127,7 @@ private string GetRequestedPage(string request) /// Path to the file private string GetFullPath(string request) { - return Uri.UnescapeDataString(Path.Combine(basePath + request)); + return System.Web.HttpUtility.UrlDecode(Path.Combine(basePath + request)); } } }