diff options
| author | Paul Buetow <paul@buetow.org> | 2022-01-03 10:10:43 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2022-01-03 10:10:43 +0000 |
| commit | 7f3318ecab9b9ffedc47e0a9d247dc5fdf9b2893 (patch) | |
| tree | e23c0aebeeeb488f21f4a11662c5370efb9cb3db /lib | |
| parent | 92cc75eb119f9aff696a84aded2ed33ebe00f54a (diff) | |
fix HTML encodings in lists
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/html.source.sh | 5 |
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 &<>& Bar!</p>' + line='echo foo 2>&1' + assert::equals "$(html::make_paragraph "$line")" '<p>echo foo 2>&1</p>' + line='# Header 1' assert::equals "$(html::make_heading "$line" 1)" '<h1>Header 1</h1>' |
