提交 8a4b77e4 编写于 作者: D dwdyer

Fix for ISSUE#909 (encode spaces in URLs sent by Jabber bot).

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8938 71c3de6d-444a-0410-be80-ed276b4c234a
上级 47fa71a5
......@@ -51,4 +51,13 @@ public class UtilTest extends TestCase {
assertEquals(Messages.Util_second(17), Util.getTimeSpanString(17000L));
}
/**
* Test that Strings that contain spaces are correctly URL encoded.
*/
public void testEncodeSpaces() {
final String urlWithSpaces = "http://hudson/job/Hudson Job";
String encoded = Util.encode(urlWithSpaces);
assertEquals(encoded, "http://hudson/job/Hudson%20Job");
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册