From db9be6d2446e7363d19985262b66c6d36f574f37 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 13 Aug 2016 17:19:55 -0400 Subject: [PATCH] *Strip double quotes and only add back if value has spaces or semicolon --- bin/v-add-dns-record | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/v-add-dns-record b/bin/v-add-dns-record index 113874d39..08f7be57e 100755 --- a/bin/v-add-dns-record +++ b/bin/v-add-dns-record @@ -49,6 +49,12 @@ if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then fi fi +dvalue=${dvalue//\"/} + +if [[ "dvalue" =~ [^\;\s] ]]; then + dvalue='"'"$dvalue"'"' +fi + #----------------------------------------------------------# # Verifications #