Skip to content

Commit

Permalink
[FIXED JENKINS-12945] absolutize links in the context menu
Browse files Browse the repository at this point in the history
Absolutizing on the server side is easier and more compact.
  • Loading branch information
kohsuke committed Mar 6, 2012
1 parent 6c5a9fc commit 022544d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -55,6 +55,9 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
Some of the context menu items have wrong links
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-12945">issue 12945</a>)
<li class=rfe>
Performance improvement in JavaScript on modern browsers
(<a href="https://github.com/jenkinsci/jenkins/pull/276">pull 276</a>)
Expand Down
Expand Up @@ -24,6 +24,7 @@

import javax.servlet.ServletException;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
Expand Down Expand Up @@ -163,7 +164,7 @@ public class MenuItem {
public String icon;

public MenuItem(String url, String icon, String displayName) {
this.url = url;
this.url = URI.create(Stapler.getCurrentRequest().getRequestURI()).resolve(url).toString();
this.icon = icon;
this.displayName = Util.escape(displayName);
}
Expand Down

0 comments on commit 022544d

Please sign in to comment.