Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Construct "&" in Validator.URL is simple character class, not reference to ampersand #322

Open
GoogleCodeExporter opened this issue May 5, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Match a string "a" to a subset of the regex: 
"^(\\/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'\\/\\\\\\+=&%\\$#_]*)?$"
2. Match a string "a" to a subset of the regex without a-z range: 
"^(\\/?)([A-Z0-9\\-\\.\\?\\,\\:\\'\\/\\\\\\+=&%\\$#_]*)?$"
3. Match a string "a" to a subset of the regex without "amp;" substring: 
"^(\\/?)([A-Z0-9\\-\\.\\?\\,\\:\\'\\/\\\\\\+=&%\\$#_]*)?$"

What is the expected output? What do you see instead?
1. "a" matches
2. "a" matches, but expected not to match, if & is a reference to ampersand
3. "a" does not match

Conclusion: & is a simple character class, not a reference to ampersand.

What version of the product are you using? On what operating system?
2.1.0 Win7

Does this issue affect only a specified browser or set of browsers?
-

Please provide any additional information below.
Java 1.6

Original issue reported on code.google.com by [email protected] on 17 Mar 2014 at 8:17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant