diff --git a/core/src/main/java/hudson/Util.java b/core/src/main/java/hudson/Util.java index 971b689578..ba25ae8317 100644 --- a/core/src/main/java/hudson/Util.java +++ b/core/src/main/java/hudson/Util.java @@ -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(); diff --git a/core/src/main/java/hudson/model/AbstractItem.java b/core/src/main/java/hudson/model/AbstractItem.java index 12897871bb..8a9af12144 100644 --- a/core/src/main/java/hudson/model/AbstractItem.java +++ b/core/src/main/java/hudson/model/AbstractItem.java @@ -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()); } /** diff --git a/core/src/main/resources/hudson/tasks/test/AbstractTestResultAction/summary.jelly b/core/src/main/resources/hudson/tasks/test/AbstractTestResultAction/summary.jelly index b1a3cf35a7..acc11135e2 100644 --- a/core/src/main/resources/hudson/tasks/test/AbstractTestResultAction/summary.jelly +++ b/core/src/main/resources/hudson/tasks/test/AbstractTestResultAction/summary.jelly @@ -38,7 +38,7 @@