mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-12-24 12:14:23 +08:00
Improve _htmlEscape function robustness by using printf instead of echo
small commit to trigger github actions
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user