mirror of
https://github.com/twofas/2fas-browser-extension.git
synced 2024-11-22 02:00:08 +01:00
#1458 URL Regex FIX
This commit is contained in:
parent
b515c200ea
commit
41f0f03d29
@ -28,14 +28,9 @@ const storeLog = require('../../partials/storeLog');
|
||||
const hideDomainModal = require('./hideDomainModal');
|
||||
|
||||
const isValidUrl = urlString => {
|
||||
const urlPattern = new RegExp('^(https?:\\/\\/)?' +
|
||||
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' +
|
||||
'((\\d{1,3}\\.){3}\\d{1,3}))' +
|
||||
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' +
|
||||
'(\\?[;&a-z\\d%_.~+=-]*)?' +
|
||||
'(\\#[-a-z\\d_]*)?$', 'i');
|
||||
return !!urlPattern.test(urlString);
|
||||
}
|
||||
const urlRegex = /^(((http|https):\/\/|)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,6}(:[0-9]{1,5})?(\/.*)?)$/;
|
||||
return urlRegex.test(urlString);
|
||||
};
|
||||
|
||||
const domainModalFormSubmit = e => {
|
||||
e.preventDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user