changed url regex to a stricter one
This commit is contained in:
@@ -4,7 +4,7 @@ const form = document.getElementById("search-form");
|
||||
const input = document.getElementById("search-input");
|
||||
|
||||
// https://stackoverflow.com/a/3809435/16804841
|
||||
const expression = /[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi;
|
||||
const expression = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi;
|
||||
const urlRegex = new RegExp(expression);
|
||||
|
||||
const searchEngines = {
|
||||
|
||||
Reference in New Issue
Block a user