Browse Source

Improve _htmlEscape function robustness by using printf instead of echo

small commit to trigger github actions
pull/6690/head
Robert Rettig 5 days ago
parent
commit
27ebf09c5c
Failed to extract signature
  1. 8
      dnsapi/dns_inwx.sh

8
dnsapi/dns_inwx.sh

@ -172,10 +172,10 @@ _inwx_check_cookie() {
_htmlEscape() { _htmlEscape() {
_s="$1" _s="$1"
_s=$(echo "$_s" | sed "s/&/&/g")
_s=$(echo "$_s" | sed "s/</\&lt;/g")
_s=$(echo "$_s" | sed "s/>/\&gt;/g")
_s=$(echo "$_s" | sed 's/"/\&quot;/g')
_s=$(printf '%s' "$_s" | sed "s/&/&amp;/g")
_s=$(printf '%s' "$_s" | sed "s/</\&lt;/g")
_s=$(printf '%s' "$_s" | sed "s/>/\&gt;/g")
_s=$(printf '%s' "$_s" | sed 's/"/\&quot;/g')
printf -- %s "$_s" printf -- %s "$_s"
} }

Loading…
Cancel
Save