mirror of
https://github.com/drwetter/testssl.sh.git
synced 2024-12-28 12:29:44 +01:00
Merge pull request #2317 from dcooper16/fix_html
Fix HTML output in Bash 5.2 and newer
This commit is contained in:
commit
05b4cdcc0d
10
testssl.sh
10
testssl.sh
@ -535,11 +535,11 @@ html_reserved(){
|
||||
local output
|
||||
"$do_html" || return 0
|
||||
#sed -e 's/\&/\&/g' -e 's/</\</g' -e 's/>/\>/g' -e 's/"/\"/g' -e "s/'/\'/g" <<< "$1"
|
||||
output="${1//&/&}"
|
||||
output="${output//</<}"
|
||||
output="${output//>/>}"
|
||||
output="${output//\"/"}"
|
||||
output="${output//\'/'}"
|
||||
output="${1//&/$'&'amp;}"
|
||||
output="${output//</$'&'lt;}"
|
||||
output="${output//>/$'&'gt;}"
|
||||
output="${output//\"/$'&'quot;}"
|
||||
output="${output//\'/$'&'apos;}"
|
||||
printf -- "%s" "$output"
|
||||
return 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user