提交 910b3dae 编写于 作者: D dwdyer

Fix for incorrect test result links when project name contains spaces (ISSUE#1666).

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9224 71c3de6d-444a-0410-be80-ed276b4c234a
上级 a530ee96
......@@ -733,7 +733,12 @@ public class Util {
* but don't remember it right now.
*
* @since 1.204
* @deprecated This method is broken (see ISSUE#1666). It should probably
* be removed but I'm not sure if it is considered part of the public API
* that needs to be maintained for backwards compatibility.
* Use {@link #encode(String)} instead.
*/
@Deprecated
public static String encodeRFC2396(String url) {
try {
return new URI(null,url,null).toASCIIString();
......
......@@ -150,7 +150,7 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
StaplerRequest request = Stapler.getCurrentRequest();
if(request==null)
throw new IllegalStateException("Not processing a HTTP request");
return Util.encodeRFC2396(request.getRootPath()+'/'+getUrl());
return Util.encode(request.getRootPath()+'/'+getUrl());
}
/**
......
......@@ -38,7 +38,7 @@
<li class="${elementClass}" style="${elementStyle}">
<!-- child test results are referenced from their parent builds -->
<j:set var="build" value="${testObject.owner}" />
<a href="${build.absoluteUrl}/${build.testResultAction.urlName}/${testObject.getRelativePathFrom(null)}">
<a href="${build.absoluteUrl}${build.testResultAction.urlName}/${testObject.getRelativePathFrom(null)}">
${testObject.fullName}
</a>
</li>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册