Permalink
Browse files

Merge pull request #19 from kaerast/patch-1

a hyphen needs escaping in a regex, otherwise weird things are liable to
  • Loading branch information...
2 parents 5d36dcb + 880a30a commit 1b766f4b7825d2eac92f2b7fb0f7b4f32fa65902 @ryanseddon committed May 21, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 h5f.js
View
4 h5f.js
@@ -12,8 +12,8 @@ var H5F = H5F || {};
(function(d){
var field = d.createElement("input"),
- emailPatt = /^[a-z0-9_.%+-]+@[0-9a-z.-]+\.[a-z.]{2,6}$/i,
- urlPatt = /[a-z][-\.+a-z]*:\/\//i,
+ emailPatt = /^[a-z0-9_.%+\-]+@[0-9a-z.\-]+\.[a-z.]{2,6}$/i,
+ urlPatt = /[a-z][\-\.+a-z]*:\/\//i,
nodes = /^(input|select|textarea)$/i,
isSubmit, usrPatt, curEvt, args, custMsg = "",
// Methods

0 comments on commit 1b766f4

Please sign in to comment.