mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 21:12:15 +00:00
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
This commit is contained in:
1 parent
47fa71a5f6
commit
8a4b77e4b9
1 file changed
+9
@@ -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");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user