Merge branch 'master' into refactor-new-issues

This commit is contained in:
Mohit Panjwani
2020-05-30 21:36:49 +05:30
5 changed files with 11 additions and 5 deletions

View File

@ -128,6 +128,14 @@ export default {
},
checkValidUrl(url) {
if (
url.includes('http://localhost') ||
url.includes('http://127.0.0.1') ||
url.includes('https://localhost') ||
url.includes('https://127.0.0.1')
) {
return true
}
let pattern = new RegExp(
'^(https?:\\/\\/)?' + // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name