Browse Source

*Strip double quotes and only add back if value has spaces or semicolon

Derrick Hammer 9 years ago
parent
commit
db9be6d244
1 changed files with 6 additions and 0 deletions
  1. 6 0
      bin/v-add-dns-record

+ 6 - 0
bin/v-add-dns-record

@@ -49,6 +49,12 @@ if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then
     fi
     fi
 fi
 fi
 
 
+dvalue=${dvalue//\"/}
+
+if [[ "dvalue" =~ [^\;\s] ]]; then
+    dvalue='"'"$dvalue"'"'
+fi
+
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                    Verifications                         #
 #                    Verifications                         #