mirror of
https://github.com/danog/blackfriday.git
synced 2024-11-27 04:24:41 +01:00
Add a test for the correct handling of escaped entities in HTML.
The sanitization code does not retain any particular escaped entities - it parses the HTML and thus loses the information on what entities were in the original. The result is correct UTF-8 HTML though.
This commit is contained in:
parent
8d2af3a21b
commit
915f7049a0
@ -218,6 +218,17 @@ func TestRawHtmlTag(t *testing.T) {
|
|||||||
doTestsInlineParam(t, tests, 0, HTML_SKIP_STYLE|HTML_SANITIZE_OUTPUT)
|
doTestsInlineParam(t, tests, 0, HTML_SKIP_STYLE|HTML_SANITIZE_OUTPUT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestQuoteEscaping(t *testing.T) {
|
||||||
|
tests := []string{
|
||||||
|
"<p>Here are some "quotes".</p>\n",
|
||||||
|
"<p>Here are some "quotes".</p>\n",
|
||||||
|
|
||||||
|
"<p>Here are some “quotes”.</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) {
|
func TestEmphasis(t *testing.T) {
|
||||||
var tests = []string{
|
var tests = []string{
|
||||||
"nothing inline\n",
|
"nothing inline\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user