We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 386a509 commit c8313c4Copy full SHA for c8313c4
src/coverage.sh
@@ -728,12 +728,10 @@ function bashunit::coverage::check_threshold() {
728
}
729
730
# Escape HTML special characters
731
+# Uses sed for cross-version bash compatibility (bash 3.2 vs 4.4+ handle & differently in replacement strings)
732
function bashunit::coverage::html_escape() {
733
local text="$1"
- text="${text//&/&}"
734
- text="${text//</<}"
735
- text="${text//>/>}"
736
- echo "$text"
+ printf "%s" "$text" | sed "s/&/\&/g; s/</\</g; s/>/\>/g"
737
738
739
# Convert file path to safe filename for HTML
0 commit comments