Trim values

This commit is contained in:
Remo Zaros
2026-06-29 09:42:10 +02:00
parent 72bfb88bfb
commit 159f96c9c2

View File

@@ -88,10 +88,8 @@ function send_postcode_data()
body: JSON.stringify(payload)
});
// Parse altijd eerst de JSON, zelfs bij HTTP fouten
const data = await resp.json();
// UI: Reset knop
sndBtn.disabled = false;
sndBtnLdr.style.opacity = "0";
sndBtnTxt.style.opacity = "1";
@@ -269,10 +267,10 @@ function handle_postcode_modal($data)
}
set_pppr_cookie(
postcode_in_range($params["postcode"]),
$straatnaam,
$params["huisnummer"],
$params["postcode"],
$woonplaats
trim($straatnaam),
trim($params["huisnummer"]),
trim($params["postcode"]),
trim($woonplaats)
);
return new WP_REST_Response([