diff --git a/src/main/java/hudson/tasks/test/TestResult.java b/src/main/java/hudson/tasks/test/TestResult.java index 7eee1b08d..3327a24d8 100644 --- a/src/main/java/hudson/tasks/test/TestResult.java +++ b/src/main/java/hudson/tasks/test/TestResult.java @@ -278,8 +278,7 @@ public String toPrettyString() { public String annotate(String text) { if (text == null) return null; - text = text.replace("&", "&").replace("<", "<").replaceAll( - "\\b(https?://[^\\s)>]+)", "$1"); + text = text.replace("&", "&").replace("<", "<"); for (TestAction action: getTestActions()) { text = action.annotate(text); diff --git a/src/test/java/hudson/tasks/junit/CaseResultTest.java b/src/test/java/hudson/tasks/junit/CaseResultTest.java index a5fe2d798..1fc6f4ea5 100644 --- a/src/test/java/hudson/tasks/junit/CaseResultTest.java +++ b/src/test/java/hudson/tasks/junit/CaseResultTest.java @@ -85,24 +85,24 @@ public void testIssue20090516() throws Exception { // piggy back tests for annotate methods assertOutput(cr,"plain text", "plain text"); assertOutput(cr,"line #1\nhttp://nowhere.net/\nline #2\n", - "line #1\nhttp://nowhere.net/\nline #2\n"); + "line #1\nhttp://nowhere.net/\nline #2\n"); assertOutput(cr,"failed; see http://nowhere.net/", - "failed; see http://nowhere.net/"); + "failed; see http://nowhere.net/"); assertOutput(cr,"failed (see http://nowhere.net/)", - "failed (see http://nowhere.net/)"); + "failed (see http://nowhere.net/)"); assertOutput(cr,"http://nowhere.net/ - failed: http://elsewhere.net/", - "http://nowhere.net/ - failed: " + - "http://elsewhere.net/"); + "http://nowhere.net/ - failed: " + + "http://elsewhere.net/"); assertOutput(cr,"https://nowhere.net/", - "https://nowhere.net/"); + "https://nowhere.net/"); assertOutput(cr,"stuffhttp://nowhere.net/", "stuffhttp://nowhere.net/"); assertOutput(cr,"a < b && c < d", "a < b && c < d"); assertOutput(cr,"see ", - "see <http://nowhere.net/>"); + "see <http://nowhere.net/>"); assertOutput(cr,"http://google.com/?q=stuff&lang=en", - "http://google.com/?q=stuff&lang=en"); + "http://google.com/?q=stuff&lang=en"); assertOutput(cr,"http://localhost:8080/stuff/", - "http://localhost:8080/stuff/"); + "http://localhost:8080/stuff/"); }