diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index b4b3dce..0000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -ui/html/* linguist-vendored -ui/jhtml-compat/* linguist-vendored diff --git a/ui/html/index.js b/ui/html/index.js index 837cda7..d547817 100644 --- a/ui/html/index.js +++ b/ui/html/index.js @@ -127,7 +127,7 @@ function dnswatch_search() { function is_valid_domain(str) { - let regex = /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/; + let regex = /^([a-z0-9\-]{1,64}\.){1,16}[a-z0-9]{2,}$/; return regex.test(str); } diff --git a/ui/jhtml-compat/index.js b/ui/jhtml-compat/index.js index 31cc985..c7f92b7 100644 --- a/ui/jhtml-compat/index.js +++ b/ui/jhtml-compat/index.js @@ -128,7 +128,7 @@ function dnswatch_search() { function is_valid_domain(str) { - let regex = /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/; + let regex = /^([a-z0-9\-]{1,64}\.){1,16}[a-z0-9]{2,}$/; return regex.test(str); } diff --git a/ui/raw/index.js b/ui/raw/index.js index 837cda7..d547817 100644 --- a/ui/raw/index.js +++ b/ui/raw/index.js @@ -127,7 +127,7 @@ function dnswatch_search() { function is_valid_domain(str) { - let regex = /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/; + let regex = /^([a-z0-9\-]{1,64}\.){1,16}[a-z0-9]{2,}$/; return regex.test(str); }