diff --git a/testssl.sh b/testssl.sh index 16374ae..58a1c23 100755 --- a/testssl.sh +++ b/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" <<< "$1" - output="${1//&/&}" - output="${output///>}" - output="${output//\"/"}" - output="${output//\'/'}" + output="${1//&/$'&'amp;}" + output="${output///$'&'gt;}" + output="${output//\"/$'&'quot;}" + output="${output//\'/$'&'apos;}" printf -- "%s" "$output" return 0 }