Skip to content

Commit db9be6d

Browse files
committed
*Strip double quotes and only add back if value has spaces or semicolon
1 parent 4adbef4 commit db9be6d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/v-add-dns-record

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then
4949
fi
5050
fi
5151

52+
dvalue=${dvalue//\"/}
53+
54+
if [[ "dvalue" =~ [^\;\s] ]]; then
55+
dvalue='"'"$dvalue"'"'
56+
fi
57+
5258

5359
#----------------------------------------------------------#
5460
# Verifications #

0 commit comments

Comments
 (0)