Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-17317] ”My Views" links leads to 404 Not Found.
- Loading branch information
Showing
2 changed files
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,7 +145,7 @@ public View getPrimaryView() { | |
} | ||
|
||
public HttpResponse doIndex() { | ||
return new HttpRedirect("view/" + getPrimaryView().getViewName() + "/"); | ||
return new HttpRedirect("view/" + Util.encode(getPrimaryView().getViewName()) + "/"); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ssogabe
Author
Member
|
||
} | ||
|
||
public synchronized void doCreateView(StaplerRequest req, StaplerResponse rsp) | ||
|
@@ -262,5 +262,5 @@ public String getUrlName() { | |
} | ||
|
||
} | ||
|
||
} |
What exactly does this accomplish?
encode
is not suitable for creating URLs as it does not escape general characters, only space (U+0020) and non-ASCII (U+0080–U+FFFF).encodeRFC2396
would probably do what you want (it is deprecated for no clear reason), as wouldrawEncode
(I think).