mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
Trim whitespaces before adding custom DNS record
Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
@@ -215,7 +215,7 @@ $(() => {
|
||||
|
||||
$("#btnAdd-host").on("click", () => {
|
||||
utils.disableAll();
|
||||
const elem = $("#Hip").val() + " " + $("#Hdomain").val();
|
||||
const elem = $("#Hip").val().trim() + " " + $("#Hdomain").val().trim();
|
||||
const url = document.body.dataset.apiurl + "/config/dns/hosts/" + encodeURIComponent(elem);
|
||||
utils.showAlert("info", "", "Adding DNS record...", elem);
|
||||
$.ajax({
|
||||
|
||||
Reference in New Issue
Block a user