[ 
https://issues.apache.org/jira/browse/VALIDATOR-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Speakmon resolved VALIDATOR-218.
------------------------------------

    Resolution: Fixed

Fixed in the new UrlValidator:

$ svn ci
Sending        
src/main/java/org/apache/commons/validator/routines/UrlValidator.java
Sending        
src/test/java/org/apache/commons/validator/routines/UrlValidatorTest.java
Transmitting file data ..
Committed revision 590915.


> UrlValidator fail when path contains "(" / ")"
> ----------------------------------------------
>
>                 Key: VALIDATOR-218
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-218
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Routines
>    Affects Versions: 1.3.1 Release
>         Environment: JDK 1.5, Linux
>            Reporter: Stephen Chu
>            Assignee: Niall Pemberton
>             Fix For: 1.4
>
>
> for validating the URL "http://somewhere.com/pathxyz/file(1).html", it 
> returns false.
> According to the RFC,
> uric          = reserved | unreserved | escaped
> reserved      = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
>                       "$" | ","
> unreserved    = alphanum | mark
> mark          = "-" | "_" | "." | "!" | "~" | "*" | "'" |
>                       "(" | ")"
> "(", ")" belongs to mark and is a valid part of uric.
> Test case:
> UrlValidator validator = new UrlValidator({"http","https"}, 
> UrlValidator.ALLOW_2_SLASHES);
> validator.isValid("http://somewhere.com/pathxyz/file(1).html");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to