From 20fdd9024da784e3ac0fefad093f7454020a7a20 Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 19 Feb 2025 01:25:07 -0800 Subject: [PATCH] Added safeOutputValue() --- includes/functions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index 4316ed5d..7d24a4f3 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -629,6 +629,13 @@ function mb_escapeshellarg($arg) } } +function safeOutputValue($def, $arr) +{ + if (array_key_exists($def, $arr)) { + echo htmlspecialchars($arr[$def], ENT_QUOTES); + } +} + function dnsServers() { $data = json_decode(file_get_contents("./config/dns-servers.json"));