-
Notifications
You must be signed in to change notification settings - Fork 50
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
URLs getting butchered. :( #13
Comments
+1 |
1 similar comment
+1 |
I don't use mongoose-types anymore. I use the following as my validators var Url = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
var Email = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; |
I have the same issue :( |
It adds the question mark at the end due to an incorrect check on url.js, line 52. Even if the query string is empty, the check returns true since url parsing returns an object literal, which evaluates to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tried using mongoose-types for URL matching, but it's butchering my URLs. Not particularly liking the edits it's doing. It keeps removing the port number and adding question marks to the end of every URL. >.>
The text was updated successfully, but these errors were encountered: