mirror of
https://github.com/seigler/govobject-proposal
synced 2025-07-27 06:46:10 +00:00
simplify url regex
This commit is contained in:
parent
9f2deea047
commit
119b8f9dfc
1 changed files with 1 additions and 1 deletions
|
@ -3522,7 +3522,7 @@ GovObject.prototype._verifyAddress = function(address, network) {
|
|||
};
|
||||
|
||||
GovObject.prototype._verifyUrl = function(url) {
|
||||
var urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
|
||||
var urlregex = /^(http|https):\/\/[^ "]+$/;
|
||||
return urlregex.test(url);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue