From 5a9e4c10116b32a3f0c78c812977cb3519bbec92 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sun, 1 Oct 2017 12:56:47 +0100 Subject: Escape double quotes to allow them to be used e.g. in TXT records --- dns.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dns.php b/dns.php index 11de4ad..d2dcc19 100644 --- a/dns.php +++ b/dns.php @@ -94,6 +94,7 @@ function writezone($domain, $zonetext, $password = null) { // Escape characters that will break the echo later on $zonetext = str_replace('$', '\$', $zonetext); + $zonetext = str_replace('"', '\"', $zonetext); // Create a temporary file for checking the zone file validity sshrun("echo -en \"$zonetext\" > " . TMPROOT . $domain . TMPSUFFIX); -- cgit v1.2.3