Closed seemantr closed 8 years ago
The problem with removing the encode call is that any characters that need to be encoded are left as-is, including spaces.
Isn't a better solution to use System.Uri.EscapeUriString() instead? It will leave / and other url characters alone, but will encode spaces.
bla/bla something.htm
will become:
bla/bla%20something.htm
which is what we need :)
I'll change the UrlEncode with Uri.EscapeUriString().
(I didn't look into properly escaping this through the Uri class, I read this morning the HttpUtility uses Uri under the hood so I looked at that class and it's a better fit :))
Closed (fixed by better method)
This is a corner case which only happens when the __index page is under a folder like in the below case where all my paths are under docs folder. The url which gets generated (
http://localhost:5000/docs%2foverview.html
) has/
replaced with%2f
which changes the path.