C. Scott Ananian has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/328716 )
Change subject: DON'T PUSH: remove a bunch of tests which *ought* to pass from blacklist. ...................................................................... DON'T PUSH: remove a bunch of tests which *ought* to pass from blacklist. Remove all the language-converter related tests from blacklist, so I can see more clearly what is still failing. Change-Id: Ibc16988fb1e3230362bbdd36809716df08d91919 --- M tests/parserTests-blacklist.js 1 file changed, 0 insertions(+), 120 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/16/328716/1 diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js index bb03503..e20068c 100644 --- a/tests/parserTests-blacklist.js +++ b/tests/parserTests-blacklist.js @@ -163,7 +163,6 @@ 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: 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>"); -add("wt2html", "Language converter: output gets cut off unexpectedly (bug 5757)", "<p data-parsoid='{\"dsr\":[0,20,0,0]}'>this bit is safe: }-</p>\n\n<p data-parsoid='{\"dsr\":[22,82,0,0]}'>but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-</p>\n\n<p data-parsoid='{\"dsr\":[84,112,0,0]}'>then we get cut off here: }-</p>\n\n<p data-parsoid='{\"dsr\":[114,145,0,0]}'>all additional text is vanished</p>"); add("wt2html", "Self closed html pairs (bug 5487)", "<center data-parsoid='{\"stx\":\"html\",\"dsr\":[0,47,8,9]}'><font id=\"bug\" data-parsoid='{\"stx\":\"html\",\"selfClose\":true,\"dsr\":[8,25,17,0]}'></font>Centered text</center>\n<div data-parsoid='{\"stx\":\"html\",\"dsr\":[48,88,5,6]}'><font id=\"bug2\" data-parsoid='{\"stx\":\"html\",\"selfClose\":true,\"dsr\":[53,71,18,0]}'></font>In div text</div>"); add("wt2html", "Fuzz testing: Parser14", "<h2 id=\"onmouseover.3D\" data-parsoid='{\"dsr\":[0,18,2,2]}'> onmouseover= </h2>\n<p data-parsoid='{\"dsr\":[19,33,0,0]}'><a rel=\"mw:ExtLink\" href=\"http://__TOC__\" data-parsoid='{\"stx\":\"url\",\"dsr\":[19,33,0,0]}'>http://__TOC__</a></p>"); add("wt2html", "Fuzz testing: Parser24", "<p data-parsoid='{\"fostered\":true,\"autoInsertedEnd\":true,\"dsr\":[0,0]}'>{{{|\n<u class=\"|\" about=\"#mwt2\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}\":null},\"sa\":{\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}\":\"\"},\"autoInsertedEnd\":true,\"dsr\":[8,0,74,0]}' data-mw='{\"attribs\":[[{\"txt\":\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}}\",\"html\":\"{<span about=\\\"#mwt1\\\" typeof=\\\"mw:Param\\\" data-parsoid='{\\\"dsr\\\":[21,79,null,null],\\\"src\\\":\\\"{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->&lt;noinclude>}}}\\\"}'>{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}</span>}\"},{\"html\":\"\"}]]}'>\n<br style=\"onmouseover='alert(document.cookie);' \" data-parsoid='{\"stx\":\"html\",\"selfClose\":true,\"dsr\":[83,0,53,0]}'/></u></p><p data-parsoid='{\"fostered\":true,\"autoInsertedEnd\":true,\"dsr\":[0,0]}'><u class=\"|\" about=\"#mwt2\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}\":null},\"sa\":{\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}\":\"\"},\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[-37,0,0,0]}' data-mw='{\"attribs\":[[{\"txt\":\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}}\",\"html\":\"{<span about=\\\"#mwt1\\\" typeof=\\\"mw:Param\\\" data-parsoid='{\\\"dsr\\\":[21,79,null,null],\\\"src\\\":\\\"{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->&lt;noinclude>}}}\\\"}'>{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}</span>}\"},{\"html\":\"\"}]]}'>MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p><table data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[0,177,2,0]}'>\n\n\n\n<tbody data-parsoid='{\"dsr\":[176,177,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[176,177,0,0]}'><td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[176,177,1,0]}'></td></tr></tbody></table>"); @@ -192,45 +191,6 @@ add("wt2html", "anchorencode trims spaces", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,36,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode: __pretty__please__\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>__pretty__please__</p>"); add("wt2html", "anchorencode deals with links", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,40,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode: [[hello|world]] [[hi]]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>world hi</p>"); add("wt2html", "anchorencode encodes like the TOC generator: (bug 18431)", "<h3 id=\".2B:.3A.253A.26.26.5D.5D\" data-parsoid='{\"dsr\":[0,26,3,3]}'> _ +:.3A%3A&<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;\",\"srcContent\":\"&\",\"dsr\":[15,20,null,null]}'>&</span>]] </h3>\n<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[27,64,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode: _ +:.3A%3A&&amp;]] \",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>_ +:.3A%3A&&]]</p>\n<meta property=\"mw:PageProp/noeditsection\" data-parsoid='{\"src\":\"__NOEDITSECTION__\",\"magicSrc\":\"__NOEDITSECTION__\",\"dsr\":[65,82,null,null]}'/>"); -add("wt2html", "Self-link in language variants", "<p data-parsoid='{\"dsr\":[0,54,0,0]}'>Both <a rel=\"mw:WikiLink\" href=\"./Dunav\" title=\"Dunav\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Dunav\"},\"sa\":{\"href\":\"Dunav\"},\"dsr\":[5,14,2,2]}'>Dunav</a> and <a rel=\"mw:WikiLink\" href=\"./Дунав\" title=\"Дунав\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Дунав\"},\"sa\":{\"href\":\"Дунав\"},\"dsr\":[19,28,2,2]}'>Дунав</a> are names for this river.</p>"); -add("wt2html", "Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title", "<p data-parsoid='{\"dsr\":[0,77,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Дуна\" title=\"Дуна\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Дуна\"},\"sa\":{\"href\":\"Дуна\"},\"dsr\":[0,8,2,2]}'>Дуна</a> is not a self-link while <a rel=\"mw:WikiLink\" href=\"./Duna\" title=\"Duna\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Duna\"},\"sa\":{\"href\":\"Duna\"},\"dsr\":[34,42,2,2]}'>Duna</a> and <a rel=\"mw:WikiLink\" href=\"./Dуна\" title=\"Dуна\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Dуна\"},\"sa\":{\"href\":\"Dуна\"},\"dsr\":[47,55,2,2]}'>Dуна</a> are still self-links.</p>"); -add("wt2html", "Link to a section of a variant of this title shouldn't be parsed as self-link", "<p data-parsoid='{\"dsr\":[0,79,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Dуна\" title=\"Dуна\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Dуна\"},\"sa\":{\"href\":\"Dуна\"},\"dsr\":[0,8,2,2]}'>Dуна</a> is a self-link while <a rel=\"mw:WikiLink\" href=\"./Dunа#Foo\" title=\"Dunа\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Dunа#Foo\"},\"sa\":{\"href\":\"Dunа#Foo\"},\"dsr\":[30,42,2,2]}'>Dunа#Foo</a> and <a rel=\"mw:WikiLink\" href=\"./Dуна#Foo\" title=\"Dуна\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Dуна#Foo\"},\"sa\":{\"href\":\"Dуна#Foo\"},\"dsr\":[47,59,2,2]}'>Dуна#Foo</a> are not self-links.</p>"); -add("wt2html", "Link to pages in language variants", "<p data-parsoid='{\"dsr\":[0,41,0,0]}'>Main Page can be written as <a rel=\"mw:WikiLink\" href=\"./Маин_Паге\" title=\"Маин Паге\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Маин_Паге\"},\"sa\":{\"href\":\"Маин Паге\"},\"dsr\":[28,41,2,2]}'>Маин Паге</a></p>"); -add("wt2html", "Multiple links to pages in language variants", "<p data-parsoid='{\"dsr\":[0,68,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Main_Page\" title=\"Main Page\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main Page\"},\"dsr\":[0,13,2,2]}'>Main Page</a> can be written as <a rel=\"mw:WikiLink\" href=\"./Маин_Паге\" title=\"Маин Паге\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Маин_Паге\"},\"sa\":{\"href\":\"Маин Паге\"},\"dsr\":[32,45,2,2]}'>Маин Паге</a> same as <a rel=\"mw:WikiLink\" href=\"./Маин_Паге\" title=\"Маин Паге\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Маин_Паге\"},\"sa\":{\"href\":\"Маин Паге\"},\"dsr\":[54,67,2,2]}'>Маин Паге</a>.</p>"); -add("wt2html", "Simple template in language variants", "<p data-parsoid='{\"dsr\":[0,8,0,0]}'><span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt1\" data-parsoid='{\"dsr\":[0,8,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"тест\",\"href\":\"./Шаблон:Тест\"},\"params\":{},\"i\":0}}]}'>Warning: Page/template fetching disabled, and no cache for Шаблон:Тест</span></p>"); -add("wt2html", "Template with explicit namespace in language variants", "<p data-parsoid='{\"dsr\":[0,17,0,0]}'><span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt1\" data-parsoid='{\"dsr\":[0,17,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Template:тест\",\"href\":\"./Шаблон:Тест\"},\"params\":{},\"i\":0}}]}'>Warning: Page/template fetching disabled, and no cache for Шаблон:Тест</span></p>"); -add("wt2html", "Basic test for template parameter in language variants", "<p data-parsoid='{\"dsr\":[0,23,0,0]}'><span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt1\" data-parsoid='{\"dsr\":[0,23,null,null],\"pi\":[[{\"k\":\"param\",\"named\":true}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"парамтест\",\"href\":\"./Шаблон:Парамтест\"},\"params\":{\"param\":{\"wt\":\"foo\"}},\"i\":0}}]}'>Warning: Page/template fetching disabled, and no cache for Шаблон:Парамтест</span></p>"); -add("wt2html", "Stripping -{}- tags (language variants)", "<p data-parsoid='{\"dsr\":[0,36,0,0]}'>Latin proverb: -{Ne nuntium necare}-</p>"); -add("wt2html", "Prevent conversion with -{}- tags (language variants)", "<p data-parsoid='{\"dsr\":[0,31,0,0]}'>Latinski: -{Ne nuntium necare}-</p>"); -add("wt2html", "Prevent conversion of text with -{}- tags (language variants)", "<p data-parsoid='{\"dsr\":[0,31,0,0]}'>Latinski: -{Ne nuntium necare}-</p>"); -add("wt2html", "Prevent conversion of links with -{}- tags (language variants)", "<p data-parsoid='{\"dsr\":[0,17,0,0]}'>-{<a rel=\"mw:WikiLink\" href=\"./Main_Page\" title=\"Main Page\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main Page\"},\"dsr\":[2,15,2,2]}'>Main Page</a>}-</p>"); -add("wt2html", "-{}- tags within headlines (within html for parserConvert())", "<h2 id=\"-.7BNaslov.7D-\" data-parsoid='{\"dsr\":[0,16,2,2]}'> -{Naslov}- </h2>"); -add("wt2html", "Explicit definition of language variant alternatives", "<p data-parsoid='{\"dsr\":[0,36,0,0]}'>-{zh:China;zh-tw:Taiwan}-, not China</p>"); -add("wt2html", "Conversion around HTML tags", "<p data-parsoid='{\"dsr\":[0,93,0,0]}'>-{H|span=>sr-ec:script;title=>sr-ec:src;}-\n<span title=\"La-{sr-el:L;sr-ec:C;}-tin\" data-parsoid='{\"stx\":\"html\",\"dsr\":[43,93,40,7]}'>ski</span></p>"); -add("wt2html", "Explicit session-wise language variant mapping (A flag and - flag)", "<p data-parsoid='{\"dsr\":[0,140,0,0]}'>Taiwan is not China.\nBut -{A|zh:China;zh-tw:Taiwan}- is China,\n(This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)\nand -{China}- is China.</p>"); -add("wt2html", "Explicit session-wise language variant mapping (H flag for hide)", "<p data-parsoid='{\"dsr\":[0,70,0,0]}'>(This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)\nTaiwan is China.</p>"); -add("wt2html", "Adding explicit conversion rule for title (T flag)", "<p data-parsoid='{\"dsr\":[0,46,0,0]}'>Should be stripped-{T|zh:China;zh-tw:Taiwan}-!</p>"); -add("wt2html", "Testing that changing the language variant here in the tests actually works", "<p data-parsoid='{\"dsr\":[0,46,0,0]}'>Should be stripped-{T|zh:China;zh-tw:Taiwan}-!</p>"); -add("wt2html", "Recursive conversion of alt and title attrs shouldn't clear converter state", "<p data-parsoid='{\"dsr\":[0,125,0,0]}'>-{H|zh-cn:Exclamation;zh-tw:exclamation;}-\nShould be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title=\"exclamation\" data-parsoid='{\"stx\":\"html\",\"dsr\":[91,125,26,7]}'>!</span></p>"); -add("wt2html", "Bug 24072: more test on conversion rule for title", "<p data-parsoid='{\"dsr\":[0,128,0,0]}'>This should be stripped-{T|zh:China;zh-tw:Taiwan}-!\nThis won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.</p>"); -add("wt2html", "Partly disable title conversion if variant == main language code", "<p data-parsoid='{\"dsr\":[0,23,0,0]}'>-{T|zh-cn:CN;zh-tw:TW}-</p>"); -add("wt2html", "Partly disable title conversion if variant == main language code, more", "<p data-parsoid='{\"dsr\":[0,8,0,0]}'>-{T|TW}-</p>"); -add("wt2html", "Raw output of variant escape tags (R flag)", "<p data-parsoid='{\"dsr\":[0,32,0,0]}'>Raw: -{R|zh:China;zh-tw:Taiwan}-</p>"); -add("wt2html", "Strings evaluating false shouldn't be ignored by Language converter (T51072)", "<p data-parsoid='{\"dsr\":[0,35,0,0]}'>-{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-</p>"); -add("wt2html", "Conversion rules from [numeric-only string] to [something else] (T48634)", "<p data-parsoid='{\"dsr\":[0,95,0,0]}'>-{H|0=>zh-cn:B}--{H|0=>zh-cn:C;0=>zh-cn:D}--{H|0=>zh-hans:A}-012345-{A|zh-tw:0;zh-cn:E;}-012345</p>"); -add("wt2html", "Bidirectional converter rule entries with an empty value should be ignored (T53551)", "<p data-parsoid='{\"dsr\":[0,29,0,0]}'>-{H|zh-cn:foo;zh-tw:;}-foobar</p>"); -add("wt2html", "Unidirectional converter rule entries with an empty \"from\" string should be ignored (T53551)", "<p data-parsoid='{\"dsr\":[0,24,0,0]}'>-{H|=>zh-cn:foo;}-foobar</p>"); -add("wt2html", "Empty converter rule entries shouldn't be inserted into the conversion table (T53551)", "<p data-parsoid='{\"dsr\":[0,12,0,0]}'>-{H|}-foobar</p>"); -add("wt2html", "Nested using of manual convert syntax", "<p data-parsoid='{\"dsr\":[0,113,0,0]}'>Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!</p>"); -add("wt2html", "Proper conversion of text in external links", "<p data-parsoid='{\"dsr\":[0,269,0,0]}'><a rel=\"mw:ExtLink\" href=\"http://www.google.com\" data-parsoid='{\"stx\":\"url\",\"dsr\":[0,21,0,0]}'>http://www.google.com</a>\n<a rel=\"mw:ExtLink\" href=\"gopher://www.google.com\" data-parsoid='{\"stx\":\"url\",\"dsr\":[22,45,0,0]}'>gopher://www.google.com</a>\n<a rel=\"mw:ExtLink\" href=\"http://www.google.com\" data-parsoid='{\"targetOff\":69,\"contentOffsets\":[69,90],\"dsr\":[46,91,23,1]}'>http://www.google.com</a>\n<a rel=\"mw:ExtLink\" href=\"gopher://www.google.com\" data-parsoid='{\"targetOff\":117,\"contentOffsets\":[117,140],\"dsr\":[92,141,25,1]}'>gopher://www.google.com</a>\n<a rel=\"mw:ExtLink\" href=\"https://www.google.com\" data-parsoid='{\"targetOff\":166,\"contentOffsets\":[166,186],\"dsr\":[142,187,24,1]}'>irc://www.google.com</a>\n<a rel=\"mw:ExtLink\" href=\"ftp://www.google.com\" data-parsoid='{\"targetOff\":210,\"contentOffsets\":[210,234],\"dsr\":[188,235,22,1]}'>www.google.com/ftp://dir</a>\n<a rel=\"mw:ExtLink\" href=\"//www.google.com\" data-parsoid='{\"targetOff\":254,\"contentOffsets\":[254,268],\"dsr\":[236,269,18,1]}'>www.google.com</a></p>"); -add("wt2html", "Do not convert roman numbers to language variants", "<p data-parsoid='{\"dsr\":[0,18,0,0]}'>Fridrih IV je car.</p>"); -add("wt2html", "Don't convert raw rule \"-{R|=>}-\" to \"=>\"", "<p data-parsoid='{\"dsr\":[0,11,0,0]}'>-{R|=<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&gt;\",\"srcContent\":\">\",\"dsr\":[5,9,null,null]}'>></span>}-</p>"); -add("wt2html", "Don't break link parsing if language converter markup is in the caption.", "<p data-parsoid='{\"dsr\":[0,29,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Main_Page\" title=\"Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main Page\"},\"dsr\":[0,29,12,2]}'>-{R|main page}-</a></p>"); -add("wt2html", "T146305: Don't break image parsing if language converter markup is in the caption.", "<figure class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"bogus\",\"ak\":\"-{R\"},{\"ck\":\"caption\",\"ak\":\"caption:}-\"}],\"dsr\":[0,40,2,2]}'><a href=\"./Датотека:Foobar.jpg\" data-parsoid='{\"a\":{\"href\":\"./Датотека:Foobar.jpg\"},\"sa\":{},\"dsr\":[2,null,null,null]}'><img resource=\"./Датотека:Foobar.jpg\" src=\"//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg\" data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" height=\"25\" width=\"220\" data-parsoid='{\"a\":{\"resource\":\"./Датотека:Foobar.jpg\",\"height\":\"25\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a><figcaption data-parsoid='{\"dsr\":[null,38,null,null]}'>caption:}-</figcaption></figure>"); -add("wt2html", "T146305: Don't break image parsing if nested language converter markup is in the caption.", "<figure class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"bogus\",\"ak\":\"-{zh-cn:blog (hk: -{zh-hans\"},{\"ck\":\"bogus\",\"ak\":\"WEBJOURNAL}-, tw: -{zh-hans\"},{\"ck\":\"caption\",\"ak\":\"WEBLOG}-)}-\"}],\"dsr\":[0,93,2,2]}'><a href=\"./File:Foobar.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{},\"dsr\":[2,null,null,null]}'><img resource=\"./File:Foobar.jpg\" src=\"//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg\" data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" height=\"25\" width=\"220\" data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"25\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a><figcaption data-parsoid='{\"dsr\":[null,91,null,null]}'>WEBLOG}-)}-</figcaption></figure>"); -add("wt2html", "Don't break gallery if language converter markup is inside.", "<ul class=\"gallery mw-gallery-traditional\" typeof=\"mw:Extension/gallery\" about=\"#mwt5\" data-parsoid='{\"dsr\":[0,172,2,2]}' data-mw='{\"name\":\"gallery\",\"attrs\":{},\"body\":{\"extsrc\":\"\\nFile:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-\\nFile:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt\\n\"}}'>\n<li class=\"gallerybox\" style=\"width: 155px;\"><div class=\"thumb\" style=\"width: 150px; height: 150px;\"><span style=\"display: inline-block; height: 100%; vertical-align: middle;\"></span><span typeof=\"mw:Image\" style=\"vertical-align: middle; display: inline-block;\"><a href=\"./File:Foobar.jpg\"><img alt=\"-{R\" resource=\"./File:Foobar.jpg\" src=\"//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" height=\"14\" width=\"120\"/></a></span></div><div class=\"gallerytext\">bat}-</div></li>\n<li class=\"gallerybox\" style=\"width: 155px;\"><div class=\"thumb\" style=\"width: 150px; height: 150px;\"><span style=\"display: inline-block; height: 100%; vertical-align: middle;\"></span><span typeof=\"mw:Image\" style=\"vertical-align: middle; display: inline-block;\"><a href=\"./File:Foobar.jpg\"><img alt=\"galleryalt\" resource=\"./File:Foobar.jpg\" src=\"//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" height=\"14\" width=\"120\"/></a></span></div><div class=\"gallerytext\"><span about=\"#mwt4\" typeof=\"mw:Transclusion\" data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Test\",\"href\":\"./Template:Test\"},\"params\":{\"1\":{\"wt\":\"unamedParam\"},\"2\":{\"wt\":\"param}-\"},\"alt\":{\"wt\":\"-{R\"}},\"i\":0}}]}'>This is a test template</span></div></li>\n</ul>"); -add("wt2html", "Don't break list handling if language converter markup is in the item.", "<dl data-parsoid='{\"dsr\":[0,24,0,0]}'><dt data-parsoid='{\"dsr\":[0,8,1,0]}'>-{zh-cn</dt><dd data-parsoid='{\"stx\":\"row\",\"dsr\":[8,24,1,0]}'>AAA;zh-tw:BBB}-</dd></dl>"); -add("wt2html", "T153140: Don't break table handling if language converter markup is in the cell.", "<table data-parsoid='{\"dsr\":[0,18,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[3,16,0,0]}'><tr data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[3,15,2,0]}'>\n<td data-parsoid='{\"a\":{\"-{R\":null},\"sa\":{\"-{R\":\"\"},\"autoInsertedEnd\":true,\"dsr\":[6,15,6,0]}'>B}-</td></tr>\n</tbody></table>"); add("wt2html", "Bug 529: Uncovered bullet in parser function result", "<ul data-parsoid='{\"dsr\":[0,24,0,0]}'><li data-parsoid='{\"dsr\":[0,24,1,0]}'> Foo <span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[6,24,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"lc:{{bullet}} \",\"function\":\"lc\"},\"params\":{},\"i\":0}}]}'> bar</span></li></ul>"); add("wt2html", "Bug 5678: Double-parsed template invocation", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,42,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"lc:{{paramtest {{!}} param = hello }} \",\"function\":\"lc\"},\"params\":{},\"i\":0}}]}'>{{paramtest param = hello }}</p>"); add("wt2html", "Case insensitivity of parser functions for non-ASCII characters (bug 8143)", "<p data-parsoid='{\"dsr\":[0,135,0,0]}'><span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt1\" data-parsoid='{\"dsr\":[0,19,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PRVNÍVELKÉ:ěščř\",\"href\":\"./PRVNÍVELKÉ:ěščř\"},\"params\":{},\"i\":0}}]}'>Warning: Page/template fetching disabled, and no cache for PRVNÍVELKÉ:ěščř</span>\n<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt2\" data-parsoid='{\"dsr\":[20,39,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"prvnívelké:ěščř\",\"href\":\"./Prvnívelké:ěščř\"},\"params\":{},\"i\":0}}]}'>Warning: Page/template fetching disabled, and no cache for Prvnívelké:ěščř</span>\n<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt3\" data-parsoid='{\"dsr\":[40,58,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PRVNÍMALÉ:ěščř\",\"href\":\"./PRVNÍMALÉ:ěščř\"},\"params\":{},\"i\":0}}]}'>Warning: Page/template fetching disabled, and no cache for PRVNÍMALÉ:ěščř</span>\n<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt4\" data-parsoid='{\"dsr\":[59,77,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"prvnímalé:ěščř\",\"href\":\"./Prvnímalé:ěščř\"},\"params\":{},\"i\":0}}]}'>Warning: Page/template fetching disabled, and no cache for Prvnímalé:ěščř</span>\n<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt5\" data-parsoid='{\"dsr\":[78,91,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"MALÁ:ěščř\",\"href\":\"./MALÁ:ěščř\"},\"params\":{},\"i\":0}}]}'>Warning: Page/template fetching disabled, and no cache for MALÁ:ěščř</span>\n<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt6\" data-parsoid='{\"dsr\":[92,105,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"malá:ěščř\",\"href\":\"./Malá:ěščř\"},\"params\":{},\"i\":0}}]}'>Warning: Page/template fetching disabled, and no cache for Malá:ěščř</span>\n<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt7\" data-parsoid='{\"dsr\":[106,120,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"VELKÁ:ěščř\",\"href\":\"./VELKÁ:ěščř\"},\"params\":{},\"i\":0}}]}'>Warning: Page/template fetching disabled, and no cache for VELKÁ:ěščř</span>\n<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt8\" data-parsoid='{\"dsr\":[121,135,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"velká:ěščř\",\"href\":\"./Velká:ěščř\"},\"params\":{},\"i\":0}}]}'>Warning: Page/template fetching disabled, and no cache for Velká:ěščř</span></p>"); @@ -260,11 +220,6 @@ add("wt2html", "Check noCommafy in formatNum", "<p data-parsoid='{\"dsr\":[0,53,0,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"formatnum:123456.78\",\"function\":\"formatnum\"},\"params\":{},\"i\":0}}]}'>123456.78</span>\n<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,53,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"formatnum:123456.78\",\"function\":\"formatnum\"},\"params\":{\"1\":{\"wt\":\"NOSEP\"}},\"i\":0}}]}'>123456.78</span></p>"); add("wt2html", "Wrong option for formatNum (bug 56199)", "<p data-parsoid='{\"dsr\":[0,126,0,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"formatnum:1,234.56\",\"function\":\"formatnum\"},\"params\":{\"1\":{\"wt\":\"Random\"}},\"i\":0}}]}'>1,234.56</span>\n<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[30,63,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"formatnum:1,234.56\",\"function\":\"formatnum\"},\"params\":{\"1\":{\"wt\":\"EVERYTHING\"}},\"i\":0}}]}'>1,234.56</span>\n<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[64,126,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"formatnum:1234.56\",\"function\":\"formatnum\"},\"params\":{\"1\":{\"wt\":\"any argument that has the string 'NOSEP'\"}},\"i\":0}}]}'>1234.56</span></p>"); add("wt2html", "Strip marker in grammar", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,35,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"grammar:elative\",\"function\":\"grammar\"},\"params\":{\"1\":{\"wt\":\"foo<nowiki/>bar\"}},\"i\":0}}]}'>Parser function implementation for pf_grammar missing in Parsoid.</p>"); -add("wt2html", "Gallery override link with WikiLink (bug 34852)", "<ul class=\"gallery mw-gallery-traditional\" typeof=\"mw:Extension/gallery\" about=\"#mwt2\" data-parsoid='{\"dsr\":[0,78,2,2]}' data-mw='{\"name\":\"gallery\",\"attrs\":{},\"body\":{\"extsrc\":\"\\nFile:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink\\n\"}}'>\n<li class=\"gallerybox\" style=\"width: 155px;\"><div class=\"thumb\" style=\"width: 150px; height: 150px;\"><span style=\"display: inline-block; height: 100%; vertical-align: middle;\"></span><span typeof=\"mw:Image\" style=\"vertical-align: middle; display: inline-block;\"><a href=\"./InterWikiLink\"><img alt=\"galleryalt\" resource=\"./File:Foobar.jpg\" src=\"//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" height=\"14\" width=\"120\"/></a></span></div><div class=\"gallerytext\">caption</div></li>\n</ul>"); -add("wt2html", "Gallery override link with absolute external link (bug 34852)", "<ul class=\"gallery mw-gallery-traditional\" typeof=\"mw:Extension/gallery\" about=\"#mwt2\" data-parsoid='{\"dsr\":[0,87,2,2]}' data-mw='{\"name\":\"gallery\",\"attrs\":{},\"body\":{\"extsrc\":\"\\nFile:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org\\n\"}}'>\n<li class=\"gallerybox\" style=\"width: 155px;\"><div class=\"thumb\" style=\"width: 150px; height: 150px;\"><span style=\"display: inline-block; height: 100%; vertical-align: middle;\"></span><span typeof=\"mw:Image\" style=\"vertical-align: middle; display: inline-block;\"><a href=\"http://www.example.org\"><img alt=\"galleryalt\" resource=\"./File:Foobar.jpg\" src=\"//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" height=\"14\" width=\"120\"/></a></span></div><div class=\"gallerytext\">caption</div></li>\n</ul>"); -add("wt2html", "Gallery override link with absolute external link with LanguageConverter", "<ul class=\"gallery mw-gallery-traditional\" typeof=\"mw:Extension/gallery\" about=\"#mwt2\" data-parsoid='{\"dsr\":[0,87,2,2]}' data-mw='{\"name\":\"gallery\",\"attrs\":{},\"body\":{\"extsrc\":\"\\nFile:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org\\n\"}}'>\n<li class=\"gallerybox\" style=\"width: 155px;\"><div class=\"thumb\" style=\"width: 150px; height: 150px;\"><span style=\"display: inline-block; height: 100%; vertical-align: middle;\"></span><span typeof=\"mw:Image\" style=\"vertical-align: middle; display: inline-block;\"><a href=\"http://www.example.org\"><img alt=\"galleryalt\" resource=\"./File:Foobar.jpg\" src=\"//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" height=\"14\" width=\"120\"/></a></span></div><div class=\"gallerytext\">caption</div></li>\n</ul>"); -add("wt2html", "Gallery override link with malicious javascript (bug 34852)", "<ul class=\"gallery mw-gallery-traditional\" typeof=\"mw:Extension/gallery\" about=\"#mwt2\" data-parsoid='{\"dsr\":[0,112,2,2]}' data-mw='{\"name\":\"gallery\",\"attrs\":{},\"body\":{\"extsrc\":\"\\nFile:foobar.jpg|caption|alt=galleryalt|link=\\\" onclick=\\\"alert('malicious javascript code!');\\n\"}}'>\n<li class=\"gallerybox\" style=\"width: 155px;\"><div class=\"thumb\" style=\"width: 150px; height: 150px;\"><span style=\"display: inline-block; height: 100%; vertical-align: middle;\"></span><span typeof=\"mw:Image\" style=\"vertical-align: middle; display: inline-block;\"><a href=\"./"_onclick="alert('malicious_javascript_code!');\"><img alt=\"galleryalt\" resource=\"./File:Foobar.jpg\" src=\"//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" height=\"14\" width=\"120\"/></a></span></div><div class=\"gallerytext\">caption</div></li>\n</ul>"); -add("wt2html", "Gallery with invalid title as link (bug 43964)", "<ul class=\"gallery mw-gallery-traditional\" typeof=\"mw:Extension/gallery\" about=\"#mwt2\" data-parsoid='{\"dsr\":[0,43,2,2]}' data-mw='{\"name\":\"gallery\",\"attrs\":{},\"body\":{\"extsrc\":\"\\nFile:foobar.jpg|link=<\\n\"}}'>\n<li class=\"gallerybox\" style=\"width: 155px;\"><div class=\"thumb\" style=\"width: 150px; height: 150px;\"><span style=\"display: inline-block; height: 100%; vertical-align: middle;\"></span><span typeof=\"mw:Image\" style=\"vertical-align: middle; display: inline-block;\"><a href=\"./File:Foobar.jpg\"><img resource=\"./File:Foobar.jpg\" src=\"//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" height=\"14\" width=\"120\"/></a></span></div><div class=\"gallerytext\">link=<</div></li>\n</ul>"); add("wt2html", "Language parser function", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,16,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#language:ar\",\"function\":\"#language\"},\"params\":{},\"i\":0}}]}'>ar</p>"); add("wt2html", "Special parser function", "<p data-parsoid='{\"dsr\":[0,65,0,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#special:RandomPage\",\"function\":\"#special\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_#special missing in Parsoid.</span>\n<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[24,45,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#special:BaDtItLe\",\"function\":\"#special\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_#special missing in Parsoid.</span>\n<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[46,65,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#special:Foobar\",\"function\":\"#special\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_#special missing in Parsoid.</span></p>"); add("wt2html", "1. SOL-sensitive wikitext tokens as template-args", "<p data-parsoid='{\"dsr\":[0,35,0,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,11,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"*a\"}},\"i\":0}}]}'>*a</span>\n<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"#a\"}},\"i\":0}}]}'>#a</span>\n<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,35,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\":a\"}},\"i\":0}}]}'>:a</span></p>"); @@ -352,7 +307,6 @@ add("wt2wt", "Image with page parameter", "[[File:LoremIpsum.djvu]]\n"); add("wt2wt", "Don't fall for the self-closing div", "<div>hello world</div>"); add("wt2wt", "Parsing of overlapping (improperly nested) inline html tags", "<span><s>x</span>\n"); -add("wt2wt", "T153140: Don't break table handling if language converter markup is in the cell.", "{|\n|-\n| -{R |B}-\n|}"); add("wt2wt", "Bug 529: Uncovered bullet leaving empty list, normally removed by tidy", "******* Foo \n{{bullet}}"); add("wt2wt", "HHP2.1: Heuristics for headings in preprocessor parenthetical structures", "<nowiki>{{foo|</nowiki>\n=heading=\n"); add("wt2wt", "HHP2.2: Heuristics for headings in preprocessor parenthetical structures", "<nowiki>{{foo|</nowiki>\n==heading==\n"); @@ -554,21 +508,6 @@ add("html2html", "ISBN with space-delimited number", "<p data-parsoid='{\"dsr\":[0,58,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Special:BookSources/9290170328\" title=\"Wiki/Special:BookSources/9290170328\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Special:BookSources/9290170328\"},\"sa\":{\"href\":\"wiki/Special:BookSources/9290170328\"},\"dsr\":[0,58,38,2]}'>ISBN 92 9017 032 8</a></p>\n"); add("html2html", "ISBN length", "<p data-parsoid='{\"dsr\":[0,14,0,0]}'>ISBN 123456789</p>\n\n<p data-parsoid='{\"dsr\":[16,71,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Special:BookSources/1234567890\" title=\"Wiki/Special:BookSources/1234567890\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Special:BookSources/1234567890\"},\"sa\":{\"href\":\"wiki/Special:BookSources/1234567890\"},\"dsr\":[16,71,38,2]}'>ISBN 1234567890</a></p>\n\n<p data-parsoid='{\"dsr\":[73,89,0,0]}'>ISBN 12345678901</p>\n"); add("html2html", "ISBN with trailing year (bug 8110)", "<p data-parsoid='{\"dsr\":[0,65,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Special:BookSources/1234567890\" title=\"Wiki/Special:BookSources/1234567890\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Special:BookSources/1234567890\"},\"sa\":{\"href\":\"wiki/Special:BookSources/1234567890\"},\"dsr\":[0,58,38,2]}'>ISBN 1-234-56789-0</a> - 2006</p>\n\n<p data-parsoid='{\"dsr\":[67,132,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Special:BookSources/1234567890\" title=\"Wiki/Special:BookSources/1234567890\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Special:BookSources/1234567890\"},\"sa\":{\"href\":\"wiki/Special:BookSources/1234567890\"},\"dsr\":[67,125,38,2]}'>ISBN 1 234 56789 0</a> - 2006</p>\n"); -add("html2html", "Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title", "<p data-parsoid='{\"dsr\":[0,147,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Дуна\" title=\"Wiki/Дуна\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Дуна\"},\"sa\":{\"href\":\"wiki/Дуна\"},\"dsr\":[0,18,12,2]}'>Дуна</a> is not a self-link while <strong class=\"selflink\" data-parsoid='{\"stx\":\"html\",\"dsr\":[44,82,25,9]}'>Duna</strong> and <strong class=\"selflink\" data-parsoid='{\"stx\":\"html\",\"dsr\":[87,125,25,9]}'>Dуна</strong> are still self-links.</p>\n"); -add("html2html", "Link to a section of a variant of this title shouldn't be parsed as self-link", "<p data-parsoid='{\"dsr\":[0,129,0,0]}'><strong class=\"selflink\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,38,25,9]}'>Dуна</strong> is a self-link while <a rel=\"mw:WikiLink\" href=\"./Wiki/Дуна\" title=\"Wiki/Дуна\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Дуна\"},\"sa\":{\"href\":\"wiki/Дуна\"},\"dsr\":[60,82,12,2]}'>Dunа#Foo</a> and <a rel=\"mw:WikiLink\" href=\"./Wiki/Дуна\" title=\"Wiki/Дуна\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Дуна\"},\"sa\":{\"href\":\"wiki/Дуна\"},\"dsr\":[87,109,12,2]}'>Dуна#Foo</a> are not self-links.</p>\n"); -add("html2html", "Link to pages in language variants", "<p data-parsoid='{\"dsr\":[0,56,0,0]}'>Main Page can be written as <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\":[28,56,17,2]}'>Маин Паге</a></p>\n"); -add("html2html", "Multiple links to pages in language variants", "<p data-parsoid='{\"dsr\":[0,113,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> can be written as <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\":[47,75,17,2]}'>Маин Паге</a> same as <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\":[84,112,17,2]}'>Маин Паге</a>.</p>\n"); -add("html2html", "Prevent conversion of links with -{}- tags (language variants)", "<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"); -add("html2html", "Adding explicit conversion rule for title (T flag)", "<p data-parsoid='{\"dsr\":[0,6,0,0]}'>Taiwan</p>\n\n<p data-parsoid='{\"dsr\":[8,27,0,0]}'>Should be stripped!</p>\n"); -add("html2html", "Testing that changing the language variant here in the tests actually works", "<p data-parsoid='{\"dsr\":[0,5,0,0]}'>China</p>\n\n<p data-parsoid='{\"dsr\":[7,26,0,0]}'>Should be stripped!</p>\n"); -add("html2html", "Recursive conversion of alt and title attrs shouldn't clear converter state", "<p data-parsoid='{\"dsr\":[0,5,0,0]}'>China</p>\n\n<p data-parsoid='{\"dsr\":[7,59,0,0]}'>Should be stripped<span title=\"Exclamation\" data-parsoid='{\"stx\":\"html\",\"dsr\":[25,59,26,7]}'>!</span></p>\n"); -add("html2html", "Bug 24072: more test on conversion rule for title", "<p data-parsoid='{\"dsr\":[0,6,0,0]}'>Taiwan</p>\n\n<p data-parsoid='{\"dsr\":[8,80,0,0]}'>This should be stripped!\nThis won't take interferes with the title rule.</p>\n"); -add("html2html", "Partly disable title conversion if variant == main language code", "<p data-parsoid='{\"dsr\":[0,2,0,0]}'>ZH</p>\n"); -add("html2html", "Partly disable title conversion if variant == main language code, more", "<p data-parsoid='{\"dsr\":[0,2,0,0]}'>ZH</p>\n"); -add("html2html", "Don't break link parsing if language converter markup is in the caption.", "<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"); -add("html2html", "T146305: Don't break image parsing if language converter markup is in the caption.", "<figure class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"caption\",\"ak\":\"<span></span>\"}],\"dsr\":[0,43,2,2]}'><a href=\"./Датотека:Foobar.jpg\" data-parsoid='{\"a\":{\"href\":\"./Датотека:Foobar.jpg\"},\"sa\":{},\"dsr\":[2,null,null,null]}'><img resource=\"./Датотека:Foobar.jpg\" src=\"//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg\" data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" height=\"25\" width=\"220\" data-parsoid='{\"a\":{\"resource\":\"./Датотека:Foobar.jpg\",\"height\":\"25\",\"width\":\"220\"},\"sa\":{\"resource\":\"Датотека:Foobar.jpg\"}}'/></a><figcaption data-parsoid='{\"dsr\":[null,41,null,null]}'><span data-parsoid='{\"stx\":\"html\",\"dsr\":[28,41,6,7]}'></span></figcaption></figure>\n"); -add("html2html", "T146305: Don't break image parsing if nested language converter markup is in the caption.", "<figure class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"caption\",\"ak\":\"<span></span>\"}],\"dsr\":[0,39,2,2]}'><a href=\"./File:Foobar.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{},\"dsr\":[2,null,null,null]}'><img resource=\"./File:Foobar.jpg\" src=\"//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg\" data-file-width=\"1941\" data-file-height=\"220\" data-file-type=\"bitmap\" height=\"25\" width=\"220\" data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"25\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a><figcaption data-parsoid='{\"dsr\":[null,37,null,null]}'><span data-parsoid='{\"stx\":\"html\",\"dsr\":[24,37,6,7]}'></span></figcaption></figure>\n"); -add("html2html", "Don't break gallery if language converter markup is inside.", "<p data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\" data-parsoid='{\"stx\":\"html\",\"dsr\":[4,295,26,6]}'> \t\t\t<div class=\"thumb\" style=\"width: 150px;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[34,182,41,6]}'><div style=\"margin:68px auto;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[75,176,31,6]}'><img src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" alt=\"120px-Foobar.jpg\" rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[106,170,null,null]}'/></div></div> \t\t\t<div class=\"gallerytext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[186,286,25,6]}'> <img src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg\" alt=\"20px-Foobar.jpg\" rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[212,275,null,null]}'/> \t\t\t</div> \t\t</div>\n<p data-parsoid='{\"dsr\":[296,300,0,0]}'>\t\t* </p><div style=\"width: 155px\" data-parsoid='{\"stx\":\"html\",\"dsr\":[300,551,26,6]}'> \t\t\t<div class=\"thumb\" style=\"width: 150px;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[330,478,41,6]}'><div style=\"margin:68px auto;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[371,472,31,6]}'><img src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" alt=\"120px-Foobar.jpg\" rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[402,466,null,null]}'/></div></div> \t\t\t<div class=\"gallerytext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[482,542,25,6]}'> This is a test template \t\t\t</div> \t\t</div>\n"); add("html2html", "Free external link invading image caption", "<div class=\"thumb tright\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,236,26,6]}'><div class=\"thumbinner\" style=\"width:182px;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[26,230,45,6]}'><img src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg\" alt=\"180px-Foobar.jpg\" rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[71,135,null,null]}'/> <div class=\"thumbcaption\" data-parsoid='{\"stx\":\"html\",\"dsr\":[137,224,26,6]}'><div class=\"magnify\" data-parsoid='{\"stx\":\"html\",\"dsr\":[163,213,21,6]}'>[/wiki/File:Foobar.jpg]</div>hello</div></div></div>\n"); add("html2html", "Bad images - basic functionality", "<p data-parsoid='{\"dsr\":[0,16,0,0]}'><span class=\"mw-default-size\" typeof=\"mw:Error mw:Image\" data-parsoid='{\"optList\":[],\"dsr\":[0,16,null,null]}' data-mw='{\"errors\":[{\"key\":\"missing-image\",\"message\":\"This image does not exist.\"}]}'><a href=\"./File:Bad.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Bad.jpg\"},\"sa\":{}}'><img resource=\"./File:Bad.jpg\" src=\"./Special:FilePath/Bad.jpg\" height=\"220\" width=\"220\" data-parsoid='{\"a\":{\"resource\":\"./File:Bad.jpg\",\"height\":\"220\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Bad.jpg\"}}'/></a></span></p>\n"); add("html2html", "Bad images - bug 16039: text after bad image disappears", "<p data-parsoid='{\"dsr\":[0,32,0,0]}'>Foo bar\n<span class=\"mw-default-size\" typeof=\"mw:Error mw:Image\" data-parsoid='{\"optList\":[],\"dsr\":[8,24,null,null]}' data-mw='{\"errors\":[{\"key\":\"missing-image\",\"message\":\"This image does not exist.\"}]}'><a href=\"./File:Bad.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Bad.jpg\"},\"sa\":{}}'><img resource=\"./File:Bad.jpg\" src=\"./Special:FilePath/Bad.jpg\" height=\"220\" width=\"220\" data-parsoid='{\"a\":{\"resource\":\"./File:Bad.jpg\",\"height\":\"220\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Bad.jpg\"}}'/></a></span>\nBar foo</p>\n"); @@ -589,13 +528,6 @@ add("html2html", "Empty <p> tag in TOC, removed by Sanitizer (T92892)", "\n<div id=\"toc\" class=\"toc\" data-parsoid='{\"stx\":\"html\",\"dsr\":[1,151,26,6]}'>\n<div id=\"toctitle\" data-parsoid='{\"stx\":\"html\",\"dsr\":[28,69,19,6]}'>\n<h2 id=\"Contents\" data-parsoid='{\"dsr\":[48,62,2,2]}'> Contents </h2>\n</div>\n\n<ul data-parsoid='{\"dsr\":[71,143,0,0]}'><li data-parsoid='{\"dsr\":[71,143,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#x\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#x\"},\"sa\":{\"href\":\"#x\"},\"dsr\":[73,143,5,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[78,110,24,7]}'>1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[111,141,22,7]}'>x</span></a></li></ul>\n\n</div>\n\n<h2 id=\"x\" data-parsoid='{\"dsr\":[153,160,2,2]}'> x </h2>\n"); add("html2html", "nowiki inside link inside heading (bug 18295)", "<h2 id=\"xyz\" data-parsoid='{\"dsr\":[0,22,2,2]}'> <a rel=\"mw:WikiLink\" href=\"./Wiki/Foo\" title=\"Wiki/Foo\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Foo\"},\"sa\":{\"href\":\"wiki/Foo\"},\"dsr\":[3,19,11,2]}'>xyz</a> </h2>\n"); add("html2html", "new support for bdi element (bug 31817)", "<p data-parsoid='{\"dsr\":[0,122,0,0]}'>ולדימיר לנין (ברוסית: <bdi lang=\"ru\" data-parsoid='{\"stx\":\"html\",\"dsr\":[22,57,15,6]}'>Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>\n"); -add("html2html", "Gallery override link with WikiLink (bug 34852)", "<p data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\" data-parsoid='{\"stx\":\"html\",\"dsr\":[4,239,26,6]}'> \t\t\t<div class=\"thumb\" style=\"width: 150px;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[34,182,41,6]}'><div style=\"margin:68px auto;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[75,176,31,6]}'><img src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" alt=\"120px-Foobar.jpg\" rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[106,170,null,null]}'/></div></div> \t\t\t<div class=\"gallerytext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[186,230,25,6]}'> caption \t\t\t</div> \t\t</div>\n"); -add("html2html", "Gallery override link with absolute external link (bug 34852)", "<p data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\" data-parsoid='{\"stx\":\"html\",\"dsr\":[4,239,26,6]}'> \t\t\t<div class=\"thumb\" style=\"width: 150px;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[34,182,41,6]}'><div style=\"margin:68px auto;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[75,176,31,6]}'><img src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" alt=\"120px-Foobar.jpg\" rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[106,170,null,null]}'/></div></div> \t\t\t<div class=\"gallerytext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[186,230,25,6]}'> caption \t\t\t</div> \t\t</div>\n"); -add("html2html", "Gallery override link with absolute external link with LanguageConverter", "<p data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\" data-parsoid='{\"stx\":\"html\",\"dsr\":[4,239,26,6]}'> \t\t\t<div class=\"thumb\" style=\"width: 150px;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[34,182,41,6]}'><div style=\"margin:68px auto;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[75,176,31,6]}'><img src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" alt=\"120px-Foobar.jpg\" rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[106,170,null,null]}'/></div></div> \t\t\t<div class=\"gallerytext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[186,230,25,6]}'> caption \t\t\t</div> \t\t</div>\n"); -add("html2html", "Gallery override link with malicious javascript (bug 34852)", "<p data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\" data-parsoid='{\"stx\":\"html\",\"dsr\":[4,239,26,6]}'> \t\t\t<div class=\"thumb\" style=\"width: 150px;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[34,182,41,6]}'><div style=\"margin:68px auto;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[75,176,31,6]}'><img src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" alt=\"120px-Foobar.jpg\" rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[106,170,null,null]}'/></div></div> \t\t\t<div class=\"gallerytext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[186,230,25,6]}'> caption \t\t\t</div> \t\t</div>\n"); -add("html2html", "Gallery with invalid title as link (bug 43964)", "<p data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\" data-parsoid='{\"stx\":\"html\",\"dsr\":[4,229,26,6]}'> \t\t\t<div class=\"thumb\" style=\"width: 150px;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[34,182,41,6]}'><div style=\"margin:68px auto;\" data-parsoid='{\"stx\":\"html\",\"dsr\":[75,176,31,6]}'><img src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\" alt=\"120px-Foobar.jpg\" rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[106,170,null,null]}'/></div></div> \t\t\t<div class=\"gallerytext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[186,220,25,6]}'>\t\t\t</div> \t\t</div>\n"); -add("html2html", "Ref: 8. transclusion wikitext has lower precedence", "<p data-parsoid='{\"dsr\":[0,64,0,0]}'>A <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[2,41,5,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\"><span class=\"mw-reflink-text\">[1]</span></a></span><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[41,64,8,9]}'> B C}}</span></p>\n<ol class=\"mw-references\" typeof=\"mw:Extension/references\" about=\"#mwt4\" data-parsoid='{\"dsr\":[65,79,2,2]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><li about=\"#cite_note-1\" id=\"cite_note-1\"><a href=\"./Main_Page#cite_ref-1\" rel=\"mw:referencedBy\"><span class=\"mw-linkback-text\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\" data-parsoid=\"{}\">foo {{echo|</span></li></ol>"); -add("html2html", "References: 9. Generate missing references list at the end", "<p data-parsoid='{\"dsr\":[0,52,0,0]}'>A <span about=\"#mwt3\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[2,16,5,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\"><span class=\"mw-reflink-text\">[1]</span></a></span> B <span about=\"#mwt4\" class=\"mw-ref\" id=\"cite_ref-2\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[19,52,24,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-2\"},\"attrs\":{\"group\":\"inexistent\"}}'><a href=\"./Main_Page#cite_note-2\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"inexistent\"><span class=\"mw-reflink-text\">[inexistent 1]</span></a></span></p>\n<ol class=\"mw-references\" typeof=\"mw:Extension/references\" about=\"#mwt6\" data-parsoid='{\"dsr\":[53,67,2,2]}' data-mw='{\"name\":\"references\",\"attrs\":{}}'><li about=\"#cite_note-1\" id=\"cite_note-1\"><a href=\"./Main_Page#cite_ref-1\" rel=\"mw:referencedBy\"><span class=\"mw-linkback-text\">↑ </span></a> <span id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\" data-parsoid=\"{}\">foo</span></li></ol>\n<ol class=\"mw-references\" typeof=\"mw:Extension/references\" about=\"#mwt8\" data-mw-group=\"inexistent\" data-parsoid='{\"group\":\"inexistent\",\"dsr\":[68,101,2,2]}' data-mw='{\"name\":\"references\",\"attrs\":{\"group\":\"inexistent\"}}'><li about=\"#cite_note-2\" id=\"cite_note-2\"><a href=\"./Main_Page#cite_ref-2\" data-mw-group=\"inexistent\" rel=\"mw:referencedBy\"><span class=\"mw-linkback-text\">↑ </span></a> <span id=\"mw-reference-text-cite_note-2\" class=\"mw-reference-text\" data-parsoid=\"{}\">bar</span></li></ol>"); add("html2html", "Empty LI and TR nodes should not be stripped from top-level content", "<ul data-parsoid='{\"dsr\":[0,9,0,0]}'><li data-parsoid='{\"dsr\":[0,3,1,0]}'> a</li>\n<li data-parsoid='{\"dsr\":[4,5,1,0]}'></li>\n<li data-parsoid='{\"dsr\":[6,9,1,0]}'> b</li></ul>\n\n<table data-parsoid='{\"dsr\":[11,24,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[14,22,0,0]}'><tr data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[14,21,2,0]}'>\n<td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[17,21,1,0]}'>foo</td></tr>\n</tbody></table>\n"); add("html2html", "Empty TR followed by a template-generated TR", "<table data-parsoid='{\"dsr\":[0,36,2,2]}'>\n<tbody about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[3,34,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"<tr><td>foo</td></tr>\"}},\"i\":0}},\"\\n\"]}'><tr><td>foo</td></tr>\n</tbody></table>\n"); add("html2html", "Empty TR followed by mixed-ws-comment line should RT correctly", "<table data-parsoid='{\"dsr\":[0,36,2,2]}'>\n\n <!--c--><tbody data-parsoid='{\"dsr\":[13,34,0,0]}'><tr data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[13,25,2,0]}'>\n<!--c--> </tr><!--d-->\n</tbody></table>\n"); @@ -1076,7 +1008,6 @@ add("html2wt", "Sanitizer: Closing of open tags", "<s></s>\n{|\n|}\n"); add("html2wt", "Sanitizer: Closing of open but not closed tags", "<s>foo</s>\n"); add("html2wt", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata", "<div itemscope=\"\">\n\t<meta itemprop=\"hello\" content=\"world\" />\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta itemprop=\"hello\" content=\"5\" />\n\n\t[http://example.org]\n\t<link rel=\"stylesheet\" href=\"http://example.org\">\n\t[http://example.org]\n</div>\n"); -add("html2wt", "Language converter: output gets cut off unexpectedly (bug 5757)", "this bit is safe: }-\n\nbut if we add a conversion instance: xxx\n\nthen we get cut off here: }-\n\nall additional text is vanished\n"); add("html2wt", "Self closed html pairs (bug 5487)", "<center><nowiki><font id=\"bug\" /></nowiki>Centered text</center>\n<div><nowiki><font id=\"bug2\" /></nowiki>In div text</div>\n"); add("html2wt", "Punctuation: nbsp before exclamation", "C'est grave !\n"); add("html2wt", "HTML nested bullet list, open tags (bug 5497)", "* One\n* Two:\n** Sub-one\n** Sub-two\n"); @@ -1139,44 +1070,6 @@ add("html2wt", "Bug 6200: blockquotes and paragraph formatting", "<blockquote>\nfoo\n\n</blockquote>\nbar\n\n baz\n"); add("html2wt", "Bug 8293: Use of center tag ruins paragraph formatting", "<center>\nfoo\n\n</center>\nbar\n\n baz\n"); add("html2wt", "Parsing of overlapping (improperly nested) inline html tags", "<span><s>x</s></span>\n"); -add("html2wt", "Self-link in language variants", "Both <strong class=\"selflink\">Dunav</strong> and <strong class=\"selflink\">Дунав</strong> are names for this river.\n"); -add("html2wt", "Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title", "[[wiki/Дуна|Дуна]] is not a self-link while <strong class=\"selflink\">Duna</strong> and <strong class=\"selflink\">Dуна</strong> are still self-links.\n"); -add("html2wt", "Link to a section of a variant of this title shouldn't be parsed as self-link", "<strong class=\"selflink\">Dуна</strong> is a self-link while [[wiki/Дуна|Dunа#Foo]] and [[wiki/Дуна|Dуна#Foo]] are not self-links.\n"); -add("html2wt", "Link to pages in language variants", "Main Page can be written as [[wiki/Main Page|Маин Паге]]\n"); -add("html2wt", "Multiple links to pages in language variants", "[[wiki/Main Page|Main Page]] can be written as [[wiki/Main Page|Маин Паге]] same as [[wiki/Main Page|Маин Паге]].\n"); -add("html2wt", "Simple template in language variants", "This is a test template\n"); -add("html2wt", "Template with explicit namespace in language variants", "This is a test template\n"); -add("html2wt", "Basic test for template parameter in language variants", "This is a test template with parameter foo\n"); -add("html2wt", "Stripping -{}- tags (language variants)", "Latin proverb: Ne nuntium necare\n"); -add("html2wt", "Prevent conversion with -{}- tags (language variants)", "Латински: Ne nuntium necare\n"); -add("html2wt", "Prevent conversion of text with -{}- tags (language variants)", "Латински: Ne nuntium necare\n"); -add("html2wt", "Prevent conversion of links with -{}- tags (language variants)", "[[wiki/Main Page|Main Page]]\n"); -add("html2wt", "-{}- tags within headlines (within html for parserConvert())", "== Naslov ==\n"); -add("html2wt", "Explicit definition of language variant alternatives", "Taiwan, not China\n"); -add("html2wt", "Conversion around HTML tags", "\n<span title=\"ЛаCтин\">ски</span>\n"); -add("html2wt", "Explicit session-wise language variant mapping (A flag and - flag)", "Taiwan is not China.\nBut Taiwan is Taiwan,\n(This should be stripped!)\nand China is China.\n"); -add("html2wt", "Explicit session-wise language variant mapping (H flag for hide)", "(This should be stripped!)\nTaiwan is Taiwan.\n"); -add("html2wt", "Adding explicit conversion rule for title (T flag)", "Taiwan\n\nShould be stripped!\n"); -add("html2wt", "Testing that changing the language variant here in the tests actually works", "China\n\nShould be stripped!\n"); -add("html2wt", "Recursive conversion of alt and title attrs shouldn't clear converter state", "China\n\nShould be stripped<span title=\"Exclamation\">!</span>\n"); -add("html2wt", "Bug 24072: more test on conversion rule for title", "Taiwan\n\nThis should be stripped!\nThis won't take interferes with the title rule.\n"); -add("html2wt", "Partly disable title conversion if variant == main language code", "ZH\n"); -add("html2wt", "Partly disable title conversion if variant == main language code, more", "ZH\n"); -add("html2wt", "Raw output of variant escape tags (R flag)", "Raw: zh:China;zh-tw:Taiwan\n"); -add("html2wt", "Strings evaluating false shouldn't be ignored by Language converter (T51072)", "0\n"); -add("html2wt", "Conversion rules from [numeric-only string] to [something else] (T48634)", "D12345EE12345\n"); -add("html2wt", "Bidirectional converter rule entries with an empty value should be ignored (T53551)", "foobar\n"); -add("html2wt", "Unidirectional converter rule entries with an empty \"from\" string should be ignored (T53551)", "foobar\n"); -add("html2wt", "Empty converter rule entries shouldn't be inserted into the conversion table (T53551)", "foobar\n"); -add("html2wt", "Nested using of manual convert syntax", "Nested: Hello Hong Kong!\n"); -add("html2wt", "Do not convert roman numbers to language variants", "Фридрих IV је цар.\n"); -add("html2wt", "Don't convert raw rule \"-{R|=>}-\" to \"=>\"", "=>\n"); -add("html2wt", "Don't break link parsing if language converter markup is in the caption.", "[[wiki/Main Page|main page]]\n"); -add("html2wt", "T146305: Don't break image parsing if language converter markup is in the caption.", "[[Датотека:Foobar.jpg|thumb|<span></span>]]\n"); -add("html2wt", "T146305: Don't break image parsing if nested language converter markup is in the caption.", "[[File:Foobar.jpg|thumb|<span></span>]]\n"); -add("html2wt", "Don't break gallery if language converter markup is inside.", "\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", "Don't break list handling if language converter markup is in the item.", "; AAA\n"); -add("html2wt", "T153140: Don't break table handling if language converter markup is in the cell.", "{|\n| B\n|}\n"); add("html2wt", "Bug 529: Uncovered bullet", "* Foo \n* Bar\n"); add("html2wt", "Bug 529: Uncovered bullet leaving empty list, normally removed by tidy", "******* Foo \n* Bar\n"); add("html2wt", "Bug 529: Uncovered table already at line-start", "x\n\n{|\n| 1 \n| 2\n|-\n| 3 \n| 4\n|}\ny\n"); @@ -1238,11 +1131,6 @@ add("html2wt", "nowiki inside link inside heading (bug 18295)", "== [[wiki/Foo|xyz]] ==\n"); add("html2wt", "new support for bdi element (bug 31817)", "ולדימיר לנין (ברוסית: <bdi lang=\"ru\">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.\n"); add("html2wt", "Ignore pipe between table row attributes", "{|\n| quux\n|- id=\"foo\" style=\"color: red\"\n| bar\n|}\n"); -add("html2wt", "Gallery override link with WikiLink (bug 34852)", "\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\"> caption \t\t\t</div> \t\t</div>\n"); -add("html2wt", "Gallery override link with absolute external link (bug 34852)", "\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\"> caption \t\t\t</div> \t\t</div>\n"); -add("html2wt", "Gallery override link with absolute external link with LanguageConverter", "\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\"> caption \t\t\t</div> \t\t</div>\n"); -add("html2wt", "Gallery override link with malicious javascript (bug 34852)", "\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\"> caption \t\t\t</div> \t\t</div>\n"); -add("html2wt", "Gallery with invalid title as link (bug 43964)", "\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", "Language parser function", "العربية\n"); add("html2wt", "Padleft and padright as substr", "abc\nabc\n"); add("html2wt", "Special parser function", "Special:Random\nSpecial:Badtitle\nSpecial:Foobar\n"); @@ -2004,14 +1892,6 @@ add("selser", "Don't fall for the self-closing div [2]", "03k36yoyy20jatt9<div>hello world</div/>"); add("selser", "Don't fall for the self-closing div [[2]]", "<div>3554xqvubx83erk9hello world</div/>"); add("selser", "Parsing of overlapping (improperly nested) inline html tags [2]", "y9cin9njblr6n7b9\n\n<span><s>x</span></s>"); -add("selser", "T153140: Don't break table handling if language converter markup is in the cell. [2]", "tusqmt2te5t57b9\n{|\n|-\n| -{R|B}-\n|}"); -add("selser", "T153140: Don't break table handling if language converter markup is in the cell. [[0,[1,0]]]", "{|\n|- data-foobar=\"7nu7ogj23evu0udi\"\n| -{R|B}-\n|}"); -add("selser", "T153140: Don't break table handling if language converter markup is in the cell. [[3,1]]", "{|\n|-\n| -{R|B}-\n|}"); -add("selser", "T153140: Don't break table handling if language converter markup is in the cell. [1]", "{| data-foobar=\"zqlxp0k9vmvuc8fr\"\n|-\n| -{R|B}-\n|}"); -add("selser", "T153140: Don't break table handling if language converter markup is in the cell. [[4,2]]", "{|<!--zupml16xlygmn29--><!--1434atfefr8jjor-->\n|-\n| -{R|B}-\n|}"); -add("selser", "T153140: Don't break table handling if language converter markup is in the cell. [[0,[1,2]]]", "{|\n|- data-foobar=\"tmorjabrm80hehfr\"\n| -{R|B}-<!--zqgvb957pmdt2o6r-->\n|}"); -add("selser", "T153140: Don't break table handling if language converter markup is in the cell. [[0,[[0,2],4]]]", "{|\n|-\n|7e0si0fnfoe0zfr\n| -{R|B}-<!--g8if4czfkgj8m2t9-->\n|}"); -add("selser", "T153140: Don't break table handling if language converter markup is in the cell. [[4,1]]", "{|<!--dsri4f0bxf1aif6r-->\n|-\n| -{R|B}-\n|}"); add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed by tidy [[1,0]]", "******* Foo {{bullet}}"); add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed by tidy [[2,0]]", "* wzen8urjy55qaor\n******* Foo {{bullet}}"); add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed by tidy [1]", "******* Foo {{bullet}}"); -- To view, visit https://gerrit.wikimedia.org/r/328716 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc16988fb1e3230362bbdd36809716df08d91919 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: C. Scott Ananian <canan...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits