all repos — grayfriday @ 50b8e0370b6d767a2df828f8a3481a6a443fdb61

blackfriday fork with a few changes

Merge pull request #74 from mprobst/sanitize_test

Add a test for the correct handling of escaped entities in HTML.
Vytautas Ĺ altenis vytas@rtfb.lt
Sat, 03 May 2014 13:58:03 +0300
commit

50b8e0370b6d767a2df828f8a3481a6a443fdb61

parent

c76eb63418dc02591a80541fb40b339c0f558697

1 files changed, 11 insertions(+), 0 deletions(-)

jump to
M inline_test.goinline_test.go

@@ -218,6 +218,17 @@ }

doTestsInlineParam(t, tests, 0, HTML_SKIP_STYLE|HTML_SANITIZE_OUTPUT) } +func TestQuoteEscaping(t *testing.T) { + tests := []string{ + "<p>Here are some &quot;quotes&quot;.</p>\n", + "<p>Here are some &#34;quotes&#34;.</p>\n", + + "<p>Here are some &ldquo;quotes&rdquo;.</p>\n", + "<p>Here are some \u201Cquotes\u201D.</p>\n", + } + doTestsInlineParam(t, tests, 0, HTML_SKIP_STYLE|HTML_SANITIZE_OUTPUT) +} + func TestEmphasis(t *testing.T) { var tests = []string{ "nothing inline\n",