/* A map of test titles and their manually verified output. If the parser * output matches the expected output listed here, the test can be marked as * passing in parserTests.js. */ testWhiteList = {}; // Italic/link nesting is changed in this test, but the rendered result is the // same. Currently the result is actually an improvement over the MediaWiki // output. testWhiteList["Bug 2702: Mismatched , and tags are invalid"] = "

texttextSomething in italicSomething mixed, even boldNow both

"; // The expected result for this test is really broken html. testWhiteList["Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)"] = "

Some pretty italics and stuff!

"; testWhiteList["External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)"] = "

Some pretty italics and stuff!

"; // This is a rare edge case, and the new behavior is arguably more consistent testWhiteList["5 quotes, code coverage +1 line"] = "

"; // The comment in the test already suggests this result as correct, but // supplies the old result without preformatting. testWhiteList["Bug 6200: Preformatted in
"] = "
\nBlah
"; // empty table tags / with only a caption are legal in HTML5. testWhiteList["A table with no data."] = "
"; testWhiteList["A table with nothing but a caption"] = "
caption
"; testWhiteList["Fuzz testing: Parser22"] = "

http://===r:::https://b

"; /** * Small whitespace differences that we now start to care about for * round-tripping */ // Very minor whitespace difference at end of cell (MediaWiki inserts a // newline before the close tag even if there was no trailing space in the cell) //testWhiteList["Table rowspan"] = "
Cell 1, row 1 Cell 2, row 1 (and 2) Cell 3, row 1
Cell 1, row 2 Cell 3, row 2
"; // Inter-element whitespace only //testWhiteList["Indented table markup mixed with indented pre content (proposed in bug 6200)"] = " \n\n
\nText that should be rendered preformatted\n
"; /* Misc sanitizer / HTML5 differences */ // Single quotes are legal in HTML5 URIs. See // http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#url-manipulation-and-creation testWhiteList["Link containing double-single-quotes '' (bug 4598)"] = "

Lista d''e paise d''o munno

"; // Sanitizer testWhiteList["Invalid attributes in table cell (bug 1830)"] = "
broken
"; testWhiteList["Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)"] = "
|[1]\" onmouseover=\"alert(document.cookie)\">test
"; // Sanitizer, but UTF8 in link is ok in HTML5 testWhiteList["External link containing double-single-quotes with no space separating the url from text in italics"] = "

La muerte de Casagemas (1901) en el sitio de Museo Picasso.

"; testWhiteList["External links: wiki links within external link (Bug 3695)"] = "

wikilink embedded in ext link

"; // This is valid, just confusing for humans. The reason for disallowing this // might be history by now. XXX: Check this! testWhiteList["Link containing % as a double hex sequence interpreted to hex sequence"] = "

7%25 Solution

"; if (typeof module == "object") { module.exports.testWhiteList = testWhiteList; }