Cscott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/232412
Change subject: Sync parserTests with core.
......................................................................
Sync parserTests with core.
This matches upstream core commit bb281c0317006ecfc4a3414d8ef1a4d2b2349b31.
New blacklist entries due to T23261 (IPv6 URLs) and
T106578/T106079 (Illegal HTML5 character entities).
Change-Id: Ia5e062faae75727fac0ccaf48beb8f984e91dc01
---
M tests/fetch-parserTests.txt.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 147 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/12/232412/1
diff --git a/tests/fetch-parserTests.txt.js b/tests/fetch-parserTests.txt.js
index e163efd..a219678 100755
--- a/tests/fetch-parserTests.txt.js
+++ b/tests/fetch-parserTests.txt.js
@@ -12,9 +12,9 @@
// and update these hashes automatically.
//
// You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = "6318a631297f9fe85a3b5356d7481f10f814c5c3";
+var expectedSHA1 = "a9c88d043175aa2f2cf08ea270da2388380237c3";
// git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = "59e8147b67f2d9b3d6db6132917b27ea2463e8aa";
+var latestCommit = "bb281c0317006ecfc4a3414d8ef1a4d2b2349b31";
var fs = require('fs');
var path = require('path');
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 7121684..f5b3397 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -54,6 +54,8 @@
add("wt2html", "Definition Lists: colons and tables 1", "<dl
data-parsoid='{\"dsr\":[0,21,0,0]}'><dd
data-parsoid='{\"dsr\":[0,10,1,0]}'><table
data-parsoid='{\"dsr\":[1,10,2,2]}'>\n<tbody
data-parsoid='{\"dsr\":[4,8,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[4,7,0,0]}'><td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[4,7,1,0]}'>
x</td></tr>\n</tbody></table></dd>\n<dd
data-parsoid='{\"dsr\":[11,21,1,0]}'><table
data-parsoid='{\"dsr\":[12,21,2,2]}'>\n<tbody
data-parsoid='{\"dsr\":[15,19,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[15,18,0,0]}'><td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[15,18,1,0]}'>
y</td></tr>\n</tbody></table></dd></dl>");
add("wt2html", "Bug 2702: Mismatched <i>, <b> and <a> tags are invalid", "<p
data-parsoid='{\"dsr\":[0,204,0,0]}'><i
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[0,29,2,0]}'><a
rel=\"mw:ExtLink\" href=\"http://example.com\"
data-parsoid='{\"targetOff\":22,\"contentOffsets\":[22,28],\"dsr\":[2,29,20,1]}'>text<i
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[26,28,2,0]}'></i></a></i>\n<a
rel=\"mw:ExtLink\" href=\"http://example.com\"
data-parsoid='{\"targetOff\":50,\"contentOffsets\":[50,57],\"dsr\":[30,58,20,1]}'><b
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[50,57,3,0]}'>text</b></a><b
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[58,61,3,0]}'></b>\n<i
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[62,106,2,0]}'>Something <a
rel=\"mw:ExtLink\" href=\"http://example.com\"
data-parsoid='{\"targetOff\":94,\"contentOffsets\":[94,105],\"dsr\":[74,106,20,1]}'>in
italic<i
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[103,105,2,0]}'></i></a></i>\n<i
data-parsoid='{\"dsr\":[107,164,2,2]}'>Something <a rel=\"mw:ExtLink\"
href=\"http://example.com\"
data-parsoid='{\"targetOff\":139,\"contentOffsets\":[139,160],\"dsr\":[119,161,20,1]}'>mixed<b
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[144,160,3,0]}'><i
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[147,160,2,0]}'>, even
bold</i></b></a>'</i>\n<b
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[165,204,3,0]}'><i
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[168,204,2,0]}'>Now <a
rel=\"mw:ExtLink\" href=\"http://example.com\"
data-parsoid='{\"targetOff\":194,\"contentOffsets\":[194,203],\"dsr\":[174,204,20,1]}'>both<b
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[198,203,3,0]}'><i
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[201,203,2,0]}'></i></b></a></i></b></p>");
add("wt2html", "External link containing double-single-quotes in text embedded
in italics (bug 4598 sanity check)", "<p data-parsoid='{\"dsr\":[0,60,0,0]}'><i
data-parsoid='{\"dsr\":[0,60,2,2]}'>Some <a rel=\"mw:ExtLink\"
href=\"http://example.com/\"
data-parsoid='{\"targetOff\":28,\"contentOffsets\":[28,56],\"dsr\":[7,57,21,1]}'>pretty
<i data-parsoid='{\"dsr\":[35,46,2,2]}'>italics</i> and stuff</a>!</i></p>");
+add("wt2html", "IPv6 urls, autolink format (T23261)", "<p
data-parsoid='{\"dsr\":[0,41,0,0]}'><a rel=\"mw:ExtLink\"
href=\"http://[2404:130:0:1000::187:2]/index.php\"
data-parsoid='{\"stx\":\"url\",\"dsr\":[0,41,0,0]}'>http://[2404:130:0:1000::187:2]/index.php</a></p>\n\n<p
data-parsoid='{\"dsr\":[43,78,0,0]}'>Examples from RFC2373, section
2.2:</p>\n<ul data-parsoid='{\"dsr\":[79,277,0,0]}'><li
data-parsoid='{\"dsr\":[79,119,1,0]}'>
http://[1080::8:800:200C:417A]/unicast</li>\n<li
data-parsoid='{\"dsr\":[120,150,1,0]}'> http://[FF01::101]/multicast</li>\n<li
data-parsoid='{\"dsr\":[151,174,1,0]}'> http://[::1]/loopback</li>\n<li
data-parsoid='{\"dsr\":[175,200,1,0]}'> http://[::]/unspecified</li>\n<li
data-parsoid='{\"dsr\":[201,234,1,0]}'>
http://[::13.1.68.3]/ipv4compat</li>\n<li
data-parsoid='{\"dsr\":[235,277,1,0]}'>
http://[::FFFF:129.144.52.38]/ipv4compat</li></ul>\n\n<p
data-parsoid='{\"dsr\":[279,313,0,0]}'>Examples from <a
href=\"//tools.ietf.org/html/rfc2732\" rel=\"mw:ExtLink\"
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[293,301,0,0]}'>RFC 2732</a>,
section 2:</p>\n<ul data-parsoid='{\"dsr\":[314,608,0,0]}'><li
data-parsoid='{\"dsr\":[314,378,1,0]}'>
http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</li>\n<li
data-parsoid='{\"dsr\":[379,427,1,0]}'>
http://[1080:0:0:0:8:800:200C:417A]/index.html</li>\n<li
data-parsoid='{\"dsr\":[428,460,1,0]}'>
http://[3ffe:2a00:100:7031::1]</li>\n<li
data-parsoid='{\"dsr\":[461,497,1,0]}'>
http://[1080::8:800:200C:417A]/foo</li>\n<li
data-parsoid='{\"dsr\":[498,525,1,0]}'> http://[::192.9.5.5]/ipng</li>\n<li
data-parsoid='{\"dsr\":[526,571,1,0]}'>
http://[::FFFF:129.144.52.38]:80/index.html</li>\n<li
data-parsoid='{\"dsr\":[572,608,1,0]}'>
http://[2010:836B:4179::836B:4179]</li></ul>\n");
+add("wt2html", "IPv6 urls, bracketed format (T23261)", "<p
data-parsoid='{\"dsr\":[0,48,0,0]}'>[http://[2404:130:0:1000::187:2]/index.php
test]</p>\n\n<p data-parsoid='{\"dsr\":[50,85,0,0]}'>Examples from RFC2373,
section 2.2:</p>\n<ul data-parsoid='{\"dsr\":[86,297,0,0]}'><li
data-parsoid='{\"dsr\":[86,128,1,0]}'> [http://[1080::8:800:200C:417A]
unicast]</li>\n<li data-parsoid='{\"dsr\":[129,161,1,0]}'> [http://[FF01::101]
multicast]</li>\n<li data-parsoid='{\"dsr\":[162,188,1,0]}'> [http://[::1]/
loopback]</li>\n<li data-parsoid='{\"dsr\":[189,216,1,0]}'> [http://[::]
unspecified]</li>\n<li data-parsoid='{\"dsr\":[217,252,1,0]}'>
[http://[::13.1.68.3] ipv4compat]</li>\n<li
data-parsoid='{\"dsr\":[253,297,1,0]}'> [http://[::FFFF:129.144.52.38]
ipv4compat]</li></ul>\n\n<p data-parsoid='{\"dsr\":[299,333,0,0]}'>Examples
from <a href=\"//tools.ietf.org/html/rfc2732\" rel=\"mw:ExtLink\"
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[313,321,0,0]}'>RFC 2732</a>,
section 2:</p>\n<ul data-parsoid='{\"dsr\":[334,656,0,0]}'><li
data-parsoid='{\"dsr\":[334,402,1,0]}'>
[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]</li>\n<li
data-parsoid='{\"dsr\":[403,455,1,0]}'>
[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]</li>\n<li
data-parsoid='{\"dsr\":[456,492,1,0]}'> [http://[3ffe:2a00:100:7031::1]
3]</li>\n<li data-parsoid='{\"dsr\":[493,533,1,0]}'>
[http://[1080::8:800:200C:417A]/foo 4]</li>\n<li
data-parsoid='{\"dsr\":[534,565,1,0]}'> [http://[::192.9.5.5]/ipng 5]</li>\n<li
data-parsoid='{\"dsr\":[566,615,1,0]}'>
[http://[::FFFF:129.144.52.38]:80/index.html 6]</li>\n<li
data-parsoid='{\"dsr\":[616,656,1,0]}'> [http://[2010:836B:4179::836B:4179]
7]</li></ul>\n");
add("wt2html", "Self-link to numeric title", "<p
data-parsoid='{\"dsr\":[0,5,0,0]}'><a rel=\"mw:WikiLink\" href=\"./0\"
title=\"0\"
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./0\"},\"sa\":{\"href\":\"0\"},\"dsr\":[0,5,2,2]}'>0</a></p>");
add("wt2html", "<nowiki> inside a link", "<p
data-parsoid='{\"dsr\":[0,96,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Main_Page\"
title=\"Main Page\"
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main<nowiki>
Page</nowiki>\"},\"dsr\":[0,30,2,2]}'>Main Page</a> <a rel=\"mw:WikiLink\"
href=\"./Main_Page\" title=\"Main Page\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main
Page\"},\"dsr\":[31,96,12,2]}'>the main page <span typeof=\"mw:Nowiki\"
data-parsoid='{\"dsr\":[57,94,8,9]}'>[it's not very good]</span></a></p>");
add("wt2html", "Interlanguage link with spacing", "<p
data-parsoid='{\"dsr\":[0,14,0,0]}'>Blah blah blah</p>\n<link
rel=\"mw:PageProp/Language\" href=\"http://zh.wikipedia.org/wiki/ Chinese
\"
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://zh.wikipedia.org/wiki/
Chinese \"},\"sa\":{\"href\":\" zh : Chinese
\"},\"dsr\":[15,43,null,null]}'/>");
@@ -174,6 +176,7 @@
add("wt2html", "MSIE 6 CSS safety test: sup/sub script (bug 55332)", "<div
style=\"background-image:url⁽javascript:alert())\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[0,61,54,6]}'>A</div>\n<div
style=\"background-image:url₍javascript:alert())\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[62,123,54,6]}'>B</div>\n<p
style=\"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[124,199,70,4]}'>C</p>");
add("wt2html", "Opera -o-link CSS", "<div title=\"data:text/html,<img src=1
onerror=alert(1)>\" style=\"-o-link:attr(title);-o-link-source:current\"
data-parsoid='{\"stx\":\"html\",\"a\":{\"title\":\"data:text/html,<img src=1
onerror=alert(1)>\"},\"sa\":{\"title\":\"&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;\"},\"dsr\":[0,313,306,6]}'>X</div>");
add("wt2html", "MSIE 6 CSS safety test: Repetition markers (bug 55332)", "<p
style=\"font-size: 100px; color: expres〱ion((title='XSSed'),'red')\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[0,75,70,4]}'>A</p>\n<p
style=\"font-size: 100px; color: expresゝion((title='XSSed'),'red')\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[76,151,70,4]}'>B</p>\n<p
style=\"font-size: 100px; color: expresーion((title='XSSed'),'red')\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[152,227,70,4]}'>C</p>\n<p
style=\"font-size: 100px; color: expresヽion((title='XSSed'),'red')\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[228,303,70,4]}'>D</p>\n<p
style=\"font-size: 100px; color: expresﹽion((title='XSSed'),'red')\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[304,379,70,4]}'>E</p>\n<p
style=\"font-size: 100px; color: expresﹼion((title='XSSed'),'red')\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[380,455,70,4]}'>F</p>\n<p
style=\"font-size: 100px; color: expresーion((title='XSSed'),'red')\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[456,531,70,4]}'>G</p>");
+add("wt2html", "CSS line continuation 2", "<div style=\"/* insecure input */\"
data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\"/* insecure input
*/\"},\"sa\":{\"style\":\"background-image: u\\\\&#13;rl(test.jpg);
\"},\"dsr\":[0,59,53,6]}'></div>");
add("wt2html", "Sanitizer: Closing of closed but not open table tags", "Table
not started");
add("wt2html", "Sanitizer: Escaping of spaces, multibyte characters, colons &
other stuff in id=\"\"", "<p data-parsoid='{\"dsr\":[0,45,0,0]}'><span id=\"æ:
v\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,27,16,7]}'>byte</span><a
rel=\"mw:WikiLink\" href=\"./Main%20Page#æ:_v\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main%20Page#æ:_v\"},\"sa\":{\"href\":\"#æ:
v\"},\"dsr\":[27,45,8,2]}'>backlink</a></p>");
add("wt2html", "Sanitizer: Validating that <meta> and <link> work, but only
for Microdata", "<div itemscope=\"\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[0,308,15,6]}'>\n\t<p
data-parsoid='{\"dsr\":[17,301,0,0]}'><meta itemprop=\"hello\"
content=\"world\">\n\t<meta http-equiv=\"refresh\"
content=\"5\">\n\t<meta itemprop=\"hello\" http-equiv=\"refresh\"
content=\"5\">\n\t<link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link
rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\"
itemprop=\"hello\" href=\"{{SERVER}}\"></p>\n</div>");
@@ -199,6 +202,7 @@
add("wt2html", "Gallery with wikitext inside caption", "<p
data-parsoid='{\"dsr\":[0,156,0,0]}'><span typeof=\"mw:Extension/gallery\"
about=\"#mwt1\"
data-parsoid='{\"stx\":\"html\",\"src\":\"<gallery>\\nFile:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt\\nFile:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt\\n</gallery>\",\"tagWidths\":[9,10],\"autoInsertedEnd\":true,\"dsr\":[0,156,9,0]}'><gallery>\nFile:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt\nFile:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt\n</gallery></span></p>");
add("wt2html", "gallery (with showfilename option)", "<p
data-parsoid='{\"dsr\":[0,149,0,0]}'><span typeof=\"mw:Extension/gallery\"
about=\"#mwt1\" data-parsoid='{\"stx\":\"html\",\"src\":\"<gallery
showfilename>\\nFile:Nonexistent.jpg|caption\\nFile:Nonexistent.jpg\\nimage:foobar.jpg|some
'''caption''' [[Main
Page]]\\nFile:Foobar.jpg\\n</gallery>\",\"tagWidths\":[22,10],\"autoInsertedEnd\":true,\"dsr\":[0,149,22,0]}'><gallery
showfilename>\nFile:Nonexistent.jpg|caption\nFile:Nonexistent.jpg\nimage:foobar.jpg|some
'''caption''' [[Main Page]]\nFile:Foobar.jpg\n</gallery></span></p>");
add("wt2html", "Gallery (with namespace-less filenames)", "<p
data-parsoid='{\"dsr\":[0,85,0,0]}'><span typeof=\"mw:Extension/gallery\"
about=\"#mwt1\"
data-parsoid='{\"stx\":\"html\",\"src\":\"<gallery>\\nFile:Nonexistent.jpg\\nNonexistent.jpg\\nimage:foobar.jpg\\nfoobar.jpg\\n</gallery>\",\"tagWidths\":[9,10],\"autoInsertedEnd\":true,\"dsr\":[0,85,9,0]}'><gallery>\nFile:Nonexistent.jpg\nNonexistent.jpg\nimage:foobar.jpg\nfoobar.jpg\n</gallery></span></p>");
+add("wt2html", "Illegal character references (T106578)", "<dl
data-parsoid='{\"dsr\":[0,167,0,0]}'><dt data-parsoid='{\"dsr\":[0,6,1,0]}'>
Null</dt><dd data-parsoid='{\"stx\":\"row\",\"dsr\":[6,13,1,0]}'> <span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#00;\",\"srcContent\":\"�\",\"dsr\":[8,13,null,null]}'>�</span></dd>\n<dt
data-parsoid='{\"dsr\":[14,18,1,0]}'> FF</dt><dd
data-parsoid='{\"stx\":\"row\",\"dsr\":[18,25,1,0]}'> <span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#xC;\",\"srcContent\":\"\\f\",\"dsr\":[20,25,null,null]}'>\f</span></dd>\n<dt
data-parsoid='{\"dsr\":[26,30,1,0]}'> CR</dt><dd
data-parsoid='{\"stx\":\"row\",\"dsr\":[30,37,1,0]}'> <span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#xD;\",\"srcContent\":\"\\r\",\"dsr\":[32,37,null,null]}'>\r</span></dd>\n<dt
data-parsoid='{\"dsr\":[38,53,1,0]}'> Control (low)</dt><dd
data-parsoid='{\"stx\":\"row\",\"dsr\":[53,59,1,0]}'> <span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#8;\",\"srcContent\":\"\\b\",\"dsr\":[55,59,null,null]}'>\b</span></dd>\n<dt
data-parsoid='{\"dsr\":[60,76,1,0]}'> Control (high)</dt><dd
data-parsoid='{\"stx\":\"row\",\"dsr\":[76,91,1,0]}'> <span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x7F;\",\"srcContent\":\"\",\"dsr\":[78,84,null,null]}'></span>
<span typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x9F;\",\"srcContent\":\"Ÿ\",\"dsr\":[85,91,null,null]}'>Ÿ</span></dd>\n<dt
data-parsoid='{\"dsr\":[92,103,1,0]}'> Surrogate</dt><dd
data-parsoid='{\"stx\":\"row\",\"dsr\":[103,121,1,0]}'> <span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#xD83D;\",\"srcContent\":\"�\",\"dsr\":[105,113,null,null]}'>�</span><span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#xDCA9;\",\"srcContent\":\"�\",\"dsr\":[113,121,null,null]}'>�</span></dd>\n<dt
data-parsoid='{\"dsr\":[122,156,1,0]}'> This is an okay astral
character</dt><dd data-parsoid='{\"stx\":\"row\",\"dsr\":[156,167,1,0]}'> <span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x1F4A9;\",\"srcContent\":\"💩\",\"dsr\":[158,167,null,null]}'>💩</span></dd></dl>");
add("wt2html", "Centre-aligned image", "<figure class=\"mw-default-size
mw-halign-center\" typeof=\"mw:Image\"
data-parsoid='{\"optList\":[{\"ck\":\"center\",\"ak\":\"centre\"}],\"dsr\":[0,27,2,2]}'><a
href=\"./File:Foobar.jpg\"
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{},\"dsr\":[2,25,null,null]}'><img
resource=\"./File:Foobar.jpg\" src=\"//example.com/images/3/3a/Foobar.jpg\"
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\"
height=\"220\" width=\"1941\"
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"220\",\"width\":\"1941\"},\"sa\":{\"resource\":\"Image:foobar.jpg\"}}'/></a></figure>");
add("wt2html", "None-aligned image", "<figure class=\"mw-default-size
mw-halign-none\" typeof=\"mw:Image\"
data-parsoid='{\"optList\":[{\"ck\":\"none\",\"ak\":\"none\"}],\"dsr\":[0,25,2,2]}'><a
href=\"./File:Foobar.jpg\"
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{},\"dsr\":[2,23,null,null]}'><img
resource=\"./File:Foobar.jpg\" src=\"//example.com/images/3/3a/Foobar.jpg\"
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\"
height=\"220\" width=\"1941\"
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"220\",\"width\":\"1941\"},\"sa\":{\"resource\":\"Image:foobar.jpg\"}}'/></a></figure>");
add("wt2html", "Width + Height sized image (using px) (height is ignored)",
"<p data-parsoid='{\"dsr\":[0,30,0,0]}'><span typeof=\"mw:Image\"
data-parsoid='{\"optList\":[{\"ck\":\"width\",\"ak\":\"640x480px\"}],\"dsr\":[0,30,null,null]}'><a
href=\"./File:Foobar.jpg\"
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{}}'><img
resource=\"./File:Foobar.jpg\"
src=\"//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg\"
data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\"
height=\"73\" width=\"640\"
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"73\",\"width\":\"640\"},\"sa\":{\"resource\":\"Image:foobar.jpg\"}}'/></a></span></p>");
@@ -333,6 +337,7 @@
add("wt2wt", "External links: wiki links within external link (Bug 3695)",
"[http://example.com][[wikilink]] embedded in ext link\n");
add("wt2wt", "Bug 2702: Mismatched <i>, <b> and <a> tags are invalid",
"''[http://example.com text''<nowiki/>'']''\n[http://example.com
'''text''']'''<nowiki/>'''\n''Something [http://example.com in
italic''<nowiki/>'']''\n''Something [http://example.com mixed''''', even
bold''''']'''\n'''''Now [http://example.com both'''''<nowiki/>''''']'''''\n");
add("wt2wt", "External link containing double-single-quotes with no space
separating the url from text in italics",
"[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm ''La muerte de
Casagemas'' (1901) en el sitio de ][[Museo Picasso (París)|Museo Picasso]].\n");
+add("wt2wt", "IPv6 urls, autolink format (T23261)",
"http://[2404:130:0:1000::187:2]/index.php\n\nExamples from RFC2373,
section 2.2:\n* http://[1080::8:800:200C:417A]/unicast\n*
http://[FF01::101]/multicast\n* http://[::1]/loopback\n*
http://[::]/unspecified\n* http://[::13.1.68.3]/ipv4compat\n*
http://[::FFFF:129.144.52.38]/ipv4compat\n\nExamples from RFC 2732, section
2:\n* http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html\n*
http://[1080:0:0:0:8:800:200C:417A]/index.html\n*
http://[3ffe:2a00:100:7031::1]\n* http://[1080::8:800:200C:417A]/foo\n*
http://[::192.9.5.5]/ipng\n* http://[::FFFF:129.144.52.38]:80/index.html\n*
http://[2010:836B:4179::836B:4179]\n");
add("wt2wt", "Unclosed and unmatched quotes", "'''''Bold italic text '''with
bold deactivated''' in between.'''''\n\n'''''Bold italic text ''with italic
deactivated'' in between.'''''\n\n'''Bold text..'''\n\n..spanning two
paragraphs (should not work).'''<nowiki/>'''\n\n'''Bold tag left
open'''\n\n''Italic tag left open''\n\nNormal text.\n\n<!-- Unmatching number
of opening, closing tags: -->\n'''This year'<nowiki/>'''s election ''should''
beat '''last year''''s.\n\n''Tom'''s car is bigger than
'''''<nowiki/>'''Susan'''s.\n\nPlain ''italic'''s plain\n");
add("wt2wt", "A table with captions with non-default spaced attributes and a
table row", "{|\n|+ style=\"color: red;\" |caption2\n|+ style=\"color: red;\" |
caption3\n|-\n| foo\n|}");
add("wt2wt", "Table td-cell syntax variations", "{|\n| foo bar | baz\n| foo
bar foo || baz\n| style=\"color:red;\" | baz\n| style='color:red;' || baz\n|}");
@@ -398,6 +403,7 @@
add("wt2wt", "Fuzz testing: Parser25 (bug 6055)", "{{{\n| \n<LI CLASS=||\n
>\n}}}blah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE
CURSOR OVER HERE'''\n");
add("wt2wt", "Inline wiki vs wiki block nesting", "'''Bold paragraph'''\n\nNew
wiki paragraph\n");
add("wt2wt", "Mixing markup for italics and bold",
"'<nowiki/>''bold'<nowiki/>'''''bold''bolditalics'''''\n");
+add("wt2wt", "Illegal character references (T106578)", "; Null: �\n; FF:
\n; CR: \n; Control (low): \n; Control (high):  Ÿ\n;
Surrogate: ��\n; This is an okay astral character: 💩");
add("wt2wt", "ISBN code coverage", "ISBN 978-0-1234-56 789\n");
add("wt2wt", "RFC code coverage", "RFC 983 987\n");
add("wt2wt", "Image with page parameter", "[[File:LoremIpsum.djvu]]\n");
@@ -457,6 +463,7 @@
add("html2html", "Definition lists: colon in HTML attribute", "<dl
data-parsoid='{\"dsr\":[0,12,0,0]}'><dt data-parsoid='{\"dsr\":[0,12,1,0]}'> <b
data-parsoid='{\"dsr\":[2,12,3,3]}'>bold</b></dt></dl>\n");
add("html2html", "Definition Lists: Nesting: Multi-level (Parsoid only)",
"\n<dl data-parsoid='{\"dsr\":[1,116,0,0]}'><dt
data-parsoid='{\"dsr\":[1,6,1,0]}'> t1 </dt>\n<dd
data-parsoid='{\"dsr\":[7,17,1,0]}'> d1 </dd>\n<dt
data-parsoid='{\"dsr\":[18,116,1,0]}'><dl
data-parsoid='{\"dsr\":[19,116,0,0]}'><dt data-parsoid='{\"dsr\":[19,24,1,0]}'>
t2 </dt>\n<dd data-parsoid='{\"dsr\":[25,62,2,0]}'> <span typeof=\"mw:Nowiki\"
data-parsoid='{\"dsr\":[28,48,8,9]}'>:d2</span> </dd>\n<dt
data-parsoid='{\"dsr\":[63,116,2,0]}'><dl
data-parsoid='{\"dsr\":[65,116,0,0]}'><dt data-parsoid='{\"dsr\":[65,70,1,0]}'>
t3 </dt>\n<dd data-parsoid='{\"dsr\":[71,116,3,0]}'> <span typeof=\"mw:Nowiki\"
data-parsoid='{\"dsr\":[75,96,8,9]}'>::d3</span>
</dd></dl></dt></dl></dt></dl>\n");
add("html2html", "Definition Lists: colons and tables 1", "<dl
data-parsoid='{\"dsr\":[0,26,0,0]}'><dd data-parsoid='{\"dsr\":[0,12,1,0]}'>
<table data-parsoid='{\"dsr\":[2,12,2,2]}'>\n\n<tbody
data-parsoid='{\"dsr\":[6,10,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[6,9,0,0]}'><td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[6,9,1,0]}'>
x</td></tr>\n</tbody></table></dd>\n\n<dd data-parsoid='{\"dsr\":[14,26,1,0]}'>
<table data-parsoid='{\"dsr\":[16,26,2,2]}'>\n\n<tbody
data-parsoid='{\"dsr\":[20,24,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[20,23,0,0]}'><td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[20,23,1,0]}'>
y</td></tr>\n</tbody></table></dd></dl>\n");
+add("html2html", "IPv6 urls, bracketed format (T23261)", "<p
data-parsoid='{\"dsr\":[0,58,0,0]}'><a rel=\"mw:ExtLink\"
href=\"http://[2404:130:0:1000::187:2]/index.php\"
data-parsoid='{\"targetOff\":53,\"contentOffsets\":[53,57],\"a\":{\"href\":\"http://[2404:130:0:1000::187:2]/index.php\"},\"sa\":{\"href\":\"http://&#x5B;2404:130:0:1000::187:2&#x5D;/index.php\"},\"dsr\":[0,58,53,1]}'>test</a></p>\n\n<p
data-parsoid='{\"dsr\":[60,95,0,0]}'>Examples from RFC2373, section
2.2:</p>\n\n<ul data-parsoid='{\"dsr\":[97,368,0,0]}'><li
data-parsoid='{\"dsr\":[97,149,1,0]}'> [http://<span typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[107,113,null,null]}'>[</span>1080::8:800:200C:417A<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[134,140,null,null]}'>]</span>
unicast]</li>\n<li data-parsoid='{\"dsr\":[150,192,1,0]}'> [http://<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[160,166,null,null]}'>[</span>FF01::101<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[175,181,null,null]}'>]</span>
multicast]</li>\n<li data-parsoid='{\"dsr\":[193,229,1,0]}'> [http://<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[203,209,null,null]}'>[</span>::1<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[212,218,null,null]}'>]</span>/
loopback]</li>\n<li data-parsoid='{\"dsr\":[230,267,1,0]}'> [http://<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[240,246,null,null]}'>[</span>::<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[248,254,null,null]}'>]</span>
unspecified]</li>\n<li data-parsoid='{\"dsr\":[268,313,1,0]}'> [http://<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[278,284,null,null]}'>[</span>::13.1.68.3<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[295,301,null,null]}'>]</span>
ipv4compat]</li>\n<li data-parsoid='{\"dsr\":[314,368,1,0]}'> [http://<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[324,330,null,null]}'>[</span>::FFFF:129.144.52.38<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[350,356,null,null]}'>]</span>
ipv4compat]</li></ul>\n<p data-parsoid='{\"dsr\":[369,403,0,0]}'>Examples from
<a href=\"//tools.ietf.org/html/rfc2732\" rel=\"mw:ExtLink\"
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[383,391,0,0]}'>RFC 2732</a>,
section 2:</p>\n\n<ul data-parsoid='{\"dsr\":[405,797,0,0]}'><li
data-parsoid='{\"dsr\":[405,483,1,0]}'> [http://<span typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[415,421,null,null]}'>[</span>FEDC:BA98:7654:3210:FEDC:BA98:7654:3210<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[460,466,null,null]}'>]</span>:80/index.html
1]</li>\n<li data-parsoid='{\"dsr\":[484,546,1,0]}'> [http://<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[494,500,null,null]}'>[</span>1080:0:0:0:8:800:200C:417A<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[526,532,null,null]}'>]</span>/index.html
2]</li>\n<li data-parsoid='{\"dsr\":[547,593,1,0]}'> [http://<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[557,563,null,null]}'>[</span>3ffe:2a00:100:7031::1<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[584,590,null,null]}'>]</span>
3]</li>\n<li data-parsoid='{\"dsr\":[594,644,1,0]}'> [http://<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[604,610,null,null]}'>[</span>1080::8:800:200C:417A<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[631,637,null,null]}'>]</span>/foo
4]</li>\n<li data-parsoid='{\"dsr\":[645,686,1,0]}'> [http://<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[655,661,null,null]}'>[</span>::192.9.5.5<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[672,678,null,null]}'>]</span>/ipng
5]</li>\n<li data-parsoid='{\"dsr\":[687,746,1,0]}'> [http://<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[697,703,null,null]}'>[</span>::FFFF:129.144.52.38<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[723,729,null,null]}'>]</span>:80/index.html
6]</li>\n<li data-parsoid='{\"dsr\":[747,797,1,0]}'> [http://<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5B;\",\"srcContent\":\"[\",\"dsr\":[757,763,null,null]}'>[</span>2010:836B:4179::836B:4179<span
typeof=\"mw:Entity\"
data-parsoid='{\"src\":\"&#x5D;\",\"srcContent\":\"]\",\"dsr\":[788,794,null,null]}'>]</span>
7]</li></ul>\n");
add("html2html", "Indented table markup mixed with indented pre content
(proposed in bug 6200)", " <table
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[1,58,2,0]}'>\n \n <tbody
data-parsoid='{\"dsr\":[7,58,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[7,58,0,0]}'><td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[7,58,1,0]}'>\n<pre
data-parsoid='{\"dsr\":[9,58,1,0]}'>Text that should be rendered preformatted
\n\n|}</pre></td></tr></tbody></table>\n");
add("html2html", "Build table with wikilink", "<table class=\"wikitable\"
data-parsoid='{\"dsr\":[0,216,20,2]}'>\n\n<tbody
data-parsoid='{\"dsr\":[22,214,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[22,47,0,0]}'><th
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[22,31,1,0]}'> header
</th>\n<th data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[32,47,1,0]}'>
second header</th></tr>\n\n<tr style=\"color:red;\"
data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[49,148,21,0]}'>\n<td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[71,106,1,0]}'> data <a
rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main
Page\"},\"dsr\":[78,105,17,2]}'>linktext</a> </td>\n<td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[107,148,1,0]}'> second data <a
rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main
Page\"},\"dsr\":[121,148,17,2]}'>linktext</a></td></tr>\n\n<tr
data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[150,213,2,0]}'>\n<td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[153,160,1,0]}'> data
</td>\n<td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[161,213,1,0]}'>
second data <a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main
Page\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main
Page\"},\"dsr\":[175,213,17,2]}'>link|text with
pipe</a></td></tr>\n</tbody></table>\n");
add("html2html", "Plain link, capitalized", "<p
data-parsoid='{\"dsr\":[0,28,0,0]}'><a rel=\"mw:WikiLink\"
href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main
Page\"},\"dsr\":[0,28,17,2]}'>Main Page</a></p>\n");
@@ -591,7 +598,7 @@
add("html2html", "MSIE 6 CSS safety test: Repetition markers (bug 55332)", "<p
data-parsoid='{\"dsr\":[0,1,0,0]}'>A</p>\n\n<p
data-parsoid='{\"dsr\":[3,4,0,0]}'>B</p>\n\n<p
data-parsoid='{\"dsr\":[6,7,0,0]}'>C</p>\n\n<p
data-parsoid='{\"dsr\":[9,10,0,0]}'>D</p>\n\n<p
data-parsoid='{\"dsr\":[12,13,0,0]}'>E</p>\n\n<p
data-parsoid='{\"dsr\":[15,16,0,0]}'>F</p>\n\n<p
data-parsoid='{\"dsr\":[18,19,0,0]}'>G</p>\n");
add("html2html", "Table attribute safety", "<table
data-parsoid='{\"dsr\":[0,46,2,2]}'>\n\n<tbody
data-parsoid='{\"dsr\":[4,44,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[4,43,0,0]}'><th
style=\" \" data-parsoid='{\"a\":{\"style\":\" \"},\"sa\":{\"style\":\"/*
insecure input */\"},\"autoInsertedEnd\":true,\"dsr\":[4,43,32,0]}'>
status</th></tr>\n</tbody></table>\n");
add("html2html", "CSS line continuation 1", "<div style=\" \"
data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\" \"},\"sa\":{\"style\":\"/*
insecure input */\"},\"dsr\":[0,40,34,6]}'></div>\n");
-add("html2html", "CSS line continuation 2", "<div style=\" \"
data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\" \"},\"sa\":{\"style\":\"/*
insecure input */\"},\"dsr\":[0,40,34,6]}'></div>\n");
+add("html2html", "CSS line continuation 2", "<div style=\" \"
data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\" \"},\"sa\":{\"style\":\"/*
invalid control char */\"},\"dsr\":[0,46,40,6]}'></div>\n");
add("html2html", "Sanitizer: Validating that <meta> and <link> work, but only
for Microdata", "<div itemscope=\"\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[0,244,18,6]}'>\n\t<p
data-parsoid='{\"dsr\":[20,141,0,0]}'><meta itemprop=\"hello\"
content=\"world\" />\n\t<meta http-equiv=\"refresh\"
content=\"5\">\n\t<meta itemprop=\"hello\" content=\"5\" /></p>\n\n\t<p
data-parsoid='{\"dsr\":[144,237,0,0]}'><a rel=\"mw:ExtLink\"
href=\"http://example.org\"
data-parsoid='{\"targetOff\":163,\"contentOffsets\":[163,163],\"dsr\":[144,164,19,1]}'></a>\n\t<link
rel=\"stylesheet\" href=\"http://example.org\">\n\t<a rel=\"mw:ExtLink\"
href=\"http://example.org\"
data-parsoid='{\"targetOff\":236,\"contentOffsets\":[236,236],\"dsr\":[217,237,19,1]}'></a></p>\n</div>\n");
add("html2html", "HTML ordered list item with parameters oddity", "<ol
data-parsoid='{\"dsr\":[0,5,0,0]}'><li data-parsoid='{\"dsr\":[0,5,1,0]}'>
One</li></ol>\n");
add("html2html", "Fuzz testing: Parser14", "<h2
data-parsoid='{\"dsr\":[0,18,2,2]}'> onmouseover= </h2>\n<p
data-parsoid='{\"dsr\":[19,26,0,0]}'>http://</p>\n<div id=\"toc\" class=\"toc\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[27,201,26,6]}'>\n<div id=\"toctitle\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[54,95,19,6]}'>\n<h2
data-parsoid='{\"dsr\":[74,88,2,2]}'> Contents </h2>\n</div>\n\n<ul
data-parsoid='{\"dsr\":[97,193,0,0]}'><li
data-parsoid='{\"dsr\":[97,193,1,0]}'> <a rel=\"mw:WikiLink\"
href=\"./Main%20Page#onmouseover.3D\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main%20Page#onmouseover.3D\"},\"sa\":{\"href\":\"#onmouseover.3D\"},\"dsr\":[99,193,18,2]}'><span
class=\"tocnumber\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[117,149,24,7]}'>1</span> <span
class=\"toctext\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[150,191,22,7]}'>onmouseover=</span></a></li></ul>\n\n</div>\n");
@@ -819,6 +826,8 @@
add("html2wt", "External link with comments in link text",
"[http://www.google.com Google ]\n");
add("html2wt", "URL-encoding in URL functions (single parameter)",
"/index.php?title=Some_page&=&\n");
add("html2wt", "URL-encoding in URL functions (multiple parameters)",
"/index.php?title=Some_page&q=?&=&\n");
+add("html2wt", "IPv6 urls, autolink format (T23261)",
"http://[2404:130:0:1000::187:2]/index.php\n\nExamples from RFC2373,
section 2.2:\n\n* http://[1080::8:800:200C:417A]/unicast\n*
http://[FF01::101]/multicast\n* http://[::1]/loopback\n*
http://[::]/unspecified\n*
http://[::13.1.68.3]/ipv4compat\n*
http://[::FFFF:129.144.52.38]/ipv4compat\nExamples from RFC 2732,
section 2:\n\n*
http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html\n*
http://[1080:0:0:0:8:800:200C:417A]/index.html\n*
http://[3ffe:2a00:100:7031::1]\n*
http://[1080::8:800:200C:417A]/foo\n*
http://[::192.9.5.5]/ipng\n*
http://[::FFFF:129.144.52.38]:80/index.html\n*
http://[2010:836B:4179::836B:4179]\n");
+add("html2wt", "IPv6 urls, bracketed format (T23261)",
"[http://[2404:130:0:1000::187:2]/index.php test]\n\nExamples from
RFC2373, section 2.2:\n\n* [http://[1080::8:800:200C:417A]
unicast]\n* [http://[FF01::101] multicast]\n*
[http://[::1]/ loopback]\n* [http://[::] unspecified]\n*
[http://[::13.1.68.3] ipv4compat]\n*
[http://[::FFFF:129.144.52.38] ipv4compat]\nExamples from RFC 2732,
section 2:\n\n*
[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]\n*
[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]\n*
[http://[3ffe:2a00:100:7031::1] 3]\n*
[http://[1080::8:800:200C:417A]/foo 4]\n*
[http://[::192.9.5.5]/ipng 5]\n*
[http://[::FFFF:129.144.52.38]:80/index.html 6]\n*
[http://[2010:836B:4179::836B:4179] 7]\n");
add("html2wt", "Non-extlinks in brackets", "[foo]\n[foo bar]\n[foo
''bar'']\n[fool's] errand\n[fool's errand]\n[foo]\n[foo bar]\n[foo
''bar'']\n[fool's] errand\n[fool's
errand]\n[url=foo]\n[url=http://example.com]\n");
add("html2wt", "Unclosed and unmatched quotes", "'''''Bold italic text '''with
bold deactivated''' in between.'''''\n\n'''''Bold italic text ''with italic
deactivated'' in between.'''''\n\n'''Bold text..'''\n\n..spanning two
paragraphs (should not work).'''<nowiki/>'''\n\n'''Bold tag left
open'''\n\n''Italic tag left open''\n\nNormal text.\n\n<!-- Unmatching number
of opening, closing tags: -->\n'''This year'<nowiki/>'''s election ''should''
beat '''last year''''s.\n\n''Tom'''s car is bigger than
'''''<nowiki/>'''Susan'''s.\n\nPlain ''italic'''s plain\n");
add("html2wt", "A table with caption with default-spaced attributes and a
table row", "{|\n|+ style=\"color: red;\" | caption1\n\n| foo\n|}\n");
@@ -1192,7 +1201,7 @@
add("html2wt", "Table attribute legitimate extension", "{|\n\n!
style=\"color:blue\" | status\n|}\n");
add("html2wt", "Table attribute safety", "{|\n\n! style=\"/* insecure input
*/\" | status\n|}\n");
add("html2wt", "CSS line continuation 1", "<div style=\"/* insecure input
*/\"></div>\n");
-add("html2wt", "CSS line continuation 2", "<div style=\"/* insecure input
*/\"></div>\n");
+add("html2wt", "CSS line continuation 2", "<div style=\"/* invalid control
char */\"></div>\n");
add("html2wt", "Expansion of multi-line templates in attribute values (bug
6255)", "<div style=\"background: #00FF00\">-</div>\n");
add("html2wt", "Expansion of multi-line templates in attribute values (bug
6255 sanity check 2)", "<div style=\"background: \n#00FF00\">-</div>\n");
add("html2wt", "Nested template calls", "(My parameter is: param)\n");
@@ -1236,6 +1245,7 @@
add("html2wt", "Gallery with wikitext inside caption", "\t\t* <div
style=\"width: 155px\"> \t\t\t<div class=\"thumb\" style=\"width: 150px;\"><div
style=\"margin:68px
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>
\t\t\t<div class=\"gallerytext\">
http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg \t\t\t</div>
\t\t</div>\n\t\t* <div style=\"width: 155px\"> \t\t\t<div class=\"thumb\"
style=\"width: 150px;\"><div style=\"margin:68px
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>
\t\t\t<div class=\"gallerytext\"> This is a test template \t\t\t</div>
\t\t</div>\n");
add("html2wt", "gallery (with showfilename option)", "\t\t* <div
style=\"width: 155px\"> \t\t\t<div class=\"thumb\" style=\"height:
150px;\">Nonexistent.jpg</div> \t\t\t<div class=\"gallerytext\">
[[wiki/File:Nonexistent.jpg|Nonexistent.jpg]] caption \t\t\t</div>
\t\t</div>\n\t\t* <div style=\"width: 155px\"> \t\t\t<div class=\"thumb\"
style=\"height: 150px;\">Nonexistent.jpg</div> \t\t\t<div
class=\"gallerytext\"> [[wiki/File:Nonexistent.jpg|Nonexistent.jpg]]
\t\t\t</div> \t\t</div>\n\t\t* <div style=\"width: 155px\"> \t\t\t<div
class=\"thumb\" style=\"width: 150px;\"><div style=\"margin:68px
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>
\t\t\t<div class=\"gallerytext\"> [[wiki/File:Foobar.jpg|Foobar.jpg]] some
'''caption''' [[wiki/Main Page|Main Page]] \t\t\t</div> \t\t</div>\n\t\t* <div
style=\"width: 155px\"> \t\t\t<div class=\"thumb\" style=\"width: 150px;\"><div
style=\"margin:68px
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>
\t\t\t<div class=\"gallerytext\"> [[wiki/File:Foobar.jpg|Foobar.jpg]]
\t\t\t</div> \t\t</div>\n");
add("html2wt", "Gallery (with namespace-less filenames)", "\t\t* <div
style=\"width: 155px\"> \t\t\t<div class=\"thumb\" style=\"height:
150px;\">Nonexistent.jpg</div> \t\t\t<div class=\"gallerytext\">\t\t\t</div>
\t\t</div>\n\t\t* <div style=\"width: 155px\"> \t\t\t<div class=\"thumb\"
style=\"height: 150px;\">Nonexistent.jpg</div> \t\t\t<div
class=\"gallerytext\">\t\t\t</div> \t\t</div>\n\t\t* <div style=\"width:
155px\"> \t\t\t<div class=\"thumb\" style=\"width: 150px;\"><div
style=\"margin:68px
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>
\t\t\t<div class=\"gallerytext\">\t\t\t</div> \t\t</div>\n\t\t* <div
style=\"width: 155px\"> \t\t\t<div class=\"thumb\" style=\"width: 150px;\"><div
style=\"margin:68px
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>
\t\t\t<div class=\"gallerytext\">\t\t\t</div> \t\t</div>\n");
+add("html2wt", "Illegal character references (T106578)", "\n; Null\n:
&#00;\n; FF\n: &#xC;\n; CR\n: &#xD;\n; Control (low)\n: &#8;\n;
Control (high)\n: &#x7F; &#x9F;\n; Surrogate\n:
&#xD83D;&#xDCA9;\n; This is an okay astral character\n: 💩\n");
add("html2wt", "ISBN code coverage", "ISBN 978-0-1234-56 789\n");
add("html2wt", "Double RFC with a wiki link", "RFC
[/index.php?title=RFC_1234&action=edit&redlink=1 RFC 1234]\n");
add("html2wt", "RFC code coverage", "RFC 983 987\n");
@@ -1593,6 +1603,12 @@
add("selser", "External link containing double-single-quotes with no space
separating the url from text in italics [[1,3,0]]",
"[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm ''La muerte de
Casagemas'' (1901) en el sitio de ]\n");
add("selser", "External link containing double-single-quotes with no space
separating the url from text in italics [[4,0,3]]", "s7cmk1ocalpd5cdi\n");
add("selser", "External link containing double-single-quotes with no space
separating the url from text in italics [[[1,2],2,4]]",
"[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm ''La muerte de
Casagemas''wvn1dm0gv694fgvi (1901) en el sitio de
]bizwk64e6yfogvi3d9bhvaaeq8jv2t9");
+add("selser", "IPv6 urls, autolink format (T23261) [[2],0,[4],0,4,0,1,0,2,0]",
"45jgm4n0yy4on7b9<nowiki/>http://[2404:130:0:1000::187:2]/index.php\n\n96i1s1m2dod8ia4i\n\nxvytxg6w00wqxgvi\n\nExamples
from RFC 2732, section 2:\n\nfsrqvr6zu84cxr\n*
http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html\n*
http://[1080:0:0:0:8:800:200C:417A]/index.html\n*
http://[3ffe:2a00:100:7031::1]\n* http://[1080::8:800:200C:417A]/foo\n*
http://[::192.9.5.5]/ipng\n* http://[::FFFF:129.144.52.38]:80/index.html\n*
http://[2010:836B:4179::836B:4179]\n");
+add("selser", "IPv6 urls, autolink format (T23261) [2,4,3,0,2,3,4,2,1,0]",
"uv5xktt94eku766r\n\nhttp://[2404:130:0:1000::187:2]/index.php\n\ne72h7o0er4rkke29\n\njprjv514552sxlxr\n*
http://[1080::8:800:200C:417A]/unicast\n* http://[FF01::101]/multicast\n*
http://[::1]/loopback\n* http://[::]/unspecified\n*
http://[::13.1.68.3]/ipv4compat\n*
http://[::FFFF:129.144.52.38]/ipv4compat\nyjujeffzl3r0y66r\n\np41sbl65sgzxgvi\n*
http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html\n*
http://[1080:0:0:0:8:800:200C:417A]/index.html\n*
http://[3ffe:2a00:100:7031::1]\n* http://[1080::8:800:200C:417A]/foo\n*
http://[::192.9.5.5]/ipng\n* http://[::FFFF:129.144.52.38]:80/index.html\n*
http://[2010:836B:4179::836B:4179]\n");
+add("selser", "IPv6 urls, autolink format (T23261) [2,0,2,0,1,3,3,2,3,3]",
"tg36q6uuatcvj9k9\n\nhttp://[2404:130:0:1000::187:2]/index.php\n\n95wvynqcn89f6r\n\nExamples
from RFC2373, section 2.2:\n* http://[1080::8:800:200C:417A]/unicast\n*
http://[FF01::101]/multicast\n* http://[::1]/loopback\n*
http://[::]/unspecified\n* http://[::13.1.68.3]/ipv4compat\n*
http://[::FFFF:129.144.52.38]/ipv4compat\nzpcaqsgb2gj8m2t9\n");
+add("selser", "IPv6 urls, autolink format (T23261)
[0,2,[2],0,2,4,1,4,[0,4,1,0,1,2,3,4,[4],0,4,0,0],3]",
"http://[2404:130:0:1000::187:2]/index.php\n\n2e6c9qy0l3m1jor\n\n1hm16gmimvbtvs4iExamples
from RFC2373, section 2.2:\n\ncs5tzf2ji8yhw7b9\n*
http://[1080::8:800:200C:417A]/unicast\n* http://[FF01::101]/multicast\n*
http://[::1]/loopback\n* http://[::]/unspecified\n*
http://[::13.1.68.3]/ipv4compat\n*
http://[::FFFF:129.144.52.38]/ipv4compat\nasso6pf3zn5yu8fr\n\nExamples from RFC
2732, section 2:\n\n84y5hqhfov42t9\n*
http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html\n*
yd96c94gwj73z0k9\n* http://[1080:0:0:0:8:800:200C:417A]/index.html\n*
http://[3ffe:2a00:100:7031::1]\n* 5lqpjf9squth85mi\n*
u8ea4l7i6u56zuxr\n*3pf3bmp3bkervn29\n* 4m87ahilxdnghkt9\n*
http://[2010:836B:4179::836B:4179]\n");
+add("selser", "IPv6 urls, autolink format (T23261)
[1,0,3,0,[2,0,[4],0,4,0,[4],0,[3],0,0],0,1,0,[[3],0,3,4,[3],0,4,0,[4],0,1,3,0],3]",
"http://[2404:130:0:1000::187:2]/index.php\n\n* 1xlw89h6txd2t9\n*
http://[1080::8:800:200C:417A]/unicast\n*cqufukswkp1d1jor\n*
vmqzz1cbftsdobt9\n*zy15lpor0j7zaor\n*\n*
http://[::FFFF:129.144.52.38]/ipv4compat\n\nExamples from RFC 2732, section
2:\n*\n* 7gbanjusqfv9rudi\n*\n* yyoa16vwvzd26gvi\n*gmq92kwvew89f6r\n*
http://[::FFFF:129.144.52.38]:80/index.html\n*
http://[2010:836B:4179::836B:4179]");
+add("selser", "IPv6 urls, autolink format (T23261)
[[2],0,1,0,3,3,2,4,[4,0,0,3,4,0,3,0,0,0,0,3,2],0]",
"5wfwxl6fl9q0vn29<nowiki/>http://[2404:130:0:1000::187:2]/index.php\n\nExamples
from RFC2373, section 2.2:\n\nwgtqsgg5d5sqyqfr\n\nExamples from RFC 2732,
section 2:\n\navtuoiq1794tpgb9\n* 50nmxf1m0w0l766r\n*
http://[1080:0:0:0:8:800:200C:417A]/index.html\n* u1ftbujihl8wu3di\n*
http://[::192.9.5.5]/ipng\n* http://[::FFFF:129.144.52.38]:80/index.html\n*
mptfckjbzi553ik9\n* http://[2010:836B:4179::836B:4179]\n");
add("selser", "mw:ExtLink linking to a interwiki URL can be round-tripped
losslessly (T94723) [[[4]]]", "[[wikipedia:European_Robin|w8te4gwhsniv0a4i]]");
add("selser", "mw:ExtLink linking to a interwiki URL can be round-tripped
losslessly (T94723) [[[2]]]",
"[[wikipedia:European_Robin|jtvcvll5n6x0f6rEuropean Robin]]");
add("selser", "Unclosed and unmatched quotes
[[[0,0,4]],2,3,3,[1],0,4,0,1,2,[[2]],3,3,3,2,0,3,4,1,2,2]", "'''''Bold italic
text '''with bold deactivated0bet2nehr3gl23xr''\n\nmveau9dj2krl766r\n\n'''Bold
text..'''\n\ny75pk6fh55lba9k9\n\n'''Bold tag left
open\n\nivecp7jd69h8semi\n\n''939vypv7nzalwhfrItalic tag left
open''\n\n4jx8l4e2s9kymn29\n<!-- Unmatching number of opening, closing tags:
-->\nftnac0njf7i1wcdi\n\n''Tom'''s car is bigger than
'''''<nowiki/>'''Susan'''s.\n\nwv6k36cpnikbuik9\n\nvtz1rewhs7i7ldi\n\nPlain
''italic'''s plain");
@@ -2171,6 +2187,20 @@
add("selser", "Mixing markup for italics and bold [2]",
"sype68ertrsbgldi\n\n'''bold''''''bold''bolditalics'''''");
add("selser", "Mixing markup for italics and bold [[0,0,[4,[4]]]]",
"'<nowiki/>''bold''''''ofte4w4zkeh77gb9''xbrpnwqlrllerk9'''''");
add("selser", "Mixing markup for italics and bold [[0,2,1]]",
"'7hmry58pm8to6r''bold''''''bold''bolditalics'''''");
+add("selser", "Illegal character references (T106578)
[[[3],[3,0],2,[2],1,4,1,2,4,3,3,0,[4],[3,0,3,0],0,[3],1,2,4,4]]", ";:�\n:
eh2icmhaxdr0ms4i\n;uqve4m940lvdkj4i FF: \n: axspjaiuszfflxr\n; CR\n:
et6j90ps5aaqyqfr: 
\n: 8aah3mpfno1j1yvi\n;20ww9wi9f05xko6r:Ÿ\n;:
��\n: gohh9cigsgjk0529\n: yc6i3xzpr50tqpvi\n: 168hvjmka04o0f6r");
+add("selser", "Illegal character references (T106578)
[[4,0,0,[4],[2,0],3,[4],0,0,0,0,3,[3],[4,0,0,0],2,4,0,4,2,2]]", ":
4pg2nevo279cnmi: �\n;dxfqxf01rekoi529:ztd8molicdhadcxr
\n;wlukc0cndoublnmi: 
\n; Control (low):
\n;:erbzo9178k027qfr Ÿ\n: 49leo05lk6mkj4i\n: 7wx1vdr0os7fd2t9:
��\n: jnuizl4v9s76tj4i\n: bl0icsbw2sxlxr\n; This is an okay
astral character\n: qwmprmtukiq9f6r: 💩");
+add("selser", "Illegal character references (T106578) [2]",
"vf7pd37dz2dquxr\n; Null: �\n; FF: \n; CR: 
\n; Control (low):
\n; Control (high):  Ÿ\n; Surrogate: ��\n; This is
an okay astral character: 💩");
+add("selser", "Illegal character references (T106578)
[[[4],0,2,3,0,3,0,0,4,2,3,3,0,1,0,0,[4,0,0],4,0,[4,0]]]", ";ki2y7lbj0pugzaor:
�\n: whiwizc08xfg8pvi: \n; CR: 
\n: oxrzun7lhtdibe29\n:
h24afge9i074aemi\n; Control (low)\n; Control (high):  Ÿ\n;
Surrogate:ettkd6jmyfs10pb9��\n: keuf1ts1y92otj4i\n; This is an
okay astral character:s5hsxdmwv6j38fr💩");
+add("selser", "Illegal character references (T106578) [1]", "; Null: �\n;
FF: \n; CR: 
\n; Control (low): \n; Control (high): 
Ÿ\n; Surrogate: ��\n; This is an okay astral character:
💩");
+add("selser", "Illegal character references (T106578)
[[3,2,0,2,[4,0],0,0,0,0,0,3,0,[4],[0,0,4,0],0,[2],4,0,0,0]]", ":
u5vwcy0j6qg2e29: �\n: p9a57ap9zyyzaor\n; FF:wjnckgkar860qkt9\n; CR:

\n; Control (low)\n;5myazuveszbvgqfr:
573ocw4dmb73nmiŸ\n;w6mwa1rcleeqxgvi Surrogate\n: l24l65jpn4i5p14i\n;
This is an okay astral character: 💩");
+add("selser", "Illegal character references (T106578)
[[0,0,2,4,1,2,[3],0,2,4,[3,0],0,[4],[4,0,3,0],4,[2],2,0,[4],1]]", "; Null:
�\n: 3ab3bonbkmfe0zfr\n: 99du3i9inwvr6bt9: \n: pzx5yp63uhctmx6r\n;:

\n: azy56mdc8dyxecdi\n:
80ps2m246s603sor:\n;3ly1p5adoomkj4i:pkq8glqmfkyv6lxrŸ\n:
ei515x4atmb49529\n;x59796120h5xw29 Surrogate\n: lvy96v3olh0py14i:
��\n;bb6lntpzr8me7b9: 💩");
+add("selser", "Illegal character references (T106578)
[[4,0,4,1,0,0,2,0,2,4,3,0,0,2,3,0,0,0,4,[4,0]]]", ": h13sy5yortd6xbt9: �\n:
yx2a0yvb9q5v1jor\n; FF: \n: vo96hki38vy22o6r\n; CR: 
\n:
b42u05rrxpmvlsor\n: kr9xfl64a0dx6r\n; Control (high)\n: 75hojzjf9rqtcsor:
 Ÿ\n; Surrogate: ��\n:
mbh8hsmaeswnrk9:ld3mddnlg6gpsyvi💩");
+add("selser", "Illegal character references (T106578)
[[1,0,0,2,[4,0],0,0,2,0,2,2,0,2,4,0,3,[2,0,0],2,2,3]]", "; Null: �\n:
wjv85ity8kw3ik9\n; FF:t0wgde3jzwp3z0k9\n; CR\n: 3ndxxwbs6qg2e29: 
\n:
1lkqfuvhd32i6bt9\n; Control (low)\n: eeavyurhiuex9a4i: \n:
gilnw0h204pfogvi\n; Control (high)\n: xhje4pcgmyzj8aor:5ix003l58rxjemi
��\n: 2sbnezeb93k57b9\n: rdmka6d0pyqr529\n; This is an okay
astral character");
+add("selser", "Illegal character references (T106578)
[[3,3,4,2,[3,0],0,3,2,2,0,1,0,0,2,0,0,2,0,1,3]]", ": raewhcui99cqh0k9\n:
ejpivaf27u6av2t9\n; FF:\n: 6c3qzhgnawtgldi: 
\n: ixbuhech1qsbrzfr\n;
Control (low): \n; Control (high)\n: mk8de6y7kjf6flxr:  Ÿ\n;
Surrogate\n: xglagbmtyma8xgvi: ��\n; This is an okay astral
character");
+add("selser", "Illegal character references (T106578)
[[2,0,3,3,[4,0],3,2,[2,0],0,2,[2,0],0,2,[2,0,3,0],0,[2],0,0,[3],0]]", ":
2p3xm2g6vb73nmi\n; Null: �:120oei58fnfusor\n: ttrk3ah2vl6m9529\n;
CR:hr9r43lw5va38fr 
\n: b6c1nojw0074aemi\n; Control (low):iy6o5agtesy30udi
\n: h2wiauy82ajj1yvi\n; Control (high):gux535tra7ix80k9
Ÿ\n;svxwgnovvvxwdn29 Surrogate: ��\n;: 💩");
+add("selser", "Illegal character references (T106578)
[[0,4,2,4,0,3,2,0,4,2,[3,0],0,4,[2,0,0,0],0,2,2,4,0,4]]", "; Null\n:
9fwhioeeke0442t9\n: j9rvy22kl04quxr\n: b9r3w66fxy8k6gvi: \n:
y1yftc25vffg8pvi\n; CR: 
\n: 2qqnhtc01zjpds4i\n: h4mtw9i1zzq1714i\n;
Control (low):\n: pbxoidwcwzlac3di:xdk2vbc7v3rf6r  Ÿ\n:
ltyipg2p1w9izfr\n; Surrogate\n: 53dgbaz96yeyu8fr: ��\n:
w4u00ww32t7kqpvi\n; This is an okay astral character\n: ybr70brqekzw7b9");
+add("selser", "Illegal character references (T106578)
[[[2],0,0,[4],[2,0],0,[2],0,0,1,4,0,[3],0,0,2,4,4,0,3]]", ";zu5495hxxql1sjor
Null: �\n;5cbqazxlqwbl0udi:pof7ppk4wzmpldi \n;xtwdv922j0xusor CR:

\n; Control (low)\n: 7mds6rq9nzwoecdi\n;:  Ÿ\n:
9k3u42yb3sl6usor\n; Surrogate\n: qb704xdxe3aqbyb9\n: phjue90joss2lnmi\n; This
is an okay astral character");
+add("selser", "Illegal character references (T106578)
[[1,3,0,1,4,3,2,0,0,2,[4,0],0,[2],2,4,1,3,0,2,1]]", "; Null\n; FF\n:
xf4ed4b6sfywrk9\n: 7lsfy0qpn1nn4s4i\n; CR: 
\n: uh0ehwxo7xjbrzfr\n; Control
(low):qws1kllvtusj1yvi\n;0bvupxnunsq93sor Control (high)\n:
6d547p71l1ve7b9:  Ÿ\n: swbefkspflsrlik9\n; Surrogate\n:
ulaiulmr6q88h0k9\n; This is an okay astral character: 💩");
add("selser", "ISBN code coverage [2]", "v9jyhulo7jnka9k9\n\nISBN
978-0-1234-56 789");
add("selser", "ISBN code coverage [1]", "ISBN 978-0-1234-56 789");
add("selser", "ISBN code coverage [[0,0,3]]", "ISBN 978-0-1234-56 \n");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 14915d3..9d46b12 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -5341,14 +5341,91 @@
!! end
!! test
-IPv6 urls (bug 21261)
-!! options
-disabled
+IPv6 urls, autolink format (T23261)
!! wikitext
http://[2404:130:0:1000::187:2]/index.php
+
+Examples from RFC2373, section 2.2:
+* http://[1080::8:800:200C:417A]/unicast
+* http://[FF01::101]/multicast
+* http://[::1]/loopback
+* http://[::]/unspecified
+* http://[::13.1.68.3]/ipv4compat
+* http://[::FFFF:129.144.52.38]/ipv4compat
+
+Examples from RFC 2732, section 2:
+* http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
+* http://[1080:0:0:0:8:800:200C:417A]/index.html
+* http://[3ffe:2a00:100:7031::1]
+* http://[1080::8:800:200C:417A]/foo
+* http://[::192.9.5.5]/ipng
+* http://[::FFFF:129.144.52.38]:80/index.html
+* http://[2010:836B:4179::836B:4179]
+
!! html
<p><a rel="nofollow" class="external free"
href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a>
+</p><p>Examples from RFC2373, section 2.2:
</p>
+<ul><li> <a rel="nofollow" class="external free"
href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
+<li> <a rel="nofollow" class="external free"
href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
+<li> <a rel="nofollow" class="external free"
href="http://[::1]/loopback">http://[::1]/loopback</a></li>
+<li> <a rel="nofollow" class="external free"
href="http://[::]/unspecified">http://[::]/unspecified</a></li>
+<li> <a rel="nofollow" class="external free"
href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
+<li> <a rel="nofollow" class="external free"
href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
+<p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow"
href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
+</p>
+<ul><li> <a rel="nofollow" class="external free"
href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
+<li> <a rel="nofollow" class="external free"
href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
+<li> <a rel="nofollow" class="external free"
href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
+<li> <a rel="nofollow" class="external free"
href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
+<li> <a rel="nofollow" class="external free"
href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
+<li> <a rel="nofollow" class="external free"
href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
+<li> <a rel="nofollow" class="external free"
href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
+
+!! end
+
+!! test
+IPv6 urls, bracketed format (T23261)
+!! wikitext
+[http://[2404:130:0:1000::187:2]/index.php test]
+
+Examples from RFC2373, section 2.2:
+* [http://[1080::8:800:200C:417A] unicast]
+* [http://[FF01::101] multicast]
+* [http://[::1]/ loopback]
+* [http://[::] unspecified]
+* [http://[::13.1.68.3] ipv4compat]
+* [http://[::FFFF:129.144.52.38] ipv4compat]
+
+Examples from RFC 2732, section 2:
+* [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
+* [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
+* [http://[3ffe:2a00:100:7031::1] 3]
+* [http://[1080::8:800:200C:417A]/foo 4]
+* [http://[::192.9.5.5]/ipng 5]
+* [http://[::FFFF:129.144.52.38]:80/index.html 6]
+* [http://[2010:836B:4179::836B:4179] 7]
+
+!! html
+<p><a rel="nofollow" class="external text"
href="http://[2404:130:0:1000::187:2]/index.php">test</a>
+</p><p>Examples from RFC2373, section 2.2:
+</p>
+<ul><li> <a rel="nofollow" class="external text"
href="http://[1080::8:800:200C:417A]">unicast</a></li>
+<li> <a rel="nofollow" class="external text"
href="http://[FF01::101]">multicast</a></li>
+<li> <a rel="nofollow" class="external text"
href="http://[::1]/">loopback</a></li>
+<li> <a rel="nofollow" class="external text"
href="http://[::]">unspecified</a></li>
+<li> <a rel="nofollow" class="external text"
href="http://[::13.1.68.3]">ipv4compat</a></li>
+<li> <a rel="nofollow" class="external text"
href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
+<p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow"
href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
+</p>
+<ul><li> <a rel="nofollow" class="external text"
href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
+<li> <a rel="nofollow" class="external text"
href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
+<li> <a rel="nofollow" class="external text"
href="http://[3ffe:2a00:100:7031::1]">3</a></li>
+<li> <a rel="nofollow" class="external text"
href="http://[1080::8:800:200C:417A]/foo">4</a></li>
+<li> <a rel="nofollow" class="external text"
href="http://[::192.9.5.5]/ipng">5</a></li>
+<li> <a rel="nofollow" class="external text"
href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
+<li> <a rel="nofollow" class="external text"
href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
+
!! end
!! test
@@ -15766,7 +15843,7 @@
!! wikitext
<div style="background-image: u\ rl(test.jpg); "></div>
!! html
-<div style="/* insecure input */"></div>
+<div style="/* invalid control char */"></div>
!! end
@@ -18099,6 +18176,38 @@
<p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
!! end
+# See: http://www.w3.org/TR/html5/syntax.html#character-references
+# Note that U+000C (form feed) is not a valid XML character, so
+# it is banned even though allowed in HTML5.
+!! test
+Illegal character references (T106578)
+!! wikitext
+; Null: �
+; FF: 
+; CR: 
+; Control (low): 
+; Control (high):  Ÿ
+; Surrogate: ��
+; This is an okay astral character: 💩
+!! html+tidy
+<dl>
+<dt>Null</dt>
+<dd>&#00;</dd>
+<dt>FF</dt>
+<dd>&#xC;</dd>
+<dt>CR</dt>
+<dd>&#xD;</dd>
+<dt>Control (low)</dt>
+<dd>&#8;</dd>
+<dt>Control (high)</dt>
+<dd>&#x7F; &#x9F;</dd>
+<dt>Surrogate</dt>
+<dd>&#xD83D;&#xDCA9;</dd>
+<dt>This is an okay astral character</dt>
+<dd>💩</dd>
+</dl>
+!! end
+
!! test
__FORCETOC__ override
!! wikitext
--
To view, visit https://gerrit.wikimedia.org/r/232412
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5e062faae75727fac0ccaf48beb8f984e91dc01
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits