mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Protocol required in isValidURL
This commit is contained in:
parent
34964ba598
commit
f938e3e60a
@ -555,7 +555,7 @@
|
||||
};
|
||||
|
||||
Util.isValidURL = function (str) {
|
||||
var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol
|
||||
var pattern = new RegExp('^(https?:\\/\\/)'+ // protocol
|
||||
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name
|
||||
'((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address
|
||||
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path
|
||||
|
||||
Loading…
Reference in New Issue
Block a user