summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/html.source.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/html.source.sh b/lib/html.source.sh
index a7e7717..fe4c86e 100644
--- a/lib/html.source.sh
+++ b/lib/html.source.sh
@@ -88,7 +88,7 @@ html::fromgmi () {
'* '*)
is_list=yes
echo "<ul>"
- echo "<li>${line/\* /}</li>"
+ echo "<li>$(html::encode "${line/\* /}")</li>"
;;
'```'*)
is_plain=yes
@@ -127,6 +127,9 @@ html::test () {
line='Foo &<>& Bar!'
assert::equals "$(html::make_paragraph "$line")" '<p>Foo &amp;&lt;&gt;&amp; Bar!</p>'
+ line='echo foo 2>&1'
+ assert::equals "$(html::make_paragraph "$line")" '<p>echo foo 2&gt;&amp;1</p>'
+
line='# Header 1'
assert::equals "$(html::make_heading "$line" 1)" '<h1>Header 1</h1>'