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

major bug on URL Validation #129

Closed
emadhegab opened this Issue Aug 2, 2010 · 2 comments

Comments

Projects
None yet
2 participants
@emadhegab

emadhegab commented Aug 2, 2010

i faced a very weird bug on validation when i put in url field the following URL it gives error validation

http://www.spa.gov.sa/NewsHeadlines.php?pg=2

i think the regular expression doesn't accept any querystring or by other word anything beginning from the ? mark so i've changed the RE into the following and it worked

^(?:(?:ht|f)tp(?:s?)://|/|/)?(?:\w+:\w+@)?(?:(?:[-\w]+.)+(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum|travel|[a-z]{2}))(?::[\d]{1,5})?(?:(?:(?:/(?:[-\w!$+|.,=]|%[a-f\d]{2})+)+|/)+|?|#)?(?:(?:?(?:[-\w~!$+|.,:]|%[a-f\d{2}])+=(?:[-\w~!$+|.,:=]|%[a-f\d]{2}))(?:&(?:[-\w~!$+|.,:]|%[a-f\d{2}])+=(?:[-\w~!$+|.,:=]|%[a-f\d]{2})))(?:#(?:[-\w~!$+|.,:=]|%[a-f\d]{2}))?$

and it worked

so i hope you fix this cause it's not common to have clean URL in all the web :)

thanks in advanced and hope i'm giving you more support for such good product

@tipiirai

This comment has been minimized.

Show comment
Hide comment
@tipiirai

tipiirai Aug 15, 2010

Contributor

working on this now. found out that your regexp is no perfect too. for example this URL won't validate:

http://www.spa.gov.sa/NewsHeadlines.php?pg

Contributor

tipiirai commented Aug 15, 2010

working on this now. found out that your regexp is no perfect too. for example this URL won't validate:

http://www.spa.gov.sa/NewsHeadlines.php?pg

@tipiirai

This comment has been minimized.

Show comment
Hide comment
@tipiirai

tipiirai Aug 15, 2010

Contributor

this is fixed now. here is the commit:

http://github.com/jquerytools/jquerytools/commit/6657c0e02849f59dae92e41f0172db4589930445

will be released on v.1.2.4

Contributor

tipiirai commented Aug 15, 2010

this is fixed now. here is the commit:

http://github.com/jquerytools/jquerytools/commit/6657c0e02849f59dae92e41f0172db4589930445

will be released on v.1.2.4

This issue was closed.

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