Improve domain whitespace handling in inputs

This commit is contained in:
Mcat12
2017-11-22 13:25:23 -05:00
parent 40e6c5faf1
commit 3ec55dbf0a
2 changed files with 6 additions and 5 deletions

View File

@@ -141,7 +141,7 @@ function add(arg) {
$.ajax({
url: "scripts/pi-hole/php/add.php",
method: "post",
data: {"domain":domain.val(), "list":locallistType, "token":token},
data: {"domain":domain.val().trim(), "list":locallistType, "token":token},
success: function(response) {
if (response.indexOf("] Pi-hole blocking is ") === -1) {
alFailure.show();