diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Let character references through to the browser
Decoding them here instead would mean carrying every named reference HTML defines, while the browser already knows them all.
Diffstat (limited to 'tests')
-rw-r--r--tests/extensions/test-about-render.lua9
1 file changed, 9 insertions, 0 deletions
diff --git a/tests/extensions/test-about-render.lua b/tests/extensions/test-about-render.lua
index 236c61a..e84c854 100644
--- a/tests/extensions/test-about-render.lua
+++ b/tests/extensions/test-about-render.lua
@@ -117,6 +117,15 @@ h.contains("an escaped hash starts no heading", out, "<p># not a heading</p>")
out = render("README.md", "`a\\*b`")
h.contains("code keeps its backslashes", out, "<code>a\\*b</code>")
+out = render("README.md", "&copy; &#169; &#xA9; &amp;")
+h.contains("character references pass through", out, "<p>&copy; &#169; &#xA9; &amp;</p>")
+
+out = render("README.md", "AT&T & &#xZZ; &#12345678;")
+h.contains("a bare ampersand is escaped", out, "<p>AT&amp;T &amp; &amp;#xZZ; &amp;#12345678;</p>")
+
+out = render("README.md", "`&amp;`")
+h.contains("code shows a reference as written", out, "<code>&amp;amp;</code>")
+
out = render("README.md", "run `x < y` here")
h.contains("inline code is escaped", out, "<code>x &lt; y</code>")