Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

WICKET-5112 parentheses are valid in url path

  • Loading branch information...
commit ed780cc72eb70a71291a724dbced24e1af56653a 1 parent 14d018d
svenmeier authored
View
2  wicket-core/src/main/java/org/apache/wicket/validation/validator/UrlValidator.java
@@ -115,7 +115,7 @@
private static final int PARSE_AUTHORITY_PORT = 4;
private static final int PARSE_AUTHORITY_EXTRA = 5; // Should always be empty.
- private static final String PATH_PATTERN = "^(/[-\\w:@&?=+,.!/~*'%$_;]*)?$";
+ private static final String PATH_PATTERN = "^(/[-\\w:@&?=+,.!/~*'%$_;\\(\\)]*)?$";
private static final String QUERY_PATTERN = "^(.*)$";
View
10 wicket-core/src/test/java/org/apache/wicket/validation/validator/UrlValidatorTest.java
@@ -53,6 +53,16 @@ protected void tearDown()
}
/**
+ * WICKET-5112
+ */
+ public void testParentheses()
+ {
+ String[] schemes = { "http" };
+ UrlValidator urlValidator = new UrlValidator(schemes);
+ assertTrue(urlValidator.isValid("http://en.wikipedia.org/wiki/Genus_(mathematics)"));
+ }
+
+ /**
* test
*/
public void testIsValid()
Please sign in to comment.
Something went wrong with that request. Please try again.