summaryrefslogtreecommitdiff
path: root/lib/html.source.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-05-08 00:47:13 +0300
committerPaul Buetow <paul@buetow.org>2023-05-08 00:47:13 +0300
commitb9a748dafccc7f28aa695d3590be952560eedb35 (patch)
tree508bff7e78561b1a3c8d4a3291564a1713f72da5 /lib/html.source.sh
parente3f7a795d0f5741b145f843dc2a31e97f8d6a67d (diff)
also escape ' properly
Diffstat (limited to 'lib/html.source.sh')
-rw-r--r--lib/html.source.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/html.source.sh b/lib/html.source.sh
index 7056f24..8f057a0 100644
--- a/lib/html.source.sh
+++ b/lib/html.source.sh
@@ -4,6 +4,7 @@ html::encode () {
s|\&|\&amp;|g;
s|<|\&lt;|g;
s|>|\&gt;|g;
+ s|'\''|\&#39;|g;
' <<< "$@"
}
@@ -70,7 +71,7 @@ html::make_link () {
descr="$link"
fi
- echo "<a class='textlink' href='$link'>$descr</a><br />"
+ echo "<a class='textlink' href='$($SED 's/'\''/\&#39;/g' <<< "$link")'>$descr</a><br />"
}
html::process_inline () {