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
Failed to extract signature
1 changed files with
4 additions and
4 deletions
-
dnsapi/dns_inwx.sh
|
|
|
@ -172,10 +172,10 @@ _inwx_check_cookie() { |
|
|
|
|
|
|
|
_htmlEscape() { |
|
|
|
_s="$1" |
|
|
|
_s=$(echo "$_s" | sed "s/&/&/g") |
|
|
|
_s=$(echo "$_s" | sed "s/</\</g") |
|
|
|
_s=$(echo "$_s" | sed "s/>/\>/g") |
|
|
|
_s=$(echo "$_s" | sed 's/"/\"/g') |
|
|
|
_s=$(printf '%s' "$_s" | sed "s/&/&/g") |
|
|
|
_s=$(printf '%s' "$_s" | sed "s/</\</g") |
|
|
|
_s=$(printf '%s' "$_s" | sed "s/>/\>/g") |
|
|
|
_s=$(printf '%s' "$_s" | sed 's/"/\"/g') |
|
|
|
printf -- %s "$_s" |
|
|
|
} |
|
|
|
|
|
|
|
|