Do not encode targetUrl as it creates an issue when the home url contain a '/'#29
Closed
seemantr wants to merge 1 commit intoFransBouma:masterfrom
Closed
Do not encode targetUrl as it creates an issue when the home url contain a '/'#29seemantr wants to merge 1 commit intoFransBouma:masterfrom
seemantr wants to merge 1 commit intoFransBouma:masterfrom
Conversation
Owner
|
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. 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 :)) |
FransBouma
added a commit
that referenced
this pull request
Mar 6, 2016
Owner
|
Closed (fixed by better method) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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%2fwhich changes the path.