Skip to content

Commit 4a2b258

Browse files
authored
Merge pull request #2318 from dcooper16/fix_html_30
Fix HTML output in Bash 5.2 and newer
2 parents cd2eef3 + 5c0b831 commit 4a2b258

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

testssl.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -491,11 +491,11 @@ html_reserved(){
491491
local output
492492
"$do_html" || return 0
493493
#sed -e 's/\&/\&amp;/g' -e 's/</\&lt;/g' -e 's/>/\&gt;/g' -e 's/"/\&quot;/g' -e "s/'/\&apos;/g" <<< "$1"
494-
output="${1//&/&amp;}"
495-
output="${output//</&lt;}"
496-
output="${output//>/&gt;}"
497-
output="${output//\"/&quot;}"
498-
output="${output//\'/&apos;}"
494+
output="${1//&/$'&'amp;}"
495+
output="${output//</$'&'lt;}"
496+
output="${output//>/$'&'gt;}"
497+
output="${output//\"/$'&'quot;}"
498+
output="${output//\'/$'&'apos;}"
499499
printf -- "%s" "$output"
500500
return 0
501501
}

0 commit comments

Comments
 (0)