1 # MediaWiki Parser test cases
2 # Some taken from https://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
62 Article titles can contain single quotes!
72 Template:redirect to foo
74 #REDIRECT [[Template:Foo]]
95 MediaWiki:bad image list
97 * [[File:Bad.jpg]] except [[Nasty page]]
132 // For Serbian; localize Template namespace
140 Template:echo_with_span
146 Template:echo_with_div
152 Template:echo with depth
165 Template:table_attribs
168 |</noinclude>style="color:red;"|Foo
172 Template:table_attribs_2
175 |</noinclude>style="color:red;"|Foo
180 Template:table_attribs_3
183 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
187 Template:table_attribs_4
189 | style="background-color:#DC241f;" width="10px" |
193 Template:table_attribs_5
196 |</noinclude>style="color:red;"||Bar
200 Template:table_attribs_6
202 style="background: <nowiki>
209 Template:table_attribs_7
212 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
216 Template:table_header_cells
218 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
224 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
228 Template:PartialTable
235 Template:image_attribs
238 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
241 ## See T48811 for details
243 Template:mixed_attr_content_template
245 style="color:red;" title="T48811"
251 Template:definition_list
298 Template:EmptyTRWithHTMLAttrTest
301 <tr align="center"></tr>
302 <tr><td>foo</td></tr>
303 <tr align="center"></tr>
304 <tr><td>bar</td></tr>
327 This is a simple paragraph.
329 <p>This is a simple paragraph.
334 Paragraphs with extra newline spacing
365 Paragraphs with newline spacing with comment lines in between
373 <!--foo--><!--More than 1 comment, still stripped-->
377 <!--foo--> <!----> <!-- bar -->
437 Paragraphs with newline spacing with non-empty white-space lines in between
463 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
471 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
509 Extra newlines: More paragraphs with indented comment
524 Extra newlines followed by heading
538 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
539 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
542 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
546 Extra newlines between heading and content are swallowed (Parsoid does not)
554 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
555 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
562 <p><a rel="mw:WikiLink" href="./A" title="A">a</a></p>
566 Extra new lines before and after lists are preserved
593 # Parsoid regression test
595 Multiple newlines after tables are converted to p-br-p tags
597 parsoid=wt2html,wt2wt
611 </td></tr></tbody></table>
615 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
630 Heading with line break in nowiki
634 wgFragmentMode=[ 'html5', 'legacy' ]
639 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
641 C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
644 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
651 http://fr.wikipedia.org/wiki/🍺
652 <!-- EasterEgg we love beer, better be able be able to link to it -->
654 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
672 *plain''italic''plain
673 *plain''italic''plain''italic''plain
674 *plain'''bold'''plain
675 *plain'''bold'''plain'''bold'''plain
676 *plain''italic''plain'''bold'''plain
677 *plain'''bold'''plain''italic''plain
678 *plain''italic'''bold-italic'''italic''plain
679 *plain'''bold''bold-italic''bold'''plain
680 *plain'''''bold-italic'''italic''plain
681 *plain'''''bold-italic''bold'''plain
682 *plain''italic'''bold-italic'''''plain
683 *plain'''bold''bold-italic'''''plain
684 *plain l'''italic''plain
685 *plain l''''bold''' plain
688 <li>plain<i>italic</i>plain</li>
689 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
690 <li>plain<b>bold</b>plain</li>
691 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
692 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
693 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
694 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
695 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
696 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
697 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
698 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
699 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
700 <li>plain l'<i>italic</i>plain</li>
701 <li>plain l'<b>bold</b> plain</li></ul>
704 # this example taken from the [[simple:Moon]] article (T49326)
706 Italics and possessives (1)
708 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
710 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
714 # this example taken from [[en:Flaming Pie]] (T51926)
716 Italics and possessives (2)
718 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
720 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
724 # this example taken from [[en:Dictionary]] (T51926)
726 Italics and possessives (3)
728 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
730 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
736 ### 2-quote opening sequence tests
739 Italics and bold: 2-quote opening sequence: (2,2)
748 Italics and bold: 2-quote opening sequence: (2,3)
757 Italics and bold: 2-quote opening sequence: (2,4)
767 # same html as previous, but wikitext adjusted to match parsoid html2wt
769 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
771 ''foo<nowiki>''</nowiki>''
777 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
779 Italics and bold: 2-quote opening sequence: (2,5)
792 # same html as previous, but wikitext adjusted to match parsoid html2wt
794 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
796 ''foo'''''<nowiki/>'''
807 ### 3-quote opening sequence tests
811 Italics and bold: 3-quote opening sequence: (3,2)
820 Italics and bold: 3-quote opening sequence: (3,3)
829 Italics and bold: 3-quote opening sequence: (3,4)
837 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
839 Italics and bold: 3-quote opening sequence: (3,5)
852 # same html as previous, but wikitext adjusted to match parsoid html2wt
854 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
856 '''foo'''''<nowiki/>''
867 ### 4-quote opening sequence tests
871 Italics and bold: 4-quote opening sequence: (4,2)
881 # same html as previous, but wikitext adjusted to match parsoid html2wt
883 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
885 <nowiki>''</nowiki>''foo''
892 Italics and bold: 4-quote opening sequence: (4,3)
901 Italics and bold: 4-quote opening sequence: (4,4)
911 # same html as previous, but wikitext adjusted to match parsoid html2wt
913 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
921 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
923 Italics and bold: 4-quote opening sequence: (4,5)
932 <p>'<b>foo</b><i></i>
936 # same html as previous, but wikitext adjusted to match parsoid html2wt
938 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
940 '<nowiki/>'''foo'''''<nowiki/>''
945 <p>'<b>foo</b><i></i>
951 ### 5-quote opening sequence tests
955 Italics and bold: 5-quote opening sequence: (5,2)
965 # same html as previous, but wikitext adjusted to match parsoid html2wt
967 Italics and bold: 5-quote opening sequence: (5,2+3)
976 Italics and bold: 5-quote opening sequence: (5,3)
986 # same html as previous, but wikitext adjusted to match parsoid html2wt
988 Italics and bold: 5-quote opening sequence: (5,3+2)
997 Italics and bold: 5-quote opening sequence: (5,4)
1003 <p><i><b>foo'</b></i>
1008 Italics and bold: 5-quote opening sequence: (5,5)
1012 <p><i><b>foo</b></i>
1017 Italics and bold: 5-quote opening sequence: (5,6)
1021 <p><i><b>foo'</b></i>
1026 ### multiple quote sequences in a line
1030 Italics and bold: multiple quote sequences: (2,4,2)
1036 <p><i>foo'<b>bar</b></i>
1040 # same html as previous, but wikitext adjusted to match parsoid html2wt
1042 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
1044 ''foo'<nowiki/>'''bar'''''
1046 <p><i>foo'<b>bar</b></i>
1051 Italics and bold: multiple quote sequences: (2,4,3)
1057 <p><i>foo'<b>bar</b></i>
1061 # same html as previous, but wikitext adjusted to match parsoid html2wt
1063 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
1065 ''foo'<nowiki/>'''bar'''''
1067 <p><i>foo'<b>bar</b></i>
1072 Italics and bold: multiple quote sequences: (2,4,4)
1078 <p><i>foo'<b>bar'</b></i>
1082 # same html as previous, but wikitext adjusted to match parsoid html2wt
1084 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1086 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1088 <p><i>foo'<b>bar'</b></i>
1092 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1094 Italics and bold: multiple quote sequences: (3,4,2)
1103 <p><b>foo'</b>bar<i></i>
1107 # same html as previous, but wikitext adjusted to match parsoid html2wt
1109 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1111 '''foo''''bar''<nowiki/>''
1116 <p><b>foo'</b>bar<i></i>
1120 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1122 Italics and bold: multiple quote sequences: (3,4,3)
1131 <p><b>foo'</b>bar<b></b>
1135 # same html as previous, but wikitext adjusted to match parsoid html2wt
1137 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1139 '''foo''''bar'''<nowiki/>'''
1144 <p><b>foo'</b>bar<b></b>
1149 ### other quote tests
1152 Italics and bold: other quote tests: (2,3,5)
1154 ''this is about '''foo's family'''''
1156 <p><i>this is about <b>foo's family</b></i>
1162 Italics and bold: other quote tests: (2,(3,3),2)
1164 ''this is about '''foo's''' family''
1166 <p><i>this is about <b>foo's</b> family</i>
1172 Italics and bold: other quote tests: (3,2,3,2)
1176 '''this is about ''foo'''s family''
1178 <p><b>this is about <i>foo</i></b><i>s family</i>
1183 # same html as previous, but wikitext adjusted to match parsoid html2wt
1185 Italics and bold: other quote tests: (3,2,3+2+2,2)
1187 '''this is about ''foo'''''<nowiki/>''s family''
1189 <p><b>this is about <i>foo</i></b><i>s family</i>
1195 Italics and bold: other quote tests: (3,2,3,3)
1197 '''this is about ''foo'''s family'''
1199 <p>'<i>this is about </i>foo<b>s family</b>
1205 Italics and bold: other quote tests: (3,(2,2),3)
1207 '''this is about ''foo's'' family'''
1209 <p><b>this is about <i>foo's</i> family</b>
1215 Italicized possessive
1217 The ''[[Main Page]]'''s talk page.
1219 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1222 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1226 Quote balancing context should be restricted to td/th cells on the same wikitext line
1228 parsoid=wt2html,wt2wt
1242 </td></tr></tbody></table>
1246 Bold conversion test
1248 a b'''c ''d e'''f'' g h'''i ''j
1252 <p>a b'<i>c </i>d e<b>f<i> g h</i></b><i>i </i>j
1261 Non-html5 tags should be accepted
1263 <center>''foo''</center>
1265 <font>''foo''</font>
1266 <strike>''foo''</strike>
1269 <center><i>foo</i></center>
1270 <p><big><i>foo</i></big>
1271 <font><i>foo</i></font>
1272 <strike><i>foo</i></strike>
1278 <wbr> is valid wikitext (T54468)
1286 # <strike> is HTML4, <s> is HTML4/5.
1288 <s> or <strike> for strikethrough
1290 <strike>strike</strike>
1294 <p><strike>strike</strike>
1302 Text-level semantic html elements in wikitext
1305 <strong>text</strong>
1321 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1328 <strong>text</strong>
1344 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1352 # test cases taken from
1353 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1355 Ruby markup (W3C-style)
1357 ;Mono-ruby for individual base characters
1358 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1360 :<ruby>今日<rt>きょう</rt></ruby>
1362 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1364 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1366 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1369 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1370 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1371 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1374 <dl><dt>Mono-ruby for individual base characters</dt>
1375 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1377 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1378 <dt>Jukugo ruby</dt>
1379 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1380 <dt>Inline ruby</dt>
1381 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1382 <dt>Double-sided ruby</dt>
1383 <dd><ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1385 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1386 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1387 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1392 # The next two test different paths in the sanitizer.
1394 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1396 <blockquote|>a</blockquote>
1398 <b→> doesn't terminate </b→>
1400 <bä> doesn't terminate </bä>
1402 <boo> doesn't terminate </boo>
1404 <s.foo> doesn't terminate </s.foo>
1408 <p><blockquote|>a</blockquote>
1409 </p><p><b→> doesn't terminate </b→>
1410 </p><p><bä> doesn't terminate </bä>
1411 </p><p><boo> doesn't terminate </boo>
1412 </p><p><s.foo> doesn't terminate </s.foo>
1413 </p><p><sub-ID#1>
1418 Non-word characters don't terminate tag names
1420 <blockquote|>a</blockquote>
1422 <b→> doesn't terminate </b→>
1424 <bä> doesn't terminate </bä>
1426 <boo> doesn't terminate </boo>
1428 <s.foo> doesn't terminate </s.foo>
1432 <p><blockquote|>a
1433 </p><p><b→> doesn't terminate </b→>
1434 </p><p><bä> doesn't terminate </bä>
1435 </p><p><boo> doesn't terminate </boo>
1436 </p><p><s.foo> doesn't terminate </s.foo>
1437 </p><p><sub-ID#1>
1442 ### See tests/parser/ParserTestParserHook.php for the <tåg> extension)
1443 ### This checks that HTML5 tags (with non-word characters in the tag
1444 ### name) make it safely through the parser -- the Sanitizer will
1445 ### munge them later, as it should.
1448 Non-word characters are valid in extension tags (T19663)
1458 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1462 Isolated close tags should be treated as literal text (T54760)
1470 <p class="mw-empty-elt">
1471 </p><p><s.foo>s
1476 ### Special characters
1480 Bare pipe character (T54363)
1489 Bare pipe character from a template (T54363)
1498 ### <nowiki> test cases
1502 <nowiki> unordered list
1504 <nowiki>* This is not an unordered list item.</nowiki>
1506 <p>* This is not an unordered list item.
1509 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1515 <nowiki>Lorem ipsum dolor
1523 <p>Lorem ipsum dolor
1532 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1542 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1544 <nowiki><span class="error"></nowiki>
1546 <p><span class="error">
1549 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1555 :There is not nowiki.
1556 :There is <nowiki>nowiki</nowiki>.
1558 #There is not nowiki.
1559 #There is <nowiki>nowiki</nowiki>.
1561 *There is not nowiki.
1562 *There is <nowiki>nowiki</nowiki>.
1564 <dl><dd>There is not nowiki.</dd>
1565 <dd>There is nowiki.</dd></dl>
1566 <ol><li>There is not nowiki.</li>
1567 <li>There is nowiki.</li></ol>
1568 <ul><li>There is not nowiki.</li>
1569 <li>There is nowiki.</li></ul>
1571 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1572 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1574 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1575 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1577 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1578 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1582 Entities inside <nowiki>
1584 <nowiki><</nowiki>
1589 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1593 Entities inside template parameters
1600 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1604 Properly escape nowiki when combined with other wiki markup
1608 <p>* </nowiki> tag</p>
1610 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1614 T93824: Put escaped HTML tags inside nowiki
1618 <p><h2>foo</h2></p>
1620 <nowiki><h2>foo</h2></nowiki>
1624 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1628 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1629 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1630 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1632 This text: L'[[Foo]]
1633 This text: L<nowiki>''</nowiki>[[Foo]]
1634 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1637 # This test fails because wikitext whitespace is not normalized before comparing.
1639 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1643 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1646 This text : L<nowiki>''</nowiki>[[Foo]]
1649 # This test and the next one are html2wt only as they test that incorrect wikitext
1650 # passed in template arguments gets escaped or wrapped in nowikis where required.
1652 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1656 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1657 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1659 {{echo|foo{{!}}bar}}
1660 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1664 T53961: Output correct nowikis in template arguments
1668 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1669 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1670 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1671 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1672 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1675 {{echo|<nowiki>a }} b</nowiki>}}
1676 {{echo|<nowiki>a [[ b</nowiki>}}
1677 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1678 {{echo|a <nowiki>}</nowiki>}}
1682 Cases where "!!" needs nowiki protection
1687 <tr><th>this needs protection !! here</th></tr>
1691 <tr><th>this does not need
1692 protection !! here</th></tr>
1696 !<nowiki>this needs protection !! here</nowiki>
1709 Comments and Indent-Pre
1711 <!-- comment 1 --> asdf
1713 <!-- comment 1 --> asdf
1716 <!-- comment 1 --> asdf
1717 <!-- comment 2 -->xyz
1719 <!-- comment 1 --> asdf
1720 <!-- comment 2 --> xyz
1776 asdf<!-- comment 1 -->jkl
1786 <!-- foo --> b <!-- bar -->
1800 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1805 Comment semantics and delimiters
1807 <!-- --><!----><!-----><!------>
1810 <!-- --><!----><!-----><!------>
1814 Comment semantics and delimiters, redux
1816 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1817 -- foo -- funky huh? ... -->
1820 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1821 -- foo -- funky huh? ... -->
1825 Comment semantics and delimiters: directors cut
1827 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1828 everything starting with < followed by !-- until the first -- and > we see,
1829 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1835 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1836 everything starting with < followed by !-- until the first -- and > we see,
1837 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1842 Comment semantics: nesting
1844 <!--<!-- no, we're not going to do anything fancy here -->-->
1849 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1852 # Parsoid closes the unclosed comment, even if it means a slight
1855 Comment semantics: unclosed comment at end
1857 parsoid=wt2html,html2html
1859 <!--This comment will run out to the end of the document
1862 <!--This comment will run out to the end of the document-->
1866 Comment semantics: normalize comments to play nice with XML and browsers
1868 <!-- Browsers --!> think this is closed -->
1869 <!--> This would normally be text -->
1870 <!---> As would this -->
1871 <!-- XML doesn't like trailing dashes -------->
1872 <!-- Nor doubled hyphens -- anywhere in the data -->
1873 But this is not a comment.
1875 <p>But this is not a comment.
1878 <!-- Browsers --!> think this is closed -->
1879 <!--> This would normally be text -->
1880 <!---> As would this -->
1881 <!-- XML doesn't like trailing dashes -------->
1882 <!-- Nor doubled hyphens -- anywhere in the data -->
1883 <p>But this is not a comment.</p>
1887 Comment semantics: round-trip even text which contains encoded -->
1889 <!-- hello & goodbye - > --> --&gt; --&xx -->
1891 <!-- hello & goodbye - > --> --&gt; --&xx -->
1895 Comment in template title
1904 Comment on its own line post-expand
1916 Comment on its own line post-expand with non-significant whitespace
1928 post-expand include size being exceeded
1932 {{echo3|1234567890}}
1934 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1939 max template depth being reached
1943 {{echo with depth|too deep!}}
1945 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1950 multiple templates that are redirects
1961 Multiple comments should still parse as SOL-transparent
1963 parsoid=wt2html,wt2wt
1966 <!--c2--><!--c3--><!--c4-->*b
1974 <!--c2--><!--c3--><!--c4-->
1980 ## Make sure ">" gets escaped in comments to avoid XSS
1982 IE conditional comments
1985 <script>alert('hi');</script>
1988 <!--[if lt IE 9]>
1989 <script>alert('hi');</script>
1994 ### paragraph wrapping tests
2010 Block tag on one line (<div>)
2020 <p>a </p><div>foo</div>
2026 No p-wrappable content
2028 parsoid=wt2html,html2html
2030 <span><div>x</div></span>
2031 <span><s><div>x</div></s></span>
2032 <small><em></em></small><span><s><div>x</div></s></span>
2034 <span><div>x</div></span>
2035 <span><s><div>x</div></s></span>
2036 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2039 # T177612: Parsoid-only test
2041 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2043 {{echo|<span><div>x</div></span>}}
2046 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
2051 Block tag on one line (<blockquote>)
2053 a <blockquote>foo</blockquote>
2057 a <blockquote>foo</blockquote>
2061 <p>a </p><blockquote><p>foo</p></blockquote>
2067 Block tag on both lines (<div>)
2076 <p>a </p><div>foo</div><p>
2077 b </p><div>foo</div>
2081 Block tag on both lines (<blockquote>)
2083 a <blockquote>foo</blockquote>
2085 b <blockquote>foo</blockquote>
2087 a <blockquote>foo</blockquote>
2088 b <blockquote>foo</blockquote>
2090 <p>a </p><blockquote><p>foo</p></blockquote><p>
2091 b </p><blockquote><p>foo</p></blockquote>
2095 Multiple lines without block tags
2115 x </p><div>foo</div><p> z</p>
2119 Empty lines between lines with block tags
2153 </p><div>b</div><p>d
2158 <div data-parsoid='{"stx":"html"}'></div>
2161 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2164 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2166 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2169 <div data-parsoid='{"stx":"html"}'>e</div>
2173 Unclosed HTML p-tags should be handled properly
2180 <div><p>foo</p></div>
2185 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2190 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2191 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2194 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2198 a [[Category:A1]] [[Category:A2]]
2203 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2207 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2213 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2217 No paragraph necessary for SOL transparent template
2219 <span><div>foo</div></span>
2222 <span><div>foo</div></span>
2223 {{echo|[[Category:Foo]]}}
2225 <span><div>foo</div></span>
2226 <span><div>foo</div></span>
2228 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2229 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2231 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2232 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]"}},"i":0}}]}'/>
2236 Avoid expanding multiline sol transparent template ranges unnecessarily
2254 <br about="#mwt1" typeof="mw:Transclusion" data-parsoid='{}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<br/>\n"}},"i":0}}]}'/><span about="#mwt1">
2257 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2261 Paragraph wrapping following unclosed table
2263 parsoid=wt2html,html2html
2284 </td></tr></tbody></table>
2290 <table data-parsoid='{"autoInsertedEnd":true}'>
2291 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2293 </tbody></table><table>
2294 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2305 Paragraph wrapping suppressed in html p
2307 parsoid=wt2html,html2html
2327 <p data-parsoid='{"stx":"html"}'>
2338 Dangling table row doesn't prevent p-wrapping
2340 parsoid=wt2html,html2html
2348 <tbody><tr><td>hi</td></tr>
2349 <tr class="mw-empty-elt"></tr>
2350 </tbody></table><p> ho</p>
2354 P-wrapping non-breaking spaces
2365 ### Preformatted text
2375 And a [[Main Page|link]]
2381 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2386 Tabs don't trigger preformatted text
2390 This is preformatted text.
2396 <pre>This is preformatted text.
2401 preformatted text.</p>
2402 <pre>This is preformatted text.
2407 Space before tab needs nowiki pre protection
2413 <nowiki> </nowiki> a
2417 Ident preformatting with inline content
2428 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2444 Regression with preformatted in <center>
2457 T54763: Preformatted in <blockquote>
2463 indented cell (no pre-wrapping!)
2473 <p> indented cell (no pre-wrapping!)
2480 T53086: Double newlines in blockquotes should be turned into paragraphs
2496 T17491: <ins>/<del> in blockquote
2499 Foo <del>bar</del> <ins>baz</ins> quux
2503 <p>Foo <del>bar</del> <ins>baz</ins> quux
2508 <p>Foo <del>bar</del> <ins>baz</ins> quux
2514 T17491: <ins>/<del> in blockquote (2)
2516 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2519 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2522 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2527 <pre> with attributes (T5202)
2529 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2531 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2535 <pre> with width attribute (T5202)
2537 <pre width="8">Narrow screen goodies</pre>
2539 <pre width="8">Narrow screen goodies</pre>
2543 <pre> with forbidden attribute (T5202)
2545 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2547 <pre width="8">Narrow screen goodies</pre>
2551 Entities inside <pre>
2559 <pre> with forbidden attribute values (T5202)
2561 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2563 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2567 <nowiki> inside <pre> (T15238)
2575 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2583 <pre><nowiki>Foo</nowiki></pre>
2587 <nowiki> inside of #tag:pre
2589 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2591 <pre>Foo →bar</pre>
2593 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2596 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2597 ## aren't enclosed in nowikis.
2599 <nowiki> and <pre> preference (first one wins)
2630 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2635 <p><span typeof="mw:Nowiki">
2643 </pre> inside nowiki
2645 <nowiki></pre></nowiki>
2652 Empty pre; pre inside other HTML tags (T56946)
2669 <div data-parsoid='{"stx":"html"}'><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
2671 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2675 HTML pre followed by indent-pre
2688 <p><pre>foo</pre></p>
2690 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2692 <p class='mw-empty-elt' data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2696 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2703 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2713 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2725 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2746 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2750 {{echo| foo}}{{echo| bar}}
2755 {{echo|<!--cmt--> foo}}
2757 <!--cmt-->{{echo| foo}}
2759 {{echo|{{echo| }}bar}}
2777 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2813 ## Hmm, should Parsoid rt this?
2815 Pres with newline attributes
2817 parsoid=wt2html,html2html
2822 <pre class="one two">hi</pre>
2824 <pre class="one two" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2828 Things that look like <pre> tags aren't treated as such
2830 Barack Obama <President> of the United States
2831 <President></President>
2833 <p>Barack Obama <President> of the United States
2834 <President></President>
2838 ## Remex doesn't account for fostered content.
2839 ## The difference between Parsoid and the PHP parser can be attributed to core
2840 ## commit 674e8388cba and 710618f89af in Parsoid's repo. Parsoid doesn't
2841 ## tokenize unmatched extension tags that shadow html tags as strings to ease
2842 ## an escaping mechanism. See the comment in `maybeExtensionTag`.
2844 Handle broken pre-like tags (T66025)
2848 {{echo|<pre <pre>x</pre>}}
2850 <table><pre </table>
2853 <table><pre </table>
2856 <pre <table></table>
2858 <pre typeof="mw:Extension/pre mw:Transclusion" about="#mwt2" data-parsoid='{"stx":"html","a":{"<pre":null},"sa":{"<pre":""},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2860 <pre data-parsoid='{"stx":"html","src":"<pre </table>","tagWidths":[13,0],"a":{"<":null,"table":null},"sa":{"<":"","table":""},"fostered":true,"autoInsertedEnd":true}'></pre><table data-parsoid='{"stx":"html","autoInsertedEnd":true}'></table>
2863 ## Similar to the above, but shows the difference between extension and html tags
2865 Less than in attribute position
2872 <div </p><div>123</div>
2874 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"<pre":""},"body":{"extsrc":"123"}}'>123</pre><p>
2876 <div </p><div>123</div>
2880 Parsoid: handle pre with space after attribute
2884 <pre style="width:50%;" >{{echo|foo}}</pre>
2886 <pre style="width:50%;">{{echo|foo}}</pre>
2888 <pre typeof="mw:Extension/pre" about="#mwt2" style="width:50%;" data-mw='{"name":"pre","attrs":{"style":"width:50%;"},"body":{"extsrc":"{{echo|foo}}"}}'>{{echo|foo}}</pre>
2898 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{}}'></pre>
2902 Newline before table-close generates empty table row: T208619
2910 <tbody><tr><td></td></tr></tbody></table>
2912 <table data-parsoid='{}'>
2917 # PHP has one more row in the output than Parsoid does: T208619
2919 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2939 </tr><tr><td></td></tr></tbody></table>
2956 #--------------------------------------------------------------------
2957 # Transclusion parameter whitespace stripping tests
2958 # Behavior is different for positional and named parameters
2959 #--------------------------------------------------------------------
2961 Templates: Strip leading and trailing whitespace from named-param values
2965 {{echo|1= {{echo|b}} }}
2982 Templates: Don't strip whitespace from positional-param values
2986 {{echo|{{echo|b}} }}
3026 Templates: Don't recognize targets split by newlines
3042 Templates: Recognize targets when newlines and comments don't split the target
3047 <!--X--> ech<!--X-->o<!--X-->
3055 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech<!--X-->o<!--X--> \n <!--X--> <!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3059 Templates: Handle empty comment-and-ws-only lines correctly
3062 <!--should be ignored-->
3063 <!--should be ignored as well-->
3070 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n<!--should be ignored-->\n <!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
3074 Templates: Handle comments in the target
3077 <!-- should be ignored -->
3081 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3084 {{echo<!-- should be ignored -->
3087 {{echo<!-- should be ignored -->|foo}}
3089 {{<!-- should be ignored -->echo|foo}}
3098 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3100 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3102 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3104 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3106 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3110 Templates: Handle comments in parameter names (T69657)
3113 <!-- should be ignored -->
3117 <!-- should be ignored -->
3120 {{echo|1<!-- should be ignored -->=foo}}
3122 {{echo|<!-- should be ignored -->1=foo}}
3130 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3132 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
3134 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3136 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
3140 Templates: Other wikitext in parameter names (T69657)
3147 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3151 Templates: With colons
3155 <p>Template with colon
3158 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"With: Colon","href":"./Template:With:_Colon"},"params":{},"i":0}}]}'>Template with colon</p>
3161 #--------------------------------------------------------------------
3162 # Transclusion parameter escaping tests
3163 #--------------------------------------------------------------------
3166 Templates: Parsoid parameter escaping test 1
3168 {{echo|[foo]|{{echo|[bar]}}}}
3173 <p about="#mwt1" typeof="mw:Transclusion"
3174 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3178 Parsoid: Pipes in external links in template parameter
3180 {{echo|[{{echo|http://example.com}} link]}}
3182 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3185 <p><a rel="mw:ExtLink" class="external text" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
3189 Parsoid: pipe in transclusion parameter
3191 {{echo|http://foo.com/a|b}}
3193 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3196 <p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
3200 Parsoid: Pipe in external link target and content in template parameter
3202 parsoid=html2wt,wt2wt
3204 {{echo|[http://foo.com/a|b a|b]}}
3206 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3209 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3210 typeof="mw:Transclusion"
3211 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3212 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3216 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3218 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3220 <p><a rel="nofollow" class="external text" href="http://example.org/index.php?title=Parser_test&action=edit">bar</a>
3223 <p><a rel="mw:ExtLink" class="external text" href="http://example.org/index.php?title=Parser_test&action=edit" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>bar</a></p>
3227 Templates: Don't escape already nowiki-escaped text in template parameters
3229 parsoid=html2wt,wt2wt
3231 {{echo|foo<nowiki>|</nowiki>bar}}
3232 {{echo|<nowiki><div></nowiki>}}
3233 {{echo|<nowiki></nowiki>}}
3240 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
3241 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
3242 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
3248 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3250 parsoid=html2wt,wt2wt
3252 {{echo|{{echo|1=bar}}}}
3257 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
3262 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3269 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
3274 Templates: Preserve blank parameter names
3281 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3285 Templates: Preserve blank parameter names in other positions
3287 {{blank_param|bar|=foo}}
3293 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
3298 ### Parsoid-centric tests for testing RT edge cases for pre
3302 1a. Indent-Pre and Comments
3315 1b. Indent-Pre and Comments
3328 1c. Indent-Pre and Comments
3341 1d. Indent-Pre and Comments
3342 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3355 2a. Indent-Pre and tables
3375 2b. Indent-Pre and tables
3390 2c. Indent-Pre and tables (T44252)
3406 2d. Indent-Pre and tables
3422 <tbody><tr><td> b</td></tr>
3427 2e. Indent-Pre and table-line syntax
3440 2f. Indent-pre started by table-line syntax
3459 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3464 Text that should be rendered preformatted
3472 <pre>Text that should be rendered preformatted
3480 2h. Indent pre in tables
3482 parsoid=wt2html,html2html
3524 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3526 </td></tr></tbody></table>
3530 3a. Indent-Pre and block tags (single-line html)
3534 c <blockquote> foo </blockquote>
3539 c <blockquote> foo </blockquote>
3540 <pre><span> foo </span>
3543 <p> a </p><p> foo </p><p>
3544 b </p><div> foo </div><p>
3545 c </p><blockquote><p> foo </p></blockquote>
3546 <pre><span> foo </span>
3549 <p> a </p><p data-parsoid='{"stx":"html"}'> foo </p><p>
3550 b </p><div data-parsoid='{"stx":"html"}'> foo </div><p>
3551 c </p><blockquote data-parsoid='{"stx":"html"}'><p> foo </p></blockquote>
3552 <pre><span data-parsoid='{"stx":"html"}'> foo </span></pre>
3556 3b. Indent-Pre and block tags (multi-line html)
3559 <!-- comment --> b <div> foo </div>
3561 <pre>a <span>foo</span>
3565 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3566 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3568 <pre>a <span>foo</span>
3570 b </p><div> foo </div>
3574 3c. Indent-Pre and block tags (pre-content on separate line)
3636 <p data-parsoid='{"stx":"html"}'>
3653 <pre typeof="mw:Extension/pre" about="#mwt3" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3657 <table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>
3659 </td></tr></tbody></table>
3661 <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>
3667 4. Indent-Pre and extension tags
3669 parsoid=wt2html,html2html
3678 <p> a </p><pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{}}'></pre>
3682 5. Indent-Pre and html pre
3684 <pre class="123">hi</pre>
3686 <pre class="123">hi</pre>
3688 <pre class="123" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3692 Render paragraphs when indent-pre is suppressed in blocklevels
3708 4. Multiple spaces at start-of-line
3725 ## NOTE: the leading white-space chars on empty line are significant
3727 5a. White-space in indent-pre
3739 ## NOTE: the leading white-space chars on empty line are significant
3741 5b. White-space in indent-pre
3760 5c. White-space in indent-pre
3773 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3796 7a. Indent-pre and category links
3798 parsoid=wt2html,wt2wt
3800 [[Category:foo]] <!-- No pre-wrapping -->
3801 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3804 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3805 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3808 ## We used to, but no longer wt2wt this test since the default serializer
3809 ## will normalize all categories to serialize on their own line.
3810 ## This wikitext usage is going to be fairly uncommon in production and
3811 ## selser will take care of preserving formatting in those scenarios.
3813 7b. Indent-pre and category links
3818 [[Category:foo]] {{echo|b}}
3820 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3821 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
3825 Indent-Pre: Newlines in comments shouldn't affect sol state
3840 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3844 HTML-pre: 1. embedded newlines
3876 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3878 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3881 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3886 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3894 HTML-pre: big spaces
3930 <pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n"}}'>
3949 HTML-pre: 2: indented text
3961 HTML-pre: 3: other wikitext
3979 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n* foo\n# bar\n= no-h =\n'' no-italic ''\n[[ NoLink ]]\n"}}'>* foo
3988 ### Definition lists
3996 <dd>Definition</dd></dl>
4000 Definition list for indentation only
4004 <dl><dd>Indented text</dd></dl>
4008 Definition list with no space
4013 <dd>Definition</dd></dl>
4017 Definition list with URL link
4019 ;http://example.com/ :definition
4021 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
4022 <dd>definition</dd></dl>
4026 Definition list with bracketed URL link
4028 ;[http://www.example.com/ Example]:Something about it
4030 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4031 <dd>Something about it</dd></dl>
4035 Definition list with wikilink containing colon
4037 ;[[Help:FAQ]]:The least-read page on Wikipedia
4039 <dl><dt><a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
4040 <dd>The least-read page on Wikipedia</dd></dl>
4043 # At Brion's and JeLuF's insistence... :)
4045 Definition list with news link containing colon
4047 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4049 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
4050 <dd>This isn't even a real newsgroup!</dd></dl>
4052 <dl><dt><a rel="mw:ExtLink" class="external free" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'>This isn't even a real newsgroup!</dd></dl>
4056 Malformed definition list with colon
4058 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4060 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
4064 Definition lists: colon in external link text
4066 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4068 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
4069 <dd>OK, I made that up</dd></dl>
4073 Definition lists: colon in HTML attribute
4075 ;<b style="display: inline">bold</b>
4077 <dl><dt><b style="display: inline">bold</b></dt></dl>
4081 Definition lists: self-closed tag
4083 ;one<br/>two :two-line fun
4085 <dl><dt>one<br />two</dt>
4086 <dd>two-line fun</dd></dl>
4090 Definition lists: ignore colons inside tags
4092 ;one <b>two : tag <i>fun:</i>:</b>:def
4094 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4099 Definition lists: excess closed tags
4101 ;one</b>two :bad tag fun
4104 <dd>bad tag fun</dd></dl>
4108 <dd>bad tag fun</dd>
4113 T13748: Literal closing tags
4117 <dd>test test test test test</dd>
4119 <dd>test test test test test</dd>
4124 <dd>test test test test test</dd>
4126 <dd>test test test test test</dd>
4131 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4140 <dd>description</dd></dl>
4141 <ul><li>unordered</li></ul>
4146 Definition list with empty definition and following paragraph
4159 Nested definition lists using html syntax
4171 Definition Lists: No nesting: Multiple dd's
4183 Definition Lists: Indentation: Regular
4191 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4195 Definition Lists: Indentation: Missing 1st level
4201 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4205 Definition Lists: Indentation: Multi-level indent
4209 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4213 Definition Lists: Hacky use to indent tables
4220 should be left alone
4222 <dl><dd><dl><dd><table>
4227 </td></tr></table></dd></dl></dd></dl>
4229 should be left alone
4234 Definition Lists: Hacky use to indent tables (with content following table)
4239 |} <!--c1--> this text should be part of the dl
4246 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4253 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4257 Definition Lists: Hacky use to indent tables, with comments (T65979)
4265 should be left alone
4268 <dl><dd><dl><dd><table><tr>
4271 </tr></table><!-- bar --></dd></dl></dd></dl>
4273 should be left alone</p>
4277 Definition Lists: Hacky use to indent tables, with comment before table
4285 <dl><dd><dl><dd><!-- foo --><table><tr>
4287 </tr></table></dd></dl></dd></dl>
4290 # The trailing whitespace in this test is to catch a regression in
4291 # Parsoid after T54473.
4293 Definition Lists: Hacky use to indent tables (WS-insensitive)
4302 </td></tr></table></dd></dl>
4305 <tbody><tr><td>a</td></tr>
4306 </tbody></table></dd></dl>
4309 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4310 ## as an empty dt item. It also ignores all but the last ";" when followed
4311 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4312 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4315 ## Ex: ";;t2 ::d2" is transformed into:
4327 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4328 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4339 ## All Parsoid only definition list tests have this difference.
4341 ## See also: https://phabricator.wikimedia.org/T8569
4342 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4345 Table / list interaction: indented table with lists in table contents
4367 </td></tr></table></dd></dl>
4371 Table / list interaction: lists nested in tables nested in indented lists
4394 </td></tr></table></dd></dl>
4400 Definition Lists: Nesting: Multi-level (Parsoid only)
4426 Definition Lists: Nesting: Test 2
4433 <dl><dd>d2</dd></dl></dd></dl>
4438 Definition Lists: Nesting: Test 3
4443 <dl><dd><dl><dt>t1</dt>
4445 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4450 Definition Lists: Nesting: Test 4
4455 <dl><dd><dl><dd><dl><dt>t3</dt>
4456 <dd>d3</dd></dl></dd></dl></dd></dl>
4460 ## The Parsoid team believes the following three test exposes a
4461 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4462 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4463 ## It also exposes a "misfeature" in tidy, which doesn't like
4464 ## <dl> tags with a single <dt> child; it converts the <dt> into
4465 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4467 Definition Lists: Mixed Lists: Test 1
4473 <dl><dd><dl><dt><ul><li>foo</li>
4474 <li>bar</li></ul></dt></dl>
4475 <dl><dt>baz</dt></dl></dd></dl>
4477 <dl><dd><dl><dt><ul><li>foo</li>
4478 <li>bar</li></ul></dt></dl>
4479 <dl><dt>baz</dt></dl></dd></dl>
4497 Definition Lists: Mixed Lists: Test 2
4502 <ul><li><dl><dd>d1</dd>
4503 <dd>d2</dd></dl></li></ul>
4508 Definition Lists: Mixed Lists: Test 3
4513 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4514 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4519 Definition Lists: Mixed Lists: Test 4
4524 <ul><li><dl><dt>d1</dt>
4527 <dd>d4</dd></dl></li></ul>
4532 Definition Lists: Mixed Lists: Test 5
4538 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4543 Definition Lists: Mixed Lists: Test 6
4548 <ol><li><ul><li><dl><dd>d1
4549 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4554 Definition Lists: Mixed Lists: Test 7
4559 <dl><dd><ul><li>d1</li>
4560 <li>d2</li></ul></dd></dl>
4565 Definition Lists: Mixed Lists: Test 8
4570 <dl><dd><ul><li>d1</li></ul>
4571 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4576 Definition Lists: Mixed Lists: Test 9
4580 <ul><li><dl><dt>foo</dt>
4581 <dd>bar</dd></dl></li></ul>
4586 Definition Lists: Mixed Lists: Test 10
4590 <ul><li><ol><li><dl><dt>foo</dt>
4591 <dd>bar</dd></dl></li></ol></li></ul>
4594 # The Parsoid team disagrees with the PHP parser's seemingly-random
4595 # rules regarding dd/dt on the next few tests. Parsoid is more
4596 # consistent, and recognizes the shared nesting and keeps the
4597 # still-open tags around until the nesting is complete.
4599 # This is a regression test for T175099
4601 Definition Lists: Mixed Lists: Test 11
4608 <ul><li>b</li></ul></dd></dl>
4611 <dd><ul><li>b</li></ul></dd></dl>
4614 # FIXME: Maybe get rid of this test?
4616 Definition Lists: Mixed Lists: Test 12
4621 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4622 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4624 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4626 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4627 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4629 <dd>baz</dd></dl></li></ol></li></ul>
4647 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4652 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4661 Definition Lists: Mixed Lists: Test 13
4666 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4667 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4668 <dl><dt>boo </dt>
4669 <dd>baz</dd></dl></li></ol></li></ul>
4672 # FIXME: Maybe get rid of this test?
4674 # * The test is wrong, there are two colons where there should be :;
4675 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4677 Definition Lists: Weird Ones: Test 1
4679 *#;*::;;foo :bar (who uses this?)
4681 <ul><li><ol><li><dl><dt>foo</dt>
4682 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt>bar (who uses this?)</dt></dl></dt></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
4700 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4712 Definition Lists: colons occurring in tags
4729 <dt><span>a:b</span></dt>
4730 <dt><div>a:b</div></dt>
4731 <dt><div>a</div></dt>
4735 <dt><i>a:b</i></dt></dl>
4736 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4738 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4740 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4741 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4742 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4743 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4745 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4746 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4747 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4750 # Parsoid's output differs here again because it shares
4751 # nesting between the two lists unlike the PHP parser.
4752 # Unsure which is more desirable.
4754 Definition Lists: colons and tables 1
4766 </td></tr></table></dd></dl>
4770 </td></tr></table></dd></dl>
4775 </td></tr></table></dd>
4779 </td></tr></table></dd></dl>
4782 # FIXME: Does this need a html/php section?
4784 Definition Lists: template interaction
4786 ::{{definition_list}}
4789 ::{{definition_list}}
4794 <dl><dd><dl data-parsoid='{}'><dd about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[":",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}}]}'>one</dd><span about="#mwt1">
4795 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4797 <dl><dd data-parsoid='{}'>one
4798 <dl><dd about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":["::",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}},"\n:::two\n:::three"]}'>one</dd><span about="#mwt2">
4799 </span><dd about="#mwt2">two
4801 <dd>three</dd></dl></dd>
4802 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4810 External links: non-bracketed
4812 Non-bracketed: http://example.com
4814 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4818 # parsoid doesn't explicitly mark autonumbered links, see T55505
4820 External links: numbered
4822 Numbered: [http://example.com]
4823 Numbered: [http://example.net]
4824 Numbered: [http://example.com]
4826 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4827 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4828 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4831 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4832 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4833 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4837 External links: specified text
4839 Specified text: [http://example.com link]
4841 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4846 External links: trail
4848 Linktrails should not work for external links: [http://example.com link]s
4850 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4855 External links: dollar sign in URL
4857 http://example.com/1$2345
4859 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4863 # parsoid doesn't explicitly mark autonumbered links, see T55505
4865 External links: dollar sign in URL (autonumber)
4867 [http://example.com/1$2345]
4869 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4872 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4876 External links: open square bracket forbidden in URL (T6377)
4878 parsoid=wt2html,wt2wt,html2html
4880 http://example.com/1[2345
4882 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4885 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4889 External links: open square bracket forbidden in URL (named) (T6377)
4891 parsoid=wt2html,html2html
4893 [http://example.com/1[2345]
4895 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4898 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4901 # parsoid adds a space before the link name
4903 External links: open square bracket forbidden in URL (named) (T6377)
4906 [http://example.com/1 [2345]
4908 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4913 External links: nowiki in URL link text (T8230)
4915 [http://example.com/ <nowiki>''example site''</nowiki>]
4917 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4922 External links: newline forbidden in text (T8230 regression check)
4924 [http://example.com/ first
4927 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4933 External links: Pipe char between url and text
4935 [http://example.com | link]
4937 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4942 External links: protocol-relative URL in brackets
4944 [//example.com/ Test]
4946 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4950 # parsoid doesn't explicitly mark autonumbered links, see T55505
4952 External links: protocol-relative URL in brackets without text
4956 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4959 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4963 External links: protocol-relative URL in free text is left alone
4967 <p>//example.com/Foo
4972 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4974 foo//example.com/Foo
4976 <p>foo//example.com/Foo
4980 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4982 External links: with no contents
4984 parsoid=wt2html,wt2wt
4986 [http://en.wikipedia.org/wiki/Foo]
4988 [[wikipedia:Foo|Bar]]
4990 [[wikipedia:Foo|<span>Bar</span>]]
4992 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4993 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4994 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4997 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4998 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4999 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
5003 External links: Free with trailing punctuation
5013 http://example.com/url_with_(brackets)
5014 (http://example.com/url_without_brackets)
5015 http://example.com/url_with_entity&
5016 http://example.com/url_with_entity&
5017 http://example.com/url_with_entity&
5018 http://example.com/url_with_entity
5019 http://example.com/url_with_entity 
5020 http://example.com/url_with_entity 
5021 http://example.com/url_with_entity<
5022 http://example.com/url_with_entity<
5023 http://example.com/url_with_entity<
5025 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5026 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5027 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5028 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5029 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5030 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5031 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5032 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5033 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5034 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5035 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5036 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5037 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5038 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5039 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5040 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5041 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5042 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5043 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5046 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5047 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5048 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5049 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5050 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5051 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5052 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5053 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5054 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5055 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5056 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5057 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5058 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5059 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
5060 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
5061 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
5062 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
5063 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
5064 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
5068 External links: tricky Parsoid html2html case
5070 parsoid=wt2html,wt2wt,html2html
5072 http://example.com/url_with_entity&amp;
5074 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5077 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
5081 External links: Free with trailing quotes (T113666)
5083 '''News:''' Stuff here
5087 <p><b>News:</b> Stuff here
5088 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5091 <p><b>News:</b> Stuff here</p>
5092 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5096 External links: with entity
5098 [http:// www.librarieswithoutborders.org Libraries without borders]
5100 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5103 <p><a rel="mw:ExtLink" class="external text" href="http://+www.librarieswithoutborders.org" data-parsoid='{"a":{"href":"http://+www.librarieswithoutborders.org"},"sa":{"href":"http://&#x20;www.librarieswithoutborders.org"}}'>Libraries without borders</a></p>
5107 External links: Lone protocols are never linked (T105697)
5126 External links: No preceding word characters allowed (T67278)
5128 NOPEhttp://example.com
5129 N0http://example.com
5130 ok:http://example.com
5131 ok-http://example.com
5133 <p>NOPEhttp://example.com
5134 N0http://example.com
5135 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5136 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5141 External links: nofollow domain exception
5143 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5145 <p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>.
5152 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5154 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5159 External image from https
5161 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5163 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5168 External image (when not allowed)
5170 wgAllowExternalImages=0
5172 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5174 <p>External image: <a rel="nofollow" class="external free" href="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png">http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png</a>
5179 Link to non-http image, no img tag
5181 Link to non-http image, no img tag: ftp://example.com/test.jpg
5183 <p>Link to non-http image, no img tag: <a rel="nofollow" class="external free" href="ftp://example.com/test.jpg">ftp://example.com/test.jpg</a>
5188 External links: terminating separator
5190 Terminating separator: http://example.com/thing,
5192 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5197 External links: intervening separator
5199 Intervening separator: http://example.com/1,2,3
5201 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5206 External links: old bug with URL in query
5208 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5210 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5215 External links: old URL-in-URL bug, mixed protocols
5217 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5219 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5223 # Since Parsoid is starting to emit canonical wikitext for links,
5224 # [http://example.com http://example.com] will not RT back to that
5227 External links: URL in text
5231 URL in text: [http://example.com http://example.com]
5233 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5236 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5240 External links: Clickable images
5242 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5244 <p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/></a>
5247 <p>ja-style clickable images: <a rel="mw:ExtLink" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
5251 External links: raw ampersand
5253 Old & use: http://x&y
5255 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5260 External links: encoded ampersand
5262 Old & use: http://x&y
5264 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5267 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5271 External links: encoded equals (T8102)
5273 http://example.com/?foo=bar
5275 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5278 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5282 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5283 ## does it number them. As discussed in T55505, we can identify
5284 ## autonumbered links via CSS.
5288 External links: [raw ampersand]
5290 Old & use: [http://x&y]
5292 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5295 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5298 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5299 # mode will return the [raw ampersand] wikitext
5301 External links: [encoded ampersand]
5303 parsoid=wt2html,wt2wt,html2html
5305 Old & use: [http://x&y]
5307 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5310 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5314 External links: [raw equals]
5316 [http://example.com/?foo=bar]
5318 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5321 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5324 # note that parsoid html is identical to [raw equals] case; so html2wt
5325 # mode will return the [raw equals] wikitext
5327 External links: [encoded equals] (T8102)
5329 parsoid=wt2html,wt2wt,html2html
5331 [http://example.com/?foo=bar]
5333 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5336 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5339 # xxx parsoid strips the IDN character, so the round-trip tests will
5340 # obviously fail and are disabled. --cscott
5342 External links: [IDN ignored character reference in hostname; strip it right off]
5344 parsoid=wt2html,wt2wt,html2html
5346 [http://e‌xample.com/]
5348 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5351 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5354 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5355 # Where an external link could easily circumvent the sanitization of the text of
5356 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5357 # test demands a higher standard. That's a bit strange.
5361 # http://example.com -> [http://example.com|http://example.com]
5362 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5364 # The first example is sanitized, but the second is not. Any security benefits
5365 # from this production are trivial to circumvent. Either remove this test and
5366 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5367 # the test accordingly.
5371 # xxx parsoid strips the IDN character, so the round-trip tests will
5372 # obviously fail and are disabled. --cscott
5374 External links: IDN ignored character reference in hostname; strip it right off
5376 parsoid=wt2html,html2html
5378 http://e‌xample.com/
5380 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5383 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5387 External links: www.jpeg.org (T2554)
5391 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5395 # parsoid doesn't explicitly mark autonumbered links, see T55505
5397 External links: URL within URL (T2002)
5399 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5401 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5404 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5408 T2361: URL inside bracketed URL
5410 [http://www.example.com/foo http://www.example.com/bar]
5412 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5417 T2361: URL within URL, not bracketed
5419 http://www.example.com/foo?=http://www.example.com/bar
5421 <p><a rel="nofollow" class="external free" href="http://www.example.com/foo?=http://www.example.com/bar">http://www.example.com/foo?=http://www.example.com/bar</a>
5426 T2289: ">"-token in URL-tail
5428 http://www.example.com/<hello>
5430 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5435 T2289: literal ">"-token in URL-tail
5437 http://www.example.com/<b>html</b>
5439 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5442 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
5446 T2289: ">"-token in bracketed URL
5448 [http://www.example.com/<hello> stuff]
5450 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5455 T2289: literal ">"-token in bracketed URL
5457 [http://www.example.com/<b>html</b> stuff]
5459 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5464 T2289: literal double quote at end of URL
5466 http://www.example.com/"hello"
5468 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5473 T2289: literal double quote in bracketed URL
5475 [http://www.example.com/"hello" stuff]
5477 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5482 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5484 [http://www.example.com test]
5486 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5491 External links: link text with spaces
5493 [http://www.example.com a b c]
5494 [http://www.example.com ''a'' ''b'']
5496 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5497 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5501 # Note edge case difference between PHP and Parsoid here.
5503 External links: wiki links within external link (T5695)
5505 parsoid=wt2html,html2html
5507 [http://example.com [[wikilink]] embedded in ext link]
5509 [http://example.com test [[wikilink]] embedded in ext link]
5511 <p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5512 </p><p><a rel="nofollow" class="external text" href="http://example.com">test </a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5515 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5516 <p><a rel="mw:ExtLink" class="external text" href="http://example.com">test </a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5520 T2787: Links with one slash after the url protocol are invalid
5524 [http:/example.com title]
5526 <p>http:/example.com
5527 </p><p>[http:/example.com title]
5532 Bracketed external links with template-generated invalid target
5534 [{{echo|http:/example.com}} title]
5536 <p>[http:/example.com title]
5540 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5542 Broken wikilinks (but not external links) prevent templates from closing
5546 [http://example.com x
5548 {{echo|[http://example.com x}}
5554 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5555 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5557 </p><p>{{echo|[[Foo}}
5560 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5561 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://example.com x"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5563 <p>{{echo|[[Foo}}</p>
5567 Wikilinks with embedded newlines are not broken
5578 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[ Foo\nB\nC]]"}},"i":0}}]}'>[[ Foo B C]]</p>
5590 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5594 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5595 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5599 T4702: Mismatched <i>, <b> and <a> tags are invalid
5601 ''[http://example.com text'']
5602 [http://example.com '''text]'''
5603 ''Something [http://example.com in italic'']
5604 ''Something [http://example.com mixed''''', even bold]'''
5605 '''''Now [http://example.com both''''']
5607 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5608 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5609 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5610 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5611 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5619 http://www.example.com/?title=AT%26T
5621 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5624 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5627 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5628 # % is actually legal in HTML5. Any change in output would need testing though.
5630 T6781, T7267: %25 in URL
5632 http://www.example.com/?title=100%25_Bran
5634 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a>
5637 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5641 T6781, T7267: %28, %29 in URL
5643 http://www.example.com/?title=Ben-Hur_%281959_film%29
5645 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
5648 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
5653 T6781: %26 in autonumber URL
5655 [http://www.example.com/?title=AT%26T]
5657 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5660 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5664 T6781, T7267: %26 in autonumber URL
5666 [http://www.example.com/?title=100%25_Bran]
5668 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5671 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5675 T6781, T7267: %28, %29 in autonumber URL
5677 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5679 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5682 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5687 T6781: %26 in bracketed URL
5689 [http://www.example.com/?title=AT%26T link]
5691 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5694 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5698 T6781, T7267: %25 in bracketed URL
5700 [http://www.example.com/?title=100%25_Bran link]
5702 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5707 T6781, T7267: %28, %29 in bracketed URL
5709 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5711 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5714 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5718 External link containing a period in the anchor. (T65947)
5720 [//foo.org/bar#baz. bang]
5722 [//foo.org/bar. bang]
5724 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5725 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5728 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5729 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5733 External link containing a single quote. (T65947)
5737 [//foo.org/bar'baz bang]
5739 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5740 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5743 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5744 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5748 External link containing double-single-quotes in text '' (T6598 sanity check)
5750 Some [http://example.com/ pretty ''italics'' and stuff]!
5752 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5757 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5759 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5761 <p><i>Some </i><a rel="nofollow" class="external text" href="http://example.com/"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
5765 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5767 External link containing double-single-quotes with no space separating the url from text in italics
5769 [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]].]
5771 <p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.
5774 <p><a rel="mw:ExtLink" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
5778 External link with comments in link text
5780 [http://www.google.com Google <!-- comment -->]
5782 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5785 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5789 External link to bare IPv4 address
5791 [http://192.168.0.1 Link]
5793 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5796 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5800 URL-encoding in URL functions (single parameter)
5802 {{localurl:Some page|amp=&}}
5804 <p>/index.php?title=Some_page&amp=&
5809 URL-encoding in URL functions (multiple parameters)
5811 {{localurl:Some page|q=?&=&}}
5813 <p>/index.php?title=Some_page&q=?&amp=&
5820 http://example.com/index.php?foozoid%5B%5D=bar
5822 http://example.com/index.php?foozoid[]=bar
5824 <p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5825 </p><p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5828 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5830 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar" data-parsoid='{"stx":"url","a":{"href":"http://example.com/index.php?foozoid%5B%5D=bar"},"sa":{"href":"http://example.com/index.php?foozoid&#x5B;&#x5D;=bar"}}'>http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5834 IPv6 urls, autolink format (T23261)
5836 http://[2404:130:0:1000::187:2]/index.php
5838 Examples from RFC 2373, section 2.2:
5840 *http://[1080::8:800:200C:417A]/unicast
5841 *http://[FF01::101]/multicast
5842 *http://[::1]/loopback
5843 *http://[::]/unspecified
5844 *http://[::13.1.68.3]/ipv4compat
5845 *http://[::FFFF:129.144.52.38]/ipv4compat
5847 Examples from RFC 2732, section 2:
5849 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5850 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5851 *http://[3ffe:2a00:100:7031::1]
5852 *http://[1080::8:800:200C:417A]/foo
5853 *http://[::192.9.5.5]/ipng
5854 *http://[::FFFF:129.144.52.38]:80/index.html
5855 *http://[2010:836B:4179::836B:4179]
5857 <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>
5858 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5860 <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>
5861 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5862 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5863 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5864 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5865 <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>
5866 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5868 <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>
5869 <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>
5870 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5871 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5872 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5873 <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>
5874 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5876 <p><a rel="mw:ExtLink" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5878 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external mw-magiclink">RFC 2373</a>, section 2.2:</p>
5879 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5880 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5881 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5882 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5883 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5884 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5886 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5887 <ul><li><a rel="mw:ExtLink" 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>
5888 <li><a rel="mw:ExtLink" 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>
5889 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5890 <li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5891 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5892 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5893 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5897 IPv6 urls, bracketed format (T23261)
5899 [http://[2404:130:0:1000::187:2]/index.php test]
5901 Examples from RFC 2373, section 2.2:
5903 *[http://[1080::8:800:200C:417A] unicast]
5904 *[http://[FF01::101] multicast]
5905 *[http://[::1]/ loopback]
5906 *[http://[::] unspecified]
5907 *[http://[::13.1.68.3] ipv4compat]
5908 *[http://[::FFFF:129.144.52.38] ipv4compat]
5910 Examples from RFC 2732, section 2:
5912 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5913 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5914 *[http://[3ffe:2a00:100:7031::1] 3]
5915 *[http://[1080::8:800:200C:417A]/foo 4]
5916 *[http://[::192.9.5.5]/ipng 5]
5917 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5918 *[http://[2010:836B:4179::836B:4179] 7]
5920 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5921 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5923 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5924 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5925 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5926 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5927 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5928 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5929 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5931 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5932 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5933 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5934 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5935 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5936 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5937 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5939 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5941 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external mw-magiclink">RFC 2373</a>, section 2.2:</p>
5942 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5943 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5944 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5945 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5946 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5947 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5949 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5950 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5951 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5952 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5953 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5954 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5955 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5956 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5960 Non-extlinks in brackets
5969 [{{echo|foo}} ''bar'']
5970 [{{echo|foo}}l's] errand
5971 [{{echo|foo}}l's errand]
5973 [url=http://example.com]
5974 [http:// bare protocols don't count]
5987 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5988 [http:// bare protocols don't count]
5996 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5997 [<span about="#mwt20" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> bar]
5998 [<span about="#mwt21" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> <i>bar</i>]
5999 [<span about="#mwt22" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's] errand
6000 [<span about="#mwt23" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's errand]
6001 [url=<span about="#mwt24" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6002 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6003 [http:// bare protocols don't count]</p>
6007 Percent encoding in external links
6009 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6011 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6014 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6018 Use url link syntax for links where the content is equal the link target
6022 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6025 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6029 Parenthesis in external links, especially URL links
6033 http://example.com/test)
6035 http://example.com/(test)
6037 http://example.com/((test)
6039 (http://example.com/(test))
6041 (http://example.com/(test)))))
6043 http://example.com/a)b
6045 [http://example.com) foo]
6047 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6048 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6049 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6050 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6051 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6052 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6053 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6054 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6057 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6058 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6059 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6060 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6061 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6062 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6063 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6064 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6068 Parenthesis in external links, w/ transclusion or comment
6070 (http://example.com/{{echo|hi}})
6072 (http://example.com<!-- hi -->)
6074 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6075 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6078 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" class="external free" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span>"}]]}'>http://example.com/hi</a>)</p>
6080 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
6084 Serialize <a> tags with invalid link targets as plain text
6086 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6088 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6089 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6090 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6091 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6094 <nowiki>*</nowiki>text
6095 <nowiki>[[foo]]</nowiki>
6096 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6100 mw:ExtLink -vs- mw:WikiLink (T94723)
6104 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6105 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6106 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6107 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6109 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6110 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6118 [[:en:European_Robin|European Robin]]
6119 [[:en:European_Robin|European Robin]]
6123 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6127 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6129 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6140 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6142 Normal text. '''''Bold italic text.''''' Normal text.
6144 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6145 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6150 Quotes wrapping HTML table
6152 '''<table><tr><td>hi</td></tr></table>'''
6154 <b><table><tbody><tr><td>hi</td></tr></tbody></table></b>
6156 <b><table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>hi</td></tr></tbody></table></b>
6159 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6160 # parser strips. The wikitext contains just the first half of the bold
6163 Unclosed and unmatched quotes
6165 '''''Bold italic text '''with bold deactivated''' in between.'''''
6167 '''''Bold italic text ''with italic deactivated'' in between.'''''
6171 ..spanning two paragraphs (should not work).'''
6173 '''Bold tag left open
6175 ''Italic tag left open
6179 <!-- Unmatching number of opening, closing tags: -->
6180 '''This year''''s election ''should'' beat '''last year''''s.
6182 ''Tom'''s car is bigger than ''Susan'''s.
6184 Plain ''italic'''s plain
6186 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6187 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6188 </p><p><b>Bold text..</b>
6189 </p><p>..spanning two paragraphs (should not work).
6190 </p><p><b>Bold tag left open</b>
6191 </p><p><i>Italic tag left open</i>
6193 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6194 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6195 </p><p>Plain <i>italic'</i>s plain
6198 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6199 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6200 </p><p><b>Bold text..</b>
6201 </p><p>..spanning two paragraphs (should not work).<b></b>
6202 </p><p><b>Bold tag left open</b>
6203 </p><p><i>Italic tag left open</i>
6206 <!-- Unmatching number of opening, closing tags: -->
6207 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6208 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6209 </p><p>Plain <i>italic'</i>s plain
6216 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6219 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6220 # is the bare minimum required by the spec, see:
6221 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6222 # Parsoid team replies: empty table tags are legal in HTML5
6224 A table with no data.
6235 A table with stray table end tags on start tag line (wt2html)
6239 {|style="color: red;"|}
6241 {|style="color: red;" |}
6245 {|style="color: red;"|} id="foo"
6249 {|style="color: red;" |} id="foo"
6253 <table style="color: red;">
6255 </table><table style="color: red;">
6258 </td></tr></tbody></table>
6259 <table style="color: red;" id="foo">
6262 </td></tr></tbody></table>
6263 <table style="color: red;" id="foo">
6266 </td></tr></tbody></table>
6268 <table style="color: red;"></table>
6270 <table style="color: red;">
6276 <table style="color: red;" id="foo">
6282 <table style="color: red;" id="foo">
6290 A table with no data (take 2)
6298 # A table with nothing but a caption is invalid XHTML, we might want to render
6299 # this as <p>caption</p>
6300 # Parsoid team replies: table with only a caption is legal in HTML5
6302 A table with nothing but a caption
6310 </caption><tr><td></td></tr></table>
6312 <table><caption>caption</caption></table>
6316 A table with caption with default-spaced attributes and a table row
6319 |+ style="color: red;" |caption1
6325 <caption style="color: red;">caption1
6333 A table with captions with non-default spaced attributes and a table row
6336 |+style="color: red;"|caption2
6337 |+ style="color: red;"|caption3
6343 <caption style="color: red;">caption2
6345 <caption style="color: red;">caption3
6353 Table td-cell syntax variations
6358 |style='color:red;'|baz
6359 |style='color:red;'||baz
6366 <td>foo bar foo</td>
6369 <td style="color:red;">baz
6371 <td>style='color:red;'</td>
6397 Simple table but with multiple dashes for row wikitext
6415 Multiplication table
6417 {| border="1" cellpadding="2"
6418 |+Multiplication table
6438 <table border="1" cellpadding="2">
6439 <caption>Multiplication table
6485 Accept "||" in table headings
6499 Accept "!!" in table data
6512 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6517 Accept "||" in indented table headings
6527 </th></tr></table></dd></dl>
6531 Accept "!!" in templates
6544 <tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["!a ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b!!c"}},"i":0}}]}'>a b</th><th about="#mwt1">c</th></tr>
6548 Accept "!!" in table headings after newline
6564 <p>b!!c</p></th></tr>
6569 Accept "!!" in table data of mixed wikitext / html syntax
6573 <tr><td>b!!c</td></tr>
6579 </th></tr><tr><td>b!!c</td></tr>
6583 <tbody><tr><th>a</th></tr>
6584 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6589 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6605 Accept "| !" at start of line in tables (ignore !-attribute)
6609 |!style="color:red"|bar
6620 Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present, or in 1st cell when there is a space between "|" and +/-
6624 |style='color:red;'|+1
6625 |style='color:blue;'|-1
6637 <td style="color:red;">+1
6639 <td style="color:blue;">-1
6662 |rowspan=2|Cell 2, row 1 (and 2)
6673 <td rowspan="2">Cell 2, row 1 (and 2)
6690 {| bgcolor=#ABCDEF border=2
6695 |the original table again
6703 <table bgcolor="#ABCDEF" border="2">
6711 <td>the original table again
6716 Invalid attributes in table cell (T3830)
6729 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6733 |title="foo<nowiki>|</nowiki>" |bar
6734 |title="foo<nowiki>|</nowiki>" bar
6741 <td title="foo|">bar
6743 <td>title="foo|" bar
6747 <tbody><tr><td title="foo">bar</td>
6748 <td title="foo|" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"foo<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[32,50,8,9]}'>|</span>"}]]}'>bar</td>
6749 <td>title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6753 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6754 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6755 # *2wt modes will fail.
6757 Table security: embedded pipes
6759 parsoid=wt2html,html2html
6762 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6766 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6767 <td>]" onmouseover="alert(document.cookie)">test
6774 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" class="external free" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6778 Element attributes with double ! should not be broken up by <th>
6781 !hi <div class="!!">ha</div> ho
6786 <th>hi <div class="!!">ha</div> ho
6790 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6795 ! and || in element attributes should not be parsed as <th>/<td>
6798 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6803 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6807 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6811 # FIXME: The output seems broken. Filed as T110268.
6813 ! and || in td attributes should not be parsed as <th>/<td>
6818 |style="color: red !important;" data-contrived="put this here ||"|foo
6823 <td>style="color: red !important;" data-contrived="put this here</td>
6828 <tbody><tr><td>style="color: red !important;" data-contrived="put this here</td><td data-parsoid='{"stx":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'>foo</td></tr>
6833 Break on | in element attribute in template
6835 parsoid=wt2html,html2html
6837 {{echo|1=<div class="hi|ho">ha</div>}}
6839 <p>ho">ha</div>
6842 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</p>
6846 Break on | in element attribute name in template
6848 {{echo|<div cla|ss="hiho">ha</div>}}
6850 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"ss","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div cla"},"ss":{"wt":"\"hiho\">ha</div>"}},"i":0}}]}'><div cla</p>
6854 Don't break on | in extension attribute in template
6856 {{echo|<ref name="hi|ho">ha</ref>}}
6860 <p><sup about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Parser_test#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
6862 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Parser_test#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
6865 ## We don't support roundtripping of these attributes in Parsoid.
6866 ## Selective serialization takes care of preventing dirty diffs.
6867 ## But, on edits, we dirty-diff the invalid attribute text.
6869 Invalid text in table attributes should be discarded
6873 {| <span>boo</span> style='border:1px solid black'
6874 | <span>boo</span> style='color:blue' |1
6875 |<span>boo</span> style='color:blue'|2
6878 <table style="border:1px solid black">
6880 <td style="color:blue">1
6882 <td style="color:blue">2
6885 <table style="border:1px solid black">
6887 <td style="color:blue">1</td>
6888 <td style="color:blue">2</td>
6894 Invalid text in table attributes should be preserved by selective serializer
6897 "modes": ["selser"],
6899 ["td:first-child", "text", "abc"],
6900 ["td + td", "text", "xyz"]
6904 {| <span>boo</span> style='border:1px solid black'
6905 | <span>boo</span> style='color:blue' | 1
6906 |<span>boo</span> style='color:blue'| 2
6909 {| <span>boo</span> style='border:1px solid black'
6910 | <span>boo</span> style='color:blue' | abc
6911 |<span>boo</span> style='color:blue'| xyz
6916 1. Template-generated table cell attributes and cell content
6921 || {{table_attribs_5}}
6922 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6923 |align=center {{table_attribs}}
6924 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6929 <td style="color:red;">Foo
6931 <td style="color:red;">Foo
6933 <td>style="color:red;"</td>
6936 <td style="color:red;">Foo
6938 <td align="center" style="color:red;">Foo
6940 <td align="center" style="color:red;">Foo
6945 2. Template-generated table cell attributes and cell content
6948 |{{table_attribs_2}}
6953 <td style="color:red;">Foo
6960 <tbody><tr><td about="#mwt1" typeof="mw:Transclusion" style="color:red;" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_2","href":"./Template:Table_attribs_2"},"params":{},"i":0}}]}'>Foo</td>
6961 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6966 3. Template-generated table cell attributes and cell content
6969 !align=center {{table_header_cells}}
6971 |align=center {{table_cells}}
6976 <th align="center" style="color:red;">Foo</th>
6977 <th style="color:red;"><i>Bar</i></th>
6978 <th style="color:brown;"><i>Foo</i> and Baz
6981 <td align="center" style="color:red;">Foo</td>
6982 <td style="color:red;"><i>Bar</i></td>
6983 <td style="color:brown;"><i>Foo</i> and Baz
6987 <tbody><tr><th align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":0}}]}'>Foo</th><th about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></th><th about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</th></tr><tr>
6988 <td align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":0}}]}'>Foo</td><td about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></td><td about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</td></tr>
6993 4. Template-generated table cell attributes and cell content inside a templated table
6996 !align=center {{table_header_cells}}
6998 |align=center {{table_cells}}
7003 <th align="center" style="color:red;">Foo</th>
7004 <th style="color:red;"><i>Bar</i></th>
7005 <th style="color:brown;"><i>Foo</i> and Baz
7008 <td align="center" style="color:red;">Foo</td>
7009 <td style="color:red;"><i>Bar</i></td>
7010 <td style="color:brown;"><i>Foo</i> and Baz
7013 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":1}},"\n|-\n|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":2}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":3}}]}'>
7014 <tbody><tr><th align="center" style="color:red;">Foo</th><th style="color:red;"><i>Bar</i></th><th style="color:brown;"><i>Foo</i> and Baz</th></tr>
7016 <td align="center" style="color:red;">Foo</td><td style="color:red;"><i>Bar</i></td><td style="color:brown;"><i>Foo</i> and Baz</td></tr>
7020 ## Edge case fix to prevent future regressions
7022 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7025 |{{table_attribs_7}}
7030 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
7032 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#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>
7036 Table with row followed by newlines and table heading
7038 parsoid=wt2html,html2html
7055 Table with empty line following the start tag
7057 parsoid=wt2html,html2html
7074 Table attributes with empty value
7076 parsoid=wt2html,html2html
7088 <tbody><tr><td style="">hello</td></tr>
7093 Wikitext table with a lot of comments
7115 Wikitext table comments represented in parsoid dom
7117 {|<!--c1--><!--c2-->
7126 </td></tr></tbody></table>
7128 <table><!--c1--><!--c2-->
7129 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7130 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7135 Wikitext table with double-line table cell
7151 Table cell with a single comment
7167 Table-cell after a comment-only-empty-line
7183 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7185 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7190 Build table with {{!}}
7192 {{{!}} class="wikitable"
7195 {{!}}- style="color:red;"
7196 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7199 <table class="wikitable">
7205 <tr style="color:red;">
7207 <td style="color:red;">second data
7212 Build table with pipe as data
7214 {| class="wikitable"
7217 |- style="color:red;"
7218 |data|| style="color:red;" |second data
7220 | style="color:red;" |data with | || style="color:red;" | second data with |
7222 ||data with | |||second data with |
7225 <table class="wikitable">
7231 <tr style="color:red;">
7233 <td style="color:red;">second data
7236 <td style="color:red;">data with |</td>
7237 <td style="color:red;">second data with |
7240 <td>data with |</td>
7241 <td>second data with |
7246 Build table with wikilink
7248 {| class="wikitable"
7249 !header||second header
7250 |- style="color:red;"
7251 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7253 |data||second data [[Main Page|link|text with pipe]]
7256 <table class="wikitable">
7261 <tr style="color:red;">
7262 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7263 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7267 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7271 # The expected HTML structure in this test is debatable. The PHP parser does
7272 # not parse this kind of table at all. The main focus for Parsoid is on
7273 # round-tripping, so this output is ok for now. TODO: revisit!
7275 Wikitext table with html-syntax row
7285 <td>foo</td></tr></tbody></table>
7288 ## Remex doesn't account for fostered content.
7290 Fostered content in tables: Plain text
7309 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7312 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7316 Fostered content in tables: Lists
7318 parsoid=wt2html,html2html
7330 <ul><li>a</li></ul><table>
7335 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7336 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7338 </tr></tbody></table>
7342 Template generated table cell with attributes
7346 {{table_attribs_4}} ||a||b
7352 <td style="background-color:#DC241f;" width="10px"></td>
7355 </td></tr></tbody></table>
7358 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7359 <td style="background-color:#DC241f;" width="10px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"table_attribs_4","href":"./Template:Table_attribs_4"},"params":{},"i":0}}," ||a||b"]}'></td><td about="#mwt1">a</td><td about="#mwt1">b</td></tr>
7363 Parsoid: Round-trip tables directly followed by content (T53219)
7365 parsoid=wt2html,wt2wt
7378 </td></tr></tbody></table><p> bar
7382 </td></tr></tbody></table><p><b>quux</b></p>
7386 Parsoid: Default to a newline after tables in new content (T53219)
7391 <tr><td>foo</td></tr></tbody></table> bar
7393 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7398 <nowiki> </nowiki>bar
7406 Parsoid: Row-syntax table headings followed by comment & table cells
7408 parsoid=wt2html,wt2wt
7412 <!-- foo --> ||baz||quux
7425 <tbody><tr><th>foo</th><th>bar
7426 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7431 Parsoid: Recover better from broken table attributes
7445 </td></tr></tbody></table>
7450 <p>foo</p></td></tr>
7454 # Note: PHP parser omits empty rows
7456 Tables: Digest broken attributes on table and tr tag
7472 <tr class='mw-empty-elt'></tr>
7473 <tr class='mw-empty-elt'></tr>
7478 Table with missing opening <tr> tag
7480 parsoid=wt2html,wt2wt
7488 <tbody><tr><td>foo</td>
7493 # T137406: Whitespace in the HTML
7495 1. Generate correct wikitext for tables with thead/tbody/tfoot
7500 <caption>Test</caption>
7562 </td></tr></tbody></table>
7565 # T137406: No whitespace in the HTML
7567 2. Generate correct wikitext for tables with thead/tbody/tfoot
7571 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7581 Wikitext tables can be nested inside HTML tables
7585 <table data-parsoid='{"stx":"html"}'>
7588 <tr><td>foo</td></tr>
7606 </td></tr></tbody></table>
7615 Plain link, capitalized
7619 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7624 Plain link, uncapitalized
7628 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7635 [[Main Page|The Main Page]]
7637 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7642 Piped link with comment in link text
7644 [[Main Page|The Main<!--front--> Page]]
7646 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7651 Piped link with multiple pipe characters in link text
7653 [[Main Page||The|Main|Page|]]
7655 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7658 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7662 Piped link with no link text
7664 [[Thomas Bek (bishop of St David's)|]]
7666 <p>[[Thomas Bek (bishop of St David's)|]]
7669 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7673 Piped link with empty link text
7675 [[Main Page|<nowiki/>]] - empty nowiki
7676 [[Main Page| ]] - empty space
7677 [[Main Page| ]] - empty non breaking space
7679 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7680 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7681 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7684 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7685 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7686 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></a> - empty non breaking space</p>
7694 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7699 Broken link with fragment
7701 [[Zigzagzogzagzig#zug]]
7703 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7708 Special page link with fragment
7710 [[Special:Version#anchor]]
7712 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7717 Nonexistent special page link with fragment
7719 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7721 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7728 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7730 <p>xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a>, xxx<a href="/wiki/Main_Page" title="Main Page">Main Page</a>, Xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a> XXX<a href="/wiki/Main_Page" title="Main Page">main Page</a>, XXX<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7737 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7739 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>!!!
7750 T45661: Piped links with identical prefixes
7752 [[prefixed article|prefixed articles with spaces]]
7754 [[prefixed article|prefixed articlesaoeu]]
7756 [[Main Page|Main Page test]]
7758 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7759 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7760 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7766 Link with HTML entity in suffix / tail
7768 [[Main Page]]", [[Main Page]]a
7770 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7773 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&quot;","srcContent":"\""}'>"</span>, <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&#97;","srcContent":"a"}'>a</span></p>
7777 Link with 3 brackets
7788 Link with 4 brackets
7792 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7797 Piped link with 3 brackets
7799 [[[main page|the main page]]]
7801 <p>[[[main page|the main page]]]
7806 Piped link with extlink-like text
7809 [[Main Page|This is a [bar]]]
7812 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7813 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7814 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7817 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7818 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7819 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7823 Link with multiple pipes
7825 [[Main Page|The|Main|Page]]
7827 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7832 Anchor containing a #. (T65430)
7834 wgFragmentMode=[ 'html5', 'legacy' ]
7836 [[Main Page#And#Link]]
7838 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7841 <p><a rel="mw:WikiLink" href="./Main_Page#And#Link" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#And#Link"},"sa":{"href":"Main Page#And#Link"}}'>Main Page#And#Link</a></p>
7847 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7849 <p><a href="/index.php?title=Talk:Parser_testing&action=edit&redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a>
7854 Link with space in namespace
7856 [[User talk:Foo bar]]
7858 <p><a href="/index.php?title=User_talk:Foo_bar&action=edit&redlink=1" class="new" title="User talk:Foo bar (page does not exist)">User talk:Foo bar</a>
7863 MemoryAlpha:AlphaTest
7865 This is an article in the MemoryAlpha namespace
7866 (which shadows the memoryalpha interwiki link).
7870 Namespace takes precedence over interwiki link (T53680)
7872 [[MemoryAlpha:AlphaTest]]
7874 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7878 # The previous test doesn't work correctly in html2*, due to not recognizing the
7879 # link as an internal one. This one checks for the correct behavior.
7881 Link to namespace preferred over interwiki with correct rel attribute
7883 parsoid=html2wt,html2html
7885 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7887 [[MemoryAlpha:AlphaTest]]
7891 Piped link to namespace
7893 [[Meta:Disclaimers|The disclaimers]]
7895 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7902 [[Usually caused by a typo (oops}]]
7904 <p>[[Usually caused by a typo (oops}]]
7911 Just a test of an article title containing a percent.
7915 Link containing % (not as a hex sequence)
7918 [[7% Solution|7%25 Solution]]
7920 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7921 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7924 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7925 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7928 # note that the parsoid HTML is identical to the previous test output,
7929 # so the previous test ensures that the html2wt mode will generate the
7930 # "not as a hex sequence" wikitext.
7932 Link containing % as a single hex sequence interpreted to char
7934 parsoid=wt2wt,wt2html,html2html
7937 [[7%25 Solution|7%25 Solution]]
7939 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7940 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7943 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7944 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7948 Link containing % as a double hex sequence interpreted to hex sequence
7952 <p>[[7%2525 Solution]]
7956 ## Example for such a section: == < ==
7958 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7962 wgFragmentMode=[ 'html5', 'legacy' ]
7964 [[%23%3c]][[%23%3e]]
7966 <p><a href="#<">#<</a><a href="#>">#></a>
7969 <p><a rel="mw:WikiLink" href="./Main_Page#<" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#<"},"sa":{"href":"%23%3c"}}'>#<</a><a rel="mw:WikiLink" href="./Main_Page#>" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#>"},"sa":{"href":"%23%3e"}}'>#></a></p>
7972 ## Example for such a section: == < ==
7974 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7976 wgFragmentMode=[ 'legacy' ]
7978 [[%23%3c]][[%23%3e]]
7980 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7985 Link containing "<#" and ">#" as a hex sequences
7987 [[%3c%23]][[%3e%23]]
7989 <p>[[%3c%23]][[%3e%23]]
7994 Link containing an equals sign
7996 [[Special:BookSources/isbn=4-00-026157-6]]
7998 <p><a href="/wiki/Special:BookSources/isbn%3D4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a>
8001 <p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
8007 Just a test of an article title containing an ampersand
8011 Link containing an ampersand
8017 [[Foo &amp; bar]]
8019 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8020 </p><p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8021 </p><p>[[Foo &amp; bar]]
8024 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar">Foo & bar</a></p>
8025 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar" data-parsoid='{"stx":"simple","a":{"href":"./Foo_&_bar"},"sa":{"href":"Foo &amp; bar"}}'>Foo & bar</a></p>
8026 <p>[[Foo <span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp; bar]]</p>
8032 Just a test of an article title containing a tilde.
8035 # note that links containing signatures, like [[Foo~~~~]], are
8036 # massaged by the pre-save transform (PST) and so the tildes are never
8037 # seen by the parser.
8039 Link containing a tilde
8043 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8046 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8050 Link containing double-single-quotes '' (T6598)
8052 [[Lista d''e paise d''o munno]]
8054 <p><a href="/index.php?title=Lista_d%27%27e_paise_d%27%27o_munno&action=edit&redlink=1" class="new" title="Lista d''e paise d''o munno (page does not exist)">Lista d''e paise d''o munno</a>
8057 <p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno" title="Lista d''e paise d''o munno">Lista d''e paise d''o munno</a></p>
8061 Link containing double quotes and spaces
8065 <p><a href="/index.php?title=Cool_%22Gator%22&action=edit&redlink=1" class="new" title="Cool "Gator" (page does not exist)">Cool "Gator"</a>
8068 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8072 File containing double quotes and spaces
8074 [[File:Cool "Gator".png]]
8076 <p><a href="/index.php?title=Special:Upload&wpDestFile=Cool_%22Gator%22.png" class="new" title="File:Cool "Gator".png">File:Cool "Gator".png</a>
8079 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Cool_%22Gator%22.png"><span resource='./File:Cool_"Gator".png' data-parsoid='{"a":{"resource":"./File:Cool_\"Gator\".png"},"sa":{"resource":"File:Cool \"Gator\".png"}}'>File:Cool "Gator".png</span></a></figure-inline></p>
8083 File containing single quotes
8085 [[File:Foo's ''italic'' bar.jpg]]
8086 [[File:Foo's ''italic'' bar.jpg|Foo's ''italic'' bar]]
8088 <p><a href="/index.php?title=Special:Upload&wpDestFile=Foo%27s_%27%27italic%27%27_bar.jpg" class="new" title="File:Foo's ''italic'' bar.jpg">File:Foo's <i>italic</i> bar.jpg</a>
8089 <a href="/index.php?title=Special:Upload&wpDestFile=Foo%27s_%27%27italic%27%27_bar.jpg" class="new" title="File:Foo's ''italic'' bar.jpg">Foo's italic bar</a>
8094 Redirect containing double quotes and spaces
8096 #REDIRECT [[Cool "Gator"]]
8098 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8102 Link containing double-single-quotes '' in text (T6598 sanity check)
8104 Some [[Link|pretty ''italics'' and stuff]]!
8106 <p>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!
8109 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8113 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8115 ''Some [[Link|pretty ''italics'' and stuff]]!''
8117 <p><i>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!</i>
8121 ## FIXME: Title part of filename is interpreted in php
8123 Link with double quotes in title part (literal) and alternate part (interpreted)
8125 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8129 [[''Pentecoste''|Pentecoste]]
8131 [[''Pentecoste''|''Pentecoste'']]
8133 <p><a href="/index.php?title=Special:Upload&wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko ''Pentecoste''.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a>
8134 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a>
8135 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a>
8136 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)"><i>Pentecoste</i></a>
8139 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Denys_Savchenko_''Pentecoste''.jpg"><span resource="./File:Denys_Savchenko_''Pentecoste''.jpg" data-parsoid='{"a":{"resource":"./File:Denys_Savchenko_''Pentecoste''.jpg"},"sa":{"resource":"File:Denys_Savchenko_''Pentecoste''.jpg"}}'>File:Denys Savchenko ''Pentecoste''.jpg</span></a></figure-inline></p>
8140 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8141 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8142 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8146 Broken image links with HTML captions (T41700)
8148 [[File:Nonexistent|<script></script>]]
8149 [[File:Nonexistent|100x100px|<script></script>]]
8150 [[File:Nonexistent|<]]
8151 [[File:Nonexistent|a<i>b</i>c]]
8153 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8154 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8155 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8156 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8159 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"caption":"&lt;script>&lt;/script>","errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Nonexistent"><span resource="./File:Nonexistent" data-parsoid='{"a":{"resource":"./File:Nonexistent"},"sa":{"resource":"File:Nonexistent"}}'>File:Nonexistent</span></a></figure-inline>
8160 <figure-inline typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"caption":"&lt;script>&lt;/script>","errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Nonexistent"><span resource="./File:Nonexistent" data-width="100" data-height="100" data-parsoid='{"a":{"resource":"./File:Nonexistent"},"sa":{"resource":"File:Nonexistent"}}'>File:Nonexistent</span></a></figure-inline>
8161 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[107,111,null,null]}'>&lt;</span>","errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Nonexistent"><span resource="./File:Nonexistent" data-parsoid='{"a":{"resource":"./File:Nonexistent"},"sa":{"resource":"File:Nonexistent"}}'>File:Nonexistent</span></a></figure-inline>
8162 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"caption":"a<i data-parsoid='{\"stx\":\"html\",\"dsr\":[134,142,3,4]}'>b</i>c","errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Nonexistent"><span resource="./File:Nonexistent" data-parsoid='{"a":{"resource":"./File:Nonexistent"},"sa":{"resource":"File:Nonexistent"}}'>File:Nonexistent</span></a></figure-inline></p>
8168 [[http://www.example.com]]
8170 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8173 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8177 Plain link to URL with link text
8179 [[http://www.example.com Link text]]
8181 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8186 Plain link to URL containing special characters, with link text (see T213950).
8188 [[http://www.example.com/?q=%7Babc%7D Link text]]
8190 <p>[<a rel="nofollow" class="external text" href="http://www.example.com/?q=%7Babc%7D">Link text</a>]
8195 Plain link to protocol-relative URL
8197 [[//www.example.com]]
8199 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8202 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8206 Plain link to protocol-relative URL with link text
8208 [[//www.example.com Link text]]
8210 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8215 Plain link to page with question mark in title
8221 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8222 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8226 # I'm fairly sure the expected result here is wrong.
8227 # We want these to be URL links, not pseudo-pages with URLs for titles....
8228 # However the current output is also pretty screwy.
8231 # I'm changing it to match the current output--it arguably makes more
8232 # sense in the light of the test above. Old expected result was:
8233 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8235 # But I think this test is bordering on "garbage in, garbage out" anyway.
8240 Piped link to URL: [[http://www.example.com|an example URL]]
8242 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8245 <p>Piped link to URL: [<a rel="mw:ExtLink" class="external text" href="http://www.example.com%7Can" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
8249 Plain link in template argument
8253 {{echo|[http://www.example.com |123]}}
8255 {{echo|[[http://www.example.com |123]]}}
8257 {{echo|[[http://www.example.com |123]}}
8259 {{echo|[http://www.example.com |123]]}}
8261 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8262 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8263 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8264 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8267 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8269 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[http://www.example.com |123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external text" href="http://www.example.com">|123</a>]</p>
8271 <p>{{echo|[<a rel="mw:ExtLink" class="external text" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
8273 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8277 T2002: [[page|http://url/]] should link to page, not http://url/
8279 [[Main Page|http://url/]]
8281 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8284 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8287 # Parsoid does not mark self-links, by design.
8289 T2337: Escaped self-links should be bold
8293 [[Bug462]] [[Bug462]]
8295 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8298 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8302 Self-link to section should not be bold
8306 [[Main Page#section]]
8308 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8319 Self-link to numeric title
8325 <p><a class="mw-selflink selflink">0</a>
8330 Link to numeric-equivalent title
8336 <p><a href="/wiki/00" title="00">00</a>
8341 <nowiki> inside a link
8343 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8345 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8348 <p>[[Main<span typeof="mw:Nowiki"> Page</span>]] <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">the main page <span typeof="mw:Nowiki">[it's not very good]</span></a></p>
8351 ## Parsoid doesn't get this right and even fails wt2html because, when doing the
8352 ## normalization for comparison, the html serialization / re-parse doesn't
8353 ## roundtrip. This is T49963
8357 [[Main<pre> Page</pre>]] [[Main Page|the main page <pre>[it's not very good]</pre>]]
8359 <p>[[Main</p><pre> Page</pre><p>]] <a href="/wiki/Main_Page" title="Main Page">the main page </a></p><a href="/wiki/Main_Page" title="Main Page"><pre>[it's not very good]</pre></a>
8361 <p>[[Main</p><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":" Page"}}'> Page</pre><p>]] <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">the main page <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"[it's not very good]"}}'>[it's not very good]</pre></a></p>
8365 Non-breaking spaces in title
8367 [[ Main Page ]]
8369 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8373 # Add new article for the test below so that it doesn't red-link
8381 Multiple spaces in titles should normalize to a single underscore
8383 parsoid=wt2html,wt2wt
8389 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8390 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8391 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8394 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8395 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8396 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8401 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8407 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8412 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8418 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8423 Internal link with en linktrail: no apostrophes (T29473)
8429 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8434 Internal link with ca linktrail with apostrophes (T29473)
8440 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8445 Internal link with kaa linktrail with apostrophes (T29473)
8451 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8456 Link with multiple ":" in a subpage-supporting namespace (T65636)
8458 [[User:Foo/Test/63636:Bar|Test]]
8460 <p><a href="/index.php?title=User:Foo/Test/63636:Bar&action=edit&redlink=1" class="new" title="User:Foo/Test/63636:Bar (page does not exist)">Test</a>
8463 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8466 ## Mainly a sanity check for Parsoid
8468 Handle title parsing for subpages
8488 Link to a subpage from a namespace other than main
8495 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8498 <p><a rel="mw:WikiLink" href="./User:Test/123" title="User:Test/123" data-parsoid='{"stx":"simple","a":{"href":"./User:Test/123"},"sa":{"href":"/123"}}'>/123</a></p>
8502 Ensure that transclusion titles are not url-decoded
8504 subpage title=[[Test]]
8507 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8509 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8512 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8516 Purely hash wikilink
8518 title=[[User:Test/123]]
8523 <p><a href="#a">b</a>
8526 <p><a rel="mw:WikiLink" href="./User:Test/123#a" data-parsoid='{"stx":"piped","a":{"href":"./User:Test/123#a"},"sa":{"href":"#a"}}'>b</a></p>
8530 Serialization of purely hash wikilink
8532 title=[[User:Test/123]]
8536 <p><a href="#a">[[</a></p>
8538 [[#a|<nowiki>[[</nowiki>]]
8540 <p><a href="#a">[[</a>
8545 1. Interaction of linktrail and template encapsulation
8549 <p><a href="/wiki/Foo" title="Foo">Fool</a>
8552 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo]]"}},"i":0}},"l"]}'>Fool</a></p>
8556 2. Interaction of linktrail and template encapsulation
8558 {{echo|Some [[Fool]]}}s
8560 <p>Some <a href="/index.php?title=Fool&action=edit&redlink=1" class="new" title="Fool (page does not exist)">Fools</a>
8563 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]"}},"i":0}},"s"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some </span><a rel="mw:WikiLink" href="./Fool" title="Fool" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a></p>
8567 3. Interaction of linktrail and template encapsulation
8569 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8571 <p>Some <a href="/index.php?title=Fool&action=edit&redlink=1" class="new" title="Fool (page does not exist)">Fools</a> are <b>bold and foolish</b>
8574 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]s are '''bold and foolish'''"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some <a rel="mw:WikiLink" href="./Fool" title="Fool" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a> are <b>bold and foolish</b></p>
8584 Internal link with is link prefix
8588 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8590 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8601 Internal link with is link trail and link prefix
8605 [[mótmælendatrú|xxx]]ar
8607 mótmælenda[[söfnuður]]
8608 mótmælenda[[söfnuður|söfnuðir]]
8609 mótmælenda[[söfnuður|söfnuðir]]xxx
8611 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8612 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8613 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8614 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8615 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8620 Parsoid link trail escaping
8622 parsoid=html2wt,html2html
8624 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8630 Parsoid link prefix escaping
8633 parsoid=html2wt,html2html
8635 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8637 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8641 Parsoid link bracket escaping
8643 parsoid=html2wt,html2html
8645 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8646 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8647 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8648 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8649 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8650 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8658 [[[<nowiki/>[[Test]]]]]
8662 [[[[[<nowiki/>[[Test]]]]]]]
8666 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8674 [http://wp.org ''foo'']
8676 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8677 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8678 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8679 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8684 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8686 [[Foo|{{echo|a}} b {{echo|c}}]]
8688 <p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span> b <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c"}},"i":0}}]}'>c</span></a></p>
8692 Link with angle bracket after anchor
8694 wgFragmentMode=[ 'html5', 'legacy' ]
8698 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8701 <p><a rel="mw:WikiLink" href="./Foo#<bar>" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#<bar>"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
8705 Link with angle bracket after anchor (legacy)
8707 wgFragmentMode=[ 'legacy' ]
8711 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8716 ### Interwiki links (see maintenance/interwiki.sql)
8720 Inline interwiki link
8722 parsoid=wt2html,wt2wt,html2html
8724 [[MeatBall:SoftSecurity]]
8726 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8729 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8733 Inline interwiki link with empty title (T4372)
8735 parsoid=wt2html,wt2wt,html2html
8739 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8742 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8745 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8747 Interwiki link encoding conversion (T3636)
8749 parsoid=wt2html,wt2wt
8751 *[[Wikipedia:ro:Olteniţa]]
8752 *[[Wikipedia:ro:Olteniţa]]
8754 <ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8755 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li></ul>
8757 <ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8758 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li></ul>
8761 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8762 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8767 Interwiki link with fragment (T4130)
8769 [[MeatBall:SoftSecurity#foo]]
8771 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8775 ## The interwiki case here continued to be legacy escaped because of the
8776 ## default setting of $wgExternalInterwikiFragmentMode
8778 Link scenarios with escaped fragments
8782 wgFragmentMode=[ 'html5', 'legacy' ]
8785 [[Foo#Is this great?]]
8786 [[meatball:Foo#Is this great?]]
8788 <p><a href="#Is_this_great?">#Is this great?</a>
8789 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8790 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8793 <p><a rel="mw:WikiLink" href="./Main_Page#Is_this_great?" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Is_this_great?"},"sa":{"href":"#Is this great?"}}'>#Is this great?</a>
8794 <a rel="mw:WikiLink" href="./Foo#Is_this_great?" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#Is_this_great?"},"sa":{"href":"Foo#Is this great?"}}'>Foo#Is this great?</a>
8795 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
8799 Link scenarios with escaped fragments (legacy)
8801 wgFragmentMode=[ 'legacy' ]
8804 [[Foo#Is this great?]]
8805 [[meatball:Foo#Is this great?]]
8807 <p><a href="#Is_this_great.3F">#Is this great?</a>
8808 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8809 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8813 # Ideally the wikipedia: prefix here should be proto-relative too
8814 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8815 # define the 'en' prefix, and originally the test used 'wikipedia',
8816 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8819 Different interwiki prefixes mapping to the same URL
8827 [[:wikipedia:Foo|Foo]]
8829 [[wikipedia:en:Foo]]
8831 [[:wikipedia:en:Foo]]
8835 <p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">en:Foo</a></p>
8837 <p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">Foo</a></p>
8839 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">wikipedia:Foo</a></p>
8841 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">Foo</a></p>
8843 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8845 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8847 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":" wikiPEdia :Foo"},"isIW":true}' title="wikipedia:Foo"> wikiPEdia :Foo</a></p>
8851 Interwiki links that cannot be represented in wiki syntax
8854 [[meatball:ok#foo|ok with fragment]]
8855 [[meatball:ok_as_well?|ok ending with ? mark]]
8856 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8857 [http://de.wikipedia.org/wiki/#foo is just fragment]
8860 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8861 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8862 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" class="extiw" title="meatball:ok as well?">ok ending with ? mark</a>
8863 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8864 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8867 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8868 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8869 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" title="meatball:ok as well?">ok ending with ? mark</a>
8870 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8871 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8875 Interwiki links: trail
8877 [[wikipedia:Foo|Ba]]r
8879 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8882 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}' title="wikipedia:Foo">Bar</a></p>
8886 Local interwiki link
8888 parsoid=wt2html,wt2wt,html2html
8890 [[local:Template:Foo]]
8892 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8895 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8898 # Parsoid does not mark self-links, by design.
8900 Local interwiki link: self-link to current page
8903 parsoid=wt2html,wt2wt,html2html
8907 <p><a class="mw-selflink selflink">local:Main Page</a>
8910 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8914 Local interwiki link: prefix only (T66167)
8916 parsoid=wt2html,wt2wt,html2html
8920 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8923 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8927 Local interwiki link: with additional interwiki prefix (T63357)
8929 parsoid=wt2html,wt2wt,html2html
8931 [[local:meatball:Hello]]
8933 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8936 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8940 Multiple local interwiki link prefixes
8942 [[local:local:local:local:mi:local:Foo]]
8944 parsoid=wt2html,wt2wt,html2html
8946 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8949 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8953 Interwiki link with percent encoded target
8955 [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]]
8957 <p><a href="http://es.wikipedia.org/wiki/Nueva_Guip%C3%BAzcoa" class="extiw" title="es:Nueva Guipúzcoa">Nueva Guipúzcoa</a>
8960 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Nueva%20Guipúzcoa" title="es:Nueva Guipúzcoa" data-parsoid='{"stx":"piped","a":{"href":"http://es.wikipedia.org/wiki/Nueva%20Guipúzcoa"},"sa":{"href":":es:Nueva Guip%C3%BAzcoa"},"isIW":true}'>Nueva Guipúzcoa</a></p>
8964 ### Interlanguage links
8965 ### Language links (so that searching for '### language' matches..)
8977 <p>Blah blah blah</p>
8978 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8981 ## parsoid html2wt will lose the space variations
8983 Interlanguage link with spacing
8985 parsoid=wt2html,wt2wt,html2html
8993 <p>Blah blah blah</p>
8994 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8998 Double interlanguage link
9007 <p>Blah blah blah</p>
9008 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9009 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9012 ## parsoid html2wt will lose the space variations
9014 Interlanguage link variations
9016 parsoid=wt2html,wt2wt,html2html
9026 <p>Blah blah blah</p>
9027 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
9028 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
9029 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
9033 Escaping of interlanguage links (T129218, T156308)
9037 [[ : zh : Chinese ]]
9040 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9041 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
9045 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9046 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
9050 Multiple colons escaping interlanguage links
9058 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9063 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9065 [[:::es:Spanish]]</p>
9068 ## parsoid html2wt will normalize the space to _
9070 Space and question mark encoding in interlanguage links (T95473)
9072 parsoid=wt2html,wt2wt,html2html
9080 <p>Blah blah blah</p>
9081 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9085 Interlanguage link, with prefix links
9095 <p>Blah blah blah</p>
9096 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9100 Double interlanguage link, with prefix links (T10897)
9111 <p>Blah blah blah</p>
9112 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9113 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9117 "Extra" interlanguage links (T34189 / gerrit 111390)
9125 <p>Blah blah blah</p>
9126 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9129 ## PHP parser tests script needs an update
9130 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9132 Language links render as inline links if $wgInterwikiMagic=false
9134 wgInterwikiMagic=false
9135 parsoid=wt2html,wt2wt,html2html
9140 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9143 ## PHP parser tests script needs an update
9144 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9146 Language links render as inline links in the Talk namespace
9149 parsoid=wt2html,wt2wt,html2html
9154 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9158 Parsoid-specific test: Wikilinks with should RT properly
9164 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9169 Parsoid T55221: Wikilinks should be properly entity-escaped
9171 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9173 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9174 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9176 He&nbsp;llo [[Foo|He&nbsp;llo]]
9178 He&nbsp;llo He&nbsp;llo
9180 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9181 </p><p>He&nbsp;llo He&nbsp;llo
9185 # html2wt will fail because of title normalization without data-parsoid
9187 Parsoid: handle constructor well
9189 parsoid=wt2html,wt2wt
9195 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9196 </p><p><a href="/index.php?title=Constructor:foo&action=edit&redlink=1" class="new" title="Constructor:foo (page does not exist)">constructor:foo</a>
9199 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9201 <p><a rel="mw:WikiLink" href="./Constructor:foo" title="Constructor:foo" data-parsoid='{"stx":"simple","a":{"href":"./Constructor:foo"},"sa":{"href":"constructor:foo"}}'>constructor:foo</a></p>
9205 Template parameter named "constructor"
9207 {{echo| constructor = |hi}}
9209 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"constructor","named":true,"spc":[" "," ",""," "]},{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"},"constructor":{"wt":""}},"i":0}}]}'>hi</p>
9218 # Note that `ko` isn't a known interlanguage prefix
9220 Parsoid: recognize interlanguage links without a target page
9230 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9232 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9235 # Note that `ko` isn't a known interwiki prefix
9237 Parsoid: recognize interwiki links without a target page
9239 parsoid=wt2html,wt2wt,html2html
9245 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9246 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9249 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9250 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9254 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9258 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9261 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9265 Interlanguage link with preceding local interwiki link (T70085)
9267 parsoid=wt2html,wt2wt,html2html
9270 [[local:es:Spanish]]
9273 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9277 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9281 Looks like an interlanguage link, but is actually a local interwiki
9283 parsoid=wt2html,wt2wt,html2html
9289 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9293 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9297 ### Redirects, Parsoid-only
9301 1. Simple redirect to page
9303 #REDIRECT [[Main Page]]
9305 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9309 2. Other redirect variants
9311 #REDIRECT [[Main_Page]]
9313 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9316 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9317 # This tests the Parsoid bail-out code.
9319 3. Other redirect variants
9323 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9325 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9329 4. Redirect to a templated destination
9331 #REDIRECT [[{{echo|Foo}}bar]]
9333 <link about="#mwt2" typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-parsoid='{"a":{"href":"./Foobar"},"sa":{"href":"{{echo|Foo}}bar"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,24,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span>bar"}]]}'/>
9339 parsoid=wt2html,wt2wt
9344 <li>REDIRECT [[]]</li></ol>
9348 Optional colon in #REDIRECT
9350 # the colon is archaic syntax. we support it for wt2html, but we
9351 # don't care that it roundtrips back to the modern syntax.
9352 parsoid=wt2html,html2html
9354 #REDIRECT:[[Main Page]]
9356 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9360 Whitespace in #REDIRECT with optional colon
9362 # the colon and gratuitous whitespace is archaic syntax. we support
9363 # it for wt2html, but we don't care that it roundtrips back to the
9364 # modern syntax (without extra whitespace)
9365 parsoid=wt2html,html2html
9372 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9376 Piped link in #REDIRECT
9378 # content after piped link is ignored. we support this syntax,
9379 # but don't care that the piped link is lost when we roundtrip this.
9382 #REDIRECT [[Main Page|bar]]
9384 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9388 Redirect to category (T104502)
9390 parsoid=wt2html,wt2wt
9392 #REDIRECT [[Category:Foo]]
9394 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9398 Redirect to category with URL encoding (T104502)
9402 #REDIRECT [[Category%3AFoo]]
9404 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9408 Redirect to category page
9410 #REDIRECT [[:Category:Foo]]
9412 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9416 Redirect to image page (1)
9418 #REDIRECT [[File:Wiki.png]]
9420 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9424 Redirect to image page (2)
9426 #REDIRECT [[Image:Wiki.png]]
9428 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9431 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9432 # Next test confirms this.
9434 Redirect to language (1) (T104918)
9436 parsoid=wt2html,wt2wt,html2html
9438 #REDIRECT [[en:File:Wiki.png]]
9440 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9444 Redirect to language (2) (T104918)
9446 #REDIRECT [[:en:File:Wiki.png]]
9448 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9452 Redirect to interwiki (T104918)
9454 #REDIRECT [[meatball:File:Wiki.png]]
9456 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9460 Non-English #REDIRECT
9464 #TILVÍSUN [[Main Page]]
9466 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9470 Redirect syntax under text isn't considered a redirect
9474 #redirect [[Main Page]]
9477 <ol data-parsoid='{}'><li data-parsoid='{}'>redirect <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'>Main Page</a></li></ol>
9485 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9492 Redirect followed by block on the same line
9496 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9498 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9502 Redirect followed by a newline
9504 #REDIRECT [[Main Page]]
9507 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9512 Redirect followed by multiple newlines
9514 #REDIRECT [[Main Page]]
9519 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9526 Drop duplicate redirects
9530 <link rel="mw:PageProp/redirect" href="./Foo"/>
9531 <link rel="mw:PageProp/redirect" href="./Bar"/>
9532 <link rel="mw:PageProp/redirect" href="./Baz"/>
9551 Broken br tag sanitization
9559 # TODO: Fix html2html mode (T53055)!
9561 Parsoid: Broken br tag recognition
9575 Incorrecly removing closing slashes from correctly formed XHTML
9577 <br style="clear:both;" />
9579 <p><br style="clear:both;" />
9584 Failing to transform badly formed HTML into correct XHTML
9586 <br style="clear: left;">
9587 <br style="clear: right;">
9588 <br style="clear: both;">
9590 <p><br style="clear: left;" />
9591 <br style="clear: right;" />
9592 <br style="clear: both;" />
9596 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9597 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9599 Handling html with a div self-closing tag
9608 <div title=""></div>
9609 <div title=""></div>
9611 <div title="bar"></div>
9612 <div title="bar"></div>
9613 <div title="bar/"></div></div>
9615 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9616 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9617 <div title="" data-parsoid='{"stx":"html","autoInsertedEnd":true}'>
9618 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9619 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9620 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div></div>
9624 Elements with solidus in various attribute positions
9626 parsoid=wt2html,html2html
9628 <div cla/ss="123">ha</div>
9630 <div / class="123">ha</div>
9632 <div class= / "123">ha</div>
9635 <div class="123">ha</div>
9636 <div class="/">ha</div>
9638 <div data-parsoid='{"stx":"html","a":{"cla":null,"ss":null},"sa":{"cla":"","ss":"123"}}'>ha</div>
9640 <div class="123" data-parsoid='{"stx":"html"}'>ha</div>
9642 <div class="/" data-parsoid='{"stx":"html","a":{"\"123\"":null},"sa":{"\"123\"":""}}'>ha</div>
9646 Handling html with a br self-closing tag
9673 Quoted attributes without spaces
9677 <div class="foo"style="color:red">red</div>
9679 <div class="foo" style="color:red">red</div>
9681 <div class="foo" style="color:red">red</div>
9685 Horizontal ruler (should it add that extra space?)
9694 foo </p><hr /><p> bar</p>
9698 Horizontal ruler -- 4+ dashes render hr
9706 Horizontal ruler -- eats additional dashes on the same line
9714 Horizontal ruler -- does not collapse dashes on consecutive lines
9724 Horizontal ruler -- <4 dashes render as plain text
9733 Horizontal ruler -- Supports content following dashes on same line
9743 ### Block-level elements
9752 <ul><li>Common list</li>
9754 <li>item 3</li></ul>
9764 <ol><li>Numbered list</li>
9766 <li>item 3</li></ol>
9769 # the switch from level 3 to ordered should not introduce a newline between
9780 ***#Number on level 4
9782 **#Number on level 3
9783 **#Number on level 3
9787 #**Level 3, but ordered
9790 <ol><li>with numbers</li></ol>
9791 <ul><li>and bullets</li></ul>
9792 <ol><li>and numbers</li></ol></li>
9794 <ul><li>bullet level 2
9795 <ul><li>bullet level 3
9796 <ol><li>Number on level 4</li></ol></li></ul></li>
9798 <ol><li>Number on level 3</li>
9799 <li>Number on level 3</li></ol></li></ul>
9800 <ol><li>number level 2</li></ol></li>
9802 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9803 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9807 1. Nested mixed wikitext and html list
9810 *<ul><li>ho</li></ul>
9815 <li><ul><li>ho</li></ul></li>
9817 <ul><li>ho</li></ul></li></ul>
9820 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9822 <ul><li>ho</li></ul></li></ul>
9826 2. Nested mixed wikitext and html list (incompatible)
9829 :{{echo|<li>ho</li>}}
9832 <dd><li>ho</li></dd></dl>
9835 <dd><li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>ho</li>"}},"i":0}}]}'>ho</li></dd></dl>
9845 <ul><li>bar</li></ul></li></ul>
9854 <ul><li><ul><li>foo</li></ul></li>
9859 Nested lists 3 (first element empty)
9865 <ul><li>bar</li></ul></li></ul>
9869 Nested lists 4 (first element empty)
9874 <ul><li><ul><li></li></ul></li>
9879 Nested lists 5 (both elements empty)
9884 <ul><li><ul><li></li></ul></li>
9889 Nested lists 6 (both elements empty)
9895 <ul><li></li></ul></li></ul>
9899 Nested lists 7 (skip initial nesting levels)
9903 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9907 Nested lists 8 (multiple nesting transitions)
9915 <ul><li><ul><li>bar</li></ul></li>
9916 <li>baz</li></ul></li>
9920 # XXX this test should be moved to citeParserTests, since it depends
9921 # on the Cite extension, which is "built in" to Parsoid.
9923 Nested lists 9 (extension interaction)
9926 !! html/php+tidy-DISABLED
9927 <ul><li class="mw-empty-elt"></li></ul>
9929 <ul><li data-parsoid='{}'><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9933 1. Lists with start-of-line-transparent tokens before bullets: Comments
9945 Nested lists 10 (list and span siblings: wt2wt regression)
9950 <ul><li>a <span>x</span>
9951 <ul><li>b <span>y</span></li></ul></li></ul>
9955 2. Lists with start-of-line-transparent tokens before bullets: Template close
9960 <ul><li>foo bar</li>
9965 List items are not parsed correctly following a <pre> block (T2785)
9971 <ul><li><pre>foo</pre></li>
9972 <li><pre>bar</pre></li>
9975 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9976 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9980 # FIXME: Might benefit from a html/parsoid since this has a template
9982 List items from template
9993 *notSOL{{inner list}}
9997 <li>item 2</li></ul>
10000 <li>item 2</li></ul>
10001 <ul><li>item 0</li>
10004 <li>item 2</li></ul>
10008 List interrupted by empty line or heading
10016 <ul><li>foo</li></ul>
10017 <ul><li><ul><li>bar</li></ul></li></ul>
10018 <h2><span class="mw-headline" id="A_heading">A heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
10019 <ul><li>Another list item</li></ul>
10023 Multiple list tags generated by templates
10040 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"a"]}'>a</li>
10041 <li about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"b"]}'>b</li>
10042 <li about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"c"]}'>c</li>
10046 Multiple newlines in between HTML list items don't induce paragraph wrapping
10059 <dd>ho<div>123</div>
10075 <dd>ho<div>123</div>
10083 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10086 <!--This line will NOT split the list-->
10088 <!--This line will NOT split the list either-->
10090 <!--foo--> <!----> <!--This line NOT split the list either-->
10100 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10103 <!--This line will NOT split the list-->
10105 <!--This line will NOT split the list either-->
10107 <!--foo--> <!----> <!--This line NOT split the list
10117 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10118 # That pass could possibly be removed.
10120 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10122 parsoid=wt2html,wt2wt
10126 *{{echo|<li>templated li-hack}}
10127 *<!--foo--><li> unsupported li-hack with preceding comments
10130 <li><li>not a li-hack
10135 <li class="mw-empty-elt"></li><li>li-hack</li>
10136 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10137 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10139 <li class="mw-empty-elt"></li><li>not a li-hack
10144 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10145 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["*",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>templated li-hack"}},"i":0}}]}'>templated li-hack</li>
10146 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10148 <ul data-parsoid='{"stx":"html"}'>
10149 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10155 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10167 <ol><li>bar</li></ol></li></ol>
10169 <ul><li>bar</li></ul></li></ul>
10171 <dl><dd>bar</dd></dl></dd></dl>
10189 Parsoid: Test of whitespace serialization with Templated bullets
10196 <li class="mw-empty-elt"> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
10200 # ------------------------------------------------------------------------
10201 # The next set of tests are about Parsoid's ability to handle badly nested
10202 # tags (parse, minimize scope of fixup, and roundtrip back)
10203 # ------------------------------------------------------------------------
10205 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10206 # Parsoid's list handling is more aware of block structure.
10208 Unbalanced closing block tags break a list
10215 <ul><li>a</li></ul></div><div>
10227 Unbalanced closing non-block tags don't break a list
10229 parsoid=wt2html,html2html
10237 <ul><li>a<span></span></li>
10240 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></p>
10241 <ul><li>a<span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></li>
10245 # Parsoid does some post-dom-building cleanup
10246 # which is why its output differs from Remex.
10248 Unclosed formatting tags that straddle lists are closed and reopened
10250 parsoid=wt2html,wt2wt,html2html
10255 <ol><li><s> a</s></li><s>
10256 </s><li><s>b </s></li></ol>
10258 <ol><li><s> a</s></li>
10259 <li><s>b </s></li></ol>
10262 # Output is ugly because of all the misnested tag fixups.
10264 1. List embedded in a formatting tag
10271 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10274 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
10275 <ul><li data-parsoid='{}'>foo</li></ul></small>
10276 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p>
10279 # Output is ugly because of all the misnested tag fixups.
10281 2. List embedded in a formatting tag in a misnested way
10288 </small></p><small></small><ul><small><li>a</li>
10289 </small><li><small>b</small></li></ul>
10291 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10292 <ul><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'><li>a</li></small>
10293 <li><small data-parsoid='{"stx":"html","autoInsertedStart":true}'>b</small></li></ul>
10296 # Output is ugly because of all the misnested tag fixups.
10298 3. List embedded in a formatting tag in a misnested way
10305 </small></p><small></small><ul><small></small><li><small></small><ul><small></small><li><small>123</small></li></ul></li></ul>
10307 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10309 <ul><li><ul><li data-parsoid='{}'><small data-parsoid='{"stx":"html","autoInsertedStart":true}'> 123</small></li></ul></li></ul>
10316 # Note that the current date is hard-coded as
10317 # 1970-01-01T00:02:03Z (a Thursday)
10318 # when running parser tests. The timezone is also fixed to GMT, so
10319 # local date will be identical to current date.
10322 Magic Word: {{CURRENTDAY}}
10331 Magic Word: {{CURRENTDAY2}}
10340 Magic Word: {{CURRENTDAYNAME}}
10349 Magic Word: {{CURRENTDOW}}
10358 Magic Word: {{CURRENTMONTH}}
10367 Magic Word: {{CURRENTMONTH1}}
10376 Magic Word: {{CURRENTMONTHABBREV}}
10378 {{CURRENTMONTHABBREV}}
10385 Magic Word: {{CURRENTMONTHNAME}}
10387 {{CURRENTMONTHNAME}}
10394 Magic Word: {{CURRENTMONTHNAMEGEN}}
10396 {{CURRENTMONTHNAMEGEN}}
10403 Magic Word: {{CURRENTTIME}}
10412 Magic Word: {{CURRENTHOUR}}
10421 Magic Word: {{CURRENTWEEK}} (T6594)
10430 Magic Word: {{CURRENTYEAR}}
10439 Magic Word: {{CURRENTTIMESTAMP}}
10441 {{CURRENTTIMESTAMP}}
10448 Magic Words LOCAL (UTC)
10452 *{{LOCALMONTHNAME}}
10453 *{{LOCALMONTHNAMEGEN}}
10454 *{{LOCALMONTHABBREV}}
10463 *{{LOCALTIMESTAMP}}
10478 <li>19700101000203</li></ul>
10482 Magic Word: {{FULLPAGENAME}}
10484 title=[[User:Ævar Arnfjörð Bjarmason]]
10485 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10489 <p>User:Ævar Arnfjörð Bjarmason
10494 Magic Word: {{FULLPAGENAMEE}}
10496 title=[[User:Ævar Arnfjörð Bjarmason]]
10497 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10501 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10506 Magic Word: {{TALKSPACE}}
10508 title=[[User:Ævar Arnfjörð Bjarmason]]
10509 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10518 Magic Word: {{TALKSPACE}}, same namespace
10520 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10521 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10530 Magic Word: {{TALKSPACE}}, main namespace
10532 title=[[Parser Test]]
10533 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10542 Magic Word: {{TALKSPACEE}}
10544 title=[[User:Ævar Arnfjörð Bjarmason]]
10545 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10554 Magic Word: {{SUBJECTSPACE}}
10556 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10557 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10566 Magic Word: {{SUBJECTSPACE}}, same namespace
10568 title=[[User:Ævar Arnfjörð Bjarmason]]
10569 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10578 Magic Word: {{SUBJECTSPACE}}, main namespace
10580 title=[[Parser Test]]
10581 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10588 Magic Word: {{SUBJECTSPACEE}}
10590 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10591 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10600 Magic Word: {{NAMESPACE}}
10602 title=[[User:Ævar Arnfjörð Bjarmason]]
10603 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10612 Magic Word: {{NAMESPACEE}}
10614 title=[[User:Ævar Arnfjörð Bjarmason]]
10615 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10624 Magic Word: {{NAMESPACENUMBER}}
10626 title=[[User:Ævar Arnfjörð Bjarmason]]
10627 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10629 {{NAMESPACENUMBER}}
10636 Magic Word: {{SUBPAGENAME}}
10638 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10639 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10648 Magic Word: {{SUBPAGENAMEE}}
10650 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10651 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10660 Magic Word: {{ROOTPAGENAME}}
10662 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10663 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10667 <p>Ævar Arnfjörð Bjarmason
10672 Magic Word: {{ROOTPAGENAMEE}}
10674 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10675 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10679 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10684 Magic Word: {{BASEPAGENAME}}
10686 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10687 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10691 <p>Ævar Arnfjörð Bjarmason
10696 Magic Word: {{BASEPAGENAMEE}}
10698 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10699 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10703 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10708 Magic Word: {{TALKPAGENAME}}
10710 title=[[User:Ævar Arnfjörð Bjarmason]]
10711 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10715 <p>User talk:Ævar Arnfjörð Bjarmason
10720 Magic Word: {{TALKPAGENAMEE}}
10722 title=[[User:Ævar Arnfjörð Bjarmason]]
10723 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10727 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10732 Magic Word: {{SUBJECTPAGENAME}}
10734 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10735 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10737 {{SUBJECTPAGENAME}}
10739 <p>User:Ævar Arnfjörð Bjarmason
10744 Magic Word: {{SUBJECTPAGENAMEE}}
10746 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10747 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10749 {{SUBJECTPAGENAMEE}}
10751 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10756 Magic Word: {{NUMBEROFFILES}}
10758 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10767 Magic Word: {{PAGENAME}}
10769 title=[[User:Ævar Arnfjörð Bjarmason]]
10770 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10774 <p>Ævar Arnfjörð Bjarmason
10779 Magic Word: {{PAGENAME}} with metacharacters
10781 title=[['foo & bar = baz']]
10782 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10786 <p><i>'foo & bar = baz'</i>
10791 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10793 title=[[*RFC 1234 http://example.com/]]
10794 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10798 <p>*RFC 1234 http://example.com/
10803 Magic Word: {{PAGENAMEE}}
10805 title=[[User:Ævar Arnfjörð Bjarmason]]
10806 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10810 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10815 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10817 title=[[*RFC 1234 http://example.com/]]
10818 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10822 <p>*RFC_1234_http://example.com/
10827 Magic Word: {{REVISIONID}} on latest revision
10830 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10837 flags=vary-revision-id
10841 Magic Word: {{REVISIONID}} on non-latest revision
10843 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10850 flags=vary-revision-id
10854 Magic Word: {{REVISIONTIMESTAMP}} on latest revision
10857 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10860 {{REVISIONTIMESTAMP}}
10868 Magic Word: {{REVISIONTIMESTAMP}} on non-existing page
10870 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10873 {{REVISIONTIMESTAMP}}
10877 flags=vary-revision-timestamp
10881 Magic Word: {{REVISIONUSER}} on latest revision
10884 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10895 Parser Function: {{REVISIONID:{{PAGENAME}}}} on latest revision
10898 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10901 {{REVISIONID:{{PAGENAME}}}}
10905 flags=vary-revision-id
10909 Parser Function: {{REVISIONID:{{PAGENAME}}}} on non-saved revision
10911 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10914 {{REVISIONID:{{PAGENAME}}}}
10917 flags=vary-revision-id
10921 Parser Function: {{REVISIONTIMESTAMP:{{PAGENAME}}}} on latest revision
10924 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10927 {{REVISIONTIMESTAMP:{{PAGENAME}}}}
10931 flags=vary-revision-timestamp
10935 Parser Function: {{REVISIONDAY:{{PAGENAME}}}} on latest revision
10938 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10941 {{REVISIONDAY:{{PAGENAME}}}}
10945 flags=vary-revision-timestamp
10949 Parser Function: {{REVISIONMONTH:{{PAGENAME}}}} on latest revision
10952 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10955 {{REVISIONMONTH:{{PAGENAME}}}}
10959 flags=vary-revision-timestamp
10963 Parser Function: {{REVISIONYEAR:{{PAGENAME}}}} on latest revision
10966 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10969 {{REVISIONYEAR:{{PAGENAME}}}}
10973 flags=vary-revision-timestamp
10977 Parser Function: {{PAGESIZE:{{PAGENAME}}}} on latest revision
10980 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10983 {{PAGESIZE:{{PAGENAME}}}}
10987 flags=vary-revision-sha1
10991 Magic Word: {{SCRIPTPATH}}
10993 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11000 Magic Word: {{STYLEPATH}}
11002 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11011 Magic Word: {{SERVER}}
11013 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11017 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
11022 Magic Word: {{SERVERNAME}}
11024 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11033 Magic Word: {{SITENAME}}
11035 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11044 Magic Word: {{PAGELANGUAGE}}
11047 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11056 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
11058 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11067 Case-sensitive magic words, when cased differently, should just be template transclusions
11074 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
11075 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
11076 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
11077 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
11082 Case-insensitive magic words should still work with weird casing.
11092 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
11096 # From plwiki:PLOS_ONE
11098 Parsoid: Page property magic word with magic word contents
11102 wgAllowDisplayTitle=true
11103 wgRestrictDisplayTitle=false
11105 {{DISPLAYTITLE:''{{PAGENAME}}''}}
11110 <meta property="mw:PageProp/displaytitle" content="Parser test" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"DISPLAYTITLE:<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Parser test</span></i>"}]]}'/>
11113 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
11114 # But, this is a limitation of our representation and is documented in
11115 # TemplateHandler.js in processSpecialMagicWord
11117 Parsoid: Template-generated DISPLAYTITLE
11119 {{{{echo|DISPLAYTITLE}}:Foo}}
11123 wgAllowDisplayTitle=true
11124 wgRestrictDisplayTitle=false
11129 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:ExpandedAttrs" data-parsoid='{"pi":[[]]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DISPLAYTITLE\"}},\"i\":0}}]}'>DISPLAYTITLE</span>:Foo"}]]}'/>
11133 Namespace 1 {{ns:1}}
11142 Namespace 1 {{ns:01}}
11151 Namespace 0 {{ns:0}} (T6783)
11158 Namespace 0 {{ns:00}} (T6783)
11165 Namespace -1 {{ns:-1}}
11174 Namespace User {{ns:User}}
11183 Namespace User talk {{ns:User_talk}}
11192 Namespace User talk {{ns:uSeR tAlK}}
11201 Namespace File {{ns:File}}
11210 Namespace File {{ns:Image}}
11219 Namespace (lang=de) Benutzer {{ns:User}}
11230 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11236 <p>Benutzer Diskussion
11243 {{urlencode:hi world?!}}
11244 {{urlencode:hi world?!|WIKI}}
11245 {{urlencode:hi world?!|PATH}}
11246 {{urlencode:hi world?!|QUERY}}
11256 Magic Word: prioritize type info over data-parsoid
11260 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11266 Magic Word: serialize on separate line (parsoid)
11268 parsoid=wt2wt,html2wt
11274 foo<meta property="mw:PageProp/notoc"/>bar
11278 Magic Word: rt non-english wikis
11285 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11289 __proto__ is treated as normal wikitext (T105997)
11301 Magic links: internal link to RFC (T2479)
11305 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11308 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11312 Magic links: RFC (T2479)
11316 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11319 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11323 Magic links: RFC (T67278)
11325 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11327 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
11330 <p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
11334 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11336 RFC      822
11340 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11345 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 822</a>
11351 Magic links: ISBN (T3937)
11355 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11358 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11362 Magic links: ISBN (T67278)
11364 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11366 <p>This is <a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11369 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
11373 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11375 ISBN      978 0 316 09811 3
11381 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11388 <p><a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 978<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>0<span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>316<span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span>09811<span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>3</a>
11396 Magic links: PMID incorrectly converts space to underscore
11400 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11403 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11407 Magic links: PMID (T67278)
11409 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11411 <p>This is <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.
11414 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
11418 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11420 PMID      1234
11424 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11429 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 1234</a>
11434 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11435 # since these are ExtLinkText, not MagicLinkText
11437 Magic links: use appropriate serialization for "almost" magic links.
11439 X[[Special:BookSources/0978739256|foo]]
11441 X[https://tools.ietf.org/html/rfc1234 foo]
11443 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11444 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11447 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11448 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11452 Magic links: All disabled (T47942)
11454 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11460 <p>ISBN 0-306-40615-2
11471 Nonexistent template
11473 {{thistemplatedoesnotexist}}
11475 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11480 Template with invalid target containing tags
11482 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11484 <p>{{a<b>b</b>|foo|a=b|a = b}}
11489 Template with invalid target containing unclosed tag
11491 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11493 <p>{{a<b>|foo|a=b|a = b}}</b>
11498 Template with invalid target containing wikilink
11502 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11505 <p><span typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"[[Main Page]]"},"params":{},"i":0}}]}'>{{</span><a rel="mw:WikiLink" href="./Main_Page" about="#mwt1">Main Page</a><span about="#mwt1">}}</span></p>
11509 Template with just whitespace in it, T70421
11513 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</p>
11519 This is a test template
11527 <p>This is a test template
11532 Template with explicit namespace
11536 <p>This is a test template
11544 This is a test template with parameter {{{param}}}
11550 {{paramtest|param=foo}}
11552 <p>This is a test template with parameter foo
11557 Template:paramtestnum
11559 [[{{{1}}}|{{{2}}}]]
11563 Template unnamed parameter
11565 {{paramtestnum|Main Page|the main page}}
11567 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11572 Template:templatesimple
11578 Template:templateredirect
11580 #redirect [[Template:templatesimple]]
11584 Template:templateasargtestnum
11590 Template:templateasargtest
11592 {{template{{{templ}}}}}
11596 Template:templateasargtest2
11602 Template with template name as unnamed argument
11604 {{templateasargtestnum|templatesimple}}
11611 Template with template name as argument
11613 {{templateasargtest|templ=simple}}
11620 Template with template name as argument (2)
11622 {{templateasargtest2|templ=templatesimple}}
11629 Template:templateasargtestdefault
11631 {{{{{templ|templatesimple}}}}}
11641 Template with default value
11643 {{templateasargtestdefault}}
11650 Template with default value (value set)
11652 {{templateasargtestdefault|templ=templa}}
11661 {{templateredirect}}
11666 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11670 Template with argument in separate line
11672 {{ templateasargtest |
11680 Template with complex template as argument
11683 param ={{ templateasargtest |
11684 templ = simple }}}}
11686 <p>This is a test template with parameter (test)
11691 Templates with templated name
11693 {{{{echo|echo}}|foo}}
11694 {{{{echo|inner list}} }}
11698 <ul><li>item 1</li></ul>
11700 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|echo}}","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
11701 <ul about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|inner list}} ","href":"./Template:Inner_list"},"params":{},"i":0}}]}'><li>item 1</li></ul>
11704 ## Regression test; the output here isn't really that interesting.
11706 Templates with templated name and top level template args
11708 {{1{{2{{{3}}}|4=5}}}}
11710 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1{{2{{{3}}}|4=5}}"},"params":{},"i":0}}]}'>{{1{{2{{{3}}}|4=5}}}}</p>
11713 # Parsoid markup is deliberate "broken". This is an edge case.
11714 # See long comment in TemplateHandler.js:convertAttribsToString.
11716 Templates with invalid templated targets
11727 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11732 Template with thumb image (with link in description)
11734 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11736 This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
11738 <p>This is a test template with parameter </p><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
11740 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"paramtest","href":"./Template:Paramtest"},"params":{"param":{"wt":"[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]"}},"i":0}}]}'>This is a test template with parameter </p><figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" about="#mwt1" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Noimage.png"><span resource="./File:Noimage.png" data-width="220">File:Noimage.png</span></a><figcaption><a rel="mw:WikiLink" href="./No_link" title="No link">link</a> <a rel="mw:WikiLink" href="./No_link" title="No link">caption</a></figcaption></figure>
11744 Template:complextemplate
11746 {{{1}}} {{paramtest|
11747 param ={{{param}}}}}
11751 Template with complex arguments
11754 param ={{ templateasargtest |
11755 templ = simple }}|[[Template:complextemplate|link]]}}
11757 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11762 T2553: link with two variables in a piped link
11765 |[[{{{1}}}|{{{2}}}]]
11770 <td>[[{{{1}}}|{{{2}}}]]
11774 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{},"i":0}}]}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"2"},"params":{},"i":0}}]}'>{{{2}}}</span>]]</td></tr>
11780 Abort table cell attribute parsing on wikilink
11783 |testing [[one|two]] |three||four
11784 |testing one two |three||four
11785 |testing="[[one|two]]" |three||four
11790 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11796 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11801 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> |three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td>
11802 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'>three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td>
11803 <td>testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" |three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td></tr>
11808 Don't abort table cell attribute parsing if wikilink is found in template arg
11811 |Test {{#tag:ref|One two "[[three]]" four}}
11815 <tbody><tr><td>Test <ref about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:ref","function":"tag"},"params":{"1":{"wt":"One two \"[[three]]\" four"}},"i":0}}]}'>One two "<a rel="mw:WikiLink" href="./Three" title="Three">three</a>" four</ref></td></tr>
11820 Magic variable as template parameter
11822 {{paramtest|param={{SITENAME}}}}
11824 <p>This is a test template with parameter MediaWiki
11831 [[{{{param}}}|link]]
11835 Template parameter as link source
11837 {{linktest|param=Main Page}}
11839 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11844 Template:paramtest2
11846 including another template, {{paramtest|param={{{arg}}}}}
11850 Template passing argument to another template
11852 {{paramtest2|arg='hmm'}}
11854 <p>including another template, This is a test template with parameter 'hmm'
11865 Template as link source
11869 [[{{linktest2}}|Main Page]]
11871 [[{{linktest2}}]]Page
11873 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11874 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11875 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11893 Template infinite loop
11897 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11902 Template from main namespace
11911 Template from non-includable namespace
11913 wgNonincludableNamespaces=10
11917 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11932 T2529: Template with table, not included at beginning of line
11950 T2523: Template shouldn't eat newline (or add an extra one before table)
11969 T2041: Template parameters shown as broken links
11978 Template with targets containing wikilinks
11984 {{[[{{echo|foo}}]]}}
11986 {{{{echo|[[foo}}]]}}
11988 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11989 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11993 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11994 <p>{{<a typeof="mw:ExpandedAttrs" rel="mw:WikiLink" href="./Foo" title="Foo" data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>"}]]}'>foo</a>}}</p>
11995 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
12005 Templates: Double quotes as template target
12012 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
12016 ## This test is about making sure Parsoid's data-mw is well formed in the
12017 ## face of multiple templates with intersecting and overlapping ranges. The
12018 ## wikitext itself is wretched.
12020 Templates with intersecting and overlapping ranges
12031 </table><p>ho</p><table>
12035 </td></tr></tbody></table>
12037 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]],"firstWikitextNode":"table"}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ha</p>"}},"i":0}},"\n","{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ho</p>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}}hi"}},"i":2}},"\n|}"]}'>ha</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
12039 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
12041 <tbody><tr><td>hi</td></tr>
12046 Template:MSGNW test
12048 ''None'' of '''this''' should be
12050 but rather passed unmodified
12058 # hmm, fix this or just deprecate msgnw and document its behavior?
12062 {{msgnw:MSGNW test}}
12064 <p>''None'' of '''this''' should be
12066  but rather passed unmodified
12067 {{test}}
12071 <!-- comment -->
12078 {{int:youhavenewmessages|lots of money|not!}}
12080 <p>You have lots of money (not!).
12085 int keyword - non-existing message
12096 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
12100 <includeonly> and <noinclude> being included
12111 <onlyinclude>Foo</onlyinclude>bar
12115 <onlyinclude> being included
12127 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
12131 <onlyinclude> and <includeonly> being included
12139 # FIXME: Parsoid's markup for this is quite ugly.
12141 <includeonly> and <noinclude> on a page
12143 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
12148 <p>Foo<meta typeof="mw:Includes/NoInclude" data-parsoid="{}"/>zar</p><meta typeof="mw:Includes/NoInclude/End" data-parsoid="{}"/><meta typeof="mw:Includes/IncludeOnly" data-mw='{"src":"<includeonly>bar</includeonly>"}' data-parsoid="{}"/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid="{}"/>
12152 Un-closed <noinclude>
12159 <onlyinclude> on a page
12161 <onlyinclude>Foo</onlyinclude>bar
12168 Un-closed <onlyinclude>
12175 Self-closed noinclude, includeonly, onlyinclude tags
12186 Unbalanced includeonly and noinclude tags
12190 |b</noinclude></noinclude>
12191 |c</noinclude></includeonly>
12192 |d</includeonly></includeonly>
12201 <td>c</includeonly>
12203 <td>d</includeonly></includeonly>
12208 Template:Includeonly section
12211 ==Includeonly section==
12217 T8563: Edit link generation for section shown by <includeonly>
12219 {{includeonly section}}
12221 <h2><span class="mw-headline" id="Includeonly_section">Includeonly section</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-1" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12222 <h2><span class="mw-headline" id="Section_T-1">Section T-1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-2" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12225 # Uses same input as the contents of [[Template:Includeonly section]]
12227 T8563: Section extraction for section shown by <includeonly>
12232 ==Includeonly section==
12240 T8563: Edit link generation for section suppressed by <includeonly>
12243 ==Includeonly section==
12247 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12251 T8563: Section extraction for section suppressed by <includeonly>
12256 ==Includeonly section==
12264 Un-closed <includeonly>
12269 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}' data-mw='{"src":"<includeonly>"}'/>
12272 ## We used to, but no longer wt2wt this test since the default serializer
12273 ## will normalize the include directives to serialize on their own line.
12274 ## Selser will take care of preserving formatting in scenarios where they
12275 ## intermingled with other wikitext.
12277 Includes and comments at SOL
12279 parsoid=wt2html,html2html
12281 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12289 some</noinclude>* stuff
12292 <includeonly>can have stuff</includeonly>===here===
12295 <h2><span class="mw-headline" id="hu">hu</span></h2>
12303 <ul><li>here</li></ul>
12304 <h3><span class="mw-headline" id="here">here</span></h3>
12306 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment --><h2 id="hu">hu</h2>
12308 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12310 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12313 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12314 <p>some<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>* stuff</p>
12315 <ul><li>here</li></ul>
12317 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}' data-mw='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3 id="here">here</h3>
12320 # TODO: test with DOM fragment reuse!
12322 Parsoid: DOM fragment reuse
12324 parsoid=wt2wt,wt2html
12326 a{{echo|b<table></table>c}}d
12338 <p>ab</p><table></table><p>cd
12349 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b<table></table>c"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
12351 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b\n<table></table>\nc"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><span about="#mwt2">
12352 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12353 </span><p about="#mwt2">cd</p>
12355 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n\n<table></table>\n\nb"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>a</p><span about="#mwt3">
12357 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12359 </span><p about="#mwt3">b</p>
12363 Parsoid: Merge double tds (T52603)
12366 |{{echo|{{!}} foo}}
12372 </td></tr></tbody></table>
12375 <tr><td about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":0}}]}'> foo</td></tr>
12380 Parsoid: Merge double tds in nested transclusion content (T52603)
12384 |{{echo|{{!}} foo}}
12392 </td></tr></tbody></table>
12395 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\n{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":1}},"\n|}\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}'>
12397 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12403 ### <includeonly> and <noinclude> in attributes
12406 0. includeonly around the entire attribute
12408 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12410 <p><span id="v2">bar</span>
12415 1. includeonly in html attr key
12417 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12419 <p><span id="foo">bar</span>
12424 2. includeonly in html attr value
12426 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12427 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12429 <p><span id="v1">bar</span>
12430 <span id="v1">bar</span>
12435 3. includeonly in part of an attr value
12437 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12439 <p><span style="color:red;">bar</span>
12444 4. includeonly in table attributes
12467 ### Preprocessor precedence tests
12468 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12470 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12472 Preprocessor precedence 1: link is rightmost opening
12478 But close-brace is not a valid character in a link title:
12481 However, we can still tell this was handled as a link in the preprocessor:
12482 {{echo|[[Foo}}|bar]]|bat}}
12484 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12485 </p><p>But close-brace is not a valid character in a link title:
12487 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12491 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12492 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12493 <p>However, we can still tell this was handled as a link in the preprocessor: <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo}}|bar]]"},"2":{"wt":"bat"}},"i":0}}]}'>[[Foo}}|bar]]</span></p>
12497 Preprocessor precedence 2: template is rightmost opening
12506 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12510 Preprocessor precedence 3: language converter is rightmost opening
12526 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12527 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12528 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12532 Preprocessor precedence 4: left-most angle bracket
12543 Template:Precedence5
12549 Preprocessor precedence 5: tplarg takes precedence over template
12551 {{Precedence5|Bullet}}
12553 <ul><li>Bar</li></ul>
12555 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12559 Preprocessor precedence 6: broken link is rightmost opening
12565 {{echo|[[Foo|bar|bat=baz}}
12568 </p><p>{{echo|[[Foo|bar|bat=baz}}
12571 <p>{{echo|[[Foo}}</p>
12572 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12575 # This next test exposes a difference between PHP and Parsoid:
12576 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12577 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12578 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12579 # outer `[[Foo` extends until the `y]]`
12580 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12581 # intermediate result (after template expansion), and link processing
12582 # happens on this intermediate result, which moves the wikilink
12583 # boundary leftward to `[[Foo|Bar]]`
12584 # 2b) Parsoid works in a single step, so it's going to keep the
12585 # wikilink as extending to the `y]]`
12586 # 3a) Then PHP does linktrail processing which slurps up the trailing
12587 # `xy` inside the link.
12588 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12589 # `z` inside the link.
12590 # This is "correct" behavior. Parsoid's basic worldview is that the
12591 # `]]` inside the template shouldn't be allowed to leak out to affect
12592 # the surrounding wikilink. PHP may match Parsoid (in the future)
12593 # if you use {{#balance}} (T114445).
12596 Preprocessor precedence 7: broken template is rightmost opening
12602 [[Foo|{{echo|Bar]]-x}}-y]]-z
12604 Careful: linktrails can move the end of the wikilink:
12605 [[Foo|{{echo|y']]a}}l]]l
12607 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12608 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12609 </p><p>Careful: linktrails can move the end of the wikilink:
12610 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12613 <p>[[Foo|{{echo|Bar]]</p>
12614 <p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar]]-x"}},"i":0}}]}'>Bar]]-x</span>-y</a>-z</p>
12615 <p>Careful: linktrails can move the end of the wikilink:
12616 <a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"y']]a"}},"i":0}}]}'>y']]a</span>ll</a></p>
12620 Preprocessor precedence 8: broken language converter is rightmost opening
12631 Template:Preprocessor_precedence_9
12636 ;7: {{{{{{{4}}}}}}}
12640 Preprocessor precedence 9: groups of braces
12642 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12648 <ul><li>Bar</li></ul>
12652 <dd>{Bullet}</dd></dl>
12654 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 9","href":"./Template:Preprocessor_precedence_9"},"params":{"1":{"wt":"Four"},"2":{"wt":"Bullet"},"3":{"wt":"1"},"4":{"wt":"2"}},"i":0}}]}'>
12659 </dl><ul about="#mwt1">
12661 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12670 Template:Preprocessor_precedence_10
12677 ;6: -{{{{{{4}}}}}}-
12678 ;7: -{{{{{{{5}}}}}}}-
12682 Preprocessor precedence 10: groups of braces with leading dash
12686 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12692 <ul><li>Bar-</li></ul>
12699 <ul><li>Bar-</li></ul>
12705 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 10","href":"./Template:Preprocessor_precedence_10"},"params":{"1":{"wt":"Three"},"2":{"wt":"raw2"},"3":{"wt":"Bullet"},"4":{"wt":"1"},"5":{"wt":"2"}},"i":0}}]}'>
12707 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12710 </dl><ul about="#mwt1">
12712 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12716 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12719 </dl><ul about="#mwt1">
12721 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12725 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12730 Preprocessor precedence 11: found during visual diff testing
12732 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12734 {{echo|-{{echo|-{{echo|x}}}}}}
12736 {{echo|-{{echo|x}}}}
12738 <p><span>-<span>-x</span></span>
12743 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"#tag:span","function":"tag"},"params":{"1":{"wt":"-{{#tag:span|-{{echo|x}}}}"}},"i":0}}]}'>-<span>-x</span></span></p>
12745 <p about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|-{{echo|x}}}}"}},"i":0}}]}'>--x</p>
12747 <p about="#mwt7" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|x}}"}},"i":0}}]}'>-x</p>
12751 Preprocessor precedence 12: broken language converter closed by brace.
12755 This form breaks the template, which is unfortunate:
12756 *{{echo|foo-{bar}bat}}
12758 But if the broken language converter markup is inside an extension
12759 tag, nothing bad happens:
12760 *<nowiki>foo-{bar}bat</nowiki>
12761 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12762 *<pre>foo-{bar}bat</pre>
12763 *{{echo|<pre>foo-{bar}bat</pre>}}
12765 <tag>foo-{bar}bat</tag>
12766 {{echo|<tag>foo-{bar}bat</tag>}}
12769 <p>This form breaks the template, which is unfortunate:
12771 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12772 <p>But if the broken language converter markup is inside an extension
12773 tag, nothing bad happens:
12775 <ul><li>foo-{bar}bat</li>
12776 <li>foo-{bar}bat</li>
12777 <li><pre>foo-{bar}bat</pre></li>
12778 <li><pre>foo-{bar}bat</pre></li></ul>
12779 <pre>'foo-{bar}bat'
12783 <pre>'foo-{bar}bat'
12788 <p>This form breaks the template, which is unfortunate:</p>
12790 <li>{{echo|foo-{bar}bat}}</li>
12792 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12794 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12795 <li><span typeof="mw:Nowiki mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>foo-{bar}bat</nowiki>"}},"i":0}}]}'>foo-{bar}bat</span></li>
12796 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12797 <li><pre typeof="mw:Extension/pre mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre>foo-{bar}bat</pre>"}},"i":0}}]}'>foo-{bar}bat</pre></li>
12799 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'></pre> <pre typeof="mw:Extension/tag mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tag>foo-{bar}bat</tag>"}},"i":0}}]}'></pre>
12803 Preprocessor precedence 13: broken language converter in external link
12807 *[http://example.com/-{foo Example in URL]
12808 *[http://example.com Example in -{link} description]
12809 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12811 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12812 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12813 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12816 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12817 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12818 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12823 Preprocessor precedence 14: broken language converter in comment
12825 *<!--{{foo}}-->...should be ok
12826 *<!---{{foo}}-->...extra dashes
12827 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12829 <ul><li>...should be ok</li>
12830 <li>...extra dashes</li>
12831 <li>foobat...should be ok</li></ul>
12834 <li><!--{{foo}}-->...should be ok</li>
12835 <li><!---{{foo}}-->...extra dashes</li>
12836 <li><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<!-- -{bar} -->bat"}},"i":0}}]}'>foo</span><span about="#mwt1"><!-- -{bar} --></span><span about="#mwt1">bat</span>...should be ok</li>
12841 Preprocessor precedence 15: broken brace markup in headings
12843 wgFragmentMode=[ 'html5', 'legacy' ]
12847 __NOTOC__ __NOEDITSECTION__
12856 ===5 foo{{{bar 5===
12861 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12864 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12867 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12870 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12873 <h3><span id="5_foo.7B.7B.7Bbar_5"></span><span class="mw-headline" id="5_foo{{{bar_5">5 foo{{{bar 5</span></h3>
12876 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12880 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12881 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12883 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12885 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12887 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12889 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12891 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12896 Preprocessor precedence 16: matching closing braces to opening braces
12901 -{{{echo|foo}}bar}-
12906 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>bar"}}'></span></p>
12910 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12919 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12922 # Ensure we're using a language without variants for this test; even
12923 # if $wgUsePigLatinVariant is true. We've picked `de` arbitrarily.
12925 Preprocessor precedence 18: another rightmost wins scenario
12930 {{ -{{{{1|tplarg}}} }} }-
12932 <p>{{ -{tplarg }} }-
12935 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12939 Preprocessor precedence 19: break syntax
12952 ### Token Stream Patcher tests
12954 ### These tests won't always pass wt2wt and other modes because
12955 ### on serialization, the table will be output on a new line.
12956 ### For now, we are blacklisting them, and using this to test selser.
12960 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12962 parsoid=wt2html,wt2wt
12964 {{echo|}}{| width = '100%'
12968 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12969 <tbody><tr><td>foo</td></tr>
12973 ## We used to, but no longer wt2wt this test since the default serializer
12974 ## will normalize the include directives to serialize on their own line.
12975 ## Selser will take care of preserving formatting in scenarios where they
12976 ## intermingled with other wikitext.
12978 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12982 <includeonly>a</includeonly>{| {{{b}}}
12986 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}' data-mw='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[31,38,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"b\"},\"params\":{},\"i\":0}}]}'>{{{b}}}</span>"},{"html":""}]]}'>
12987 <tbody><tr><td>c</td></tr>
12992 Table wikitext syntax outside wiki-tables
12996 ! not a table heading
12999 | class="foo bar" | baz
13007 ! not a table heading
13010 | class="foo bar" | baz
13019 ### Testing parsing of templates where a template arg
13020 ### has the same name as the template itself.
13026 {{{quote|{{{1}}}}}}
13030 Templates: Template Name/Arg clash: 1. Use of positional param
13039 Templates: Template Name/Arg clash: 2. Use of named param
13041 {{quote|quote=foo}}
13048 Templates: Template Name/Arg clash: 3. Use of named param with empty input
13057 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
13061 Templates: 1. Simple use
13070 Templates: 2. Inside a block tag
13072 <div>{{echo|Foo}}</div>
13073 <blockquote>{{echo|Foo}}</blockquote>
13076 <blockquote>Foo</blockquote>
13079 <blockquote><p>Foo</p></blockquote>
13083 Templates: P-wrapping: 1a. Templates on consecutive lines
13094 Templates: P-wrapping: 1b. Templates on consecutive lines
13108 Templates: P-wrapping: 1c. Templates on consecutive lines
13111 {{echo|bar}} <div>baz</div>
13119 bar </p><div>baz</div>
13123 Templates: P-wrapping: 1d. Template preceded by comment-only line
13133 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
13137 Templates: Scopes should not be expanded unnecessarily
13139 parsoid=wt2html,wt2wt
13141 {{echo|<div>a</div>}}b{{echo|
13147 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>a</div>"}},"i":0}}]}'>a</div><p>b</p><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<div>c</div>"}},"i":0}}]}'>
13148 </span><div about="#mwt2">c</div>
13152 Templates: Inline Text: 1. Multiple template uses
13154 {{echo|Foo}}bar{{echo|baz}}
13161 Templates: Inline Text: 2. Back-to-back template uses
13163 {{echo|Foo}}{{echo|bar}}
13170 Templates: Block Tags: 1. Multiple template uses
13172 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
13174 <div>Foo</div><div>bar</div><div>baz</div>
13178 Templates: Block Tags: 2. Back-to-back template uses
13180 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
13182 <div>Foo</div><div>bar</div>
13185 ## Parsoid drops empty elements in templates.
13187 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
13194 b</p><p class="mw-empty-elt"></p>
13196 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\nb</p>"}},"i":0}}]}'>a</p><span about="#mwt1">
13197 </span><p about="#mwt1">b</p>
13201 Templates: Links: 1. Simple example
13203 {{echo|[[Foo|bar]]}}
13205 <p><a href="/wiki/Foo" title="Foo">bar</a>
13210 Templates: Links: 2. Generation of link href
13212 [[{{echo|Foo}}|bar]]
13214 <p><a href="/wiki/Foo" title="Foo">bar</a>
13219 Templates: Links: 3. Generation of part of a link href
13221 [[Fo{{echo|o}}|bar]]
13223 [[Foo{{echo|bar}}]]
13225 [[Foo{{echo|bar}}baz]]
13227 [[Foo{{echo|bar}}|bar]]
13229 [[:Foo{{echo|bar}}]]
13231 [[:Foo{{echo|bar}}|bar]]
13233 <p><a href="/wiki/Foo" title="Foo">bar</a>
13234 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13235 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
13236 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13237 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13238 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13243 Templates: Links: 4. Multiple templates generating link href
13245 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
13247 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13252 Templates: Links: 5. Generation of link text
13254 [[Foo|{{echo|bar}}]]
13256 <p><a href="/wiki/Foo" title="Foo">bar</a>
13261 Templates: Links: 5. Nested templates (only outermost template should be marked)
13263 {{echo|[[{{echo|Foo}}|bar]]}}
13265 <p><a href="/wiki/Foo" title="Foo">bar</a>
13270 File with template filename
13272 [[File:{{echo|Foobar.jpg}}]]
13274 <p><figure-inline class="mw-default-size" typeof="mw:Image mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"href"},{"html":"File:<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[7,26,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foobar.jpg\"}},\"i\":0}}]}'>Foobar.jpg</span>"}]]}'><a href="./File:Foobar.jpg"><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":"File:{{echo|Foobar.jpg}}"}}'/></a></figure-inline></p>
13278 Templates: HTML Tag: 1. Generation of HTML attr. key
13280 <div {{echo|style}}="color:red;">foo</div>
13282 <div style="color:red;">foo</div>
13286 Templates: HTML Tag: 2. Generation of HTML attr. value
13288 <div style={{echo|'color:red;'}}>foo</div>
13290 <div style="color:red;">foo</div>
13294 Templates: HTML Tag: 3. Generation of HTML attr key and value
13296 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13298 <div style="color:red;">foo</div>
13302 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13304 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13306 <div title="This is a long title with just one piece templated">foo</div>
13310 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13312 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13314 <div title="This is a long title with just one piece templated">foo</div>
13318 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13320 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13322 <div title="This is a long title with just one piece templated">foo</div>
13325 # SSS FIXME: While it is great we added support for all this,
13326 # do we want to make this part of the spec? Maybe we want to
13327 # deprecate this kind of usage in the future?
13329 Templates: HTML Tag: 7. Generation of partial attribute key string
13331 <div st{{echo|yle}}="color:red;">foo</div>
13333 <div style="color:red;">foo</div>
13337 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13339 <div {{echo|1=id="v1"}}>bar</div>
13341 <div id="v1">bar</div>
13345 Templates: HTML Tag: 9. Multiple template-generated attributes
13347 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13349 <div id="v1" title="foo">bar</div>
13353 Templates: Support for templates generating attributes and content
13355 {| {{mixed_attr_content_template}}
13360 <table style="color:red;" title="T48811">
13369 <table style="color:red;" title="T48811" about="#mwt1" typeof="mw:Transclusion mw:ExpandedAttrs" data-mw='{"parts":["{| ",{"template":{"target":{"wt":"mixed_attr_content_template","href":"./Template:Mixed_attr_content_template"},"params":{},"i":0}},"\n|-\n|bar\n|}"]}'>
13378 Template:attribute_from_template
13384 Table cell with attribute before expanded attribute
13387 | align="center" {{attribute_from_template}} |456
13391 <tbody><tr><td align="center" class="123" about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"class","html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[20,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"attribute_from_template\",\"href\":\"./Template:Attribute_from_template\"},\"params\":{},\"i\":0}}]}'>class=\"123\"</span>"},{"html":""}]]}'>456</td></tr>
13396 1. Entities and nowikis inside templated attributes should be handled correctly
13398 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13400 <div style="background:#f9f9f9;">foo</div>
13402 <div style="background:#f9f9f9;" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html"}' data-mw='{"attribs":[[{"txt":"style","html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[5,49,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"style{{=}}\\\"background:&amp;#35;f9f9f9;\\\"\"}},\"i\":0}}]}'>style</span><span typeof=\"mw:Nowiki\" about=\"#mwt1\" data-parsoid=\"{}\">=</span><span about=\"#mwt1\" data-parsoid=\"{}\">\"background:</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#35;\",\"srcContent\":\"#\"}'>#</span><span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"</span>"},{"html":""}]]}'>foo</div>
13406 2. Entities and nowikis inside templated attributes should be handled correctly
13409 |{{table_attribs_3}}
13414 <td style="background:#f9f9f9;">Foo
13418 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":0}}]}'>Foo</td></tr>
13423 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13426 |{{table_attribs_3}}
13431 <td style="background:#f9f9f9;">Foo
13434 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":1}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":2}}]}'>
13435 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13441 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13444 |{{table_attribs_6}} hi
13449 <td style="background: red;">hi
13453 <tbody><tr><td style="background: red;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_6","href":"./Template:Table_attribs_6"},"params":{},"i":0}}," hi"]}'> hi</td></tr>
13458 Templates: HTML Tables: 1. Generating start of a HTML table
13460 {{echo|<table><tr><td>foo</td>}}</tr></table>
13462 <table><tr><td>foo</td></tr></table>
13466 Templates: HTML Tables: 2a. Generating middle of a HTML table
13468 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13470 <table><tr><td>foo</td></tr></table>
13474 Templates: HTML Tables: 2b. Generating middle of a HTML table
13476 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13478 <table><tr><td>foo</td></tr></table>
13482 Templates: HTML Tables: 3. Generating end of a HTML table
13484 <table><tr>{{echo|<td>foo</td></tr></table>}}
13486 <table><tr><td>foo</td></tr></table>
13490 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13492 {{echo|<table>}}<tr><td>foo</td></tr></table>
13494 <table><tr><td>foo</td></tr></table>
13498 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13500 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13502 <table><tr><td>foo</td></tr></table>
13506 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13508 <table><tr>{{echo|<td>}}foo</td></tr></table>
13510 <table><tr><td>foo</td></tr></table>
13514 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13516 <table><tr><td>foo{{echo|</td>}}</tr></table>
13518 <table><tr><td>foo</td></tr></table>
13522 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13524 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13526 <table><tr><td>foo</td></tr></table>
13530 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13532 <table><tr><td>foo</td></tr>{{echo|</table>}}
13534 <table><tr><td>foo</td></tr></table>
13538 Templates: HTML Tables: 5. Proper fostering of categories from inside
13540 parsoid=wt2html,wt2wt
13542 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13543 <!--Two categories (T52330)-->
13544 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13546 <table><tbody><tr><td>foo</td></tr></tbody></table>
13547 <table><tbody><tr><td>foo</td></tr></tbody></table>
13549 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13550 <!--Two categories (T52330)-->
13551 <link rel="mw:PageProp/Category" href="./Category:Bar1"><link rel="mw:PageProp/Category" href="./Category:Bar2"><table><tbody><tr><td>foo</td></tr></tbody></table>
13554 ## Remex doesn't account for fostered content.
13556 Templates: Wiki Tables: 1a. Fostering of entire template content
13564 <tr><td></td></tr></table>
13568 <table><tbody><tr><td></td></tr></tbody></table>
13570 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}},"\n|}"]}'>a</p><table about="#mwt2">
13576 Templates: Wiki Tables: 1b. Fostering of entire template content
13589 <tr><td></td></tr></table>
13596 <tbody><tr><td></td></tr></tbody></table>
13598 <div about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"stx":"html","fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\nfoo\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":1}},"\n|}"]}'>
13600 </div><table about="#mwt3">
13605 ## Remex doesn't account for fostered content.
13607 Templates: Wiki Tables: 2. Fostering of partial template content
13617 <tr><td></td></tr></table>
13621 <div>b</div><table>
13622 <tbody><tr><td></td></tr></tbody></table>
13624 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n<div>b</div>"}},"i":0}},"\n|}"]}'>a</p><div about="#mwt2">b</div><table about="#mwt2">
13631 Templates: Wiki Tables: 3. td-content via multiple templates
13634 {{echo|{{pipe}}a}}{{echo|b}}
13644 Templates: Wiki Tables: 4. Templated tags, no content
13650 <tr><td></td></tr></table>
13654 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13667 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13679 ## This test case is very specific to Parsoid's internals
13680 ## and is hence only tested for Parsoid's code. Parsoid uses
13681 ## a <meta> marker tag for <ref> tags and they are expanded
13682 ## much later. We are verifying that this <meta> tag usage
13683 ## doesn't prevent foster parenting.
13685 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13687 {{PartialTable}}<ref>foo</ref>
13692 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><sup about="#mwt3" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p><table about="#mwt2">
13696 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#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">foo</span></li></ol>
13700 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13710 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n{{{!}}\n{{!}}-"}},"i":0}},"\n<onlyinclude>\n|foo\n</onlyinclude>\n{{!}}}"]}'>
13711 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13715 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13720 Templates: Lists: Multi-line list-items via templates
13722 *{{echo|a {{nonexistent|
13724 *{{echo|b {{nonexistent|
13727 <ul><li>a <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li>
13728 <li>b <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li></ul>
13732 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13734 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13736 <p><i>ab</i>c<i>d</i>e
13741 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13742 (PHP parser generates misnested html)
13744 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13746 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"''a"}},"i":0}}]}"><i>a</i></span><i about="#mwt2" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"b''c''d"}},"i":0}},{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"''e"}},"i":1}}]}"><span>b</span></i><span about="#mwt2">c</span><i about="#mwt2">d<span></span></i><span about="#mwt2">e</span></p>
13750 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13751 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13753 parsoid=wt2html,wt2wt
13755 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13757 <div><i>a</i></div><div><i>b</i>c<i>d</i></div><div>e</div>
13759 <div about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"''a"}},"i":0}}]}"><i>a</i></div>
13760 <div about="#mwt2" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"b''c''d"}},"i":0}}]}"><i>b</i>c<i>d</i></div>
13761 <div about="#mwt3" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"''e"}},"i":0}}]}">e</div>
13765 Templates: Ugly nesting: 4. Divs opened/closed across templates
13767 a<div>b{{echo|c</div>d}}e
13771 <p>a</p><div>bc</div><p>de</p>
13775 Templates: Ugly templates: 3. newline-only template parameter
13784 # This looks like a bug: a single newline triggers p/br for some reason.
13786 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13795 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13796 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13798 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13804 <div about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>foo"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</table>"}},"i":2}}]}'>foo</div><span about="#mwt1">
13805 </span><table about="#mwt1">
13809 # T66017 -- ugly wikitext with fostered content generates two template ranges
13810 # that are "identical" and generate nesting cycles in the algorithm
13812 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13814 {{echo|<table><tr><td><table>}}
13818 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table><tr><td><table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>
13819 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13820 </table></td></tr></tbody></table>
13824 Templates: Parameters substituted at the top-level
13826 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13830 <p><i>who</i> me? <b>never!</b>
13834 <p about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"''who'' {{echo|me}}? '''never!'''"}},"i":0}}]}'><i>who</i> me? <b>never!</b></p>
13836 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13840 Templates: Param with empty arg in the final position
13844 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13848 Parser Functions: 1. Simple example
13857 Parser Functions: 2. Nested use (only outermost should be marked up)
13865 ## Note that the templates inside the references are not wrapped
13867 Template nested in extension tag in template
13869 title=[[Main Page]]
13872 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13873 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13874 {{echo|hi<ref>-{ho|{{echo|hi}}}-</ref>}}
13877 <p><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[[ho|{{echo|hi}}]]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup>
13878 <span about="#mwt8" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[http://test.com?q={{echo|ho}}]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt8" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-2"}}'><a href="./Main_Page#cite_note-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup>
13879 <span about="#mwt13" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>-{ho|{{echo|hi}}}-</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt13" class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-3"}}'><a href="./Main_Page#cite_note-3" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[3]</span></a></sup></p>
13880 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt17" 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"><a rel="mw:WikiLink" href="./Ho" title="Ho">hi</a></span></li><li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"><a rel="mw:ExtLink" class="external autonumber" href="http://test.com?q=ho"></a></span></li><li about="#cite_note-3" id="cite_note-3"><a href="./Main_Page#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text"><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["ho"],"t":"hi"}}'></span></span></li></ol>
13884 ### Pre-save transform tests
13888 pre-save transform: subst:
13894 This is a test template
13898 pre-save transform: normal template
13908 pre-save transform: nonexistent template
13912 {{thistemplatedoesnotexist}}
13914 {{thistemplatedoesnotexist}}
13918 pre-save transform: subst magic variables
13927 # This is T2089, which I fixed. -- wtm
13929 pre-save transform: subst: templates with parameters
13933 {{subst:paramtest|param="something else"}}
13935 This is a test template with parameter "something else"
13939 Template:nowikitest
13941 <nowiki>'''not wiki'''</nowiki>
13945 pre-save transform: nowiki in subst (T3188)
13949 {{subst:nowikitest}}
13951 <nowiki>'''not wiki'''</nowiki>
13955 Template:commenttest
13957 This template has <!-- a comment --> in it.
13961 pre-save transform: comment in subst (T3936)
13965 {{subst:commenttest}}
13967 This template has <!-- a comment --> in it.
13971 pre-save transform: unclosed tag
13975 <nowiki>'''not wiki'''
13977 <nowiki>'''not wiki'''
13981 pre-save transform: mixed tag case
13985 <NOwiki>'''not wiki'''</noWIKI>
13987 <NOwiki>'''not wiki'''</noWIKI>
13991 pre-save transform: unclosed comment in <nowiki>
13995 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13997 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
14000 # Leading @ in this template definition works around a limitation
14001 # in parsoid's parserTests which otherwise strips the <span> from the
14002 # result (confusing it for a template wrapper)
14006 @<span onmouseover="alert('crap')">Oh no</span>
14010 (confirming safety of fix for subst T3936)
14012 {{Template:dangerous}}
14014 <p>@<span>Oh no</span>
14019 pre-save transform: comment containing gallery (T7024)
14023 <!-- <gallery>data</gallery> -->
14025 <!-- <gallery>data</gallery> -->
14029 pre-save transform: comment containing extension
14033 <!-- <tag>data</tag> -->
14035 <!-- <tag>data</tag> -->
14039 pre-save transform: comment containing nowiki
14043 <!-- <nowiki>data</nowiki> -->
14045 <!-- <nowiki>data</nowiki> -->
14049 pre-save transform: <noinclude> in subst (T5298)
14059 pre-save transform: <onlyinclude> in subst (T5298)
14063 {{subst:Includes2}}
14071 {{<includeonly>subst:</includeonly>Includes}}
14075 Template:SafeSubstTest
14077 {{<includeonly>safesubst:</includeonly>Includes}}
14081 T24297: safesubst: works during PST
14085 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
14091 T24297: safesubst: works during normal parse
14100 subst: does not work during normal parse
14104 <p>{{subst:Includes}}
14109 pre-save transform: context links ("pipe trick")
14113 [[Article (context)|]]
14116 [[Bar:Article (context)|]]
14117 [[:Bar:Article (context)|]]
14119 [[|Article (context)]]
14123 [[Article (context)|Article]]
14124 [[Bar:Article|Article]]
14125 [[:Bar:Article|Article]]
14126 [[Bar:Article (context)|Article]]
14127 [[:Bar:Article (context)|Article]]
14129 [[Article (context)]]
14130 [[Bar:X (Y) Z|X (Y) Z]]
14131 [[:Bar:X (Y) Z|X (Y) Z]]
14135 pre-save transform: context links ("pipe trick") with interwiki prefix
14139 [[interwiki:Article|]]
14140 [[:interwiki:Article|]]
14141 [[interwiki:Bar:Article|]]
14142 [[:interwiki:Bar:Article|]]
14144 [[interwiki:Article|Article]]
14145 [[:interwiki:Article|Article]]
14146 [[interwiki:Bar:Article|Bar:Article]]
14147 [[:interwiki:Bar:Article|Bar:Article]]
14151 pre-save transform: context links ("pipe trick") with parens in title
14153 pst title=[[Somearticle (context)]]
14157 [[Article (context)|Article]]
14161 pre-save transform: context links ("pipe trick") with comma in title
14163 pst title=[[Someplace, Somewhere]]
14166 [[Otherplace, Elsewhere|]]
14167 [[Otherplace, Elsewhere, Anywhere|]]
14169 [[Otherplace, Somewhere|Otherplace]]
14170 [[Otherplace, Elsewhere|Otherplace]]
14171 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
14175 pre-save transform: context links ("pipe trick") with parens and comma
14177 pst title=[[Someplace (IGNORED), Somewhere]]
14180 [[Otherplace (place), Elsewhere|]]
14182 [[Otherplace, Somewhere|Otherplace]]
14183 [[Otherplace (place), Elsewhere|Otherplace]]
14187 pre-save transform: context links ("pipe trick") with comma and parens
14189 pst title=[[Who, me? (context)]]
14192 [[Me, Myself, and I (1937 song)|]]
14194 [[Yes, you. (context)|Yes, you.]]
14195 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
14199 pre-save transform: context links ("pipe trick") with namespace
14201 pst title=[[Ns:Somearticle]]
14205 [[Ns:Article|Article]]
14209 pre-save transform: context links ("pipe trick") with namespace and parens
14211 pst title=[[Ns:Somearticle (context)]]
14215 [[Ns:Article (context)|Article]]
14219 pre-save transform: context links ("pipe trick") with namespace and comma
14221 pst title=[[Ns:Somearticle, Context, Whatever]]
14225 [[Ns:Article, Context, Whatever|Article]]
14229 pre-save transform: context links ("pipe trick") with namespace, comma and parens
14231 pst title=[[Ns:Somearticle, Context (context)]]
14235 [[Ns:Article (context)|Article]]
14239 pre-save transform: context links ("pipe trick") with namespace, parens and comma
14241 pst title=[[Ns:Somearticle (IGNORED), Context]]
14245 [[Ns:Article, Context|Article]]
14249 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14253 [[Article(context)|]]
14254 [[Bar:Article(context)|]]
14255 [[:Bar:Article(context)|]]
14256 [[|Article(context)]]
14260 [[Article(context)|Article]]
14261 [[Bar:Article(context)|Article]]
14262 [[:Bar:Article(context)|Article]]
14263 [[Article(context)]]
14264 [[Bar:X(Y)Z|X(Y)Z]]
14265 [[:Bar:X(Y)Z|X(Y)Z]]
14269 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14273 [[Article (context)|]]
14274 [[Bar:Article (context)|]]
14275 [[:Bar:Article (context)|]]
14276 [[|Article (context)]]
14280 [[Article (context)|Article]]
14281 [[Bar:Article (context)|Article]]
14282 [[:Bar:Article (context)|Article]]
14283 [[Article (context)]]
14284 [[Bar:X (Y) Z|X (Y) Z]]
14285 [[:Bar:X (Y) Z|X (Y) Z]]
14289 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14293 [[Article(context)|]]
14294 [[Bar:Article(context)|]]
14295 [[:Bar:Article(context)|]]
14296 [[|Article(context)]]
14300 [[Article(context)|Article]]
14301 [[Bar:Article(context)|Article]]
14302 [[:Bar:Article(context)|Article]]
14303 [[Article(context)]]
14304 [[Bar:X(Y)Z|X(Y)Z]]
14305 [[:Bar:X(Y)Z|X(Y)Z]]
14309 pre-save transform: context links ("pipe trick") with commas (T23660)
14313 [[Article (context), context|]]
14314 [[Article (context),context|]]
14315 [[Bar:Article (context), context|]]
14316 [[Bar:Article (context),context|]]
14317 [[:Bar:Article (context), context|]]
14318 [[:Bar:Article (context),context|]]
14320 [[Article (context), context|Article]]
14321 [[Article (context),context|Article]]
14322 [[Bar:Article (context), context|Article]]
14323 [[Bar:Article (context),context|Article]]
14324 [[:Bar:Article (context), context|Article]]
14325 [[:Bar:Article (context),context|Article]]
14329 Parsoid: backwards pipe trick
14336 <p>[[|<b>bar</b>]]</p>
14340 pre-save transform: trim trailing empty lines
14344 Empty lines are trimmed
14350 Empty lines are trimmed
14354 pre-save transform: Signature expansion
14361 * <noinclude>~~~</noinclude>
14362 * <includeonly>~~~</includeonly>
14363 * <onlyinclude>~~~</onlyinclude>
14365 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14366 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14367 * 00:02, 1 January 1970 (UTC)
14368 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14369 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14370 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14375 ParserOutput flags from signature expansion (T84843)
14382 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14383 flags=user-signature
14388 pre-save transform: Signature expansion in nowiki tags (T2093)
14394 <nowiki>~~~~</nowiki>
14396 <includeonly><nowiki>~~~~</nowiki></includeonly>
14398 <noinclude><nowiki>~~~~</nowiki></noinclude>
14400 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14402 {{subst:Foo}} shall be converted to FOO
14404 As well as inside noinclude/onlyinclude
14405 <noinclude>{{subst:Foo}}</noinclude>
14406 <onlyinclude>{{subst:Foo}}</onlyinclude>
14408 But not inside includeonly
14409 <includeonly>{{subst:Foo}}</includeonly>
14413 <nowiki>~~~~</nowiki>
14415 <includeonly><nowiki>~~~~</nowiki></includeonly>
14417 <noinclude><nowiki>~~~~</nowiki></noinclude>
14419 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14421 FOO shall be converted to FOO
14423 As well as inside noinclude/onlyinclude
14424 <noinclude>FOO</noinclude>
14425 <onlyinclude>FOO</onlyinclude>
14427 But not inside includeonly
14428 <includeonly>{{subst:Foo}}</includeonly>
14432 Parsoid: Recognize nowiki with trailing space in tags
14436 <nowiki ><div>[[foo]]</nowiki >
14444 <p><div>[[foo]]
14445 </p><p>a<nowiki / >b
14447 </p><p>e<nowiki/ >f
14450 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14452 <p>a<nowiki / >b</p>
14454 <p>c<span typeof="mw:Nowiki"></span>d</p>
14456 <p>e<nowiki/ >f</p>
14460 Parsoid: Recognize nowiki with odd capitalization
14464 <noWikI ><div>[[foo]]</Nowiki >
14466 <p><div>[[foo]]
14469 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14474 Parsoid: Escape nowiki with trailing space in tags
14478 <p><nowiki > foo </nowiki ></p>
14479 <p>a<nowiki />b</p>
14480 <p>c<nowiki/ >d</p>
14482 <nowiki > foo </nowiki >
14490 Parsoid: Escape weird noWikI capitalizations
14494 <p><noWikI > foo </NoWikI ></p>
14496 <noWikI > foo </NoWikI >
14500 ### Message transform tests
14503 message transform: magic variables
14513 message transform: should not transform wiki markup
14523 message transform: <noinclude> in transcluded template (T6926)
14533 message transform: <onlyinclude> in transcluded template (T6926)
14543 {{#special:}} page name, known
14547 {{#special:Recentchanges}}
14549 Special:RecentChanges
14553 {{#special:}} page name with subpage, known
14557 {{#special:Recentchanges/param}}
14559 Special:RecentChanges/param
14563 {{#special:}} page name, unknown
14567 {{#special:foobar nonexistent}}
14569 Special:Foobar nonexistent
14573 {{#speciale:}} page name, known
14577 {{#speciale:Recentchanges}}
14579 Special:RecentChanges
14583 {{#speciale:}} page name with subpage, known
14587 {{#speciale:Recentchanges/param}}
14589 Special:RecentChanges/param
14593 {{#speciale:}} page name, unknown
14597 {{#speciale:foobar nonexistent}}
14599 Special:Foobar_nonexistent
14605 ### For Parsoid-specific tests, see
14606 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14611 parsoid=wt2html,wt2wt,html2html
14613 [[Image:foobar.jpg]]
14615 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14618 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
14622 Serialize simple image with span wrapper
14626 <p><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a></span></p>
14628 [[File:Foobar.jpg]]
14632 Simple image (using File: namespace, now canonical)
14634 [[File:Foobar.jpg]]
14636 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14639 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
14643 Right-aligned image
14645 [[File:Foobar.jpg|right]]
14647 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14649 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a><figcaption></figcaption></figure>
14655 [[File:Foobar.jpg|right|Caption text]]
14657 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14659 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a><figcaption>Caption text</figcaption></figure>
14663 Image with caption, T55312 #1
14665 [[File:Foobar.jpg|right|Caption page stuff]]
14667 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page stuff"><img alt="Caption page stuff" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14669 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a><figcaption>Caption page stuff</figcaption></figure>
14673 Image with caption, T55312 #2
14675 [[File:Foobar.jpg|right|Caption page=]]
14677 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page="><img alt="Caption page=" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14679 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a><figcaption>Caption page=</figcaption></figure>
14683 Image with caption, T55312 #3
14685 [[File:Foobar.jpg|right|Caption page=stuff]]
14687 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page=stuff"><img alt="Caption page=stuff" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14689 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a><figcaption>Caption page=stuff</figcaption></figure>
14693 Image caption with pipe entity
14695 [[File:Foobar.jpg|thumb|one | two]]
14696 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14698 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one | two</div></div></div>
14699 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one <i>two</i> | three</div></div></div>
14701 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>one <span typeof="mw:Entity">|</span> two</figcaption></figure>
14702 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>one <i>two</i> <span typeof="mw:Entity">|</span> three</figcaption></figure>
14706 Allow empty links in image captions (T62753)
14710 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14715 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Caption <a href="/index.php?title=Link1&action=edit&redlink=1" class="new" title="Link1 (page does not exist)">Link1</a> [[]] <a href="/index.php?title=Link2&action=edit&redlink=1" class="new" title="Link2 (page does not exist)">Link2</a></div></div></div>
14717 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption [[Link1]]\n[[]]\n[[Link2]]\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><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>Caption <a rel="mw:WikiLink" href="./Link1" title="Link1" data-parsoid='{"stx":"simple","a":{"href":"./Link1"},"sa":{"href":"Link1"}}'>Link1</a>
14719 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14720 </figcaption></figure>
14724 Titles in unlinked images (T23454)
14726 [[File:Foobar.jpg|link=|stuff]]
14728 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" title="stuff" width="1941" height="220" />
14731 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"stuff"}'><span><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"/></span></figure-inline></p>
14735 Link with empty target
14744 Image with link trail
14746 Linktrails should not work for images: [[File:Foobar.jpg]]s
14748 <p>Linktrails should not work for images: <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>s
14751 <p>Linktrails should not work for images: <figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a></figure-inline>s</p>
14755 Image with empty attribute
14757 parsoid=wt2html,wt2wt,html2html
14759 [[File:Foobar.jpg|right||Caption text]]
14761 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14763 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a><figcaption>Caption text</figcaption></figure>
14767 1. Block image with individual attributes from templates
14769 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14771 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" decoding="async" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
14773 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,38,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</span>"}]]}'><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/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
14777 2. Block Image with individual attributes from templates
14779 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14781 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" decoding="async" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
14783 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"{{echo|thumb}}"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,32,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"thumb\"}},\"i\":0}}]}'>thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[33,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</span>"}]]}'><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/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
14787 3. Inline image with individual attributes from templates
14789 [[File:Foobar.jpg|{{echo|50px}}]]
14791 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" decoding="async" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
14794 <p><figure-inline typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}' data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"50px\"}},\"i\":0}}]}'>50px</span>"}]]}'><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/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
14797 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14798 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14800 Image with multiple attributes from the same template
14802 [[File:Foobar.jpg|{{image_attribs}}]]
14804 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14806 <figure class="mw-default-size mw-halign-right" typeof="mw:Image mw:Placeholder"><a href="./File:Foobar.jpg"><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"/></a><figcaption>Caption text</figcaption></figure>
14810 Image with link tails
14814 123[[File:Foobar.jpg]]456
14815 123[[File:Foobar.jpg|right]]456
14816 123[[File:Foobar.jpg|thumb]]456
14818 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>456
14820 123<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>456
14821 123<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>456
14823 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>456
14825 123</p><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div><p>456
14826 123</p><div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div><p>456</p>
14828 <p>123<figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a></figure-inline>456</p>
14829 <p>123</p><figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a><figcaption></figcaption></figure><p>456
14830 123</p><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption></figcaption></figure><p>456</p>
14834 Image with multiple captions -- only last one is accepted
14836 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14838 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption3 - accepted"><img alt="Caption3 - accepted" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
14840 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a><figcaption>Caption3 - accepted</figcaption></figure>
14844 Image with multiple widths -- use last
14846 [[File:Foobar.jpg|200px|300px|caption]]
14848 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" decoding="async" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a>
14851 <p><figure-inline typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure-inline></p>
14855 Image with multiple alignments -- use first (T50664)
14859 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14861 [[File:Foobar.jpg|middle|text-top|caption]]
14863 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
14864 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" style="vertical-align: middle" /></a>
14867 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
14868 <p><figure-inline class="mw-default-size mw-valign-middle" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
14872 Image with width attribute at different positions
14874 [[File:Foobar.jpg|200px|right|Caption]]
14875 [[File:Foobar.jpg|right|200px|Caption]]
14876 [[File:Foobar.jpg|right|Caption|200px]]
14878 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" decoding="async" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14879 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" decoding="async" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14880 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" decoding="async" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14882 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14883 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14884 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14887 # a sad bit of backward-compatibility
14889 Image with size specified with pxpx (T15500, T53628)
14891 parsoid=wt2html,wt2wt,html2html
14893 [[File:Foobar.jpg|20pxpx]]
14894 [[File:Foobar.jpg|200x20pxpx]]
14896 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" decoding="async" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
14897 <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" decoding="async" width="177" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/265px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/353px-Foobar.jpg 2x" /></a>
14900 <p><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></figure-inline> <figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="20" width="177"/></a></figure-inline></p>
14904 Image with link parameter, wiki target
14906 [[File:Foobar.jpg|link=Main Page]]
14908 <p><a href="/wiki/Main_Page" title="Main Page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14911 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./Main_Page"><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"/></a></figure-inline></p>
14914 # parsoid T51293 (part 1)
14916 Image with link parameter, URL target
14918 [[File:Foobar.jpg|link=http://example.com/]]
14920 <p><a href="http://example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14923 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="http://example.com/"><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"/></a></figure-inline></p>
14926 # parsoid T51293 (part 2)
14928 Image with link parameter, protocol-less URL target
14930 [[File:Foobar.jpg|link=//example.com/]]
14932 <p><a href="//example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14935 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="//example.com/"><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"/></a></figure-inline></p>
14939 Escaping non-block captions (T107435)
14942 "modes": ["wt2wt"],
14944 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14948 [[Image:Foobar.jpg|caption]]
14950 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14953 # wgExternalLinkTarget not supported by Parsoid
14955 Image with link parameter, wgExternalLinkTarget
14957 [[Image:foobar.jpg|link=http://example.com/]]
14959 wgExternalLinkTarget='foobar'
14961 <p><a href="http://example.com/" target="foobar" rel="nofollow noreferrer noopener"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14966 Image with link parameter, wgNoFollowLinks set to false
14968 [[Image:foobar.jpg|link=http://example.com/]]
14970 wgNoFollowLinks=false
14972 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14977 Image with link parameter, wgNoFollowDomainExceptions
14979 [[Image:foobar.jpg|link=http://example.com/]]
14981 wgNoFollowDomainExceptions='example.com'
14983 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
14987 # wgExternalLinkTarget not supported by Parsoid
14989 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14991 [[Image:foobar.jpg|link=http://example.com/|Title]]
14993 wgExternalLinkTarget='foobar'
14995 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow noreferrer noopener"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15000 Image with empty link parameter
15002 [[File:Foobar.jpg|link=]]
15004 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" />
15007 <p><figure-inline class="mw-default-size" typeof="mw:Image"><span><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"/></span></figure-inline></p>
15011 Image with link parameter (wiki target) and unnamed parameter
15013 [[File:Foobar.jpg|link=Main_Page|Title]]
15015 <p><a href="/wiki/Main_Page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15018 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"Title"}'><a href="./Main_Page"><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"/></a></figure-inline></p>
15022 Image with link parameter (URL target) and unnamed parameter
15024 [[File:Foobar.jpg|link=http://example.com/|Title]]
15026 <p><a href="http://example.com/" title="Title" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15029 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"Title"}'><a href="http://example.com/"><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"/></a></figure-inline></p>
15033 Thumbnail image with link parameter
15036 parsoid=wt2html,wt2wt,html2html
15038 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
15040 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="http://example.com/"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15042 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="http://example.com/"><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"/></a><figcaption>Title</figcaption></figure>
15046 Manually-specified thumbnail image
15050 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
15052 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Foobar.jpg"><img alt="" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15054 <figure class="mw-default-size" typeof="mw:Image/Thumb" about="#mwt1" data-mw='{"attribs":[["manualthumb",{"txt":"Thumb.png"}]]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
15058 Manually-specified thumbnail image (backwards compat)
15063 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
15065 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Foobar.jpg"><img alt="" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15067 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
15071 Manually-specified thumbnail image with explicit link to wiki page
15074 parsoid=wt2html,wt2wt,html2html
15076 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
15078 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15080 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"attribs":[["manualthumb",{"txt":"Thumb.png"}]]}'><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
15084 Manually-specified thumbnail image with explicit link to url
15087 parsoid=wt2html,wt2wt,html2html
15089 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
15091 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="http://example.com"><img alt="" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15093 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"attribs":[["manualthumb",{"txt":"Thumb.png"}]]}'><a href="http://example.com"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
15097 Manually-specified thumbnail image with explicit no link
15100 parsoid=wt2html,wt2wt,html2html
15102 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
15104 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><img alt="" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15106 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"attribs":[["manualthumb",{"txt":"Thumb.png"}]]}'><span><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></span><figcaption>Title</figcaption></figure>
15110 Manually-specified thumbnail image with explicit link and alt text
15113 parsoid=wt2html,wt2wt,html2html
15115 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
15117 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="alttext" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
15119 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"attribs":[["manualthumb",{"txt":"Thumb.png"}]]}'><a href="./Main_Page"><img alt="alttext" resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
15123 Image with frame and link
15125 parsoid=wt2html,wt2wt,html2html
15127 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
15129 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
15131 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><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"/></a><figcaption>This is a test image <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></figcaption></figure>
15135 Image with frame and link and explicit alt
15137 parsoid=wt2html,wt2wt,html2html
15139 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
15141 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Altitude" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
15143 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img alt="Altitude" 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"/></a><figcaption>This is a test image <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></figcaption></figure>
15147 Image with wiki markup in implicit alt
15149 [[Image:Foobar.jpg|testing '''bold''' in alt]]
15151 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
15153 <p><a href="/wiki/File:Foobar.jpg" class="image" title="testing bold in alt"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15154 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15157 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"testing '''bold''' in alt"}]}' data-mw='{"caption":"testing <b data-parsoid='{\"dsr\":[27,37,3,3]}'>bold</b> in alt"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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-inline></p>
15159 <p><figure-inline class="mw-default-size" typeof="mw:Image mw:ExpandedAttrs" about="#mwt1" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=testing '''bold''' in alt"}]}' data-mw='{"attribs":[["alt",{"html":"alt=testing <b data-parsoid='{\"dsr\":[79,89,3,3]}'>bold</b> in alt","txt":"testing bold in alt"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"Image:Foobar.jpg"}}'><img alt="testing bold in alt" 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-inline></p>
15163 Alt image option should handle most kinds of wikitext without barfing
15165 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
15167 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a link and a bold template." src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is the image caption</div></div></div>
15169 <figure class="mw-default-size" typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"This is the image caption"},{"ck":"alt","ak":"alt=This is a [[link]] and a {{echo|''bold template''}}."}]}' data-mw='{"attribs":[["alt",{"html":"alt=This is a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[65,73,2,2]}'>link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[80,106,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&apos;&apos;bold template&apos;&apos;\"}},\"i\":0}}]}'>bold template</i>.","txt":"This is a link and a bold template."}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"Image:Foobar.jpg"}}'><img alt="This is a link and a bold template." 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":"Image:Foobar.jpg"}}'/></a><figcaption>This is the image caption</figcaption></figure>
15173 Ampersand in alt attribute (T206940)
15175 [[File:Foobar.jpg|alt=&amp;]]
15177 <!-- consistency with gallery extension -->
15179 File:Foobar.jpg|alt=&amp;
15182 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="&amp;" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15184 <ul class="gallery mw-gallery-traditional">
15185 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15186 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="&amp;" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15187 <div class="gallerytext">
15192 <p><figure-inline class="mw-default-size" typeof="mw:Image mw:ExpandedAttrs" about="#mwt1" data-mw='{"attribs":[["alt",{"html":"alt=<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;amp;\",\"srcContent\":\"&amp;\",\"dsr\":[22,27,null,null]}'>&amp;</span>amp;","txt":"&amp;"}]]}'><a href="./File:Foobar.jpg"><img alt="&amp;" 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"/></a></figure-inline></p>
15194 <!-- consistency with gallery extension -->
15195 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt5" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15196 <li class="gallerybox" style="width: 155px;">
15197 <div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image mw:ExpandedAttrs" data-mw='{"attribs":[["alt",{"html":"alt=<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;amp;\",\"srcContent\":\"&amp;\",\"dsr\":[109,114,null,null]}'>&amp;</span>amp;","txt":"&amp;"}]]}'><a href="./File:Foobar.jpg"><img alt="&amp;" 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></figure-inline></div>
15198 <div class="gallerytext"></div>
15203 ## FIXME: The inconsistency in the gallery extension on the php side is T49646
15205 Link with encoded pipe in alt option
15208 "modes": ["wt2html", "html2html"]
15211 [[File:Foobar.jpg|alt=http://testing.123?4=5|6|caption]]
15213 <!-- consistency with gallery extension -->
15215 File:Foobar.jpg|alt=http://testing.123?4=5|6|caption
15218 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="http://testing.123?4=5|6" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15220 <ul class="gallery mw-gallery-traditional">
15221 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15222 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="http://testing.123?4=5&vert;6%7Ccaption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15223 <div class="gallerytext">
15228 <p><figure-inline class="mw-default-size" typeof="mw:Image mw:ExpandedAttrs" about="#mwt1" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=http://testing.123?4=5&vert;6"},{"ck":"caption","ak":"caption"}]}' data-mw='{"attribs":[["alt",{"html":"alt=<a rel=\"mw:ExtLink\" href=\"http://testing.123?4=5%7C6\" data-parsoid='{\"stx\":\"url\",\"a\":{\"href\":\"http://testing.123?4=5%7C6\"},\"sa\":{\"href\":\"http://testing.123?4=5&amp;vert;6\"},\"dsr\":[22,51,0,0]}'>http://testing.123?4=5%7C6</a>","txt":"http://testing.123?4=5|6"}]],"caption":"caption"}'><a href="./File:Foobar.jpg"><img alt="http://testing.123?4=5|6" 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"/></a></figure-inline></p>
15230 <!-- consistency with gallery extension -->
15231 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt5" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15232 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image mw:ExpandedAttrs" data-mw='{"attribs":[["alt",{"html":"alt=<a rel=\"mw:ExtLink\" href=\"http://testing.123?4=5%7C6\" data-parsoid='{\"stx\":\"url\",\"a\":{\"href\":\"http://testing.123?4=5%7C6\"},\"sa\":{\"href\":\"http://testing.123?4=5&amp;vert;6\"},\"dsr\":[137,166,0,0]}'>http://testing.123?4=5%7C6</a>","txt":"http://testing.123?4=5|6"}]]}'><a href="./File:Foobar.jpg"><img alt="http://testing.123?4=5|6" 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></figure-inline></div><div class="gallerytext">caption</div></li>
15236 Italics markup in alt attribute (T206940)
15238 parsoid=wt2html,html2html
15240 [[File:Foobar.jpg|alt=''x''|caption]]
15242 <!-- consistency with gallery extension -->
15244 File:Foobar.jpg|alt=''x''|caption
15247 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="x" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15249 <ul class="gallery mw-gallery-traditional">
15250 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15251 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="x" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15252 <div class="gallerytext">
15259 <p><figure-inline class="mw-default-size" typeof="mw:Image mw:ExpandedAttrs" about="#mwt1" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=''x''"},{"ck":"caption","ak":"caption"}]}' data-mw='{"attribs":[["alt",{"html":"alt=<i data-parsoid='{\"dsr\":[22,27,2,2]}'>x</i>","txt":"x"}]],"caption":"caption"}'><a href="./File:Foobar.jpg"><img alt="x" 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"/></a></figure-inline></p>
15261 <!-- consistency with gallery extension -->
15262 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt5" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15263 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image mw:ExpandedAttrs" data-mw='{"attribs":[["alt",{"html":"alt=<i data-parsoid='{\"dsr\":[113,118,2,2]}'>x</i>","txt":"x"}]]}'><a href="./File:Foobar.jpg"><img alt="x" 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></figure-inline></div><div class="gallerytext">caption</div></li>
15267 ## FIXME: This test can be dropped when Parsoid content versions 2.0.0 / 1.8.0
15268 ## are no longer in storage.
15270 Nowiki markup in alt attribute (T206940)
15274 [[File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption]]
15276 <!-- consistency with gallery extension -->
15278 File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption
15281 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="''x''" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15283 <ul class="gallery mw-gallery-traditional">
15284 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15285 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="''x''" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15286 <div class="gallerytext">
15293 <p><figure-inline class="mw-default-size" typeof="mw:Image mw:ExpandedAttrs" about="#mwt5" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>"},{"ck":"caption","ak":"caption"}]}' data-mw='{"attribs":[["alt",{"html":"alt=<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[22,41,8,9]}'>''</span>x<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[42,61,8,9]}'>''</span>","txt":"''x''"}]],"caption":"caption"}'><a href="./File:Foobar.jpg"><img alt="''x''" 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" /></a></figure-inline></p>
15295 <!-- consistency with gallery extension -->
15296 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt13" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption\n"}}'>
15297 <li class="gallerybox" style="width: 155px;">
15298 <div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image mw:ExpandedAttrs" data-mw='{"attribs":[["alt",{"html":"alt=<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[147,166,8,9]}'>''</span>x<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[167,186,8,9]}'>''</span>","txt":"''x''"}]]}'><a href="./File:Foobar.jpg"><img alt="''x''" 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></figure-inline></div>
15299 <div class="gallerytext">caption</div>
15305 Nowiki markup in alt attribute (edited html, no data-parsoid) (T206940)
15307 [[File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption]]
15309 <!-- consistency with gallery extension -->
15311 File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption
15314 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="''x''" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15316 <ul class="gallery mw-gallery-traditional">
15317 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15318 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="''x''" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15319 <div class="gallerytext">
15326 <p><figure-inline class="mw-default-size" typeof="mw:Image mw:ExpandedAttrs" about="#mwt3" data-mw='{"attribs":[["alt",{"html":"alt=<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[22,44,8,9]}'>''x''</span>","txt":"''x''"}]],"caption":"caption"}'><a href="./File:Foobar.jpg"><img alt="''x''" 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"/></a></figure-inline></p>
15328 <!-- consistency with gallery extension -->
15329 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt9" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15330 <li class="gallerybox" style="width: 155px;">
15331 <div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image mw:ExpandedAttrs" data-mw='{"attribs":[["alt",{"html":"alt=<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[130,152,8,9]}'>''x''</span>","txt":"''x''"}]]}'><a href="./File:Foobar.jpg"><img alt="''x''" 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></figure-inline></div>
15332 <div class="gallerytext">caption</div>
15337 ## FIXME: This test can be dropped when Parsoid content versions 2.0.0 / 1.8.0
15338 ## are no longer in storage.
15340 Ampersand in link attribute (T206940)
15344 [[File:Foobar.jpg|link=Foo & bar]]
15346 <!-- consistency with gallery extension -->
15348 File:Foobar.jpg|link=Foo & bar
15351 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15353 <ul class="gallery mw-gallery-traditional">
15354 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15355 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo_%26_bar"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15356 <div class="gallerytext">
15361 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=Foo &amp; bar"}]}'><a href="./Foo_&_bar" data-parsoid='{"a":{"href":"./Foo_&_bar"},"sa":{"href":"link=Foo &amp; bar"}}'><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"/></a></figure-inline></p>
15363 <!-- consistency with gallery extension -->
15364 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=Foo &amp; bar\n"}}'>
15365 <li class="gallerybox">
15366 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foo_&_bar"><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></figure-inline></div>
15367 <div class="gallerytext"></div>
15373 Ampersand in link attribute (edited html, no data-parsoid) (T206940)
15375 [[File:Foobar.jpg|link=Foo_&_bar]]
15377 <!-- consistency with gallery extension -->
15379 File:Foobar.jpg|link=Foo_&_bar
15382 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15384 <ul class="gallery mw-gallery-traditional">
15385 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15386 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo_%26_bar"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15387 <div class="gallerytext">
15392 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./Foo_&_bar"><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"/></a></figure-inline></p>
15394 <!-- consistency with gallery extension -->
15395 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15396 <li class="gallerybox">
15397 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foo_&_bar"><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></figure-inline></div>
15398 <div class="gallerytext"></div>
15404 Italics markup in link attribute (T206940)
15406 parsoid=wt2html,html2html
15410 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15411 [[File:Foobar.jpg|link=Foo''s bar''s|caption1]]
15413 [[File:Foobar.jpg|link=''Main Page''|caption2]]
15415 <!-- consistency with gallery extension -->
15417 File:Foobar.jpg|link=Foo''s bar''s|caption1
15418 File:Foobar.jpg|link=''Main Page''|caption2
15421 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="Foo''s bar''s">Foo''s bar''s</a>
15422 </p><p><a href="/wiki/Foos_bars" title="caption1"><img alt="caption1" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15423 </p><p><a href="/wiki/Main_Page" title="caption2"><img alt="caption2" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15425 <ul class="gallery mw-gallery-traditional">
15426 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15427 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foos_bars"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15428 <div class="gallerytext">
15433 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15434 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15435 <div class="gallerytext">
15442 <p><a rel="mw:WikiLink" href="./Foo''s_bar''s" title="Foo''s bar''s">Foo''s bar''s</a></p>
15444 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15445 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=Foo''s bar''s"},{"ck":"caption","ak":"caption1"}]}' data-mw='{"caption":"caption1"}'><a href="./Foos_bars" data-parsoid='{"a":{"href":"./Foos_bars"},"sa":{"href":"link=Foo''s bar''s"}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15447 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=''Main Page''"},{"ck":"caption","ak":"caption2"}]}' data-mw='{"caption":"caption2"}'><a href="./Main_Page" data-parsoid='{"a":{"href":"./Main_Page"},"sa":{"href":"link=''Main Page''"}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15449 <!-- consistency with gallery extension -->
15450 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15451 <li class="gallerybox">
15452 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foos_bars"><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></figure-inline></div>
15453 <div class="gallerytext">caption1</div>
15455 <li class="gallerybox">
15456 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Main_Page"><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></figure-inline></div>
15457 <div class="gallerytext">caption2</div>
15462 ## FIXME: This test can be dropped when Parsoid content versions 2.0.0 / 1.8.0
15463 ## are no longer in storage.
15465 Nowiki markup in link attribute (T206940)
15469 [[File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption]]
15471 <!-- consistency with gallery extension -->
15473 File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption
15476 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15478 <ul class="gallery mw-gallery-traditional">
15479 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15480 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo%27%27s_bar%27%27s"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15481 <div class="gallerytext">
15488 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s"},{"ck":"caption","ak":"caption"}]}' data-mw='{"caption":"caption"}'><a href="./Foo''s_bar''s" data-parsoid='{"a":{"href":"./Foo''s_bar''s"},"sa":{"href":"link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s"}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15490 <!-- consistency with gallery extension -->
15491 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption\n"}}'>
15492 <li class="gallerybox">
15493 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foo''s_bar''s"><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></figure-inline></div>
15494 <div class="gallerytext">caption</div>
15500 Nowiki markup in link attribute (edited html, no data-parsoid) (T206940)
15502 [[File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption]]
15504 <!-- consistency with gallery extension -->
15506 File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption
15509 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15511 <ul class="gallery mw-gallery-traditional">
15512 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15513 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Foo%27%27s_bar%27%27s"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15514 <div class="gallerytext">
15521 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./Foo''s_bar''s"><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"/></a></figure-inline></p>
15523 <!-- consistency with gallery extension -->
15524 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15525 <li class="gallerybox">
15526 <div class="thumb"><figure-inline typeof="mw:Image"><a href="./Foo''s_bar''s"><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></figure-inline></div>
15527 <div class="gallerytext">caption</div>
15533 HTML entity prefix in link markup (T209236)
15535 [[File:Foobar.jpg|link=https://example.com?foo¶ms=bar]]
15537 <!-- consistency with gallery extension -->
15539 File:Foobar.jpg|link=https://example.com?foo¶ms=bar
15542 <p><a href="https://example.com?foo&params=bar" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15544 <ul class="gallery mw-gallery-traditional">
15545 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15546 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="https://example.com?foo&params=bar"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
15547 <div class="gallerytext">
15552 <p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="https://example.com?foo&params=bar"><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"/></a></figure-inline></p>
15554 <!-- consistency with gallery extension -->
15555 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15556 <li class="gallerybox">
15557 <div class="thumb"><figure-inline typeof="mw:Image"><a href="https://example.com?foo&params=bar"><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></figure-inline></div>
15558 <div class="gallerytext"></div>
15564 Image with table with attributes in caption
15566 parsoid=wt2html,html2html
15568 [[File:Foobar.jpg|thumb|
15575 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{| class=\"123\" |\n|- class=\"456\" |\n| ha\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><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>
15576 <table class="123">
15577 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
15580 </figcaption></figure>
15584 Image with table with rows from templates in caption
15586 [[File:Foobar.jpg|thumb|
15592 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{|\n{{echo|{{!}} hi}}\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><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>
15594 <tbody about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} hi"}},"i":0}},"\n"]}'><tr><td> hi</td></tr>
15596 </figcaption></figure>
15600 Image with nested tables in caption
15602 [[File:Foobar.jpg|thumb|Foo<br />
15611 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Foo<br/>\n{|\n|\n{|\n|z\n|}\n|}\n"}]}'><a href="./File:Foobar.jpg"><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,50,null,null]}'>Foo<br data-parsoid='{"stx":"html","selfClose":true}'/>
15615 <tbody><tr><td>z</td></tr>
15616 </tbody></table></td></tr>
15618 </figcaption></figure>
15622 Image with heading and horizontal rule in caption
15624 [[File:Foobar.jpg|thumb|
15630 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><h3><span class="mw-headline" id="Testing">Testing</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Testing">edit</a><span class="mw-editsection-bracket">]</span></span></h3> 123 <hr /></div></div></div>
15632 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n=== Testing ===\n123\n--------------\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><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>
15633 <h3 id="Testing">Testing</h3>
15635 <hr data-parsoid='{"extra_dashes":10}'/>
15636 </figcaption></figure>
15639 ###################
15640 # Conflicting image format options.
15641 # First option specified should 'win'.
15642 # All three cases in each test should be identical.
15645 Image with 'frameless' first.
15647 parsoid=wt2html,wt2wt,html2html
15649 [[File:Foobar.jpg|frameless|caption]]
15651 [[File:Foobar.jpg|frameless|frame|caption]]
15653 [[File:Foobar.jpg|frameless|thumb|caption]]
15655 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15656 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15657 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15660 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
15661 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
15662 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
15666 Image with 'frame' first.
15668 parsoid=wt2html,wt2wt,html2html
15670 [[File:Foobar.jpg|frame|caption]]
15671 [[File:Foobar.jpg|frame|frameless|caption]]
15672 [[File:Foobar.jpg|frame|thumb|caption]]
15674 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15675 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15676 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15678 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
15679 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
15680 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
15684 Image with 'thumb' first.
15686 parsoid=wt2html,wt2wt,html2html
15688 [[File:Foobar.jpg|thumb|caption]]
15689 [[File:Foobar.jpg|thumb|frameless|caption]]
15690 [[File:Foobar.jpg|thumb|frame|caption]]
15692 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15693 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15694 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15696 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
15697 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
15698 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
15701 ###################
15703 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15704 # and https://phabricator.wikimedia.org/T64258
15705 # Foobar has actual size of 1941x220
15706 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15707 # a scalable format.
15708 # 2. Framed images always ignore size options; always render at default size.
15709 # 3. "Unspecified format" and border are the only types which can be
15713 Image: unspecified format and border enlarge
15715 parsoid=wt2html,wt2wt,html2html
15717 [[File:Foobar.jpg|2000px]]
15719 [[File:Foobar.jpg|border|2000px]]
15721 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="2000" height="227" /></a>
15722 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="2000" height="227" class="thumbborder" /></a>
15725 <p><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><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="227" width="2000"/></a></figure-inline></p>
15726 <p><figure-inline class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><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="227" width="2000"/></a></figure-inline></p>
15730 Image: "unspecified format" and border reduce
15732 parsoid=wt2html,wt2wt,html2html
15734 [[File:Foobar.jpg|1000px]]
15736 [[File:Foobar.jpg|border|1000px]]
15738 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" decoding="async" width="1000" height="113" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
15739 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" decoding="async" width="1000" height="113" class="thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
15742 <p><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></figure-inline></p>
15743 <p><figure-inline class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></figure-inline></p>
15747 Image: thumbs reduce
15749 parsoid=wt2html,wt2wt,html2html
15751 [[File:Foobar.jpg|thumb|50px]]
15753 <div class="thumb tright"><div class="thumbinner" style="width:52px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" decoding="async" width="50" height="6" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
15755 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a><figcaption></figcaption></figure>
15759 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15761 parsoid=wt2html,wt2wt,html2html
15763 [[File:Foobar.jpg|thumb|2000px]]
15765 [[File:Foobar.svg|thumb|2000px]]
15767 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
15768 <div class="thumb tright"><div class="thumbinner" style="width:2002px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" decoding="async" width="2000" height="1500" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div></div></div></div>
15770 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption></figcaption></figure>
15771 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a><figcaption></figcaption></figure>
15775 Image: frameless can reduce in size
15777 parsoid=wt2html,wt2wt,html2html
15779 [[File:Foobar.jpg|frameless|50px]]
15781 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" decoding="async" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
15784 <p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
15788 Image: bitmap frameless can't be enlarged past original size, but vector can
15790 parsoid=wt2html,wt2wt,html2html
15792 [[File:Foobar.jpg|frameless|2000px]]
15794 [[File:Foobar.svg|frameless|2000px]]
15796 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15797 </p><p><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" decoding="async" width="2000" height="1500" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a>
15800 <p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
15801 <p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure-inline></p>
15805 Image: framed images are always unscaled.
15807 parsoid=wt2html,wt2wt,html2html
15809 [[File:Foobar.jpg|frame]]
15811 [[File:Foobar.jpg|frame|50px]]
15813 [[File:Foobar.jpg|frame|50x50px]]
15815 [[File:Foobar.jpg|frame|2000px]]
15817 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15818 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15819 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15820 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15822 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><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"/></a><figcaption></figcaption></figure>
15823 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><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"/></a><figcaption></figcaption></figure>
15824 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><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"/></a><figcaption></figcaption></figure>
15825 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><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"/></a><figcaption></figcaption></figure>
15828 ###################
15831 Link to image page- image page normally doesn't exist, hence edit link
15832 Add test with existing image page
15833 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15837 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15842 T20784 Link to non-existent image page with caption should use caption as link text
15844 [[:Image:test|caption]]
15846 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15851 Frameless image caption with a free URL
15853 [[File:Foobar.jpg|http://example.com]]
15855 <p><a href="/wiki/File:Foobar.jpg" class="image" title="http://example.com"><img alt="http://example.com" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15858 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"http://example.com"}]}' data-mw='{"caption":"<a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid='{\"stx\":\"url\",\"dsr\":[18,36,0,0]}'>http://example.com</a>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15862 Thumbnail image caption with a free URL
15866 [[File:Foobar.jpg|thumb|http://example.com]]
15868 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
15870 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
15874 Thumbnail image caption with a free URL and explicit alt
15877 parsoid=wt2html,wt2wt,html2html
15879 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15881 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
15883 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img alt="Alteration" 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"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
15887 SVG thumbnails with no language set
15890 [[File:Foobar.svg|thumb|caption]]
15892 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" decoding="async" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15894 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
15898 SVG thumbnails with language de
15900 parsoid=wt2html,wt2wt,html2html
15902 [[File:Foobar.svg|thumb|caption|lang=de]]
15904 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=File:Foobar.svg&lang=de" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/langde-180px-Foobar.svg.png" decoding="async" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langde-270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langde-360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15906 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
15910 SVG thumbnails with invalid language code
15912 parsoid=wt2html,wt2wt,html2html
15914 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15916 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" decoding="async" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>lang=invalid:language:code</div></div></div>
15918 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>lang=invalid:language:code</figcaption></figure>
15922 SVG thumbnails in page language
15926 [[File:Foobar.svg]] [[File:Foobar.svg|lang=en]]
15928 <p><a href="/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/langru-240px-Foobar.svg.png" decoding="async" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langru-360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langru-480px-Foobar.svg.png 2x" /></a> <a href="/index.php?title=%D0%A4%D0%B0%D0%B9%D0%BB:Foobar.svg&lang=en" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg.png" decoding="async" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/480px-Foobar.svg.png 2x" /></a>
15933 SVG thumbnails in page language not present in the file
15937 [[File:Foobar.svg]] [[File:Foobar.svg|lang=ru]]
15939 <p><a href="/wiki/Datei:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg.png" decoding="async" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/480px-Foobar.svg.png 2x" /></a> <a href="/index.php?title=Datei:Foobar.svg&lang=ru" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/langru-240px-Foobar.svg.png" decoding="async" width="240" height="180" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langru-360px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langru-480px-Foobar.svg.png 2x" /></a>
15944 T3887: A ISBN with a thumbnail
15946 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15948 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
15950 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption><a href="./Special:BookSources/1235467890" rel="mw:WikiLink">ISBN 1235467890</a></figcaption></figure>
15954 T3887: A RFC with a thumbnail
15956 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15958 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
15960 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>This is <a href="https://tools.ietf.org/html/rfc12354" rel="mw:ExtLink" class="external mw-magiclink">RFC 12354</a></figcaption></figure>
15964 T3887: A mailto link with a thumbnail
15966 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15968 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div>
15970 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>Please <a rel="mw:ExtLink" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
15973 # Pending resolution to T2368
15975 T2648: Frameless image caption with a link
15977 [[File:Foobar.jpg|text with a [[link]] in it]]
15979 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15982 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,38,2,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15986 T2648: Frameless image caption with a link (suffix)
15988 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15990 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a linkfoo in it"><img alt="text with a linkfoo in it" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
15993 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]]foo in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,41,2,5],\"tail\":\"foo\"}'>linkfoo</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15997 T2648: Frameless image caption with an interwiki link
15999 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
16001 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a MeatBall:Link in it"><img alt="text with a MeatBall:Link in it" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16004 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink/Interwiki\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,47,2,2]}'>MeatBall:Link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16008 T2648: Frameless image caption with a piped interwiki link
16010 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
16012 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16015 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link|link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink/Interwiki\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,52,16,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16019 T107474: Frameless image caption with <nowiki>
16021 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
16023 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>"}]}' data-mw='{"caption":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[18,75,8,9]}'>text with a [[MeatBall:Link|link]] in it</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16027 Escape HTML special chars in image alt text
16029 [[File:Foobar.jpg|& < > "]]
16031 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16034 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"& < > \""}]}' data-mw='{"caption":"&amp; &lt; > \""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16038 Escape HTML special chars in image alt text with LanguageConverter
16042 [[File:Foobar.jpg|& < > "]]
16044 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16047 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"& < > \""}]}' data-mw='{"caption":"&amp; &lt; > \""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16051 Entities in file name and attributes
16053 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
16055 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
16058 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"manualthumb=7%25 solution.gif"},{"ck":"link","ak":"link=7%25 solution"},{"ck":"caption","ak":"[[7%25 solution]]"}]}' data-mw='{"attribs":[["link",{"txt":"7%25 solution"}]],"caption":"<a rel=\"mw:WikiLink\" href=\"./7%25_solution\" title=\"7% solution\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./7%25_solution\"},\"sa\":{\"href\":\"7%25 solution\"},\"dsr\":[74,91,2,2]}'>7% solution</a>","errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/7%25_solution.gif"><span resource="./File:7%25_solution.gif" data-parsoid='{"a":{"resource":"./File:7%25_solution.gif"},"sa":{"resource":"File:7%25 solution.gif"}}'>File:7% solution.gif</span></a></figure-inline></p>
16062 T2499: Alt text should have Ӓ, not &1234;
16064 [[File:Foobar.jpg|♀]]
16066 <p><a href="/wiki/File:Foobar.jpg" class="image" title="♀"><img alt="♀" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16069 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&#9792;"}]}' data-mw='{"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#9792;\",\"srcContent\":\"♀\",\"dsr\":[18,25,null,null]}'>♀</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16073 Broken image caption with link
16075 parsoid=wt2html,wt2wt,html2html
16077 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
16079 <p>[[Image:Foobar.jpg|thumb|This is a broken caption. But <a href="/wiki/Main_Page" title="Main Page">this</a> is just an ordinary link.
16082 <p>[[Image:Foobar.jpg|thumb|This is a broken caption. But <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">this</a> is just an ordinary link.</p>
16086 Image caption containing another image
16088 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
16090 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption with another <a href="/wiki/File:Thumb.png" class="image" title="image"><img alt="image" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" /></a> inside it!</div></div></div>
16092 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>This is a caption with another <figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"image"}'><a href="./File:Thumb.png"><img resource="./File:Thumb.png" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a></figure-inline> inside it!</figcaption></figure>
16096 Image: caption containing a newline
16098 [[File:Foobar.jpg|This
16101 <p><a href="/wiki/File:Foobar.jpg" class="image" title="This *is some text"><img alt="This *is some text" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
16104 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"This\n*is some text"}'><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
16108 Image: caption containing leading space
16109 (The leading space should not trigger nowiki escaping in wt2wt mode)
16111 [[File:Foobar.jpg|thumb| bar]]
16113 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>bar</div></div></div>
16115 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption> bar</figcaption></figure>
16118 # html/php output not have newlines after table, td, th, etc. because
16119 # Linker::makeThumbLink2() replaces the newlines with spaces since
16120 # the table is inside a caption.
16121 # FIXME: Verify if that circa 2004 fix is still required.
16123 Image: caption containing a table
16125 parsoid=wt2html,wt2wt,html2html
16127 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
16133 and some more text.]]
16135 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" decoding="async" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is an example image thumbnail caption with a table <table> <tr> <th>Foo</th> <th>Bar </th></tr> <tr> <td>Foo1</td> <td>Bar1 </td></tr></table> and some more text.</div></div></div>
16137 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This is an example image thumbnail caption with a table
16140 <tr><th>Foo</th><th>Bar</th></tr>
16143 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
16147 T5090: External links other than http: in image captions
16149 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
16151 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" decoding="async" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This caption has <a rel="nofollow" class="external text" href="irc://example.net">irc</a> and <a rel="nofollow" class="external text" href="https://example.com">Secure</a> ext links in it.</div></div></div>
16153 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has <a rel="mw:ExtLink" class="external text" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" class="external text" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
16159 parsoid=wt2html,wt2wt,html2html
16161 [[Image:foobar.jpg|a|class=b]]
16163 <p><a href="/wiki/File:Foobar.jpg" class="image" title="a"><img alt="a" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" class="b" /></a>
16166 <p><figure-inline class="mw-default-size b" typeof="mw:Image" data-mw='{"caption":"a"}'><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
16170 Localized image handling (1).
16172 parsoid=wt2html,wt2wt,html2html
16175 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
16177 <div class="floatleft"><a href="/wiki/Foo" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
16179 <figure class="mw-default-size mw-halign-left" typeof="mw:Image"><a href="./Foo"><img resource="./Archivo: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"/></a><figcaption>caption</figcaption></figure>
16183 Localized image handling (2).
16186 parsoid=wt2html,wt2wt,html2html
16189 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
16191 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/Foo" title="Foo"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/Archivo:Foobar.jpg" class="internal" title="Aumentar"></a></div>caption</div></div></div>
16193 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./Foo"><img resource="./Archivo: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"/></a><figcaption>caption</figcaption></figure>
16197 Localized image handling (3).
16202 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a></figure>
16204 [[File:Foobar.jpg|بندانگشتی]]
16208 "border", "frameless" and "class" attributes on an image.
16211 parsoid=wt2html,wt2wt,html2html
16213 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
16215 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="extra thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>
16218 <p><figure-inline class="mw-default-size mw-image-border extra" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
16221 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
16223 Invalid image attributes (T64500)
16226 parsoid=wt2html,wt2wt,html2html
16228 [[File:Foobar.jpg|thumb|float|left|caption]]
16230 [[File:Foobar.jpg|thumb|righ|caption]]
16232 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
16234 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
16235 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
16236 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" decoding="async" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
16238 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
16239 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
16240 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
16246 #REDIRECT [[File:Barfoo.jpg]]
16249 # FIXME: Parsoid should run this test -- but we'd need to teach the
16250 # mockAPI about the redirected Barfoo.jpg image.
16254 [[Image:Barfoo.jpg]]
16256 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
16260 ## FIXME: Parsoid needs to learn about this flag.
16262 Missing image with uploads disabled
16266 [[File:Foobaz.jpg]]
16268 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
16271 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Foobaz.jpg"><span resource="./File:Foobaz.jpg">File:Foobaz.jpg</span></a></figure-inline></p>
16274 # Parsoid-specific testing for images
16275 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
16276 # Currently imperfect due to a flaw in the Parsoid testrunner
16278 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
16282 Parsoid-specific image handling - simple image with size and middle alignment
16284 [[File:Foobar.jpg|middle|50px]]
16286 <p><figure-inline class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
16290 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
16292 parsoid=wt2wt,wt2html,html2html
16294 [[Image:Foobar.jpg|middle|50px]]
16296 <p><figure-inline class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
16300 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
16302 [[File:Foobar.jpg|50px|middle]]
16304 <p><figure-inline class="mw-valign-middle" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"50px"},{"ck":"middle","ak":"middle"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16308 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
16310 parsoid=wt2html,wt2wt,html2html
16312 [[Image:Foobar.jpg|50px|middle]]
16314 <p><figure-inline class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
16318 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
16320 [[File:Foobar.jpg|500x10px|baseline|caption]]
16322 <p><figure-inline class="mw-valign-baseline" typeof="mw:Image" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"width","ak":"500x10px"},{"ck":"baseline","ak":"baseline"},{"ck":"caption","ak":"caption"}],"size":"500x10"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/89px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="10" width="89" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"10","width":"89"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16326 Parsoid-specific image handling - simple image with border and size spec
16328 [[File:Foobar.jpg|50px|border|caption]]
16330 <p><figure-inline class="mw-image-border" typeof="mw:Image" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"width","ak":"50px"},{"ck":"border","ak":"border"},{"ck":"caption","ak":"caption"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16334 Parsoid-specific image handling - thumbnail with halign, valign, and caption
16336 parsoid=wt2html,html2html
16338 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
16340 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption content</figcaption></figure>
16344 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
16346 parsoid=wt2html,html2html
16348 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
16350 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"left","ak":"left"},{"ck":"baseline","ak":"baseline"},{"ck":"caption","ak":"caption content"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><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>caption content</figcaption></figure>
16354 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
16356 parsoid=wt2html,html2html
16358 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
16360 <figure class="mw-halign-right" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a><figcaption>caption</figcaption></figure>
16364 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
16366 parsoid=wt2html,html2html
16368 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
16370 <figure class="mw-halign-right" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"50x50px"},{"ck":"right","ak":"right"},{"ck":"middle","ak":"middle"},{"ck":"caption","ak":"caption"}],"size":"50x50"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>caption</figcaption></figure>
16374 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
16376 parsoid=wt2html,wt2wt,html2html
16378 [[File:Foobar.jpg|frame|500x50px|caption]]
16380 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
16384 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
16386 parsoid=wt2html,html2html
16388 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
16390 <figure class="mw-halign-left" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
16394 Parsoid-specific image handling - frameless image with specific size, border, and caption
16396 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
16398 <p><figure-inline class="mw-image-border" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"frameless","ak":"frameless"},{"ck":"width","ak":"442x50px"},{"ck":"border","ak":"border"},{"ck":"caption","ak":"caption"}],"size":"442x50"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="50" width="442" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"50","width":"442"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16402 Parsoid-specific image handling - simple image with a formatted caption
16404 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
16406 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>"}]}' data-mw='{"caption":"<table data-parsoid='{\"stx\":\"html\",\"dsr\":[18,81,7,8]}'><tbody data-parsoid='{\"dsr\":[25,73,0,0]}'><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[25,54,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[29,39,4,5]}'>a</td><td data-parsoid='{\"stx\":\"html\",\"dsr\":[39,49,4,5]}'>b</td></tr><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[54,73,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[58,68,4,5]}'>c</td></tr></tbody></table>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16410 Parsoid-specific image handling - caption with a template in it
16412 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
16414 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"></a><figcaption>This caption has a <span about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}">transclusion</span> in it.</figcaption></figure>
16418 Parsoid-specific image handling - caption with unbalanced tags in it
16420 parsoid=wt2html,wt2wt,html2html
16423 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
16427 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has a <center>unbalanced tag in it.</center></figcaption></figure>
16432 Parsoid-specific image handling - empty caption (1)
16434 parsoid=wt2html,wt2wt
16436 [[File:Foobar.jpg|thumb|]]
16438 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption></figcaption></figure>
16441 # empty captions don't get serialized unless we're in the "round trip" case
16443 Parsoid-specific image handling - empty caption (2)
16447 <figure class="mw-default-size" typeof="mw:Image/Thumb">
16448 <a href="./File:Foobar.jpg">
16449 <img resource="./File:Foobar.jpg"
16450 src="//example.com/images/3/3a/Foobar.jpg"
16451 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
16452 height="25" width="220"/>
16454 <figcaption></figcaption>
16457 [[File:Foobar.jpg|thumb]]
16461 Parsoid-specific image handling - whitespace caption
16463 [[File:Foobar.jpg|thumb| ]]
16465 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption> </figcaption></figure>
16469 Parsoid-specific image handling - lang option
16472 [[File:Foobar.svg|lang=de|caption]]
16476 <figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="180" width="240"/></a></figure-inline>
16480 ## Edge case bugs in Parsoid from T93580
16482 T93580: 1. Templated <ref> inside block images
16484 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
16488 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|<ref>foo</ref>}}"}]}'><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/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>Caption with templated ref: <sup about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo</ref>"}},"i":0}}]}'><a href="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></figcaption></figure>
16490 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#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>
16494 T93580: 2. <ref> inside inline images
16496 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
16500 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16502 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#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">foo</span></li></ol>
16506 T93580: 3. Templated <ref> inside inline images
16508 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
16512 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"./Parser_test#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><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":"File:Foobar.jpg"}}'/></a></figure-inline></p>
16514 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#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">foo</span></li></ol>
16521 Subpage test/subpage
16529 subpage title=[[Subpage test]]
16533 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
16538 Subpage noslash link
16540 subpage title=[[Subpage test]]
16544 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
16549 Subpage test/1/2/subpage
16555 Relative subpage noslash link
16557 parsoid=wt2wt,wt2html,html2html
16558 subpage title=[[Subpage test/1/2/3/4]]
16564 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
16565 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
16568 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
16569 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
16573 Parsoid: dot-slash prefixed wikilinks
16583 </p><p>[[././baz/]]
16588 </p><p>[[././baz/]]
16593 Render invalid page names as plain text (T53090)
16605 [[foo[http://example.com]xyz]]
16607 [[{{echo|./../foo}}|bar]]
16608 [[{{echo|foo/.}}|bar]]
16609 [[{{echo|foo/..}}|bar]]
16610 [[{{echo|foo~~~~bar}}]]
16611 [[{{echo|foo>bar}}]]
16612 [[{{echo|foo././bar}}]]
16613 [[{{echo|foo{bar}}]]
16614 [[{{echo|foo}bar}}]]
16615 [[{{echo|foo[bar}}]]
16616 [[{{echo|foo]bar}}]]
16617 [[{{echo|foo<bar}}]]
16619 <p>[[./../foo|bar]]
16629 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
16630 </p><p>[[./../foo|bar]]
16643 <p>[[./../foo|bar]]
16653 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16655 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16656 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16657 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16658 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16659 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16660 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16661 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16662 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16663 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16664 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16665 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<bar"}},"i":0}}]}'>foo<bar</span>]]</p>
16673 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16678 T2561: {{/Subpage}}
16680 subpage title=[[Page]]
16684 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16692 Category:MediaWiki User's Guide
16700 [[:Category:MediaWiki User's Guide]]
16702 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16711 [[Category:MediaWiki User's Guide]]
16713 cat=MediaWiki_User's_Guide sort=
16715 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide" data-parsoid='{"stx":"simple","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
16719 PAGESINCATEGORY invalid title fatal (r33546 fix)
16721 {{PAGESINCATEGORY:<bogus>}}
16728 Category with different sort key
16732 [[Category:MediaWiki User's Guide|Foo]]
16734 cat=MediaWiki_User's_Guide sort=Foo
16736 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#Foo" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
16740 Category with identical sort key
16744 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16746 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16748 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#MediaWiki%20User's%20Guide" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
16752 Category with empty sort key
16757 [[Category:MediaWiki User's Guide|]]
16759 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16763 Category with empty sort key and parentheses
16768 [[Category:Foo (bar)|]]
16770 [[Category:Foo (bar)|Foo]]
16774 Category with link tail
16779 123[[Category:Foo]]456
16781 123[[Category:Foo]]456
16785 Category with template
16790 [[Category:{{echo|Foo}}]]
16792 [[Category:{{echo|Foo}}]]
16796 Category with template in sort key
16801 [[Category:Foo|{{echo|Bar}}]]
16803 [[Category:Foo|{{echo|Bar}}]]
16807 Category with template in sort key and title
16812 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16814 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16817 ## We used to, but no longer wt2wt this test since the default serializer
16818 ## will normalize all categories to serialize on their own line.
16819 ## This wikitext usage is going to be fairly uncommon in production and
16820 ## selser will take care of preserving formatting in those scenarios.
16822 Category / paragraph interactions
16826 Foo [[Category:Baz]] Bar
16828 Foo [[Category:Baz]]
16836 [[Category:Baz]] Bar
16849 {{echo|[[Category:Baz]]}}
16862 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16863 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16864 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16865 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16866 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16867 <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Baz]]"}},"i":0}}]}'/>
16868 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16871 ## We used to, but no longer wt2wt this test since the default serializer
16872 ## will normalize all categories to serialize on their own line.
16873 ## This wikitext usage is going to be fairly uncommon in production and
16874 ## selser will take care of preserving formatting in those scenarios.
16876 ## The whitespace on the empty line is part of the test. Please do not delete
16878 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16884 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16886 {{echo|[[Category:Foo]] and so should this!}}
16888 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16893 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16895 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]] and so should this!"}},"i":0}}]}'/><span about="#mwt1"> and so should this!</span></p>
16898 ## Parsoid will not try to wt2wt this while preserving newlines because
16899 ## it suppresses excess newlines within list items -- and we don't want to
16900 ## introduce a special case just for categories, which is, in reality somewhat
16901 ## odd behavior -- categories are unlikely to be used in list items like this
16902 ## in top-level pages and are only likely to show up in template-generated
16903 ## list items where this RT-ing is a non-issue.
16905 ## The whitespace on the empty line is part of the test. Please do not delete
16907 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16913 [[Category:Foo]] and this should be part of the same list item
16916 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16918 <ul><li>This and this should be part of the same list item</li>
16919 <li>So should this and this should be part of the same list item</li></ul>
16922 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16923 <li>So should this <link rel="mw:PageProp/Category" href="./Category:Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]] and this should be part of the same list item"}},"i":0}}]}'/><span> and this should be part of the same list item</span></li>
16927 ## Newlines and categories that follow the last item of a list
16928 ## are treated differently because this (list followed by categories)
16929 ## is an extremely common pattern on wikis.
16931 3. Categories and newlines: newline suppression for last list item should RT properly
16952 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16954 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16955 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16957 <dl><dd>c</dd></dl>
16959 <link rel="mw:PageProp/Category" href="./Category:C"/>
16961 <dl><dt>d</dt></dl>
16963 <link rel="mw:PageProp/Category" href="./Category:D"/>
16967 4. Categories and newlines: newline suppression for last list item should RT properly
16975 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16977 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16980 ## only wt2html for this to make sure the algo only applies to the rightmost path
16982 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16995 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16997 <ul><li>d</li></ul></li></ul>
16998 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
17001 ## We used to, but no longer wt2wt this test since the default serializer
17002 ## will normalize all categories to serialize on their own line.
17003 ## This wikitext usage is going to be fairly uncommon in production and
17004 ## selser will take care of preserving formatting in those scenarios.
17006 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
17010 *a [[Category:Foo]]
17012 <ul><li>a<link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul>
17015 # This test also demonstrates because of newline+category tunneling
17016 # through the list hander, template wrapping doesn't expand to the
17017 # containing list when the list item swallows the category.
17019 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
17024 <ul><li><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n[[Category:Foo]]"}},"i":0}}]}'>a
17025 </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul>
17029 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
17033 {{echo|[[Category:Foo]]
17037 <ul><li>a</li></ul>
17039 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]\n[[Category:Bar]]"}},"i":0}}]}'/><span about="#mwt1">
17040 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
17041 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
17045 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
17049 [[Category:Bar]]<!--boo1--> <!--boo2-->
17050 [[Category:Baz]]<!--boo3--> <!--boo4-->
17052 <ul><li>a</li></ul>
17054 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
17055 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
17059 Categories and newlines: should behave properly with linkprefix (T87753)
17074 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
17075 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
17079 No regressions on internal links following category (T174639)
17081 parsoid=wt2html,html2html
17083 [[Category:Foo]]<div>a
17088 <a href="/wiki/Foo" title="Foo">Foo</a></div>
17090 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
17092 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
17095 # Note that Parsoid differs slightly from PHP due to T175421
17097 11. Special case where only newlines separate links (T175416)
17099 parsoid=wt2html,html2html
17103 [[Foo]][[es:Alimento]]
17108 <a href="/wiki/Foo" title="Foo">Foo</a>
17109 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
17112 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
17114 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17116 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
17120 Category links with multiple namespaces
17122 [[Category:Project:Foo]]
17124 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
17128 Parsoid: Serialize link to category page with colon escape
17132 [[:Category:Foo|Bar]]
17134 <p><a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Category:Foo</a>
17135 <a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Bar</a>
17139 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
17140 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
17144 # We used to, but no longer wt2wt this test since the default serializer
17145 # will normalize all categories to serialize on their own line.
17146 # This wikitext usage is going to be fairly uncommon in production and
17147 # selser will take care of preventing whitespace insertion if this
17148 # occurs in an article.
17150 # html2html disabled for the same reason (whitespace insertion between
17153 # html2wt disabled because it localizes the "Category" namespace.
17155 Link prefix/suffixes aren't applied to category links
17165 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
17169 Link prefix/suffixes aren't applied to language links
17179 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
17183 Parsoid: Serialize link to file page with colon escape
17187 [[:File:Foo.png|Bar]]
17189 <p><a href="/index.php?title=File:Foo.png&action=edit&redlink=1" class="new" title="File:Foo.png (page does not exist)">File:Foo.png</a>
17190 <a href="/index.php?title=File:Foo.png&action=edit&redlink=1" class="new" title="File:Foo.png (page does not exist)">Bar</a>
17194 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
17195 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
17200 Parsoid: Serialize a genuine category link without colon escape
17203 [[Category:Foo|Bar]]
17206 <link rel="mw:PageProp/Category" href="./Category:Foo">
17207 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
17211 Normalize hrefs properly before testing for invalid link targets (T72894)
17215 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
17217 [[Category:Toxine bactérienne]]
17221 Parsoid: Defaultsort
17223 {{DEFAULTSORT:Foo}}
17225 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
17228 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
17229 # But, this is a limitation of our representation and is documented in
17230 # TemplateHandler.js in processSpecialMagicWord
17232 Parsoid: Defaultsort (template-generated)
17234 {{{{echo|DEFAULTSORT}}:Foo}}
17236 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{{{echo|DEFAULTSORT}}:Foo}}","dsr":[0,26,null,null]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,22,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DEFAULTSORT\"}},\"i\":0}}]}'>DEFAULTSORT</span>:Foo"}]]}'/>
17240 ### Inter-language links
17243 Interlanguage links
17251 es:Alimento fr:Nourriture zh:食品
17253 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17254 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
17255 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
17259 Duplicate interlanguage links (T26502)
17270 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
17271 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
17272 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
17273 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
17280 Basic section headings
17287 ===Smaller headline===
17290 <h2><span class="mw-headline" id="Headline_1">Headline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17293 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17296 <h3><span class="mw-headline" id="Smaller_headline">Smaller headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Smaller headline">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17302 Section headings with TOC
17305 ===Subheadline 1===
17306 =====Skipping a level=====
17307 ======Skipping a level======
17311 ===Another headline===
17313 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17315 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
17317 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
17319 <li class="toclevel-3 tocsection-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
17321 <li class="toclevel-4 tocsection-4"><a href="#Skipping_a_level_2"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Skipping a level</span></a></li>
17328 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
17330 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
17336 <h2><span class="mw-headline" id="Headline_1">Headline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17337 <h3><span class="mw-headline" id="Subheadline_1">Subheadline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Subheadline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17338 <h5><span class="mw-headline" id="Skipping_a_level">Skipping a level</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Skipping a level">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
17339 <h6><span class="mw-headline" id="Skipping_a_level_2">Skipping a level</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Skipping a level">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
17340 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17343 <h3><span class="mw-headline" id="Another_headline">Another headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Another headline">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17347 TOC anchors don't collide
17355 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17357 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
17358 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
17359 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
17360 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
17364 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17365 <h2><span class="mw-headline" id="Headline">Headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17366 <h2><span class="mw-headline" id="Headline_2_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17367 <h2><span class="mw-headline" id="Headline_3">Headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Headline">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17370 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
17371 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
17373 Handling of sections up to level 6 and beyond
17378 ==Level 2 Heading==
17379 ===Level 3 Heading===
17380 ====Level 4 Heading====
17381 =====Level 5 Heading=====
17382 ======Level 6 Heading======
17383 =======Level 7 Heading=======
17384 ========Level 8 Heading========
17385 =========Level 9 Heading=========
17386 ==========Level 10 Heading==========
17388 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17390 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
17392 <li class="toclevel-2 tocsection-2"><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
17394 <li class="toclevel-3 tocsection-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
17396 <li class="toclevel-4 tocsection-4"><a href="#Level_4_Heading"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Level 4 Heading</span></a>
17398 <li class="toclevel-5 tocsection-5"><a href="#Level_5_Heading"><span class="tocnumber">1.1.1.1.1</span> <span class="toctext">Level 5 Heading</span></a>
17400 <li class="toclevel-6 tocsection-6"><a href="#Level_6_Heading"><span class="tocnumber">1.1.1.1.1.1</span> <span class="toctext">Level 6 Heading</span></a></li>
17401 <li class="toclevel-6 tocsection-7"><a href="#.3DLevel_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">=Level 7 Heading=</span></a></li>
17402 <li class="toclevel-6 tocsection-8"><a href="#.3D.3DLevel_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">==Level 8 Heading==</span></a></li>
17403 <li class="toclevel-6 tocsection-9"><a href="#.3D.3D.3DLevel_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">===Level 9 Heading===</span></a></li>
17404 <li class="toclevel-6 tocsection-10"><a href="#.3D.3D.3D.3DLevel_10_Heading.3D.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.5</span> <span class="toctext">====Level 10 Heading====</span></a></li>
17418 <h1><span class="mw-headline" id="Level_1_Heading">Level 1 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17419 <h2><span class="mw-headline" id="Level_2_Heading">Level 2 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17420 <h3><span class="mw-headline" id="Level_3_Heading">Level 3 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17421 <h4><span class="mw-headline" id="Level_4_Heading">Level 4 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
17422 <h5><span class="mw-headline" id="Level_5_Heading">Level 5 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
17423 <h6><span class="mw-headline" id="Level_6_Heading">Level 6 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
17424 <h6><span class="mw-headline" id=".3DLevel_7_Heading.3D">=Level 7 Heading=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=7" title="Edit section: =Level 7 Heading=">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
17425 <h6><span class="mw-headline" id=".3D.3DLevel_8_Heading.3D.3D">==Level 8 Heading==</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=8" title="Edit section: ==Level 8 Heading==">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
17426 <h6><span class="mw-headline" id=".3D.3D.3DLevel_9_Heading.3D.3D.3D">===Level 9 Heading===</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=9" title="Edit section: ===Level 9 Heading===">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
17427 <h6><span class="mw-headline" id=".3D.3D.3D.3DLevel_10_Heading.3D.3D.3D.3D">====Level 10 Heading====</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ====Level 10 Heading====">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
17429 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
17430 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
17431 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
17432 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
17433 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
17434 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
17435 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
17436 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
17437 <h6 id="===Level_9_Heading===" data-parsoid='{}'><span id=".3D.3D.3DLevel_9_Heading.3D.3D.3D" typeof="mw:FallbackId"></span>===Level 9 Heading===</h6>
17438 <h6 id="====Level_10_Heading====" data-parsoid='{}'><span id=".3D.3D.3D.3DLevel_10_Heading.3D.3D.3D.3D" typeof="mw:FallbackId"></span>====Level 10 Heading====</h6>
17442 TOC regression (T11764)
17446 ====title 1.1.1====
17451 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17453 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17455 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a>
17457 <li class="toclevel-3 tocsection-3"><a href="#title_1.1.1"><span class="tocnumber">1.1.1</span> <span class="toctext">title 1.1.1</span></a></li>
17460 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
17463 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17465 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
17471 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17472 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17473 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
17474 <h3><span class="mw-headline" id="title_1.2">title 1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17475 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17476 <h3><span class="mw-headline" id="title_2.1">title 2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17480 TOC for heading containing <span id="..."></span> (T96153)
17483 ==<span id="old-anchor"></span>New title==
17485 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17487 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
17491 <h2><span class="mw-headline" id="New_title"><span id="old-anchor"></span>New title</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: New title">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17495 TOC with wgMaxTocLevel=3 (T8204)
17501 ====title 1.1.1====
17506 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17508 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17510 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
17511 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
17514 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17516 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
17522 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17523 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17524 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
17525 <h3><span class="mw-headline" id="title_1.2">title 1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17526 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17527 <h3><span class="mw-headline" id="title_2.1">title 2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17531 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
17537 ====Section 1.1.1====
17538 ====Section 1.1.1.1====
17541 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17543 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
17545 <li class="toclevel-2 tocsection-2"><a href="#Section_1.1"><span class="tocnumber">1.1</span> <span class="toctext">Section 1.1</span></a></li>
17548 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
17552 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17553 <h3><span class="mw-headline" id="Section_1.1">Section 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17554 <h4><span class="mw-headline" id="Section_1.1.1">Section 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
17555 <h4><span class="mw-headline" id="Section_1.1.1.1">Section 1.1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Section 1.1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
17556 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17561 Resolving duplicate section names
17566 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17567 <h2><span class="mw-headline" id="Foo_bar_2">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17571 Resolving duplicate section names with differing case (T12721)
17576 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17577 <h2><span class="mw-headline" id="Foo_Bar_2">Foo Bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17588 Template with sections, __NOTOC__
17595 <h2><span class="mw-headline" id="Section_0">Section 0</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 0">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17596 <h3><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Sections&action=edit&section=T-1" title="Template:Sections">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17597 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Sections&action=edit&section=T-2" title="Template:Sections">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17598 <h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17602 __NOEDITSECTION__ keyword
17608 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
17609 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
17613 Link inside a section heading
17615 ==Section with a [[Main Page|link]] in it==
17617 <h2><span class="mw-headline" id="Section_with_a_link_in_it">Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section with a link in it">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17621 TOC regression (T14077)
17628 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17630 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17632 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
17635 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17639 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17640 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
17641 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17645 T3219 URL next to image (good)
17647 http://example.com [[File:Foobar.jpg]]
17649 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
17652 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> <figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
17655 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17657 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17659 parsoid=wt2html,html2html
17662 The line above must have a trailing space!
17665 But just in case it doesn't...
17667 <h1><span class="mw-headline" id=".3D">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17668 <p>The line above must have a trailing space!
17670 <h1><span class="mw-headline" id=".3D_2">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17671 <p>But just in case it doesn't...
17674 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17675 <p>The line above must have a trailing space!</p>
17676 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17678 <p>But just in case it doesn't...</p>
17682 Header with special characters (T27462)
17684 The tooltips shall not show entities to the user (ie. be double escaped)
17701 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17703 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17705 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17706 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17707 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17708 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17709 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17713 <h2><span class="mw-headline" id="text_.3E_text">text > text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: text > text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17716 <h2><span class="mw-headline" id="text_.3C_text">text < text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: text < text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17719 <h2><span class="mw-headline" id="text_.26_text">text & text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: text & text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17722 <h2><span class="mw-headline" id="text_.27_text">text ' text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: text ' text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17725 <h2><span class="mw-headline" id="text_.22_text">text " text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: text " text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17729 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17731 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17734 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17737 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17740 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17743 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17748 Header with space, plus and underscore as entity
17750 Id should not contain + for spaces
17752 ==Space between Text==
17755 ==Space-Entity between Text==
17758 ==Plus+between+Text==
17761 ==Plus-Entity+between+Text==
17764 ==Underscore_between_Text==
17767 ==Underscore-Entity_between_Text==
17770 [[#Space between Text]]
17771 [[#Space-Entity between Text]]
17772 [[#Plus+between+Text]]
17773 [[#Plus-Entity+between+Text]]
17774 [[#Underscore_between_Text]]
17775 [[#Underscore-Entity_between_Text]]
17777 <p>Id should not contain + for spaces
17779 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17781 <li class="toclevel-1 tocsection-1"><a href="#Space_between_Text"><span class="tocnumber">1</span> <span class="toctext">Space between Text</span></a></li>
17782 <li class="toclevel-1 tocsection-2"><a href="#Space-Entity_between_Text"><span class="tocnumber">2</span> <span class="toctext">Space-Entity between Text</span></a></li>
17783 <li class="toclevel-1 tocsection-3"><a href="#Plus.2Bbetween.2BText"><span class="tocnumber">3</span> <span class="toctext">Plus+between+Text</span></a></li>
17784 <li class="toclevel-1 tocsection-4"><a href="#Plus-Entity.2Bbetween.2BText"><span class="tocnumber">4</span> <span class="toctext">Plus-Entity+between+Text</span></a></li>
17785 <li class="toclevel-1 tocsection-5"><a href="#Underscore_between_Text"><span class="tocnumber">5</span> <span class="toctext">Underscore_between_Text</span></a></li>
17786 <li class="toclevel-1 tocsection-6"><a href="#Underscore-Entity_between_Text"><span class="tocnumber">6</span> <span class="toctext">Underscore-Entity_between_Text</span></a></li>
17790 <h2><span class="mw-headline" id="Space_between_Text">Space between Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Space between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17793 <h2><span class="mw-headline" id="Space-Entity_between_Text">Space-Entity between Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Space-Entity between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17796 <h2><span class="mw-headline" id="Plus.2Bbetween.2BText">Plus+between+Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Plus+between+Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17799 <h2><span class="mw-headline" id="Plus-Entity.2Bbetween.2BText">Plus-Entity+between+Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Plus-Entity+between+Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17802 <h2><span class="mw-headline" id="Underscore_between_Text">Underscore_between_Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Underscore between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17805 <h2><span class="mw-headline" id="Underscore-Entity_between_Text">Underscore-Entity_between_Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Underscore-Entity_between_Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17807 </p><p><a href="#Space_between_Text">#Space between Text</a>
17808 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17809 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17810 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17811 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17812 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17815 <p>Id should not contain + for spaces</p>
17817 <h2 id="Space_between_Text">Space between Text</h2>
17820 <h2 id="Space-Entity_between_Text">Space-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&#32;","srcContent":" "}'> </span>between<span typeof="mw:Entity" data-parsoid='{"src":"&#32;","srcContent":" "}'> </span>Text</h2>
17823 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17826 <h2 id="Plus-Entity+between+Text"><span id="Plus-Entity.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&#43;","srcContent":"+"}'>+</span>between<span typeof="mw:Entity" data-parsoid='{"src":"&#43;","srcContent":"+"}'>+</span>Text</h2>
17829 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17832 <h2 id="Underscore-Entity_between_Text">Underscore-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&#95;","srcContent":"_"}'>_</span>between<span typeof="mw:Entity" data-parsoid='{"src":"&#95;","srcContent":"_"}'>_</span>Text</h2>
17835 <p><a rel="mw:WikiLink" href="./Parser_test#Space_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Space_between_Text"},"sa":{"href":"#Space between Text"}}'>#Space between Text</a>
17836 <a rel="mw:WikiLink" href="./Parser_test#Space-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Space-Entity_between_Text"},"sa":{"href":"#Space-Entity&#32;between&#32;Text"}}'>#Space-Entity between Text</a>
17837 <a rel="mw:WikiLink" href="./Parser_test#Plus+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Plus+between+Text"},"sa":{"href":"#Plus+between+Text"}}'>#Plus+between+Text</a>
17838 <a rel="mw:WikiLink" href="./Parser_test#Plus-Entity+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Plus-Entity+between+Text"},"sa":{"href":"#Plus-Entity&#43;between&#43;Text"}}'>#Plus-Entity+between+Text</a>
17839 <a rel="mw:WikiLink" href="./Parser_test#Underscore_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Underscore_between_Text"},"sa":{"href":"#Underscore_between_Text"}}'>#Underscore_between_Text</a>
17840 <a rel="mw:WikiLink" href="./Parser_test#Underscore-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Underscore-Entity_between_Text"},"sa":{"href":"#Underscore-Entity&#95;between&#95;Text"}}'>#Underscore-Entity_between_Text</a></p>
17843 # Parsoid html2wt disabled because it adds padding spaces around =
17845 Headers with excess '=' characters
17846 (Are similar tests necessary beyond the 1st level?)
17848 parsoid=wt2html,wt2wt,html2html
17852 =''italic'' heading==
17853 ==''italic'' heading=
17855 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17857 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17858 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17859 <li class="toclevel-1 tocsection-3"><a href="#italic_heading.3D"><span class="tocnumber">3</span> <span class="toctext"><i>italic</i> heading=</span></a></li>
17860 <li class="toclevel-1 tocsection-4"><a href="#.3Ditalic_heading"><span class="tocnumber">4</span> <span class="toctext">=<i>italic</i> heading</span></a></li>
17864 <h1><span class="mw-headline" id="foo.3D">foo=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: foo=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17865 <h1><span class="mw-headline" id=".3Dfoo">=foo</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =foo">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17866 <h1><span class="mw-headline" id="italic_heading.3D"><i>italic</i> heading=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: italic heading=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17867 <h1><span class="mw-headline" id=".3Ditalic_heading">=<i>italic</i> heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: =italic heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
17869 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17870 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17871 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17872 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17876 HTML headers vs TOC (T25393)
17877 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17889 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17891 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17893 <li class="toclevel-2 tocsection-1"><a href="#Header_1.1"><span class="tocnumber">1.1</span> <span class="toctext">Header 1.1</span></a></li>
17894 <li class="toclevel-2 tocsection-2"><a href="#Header_1.2"><span class="tocnumber">1.2</span> <span class="toctext">Header 1.2</span></a></li>
17897 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17899 <li class="toclevel-2 tocsection-3"><a href="#Header_2.1"><span class="tocnumber">2.1</span> <span class="toctext">Header 2.1</span></a></li>
17900 <li class="toclevel-2 tocsection-4"><a href="#Header_2.2"><span class="tocnumber">2.2</span> <span class="toctext">Header 2.2</span></a></li>
17906 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17907 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17908 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17909 <h1><span class="mw-headline" id="Header_2">Header 2
17911 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17912 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17914 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17915 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17916 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17918 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17920 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17921 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17922 <meta property="mw:PageProp/noeditsection"/>
17926 Single-line or multiline-comments can follow headings
17928 parsoid=wt2html,wt2wt
17936 <h2><span class="mw-headline" id="foo">foo</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: foo">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17937 <h2><span class="mw-headline" id="bar">bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17938 <h2><span class="mw-headline" id="baz">baz</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: baz">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17940 <h2 id="foo">foo</h2><!---->
17941 <h2 id="bar">bar</h2><!--c1-->
17942 <h2 id="baz">baz</h2><!--
17948 T3219 URL next to image (broken)
17950 http://example.com[[File:Foobar.jpg]]
17952 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
17955 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
17959 T3186 news: in the middle of text
17961 http://en.wikinews.org/wiki/Wikinews:Workplace
17963 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17969 Namespaced link must have a title
17978 Namespaced link must have a title (bad fragment version)
17980 [[Project:#fragment]]
17982 <p>[[Project:#fragment]]
17988 ### HTML tags and HTML attributes
17992 div with no attributes
17994 <div>HTML rocks</div>
17996 <div>HTML rocks</div>
18000 div with double-quoted attribute
18002 <div id="rock">HTML rocks</div>
18004 <div id="rock">HTML rocks</div>
18008 div with single-quoted attribute
18010 <div id='rock'>HTML rocks</div>
18012 <div id="rock">HTML rocks</div>
18016 div with unquoted attribute
18018 <div id=rock>HTML rocks</div>
18020 <div id="rock">HTML rocks</div>
18024 div with illegal double attributes
18026 <div id="a" id="b">HTML rocks</div>
18028 <div id="b">HTML rocks</div>
18032 div with empty attribute value, space before equals
18034 parsoid=wt2html,html2html
18036 <div class =>HTML rocks</div>
18038 <div class="">HTML rocks</div>
18040 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
18044 div with multiple empty attribute values
18046 wgFragmentMode=[ 'html5', 'legacy' ]
18048 parsoid=wt2html,html2html
18050 <div id= title=>HTML rocks</div>
18052 <div id="title=">HTML rocks</div>
18054 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
18057 # FIXME Parsoid doesn't actually match PHP here.
18059 Extension tag in attribute value
18063 <span title="<html><div>123</div></html>">ok</span>
18065 <p><span title="<div>123</div>">ok</span>
18068 <p><span title="123" about="#mwt4" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"123"},"sa":{"title":"<html><div>123</div></html>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<div typeof=\"mw:Extension/html\" about=\"#mwt3\" data-parsoid='{\"dsr\":[13,40,2,2]}' data-mw='{\"name\":\"html\",\"attrs\":{},\"body\":{\"extsrc\":\"&lt;div>123&lt;/div>\"}}'>123</div>"}]]}'>ok</span></p>
18072 table with multiple empty attribute values
18074 parsoid=wt2html,html2html
18080 <table title="id=">
18085 <table title="id=">
18086 <tbody><tr><td>hi</td></tr>
18091 div with braces in attribute value
18093 <div title="{}">Foo</div>
18095 <div title="{}">Foo</div>
18097 <div title="{}">Foo</div>
18101 div with empty attribute value, no space before equals
18103 parsoid=wt2html,html2html
18105 <div class=>HTML rocks</div>
18107 <div class="">HTML rocks</div>
18109 <div class="">HTML rocks</div>
18113 HTML multiple attributes correction
18115 <p class="error" class="awesome">Awesome!</p>
18117 <p class="awesome">Awesome!</p>
18121 Table multiple attributes correction
18124 !+ class="error" class="awesome"|status
18129 <th class="awesome">status
18136 <DIV ID="x">HTML ROCKS</DIV>
18138 <div id="x">HTML ROCKS</div>
18142 Non-ASCII pseudo-tags are rendered as text
18151 Pseudo-tag with URL 'name' renders as url link
18153 <http://example.com/>
18155 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
18160 text with amp in the middle of nowhere
18164 <p>Remember AT&T?
18169 text with character entity: eacute
18171 I always thought é was a cute letter.
18173 <p>I always thought é was a cute letter.
18178 text with entity-escaped character entity-like string: eacute
18180 I always thought &eacute; was a cute letter.
18182 <p>I always thought &eacute; was a cute letter.
18187 text with undefined character entity: xacute
18189 I always thought &xacute; was a cute letter.
18191 <p>I always thought &xacute; was a cute letter.
18198 <data value="5">five</data>
18199 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18200 <mark>This highlighted text</mark>
18202 <p><data value="5">five</data>
18203 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18204 <mark>This highlighted text</mark>
18209 HTML tag with leading space is parsed as text
18213 <p>< div>foo< /div>
18217 ## FIXME: The untrimmed attribute in Parsoid is T205737
18219 Element with broken attribute syntax
18223 <div style=" style="123">hi</div>
18226 <div style="style=">hi</div>
18229 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
18230 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
18234 ### Nesting tests (see T43545, T52604, T53081)
18237 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
18238 # Note that html2wt is considerably more difficult if we use <b> in
18239 # the test case, instead of <small>
18241 Ensure that HTML adoption agency algorithm is properly implemented.
18243 <small>X<small>Y</small>Z</small>
18245 <p><small>X<small>Y</small>Z</small>
18249 # This was T43545 in the PHP parser.
18253 <kbd>X<kbd>Y</kbd>Z</kbd>
18255 <p><kbd>X<kbd>Y</kbd>Z</kbd>
18259 # The following cases were T53081 in the PHP parser.
18260 # Note that there are some other nestable tags (b, i, etc) which are
18261 # not covered; see T53081 for discussion.
18266 <em>X<em>Y</em>Z</em>
18268 <p><em>X<em>Y</em>Z</em>
18273 Nesting of <strong>
18275 <strong>X<strong>Y</strong>Z</strong>
18277 <p><strong>X<strong>Y</strong>Z</strong>
18286 <p><q>X<q>Y</q>Z</q>
18293 <ruby>X<ruby>Y</ruby>Z</ruby>
18295 <p><ruby>X<ruby>Y</ruby>Z</ruby>
18302 <bdo>X<bdo>Y</bdo>Z</bdo>
18304 <p><bdo>X<bdo>Y</bdo>Z</bdo>
18316 [[Media:Foobar.jpg]]
18317 [[Media:Video.ogv]]
18318 [[:Media:Video.ogv]]
18320 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
18321 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18322 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18325 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
18326 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv">Media:Video.ogv</a>
18327 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv" data-parsoid='{"a":{"resource":"./Media:Video.ogv"},"sa":{"resource":":Media:Video.ogv"}}'>Media:Video.ogv</a></p>
18331 Media link with text
18333 [[Media:Foobar.jpg|A neat file to look at]]
18335 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
18338 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18342 Localized media link
18346 [[Miðill:Foobar.jpg]]
18348 [[Miðill:Foobar.jpg|Icelandic]]
18350 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Miðill:Foobar.jpg</a>
18351 </p><p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Icelandic</a>
18354 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Miðill:Foobar.jpg</a></p>
18355 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Icelandic</a></p>
18358 # FIXME: this is still bad HTML tag nesting
18359 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
18360 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
18362 Media link with nasty text
18364 parsoid=wt2html,html2html
18366 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
18368 <a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link<div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div></a>
18370 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg"><div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div></a>
18372 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Safe Link</a></p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg"><div style="display:none" data-parsoid='{"stx":"html"}'>" onmouseover="alert(document.cookie)" onfoo="</div></a>
18376 Media link from missing resource (parsoid-only)
18380 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18382 [[Media:Foobar.jpg|Bat!]]
18386 Media link from missing resource, localized (parsoid-only)
18391 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18393 [[Miðill:Foobar.jpg|Bat!]]
18396 # This is a sanity test to ensure we don't crash or choke when given
18397 # old cached 1.7.0 HTML for media links; we don't require that the
18398 # result be "valid" because wt2wt was completely broken in 1.7.0
18400 Media link from old 1.7.0 DOM spec (crash test, parsoid-only) T198511
18404 <p>This is what Parsoid would emit (and we still handle this HTML fine):</p>
18405 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18406 <p>But VisualEditor would mangle the rel attribute, and give us back this:</p>
18407 <p><a rel="mw:ExtLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18408 <p>But at least we don't crash when trying to handle the mangled HTML!</p>
18410 This is what Parsoid would emit (and we still handle this HTML fine):
18412 [[Media:Foobar.jpg|A neat file to look at]]
18414 But VisualEditor would mangle the rel attribute, and give us back this:
18416 [//example.com/images/3/3a/Foobar.jpg A neat file to look at]
18418 But at least we don't crash when trying to handle the mangled HTML!
18422 Media link to nonexistent file (T3702)
18424 [[Media:No such.jpg]]
18425 [[Media:No_such file.jpg]]
18427 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
18428 <a href="/index.php?title=Special:Upload&wpDestFile=No_such_file.jpg" class="new" title="No such file.jpg">Media:No_such file.jpg</a>
18431 <p><a rel="mw:MediaLink" href="./Special:FilePath/No_such.jpg" resource="./Media:No_such.jpg" title="No such.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"resource":"./Media:No_such.jpg"},"sa":{"resource":"Media:No such.jpg"}}'>Media:No such.jpg</a>
18432 <a rel="mw:MediaLink" href="./Special:FilePath/No_such_file.jpg" resource="./Media:No_such_file.jpg" title="No such file.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"resource":"./Media:No_such_file.jpg"},"sa":{"resource":"Media:No_such file.jpg"}}'>Media:No_such file.jpg</a></p>
18436 Image link to nonexistent file (T3850 - good)
18438 [[File:No_such.jpg]]
18440 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
18443 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/No_such.jpg"><span resource="./File:No_such.jpg">File:No such.jpg</span></a></figure-inline></p>
18447 :Image link to nonexistent file (T3850 - bad)
18449 [[:Image:No such.jpg]]
18451 <p><a href="/index.php?title=File:No_such.jpg&action=edit&redlink=1" class="new" title="File:No such.jpg (page does not exist)">Image:No such.jpg</a>
18454 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
18458 Character reference normalization in link text (T3938)
18460 [[Main Page|this&that]]
18462 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
18469 Test for unicode normalization
18471 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
18475 (T21451) Links should refer to the normalized form.
18483 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18484 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18485 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18486 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18487 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18492 Empty attribute crash test (T4067)
18494 <font color="">foo</font>
18496 <p><font color="">foo</font>
18501 Empty attribute crash test single-quotes (T4067)
18503 <font color=''>foo</font>
18505 <p><font color="">foo</font>
18510 Attribute test: equals, then nothing
18512 parsoid=wt2html,html2html
18514 <font color=>foo</font>
18516 <p><font color="">foo</font>
18519 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
18523 Attribute test: unquoted value
18525 parsoid=wt2html,html2html
18527 <font color=x>foo</font>
18529 <p><font color="x">foo</font>
18532 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
18536 Attribute test: unquoted but illegal value (hash)
18538 <font color=#x>foo</font>
18540 <p><font color="#x">foo</font>
18544 # Parsoid does not serialize to empty attribute syntax,
18545 # so wt2wt and html2wt cases are skipped
18547 Attribute test: no value (T54330)
18549 parsoid=wt2html,html2html
18551 <font color>foo</font>
18553 <p><font color="">foo</font>
18556 <p><font color="">foo</font></p>
18560 T4095: link with three closing brackets
18564 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
18567 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
18571 T4095: link with pipe and three closing brackets
18573 [[Main Page|link]]]
18575 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
18578 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
18582 T4095: link with pipe and three closing brackets, version 2
18584 [[Main Page|[http://example.com/]]]
18586 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
18589 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
18598 Template:Dangerous attribute
18600 " onmouseover="alert(document.cookie)
18604 Template:Dangerous style attribute
18606 border-size: expression(alert(document.cookie))
18612 <div style="float: right; {{{1}}}">Magic div</div>
18616 T4304: HTML attribute safety (safe template; regression T4309)
18618 <div title="{{test}}"></div>
18620 <div title="This is a test template"></div>
18622 <div title="This is a test template" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"This is a test template"},"sa":{"title":"{{test}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,20,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"test\",\"href\":\"./Template:Test\"},\"params\":{},\"i\":0}}]}'>This is a test template</span>"}]]}'></div>
18625 # Parsoid has enough context to handle this case
18627 T4304: HTML attribute safety (dangerous template; 2309)
18629 <div title="{{dangerous attribute}}"></div>
18631 <div title=""></div>
18633 <div title='" onmouseover="alert(document.cookie)' about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"\" onmouseover=\"alert(document.cookie)"},"sa":{"title":"{{dangerous attribute}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,35,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous attribute\",\"href\":\"./Template:Dangerous_attribute\"},\"params\":{},\"i\":0}}]}'>\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
18637 T4304: HTML attribute safety (dangerous style template; 2309)
18639 <div style="{{dangerous style attribute}}"></div>
18641 <div style="/* insecure input */"></div>
18643 <div style="/* insecure input */" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"{{dangerous style attribute}}"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,41,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous style attribute\",\"href\":\"./Template:Dangerous_style_attribute\"},\"params\":{},\"i\":0}}]}'>border-size: expression(alert(document.cookie))</span>"}]]}'></div>
18647 T4304: HTML attribute safety (safe parameter; 2309)
18649 {{div style|width: 200px}}
18651 <div style="float: right; width: 200px">Magic div</div>
18653 <div style="float: right; width: 200px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"float: right; width: 200px"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: 200px"}},"i":0}}]}'>Magic div</div>
18657 T4304: HTML attribute safety (unsafe parameter; 2309)
18659 {{div style|width: expression(alert(document.cookie))}}
18661 <div style="/* insecure input */">Magic div</div>
18663 <div style="/* insecure input */" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: expression(alert(document.cookie))"}},"i":0}}]}'>Magic div</div>
18666 ## Parsoid output here differs; needs investigation.
18668 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
18670 {{div style|"><script>alert(document.cookie)</script>}}
18672 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18675 ## Parsoid output here differs; needs investigation.
18677 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18679 {{div style|" ><script>alert(document.cookie)</script>}}
18681 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18685 T4304: HTML attribute safety (link)
18687 <div title="[[Main Page]]"></div>
18689 <div title="[[Main Page]]"></div>
18691 <div title="[[Main Page]]"></div>
18695 T4304: HTML attribute safety (italics)
18697 <div title="''foobar''"></div>
18699 <div title="''foobar''"></div>
18703 T4304: HTML attribute safety (bold)
18705 <div title="'''foobar'''"></div>
18707 <div title="'''foobar'''"></div>
18711 T4304: HTML attribute safety (ISBN)
18713 <div title="ISBN 1234567890"></div>
18715 <div title="ISBN 1234567890"></div>
18719 T4304: HTML attribute safety (RFC)
18721 <div title="RFC 1234"></div>
18723 <div title="RFC 1234"></div>
18727 T4304: HTML attribute safety (PMID)
18729 <div title="PMID 1234567890"></div>
18731 <div title="PMID 1234567890"></div>
18735 T4304: HTML attribute safety (web link)
18737 <div title="http://example.com/"></div>
18739 <div title="http://example.com/"></div>
18743 T4304: HTML attribute safety (named web link)
18745 <div title="[http://example.com/ link]"></div>
18747 <div title="[http://example.com/ link]"></div>
18749 <div title="[http://example.com/ link]"></div>
18753 T5244: HTML attribute safety (extension; safe)
18755 <div style="<nowiki>background:blue</nowiki>"></div>
18757 <div style="background:blue"></div>
18759 <div style="background:blue" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[12,44,8,9]}'>background:blue</span>"}]]}'></div>
18763 T5244: HTML attribute safety (extension; unsafe)
18765 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18767 <div style="/* insecure input */"></div>
18769 <div style="/* insecure input */" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[12,75,8,9]}'>border-left:expression(alert(document.cookie))</span>"}]]}'></div>
18772 # More MSIE fun discovered by Tom Gilder
18775 MSIE CSS safety test: spurious slash
18777 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18779 <div style="/* insecure input */">evil</div>
18781 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18785 MSIE CSS safety test: hex code
18787 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18789 <div style="/* insecure input */">evil</div>
18791 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18795 MSIE CSS safety test: comment in url
18797 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18799 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18801 <div style="background-image:u rl(javascript:alert('boo'))" data-parsoid='{"stx":"html","a":{"style":"background-image:u rl(javascript:alert('boo'))"},"sa":{"style":"background-image:u/**/rl(javascript:alert('boo'))"}}'>evil</div>
18805 MSIE CSS safety test: comment in expression
18807 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18809 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18811 <div style="background-image:expres sion(alert('boo4'))" data-parsoid='{"stx":"html","a":{"style":"background-image:expres sion(alert('boo4'))"},"sa":{"style":"background-image:expres/**/sion(alert('boo4'))"}}'>evil4</div>
18815 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18817 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18819 <p style="/* invalid control char */">A</p>
18821 <p style="/* invalid control char */" data-parsoid='{"stx":"html","a":{"style":"/* invalid control char */"},"sa":{"style":"font-size: 100px; background-image:url\\b(https://www.google.com/images/srpr/logo6w.png)"}}'>A</p>
18825 MSIE 6 CSS safety test: Fullwidth (T57332)
18827 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18828 <div style="top:EXPRESSION(alert())">B</div>
18830 <p style="/* insecure input */">A</p>
18831 <div style="/* insecure input */">B</div>
18833 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18834 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18838 MSIE 6 CSS safety test: IPA extensions (T57332)
18840 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18841 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18843 <div style="/* insecure input */">A</div>
18844 <p style="/* insecure input */">B</p>
18846 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18847 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')"}}'>B</p>
18851 MSIE 6 CSS safety test: sup/sub script (T57332)
18853 <div style="background-image:url⁽javascript:alert())">A</div>
18854 <div style="background-image:url₍javascript:alert())">B</div>
18855 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18857 <div style="/* insecure input */">A</div>
18858 <div style="/* insecure input */">B</div>
18859 <p style="/* insecure input */">C</p>
18861 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18862 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18863 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18869 parsoid=wt2html,html2html
18872 title="data:text/html,<img src=1 onerror=alert(1)>"
18873 style="-o-link:attr(title);-o-link-source:current">X</div>
18875 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18877 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */" data-parsoid='{"stx":"html","a":{"title":"data:text/html,<img src=1 onerror=alert(1)>","style":"/* insecure input */"},"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;","style":"-o-link:attr(title);-o-link-source:current"}}'>X</div>
18881 MSIE 6 CSS safety test: Repetition markers (T57332)
18883 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18884 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18885 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18886 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18887 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18888 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18889 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18891 <p style="/* insecure input */">A</p>
18892 <p style="/* insecure input */">B</p>
18893 <p style="/* insecure input */">C</p>
18894 <p style="/* insecure input */">D</p>
18895 <p style="/* insecure input */">E</p>
18896 <p style="/* insecure input */">F</p>
18897 <p style="/* insecure input */">G</p>
18899 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expres〱ion((title='XSSed'),'red')"}}'>A</p>
18900 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresゝion((title='XSSed'),'red')"}}'>B</p>
18901 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title='XSSed'),'red')"}}'>C</p>
18902 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresヽion((title='XSSed'),'red')"}}'>D</p>
18903 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹽion((title='XSSed'),'red')"}}'>E</p>
18904 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹼion((title='XSSed'),'red')"}}'>F</p>
18905 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title='XSSed'),'red')"}}'>G</p>
18909 Table attribute legitimate extension
18912 !+ style="<nowiki>color:blue</nowiki>"|status
18917 <th style="color:blue">status
18922 Table attribute safety
18925 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18930 <th style="/* insecure input */">status
18935 CSS line continuation 1
18937 <div style="background-image: u\ rl(test.jpg);"></div>
18939 <div style="/* insecure input */"></div>
18943 CSS line continuation 2
18945 <div style="background-image: u\ rl(test.jpg); "></div>
18947 <div style="/* invalid control char */"></div>
18957 Expansion of multi-line templates in attribute values (T8255)
18959 <div style="background: {{identity|#00FF00}}">-</div>
18961 <div style="background: #00FF00">-</div>
18965 Expansion of multi-line templates in attribute values (T8255 sanity check)
18967 <div style="background:
18970 <div style="background: #00FF00">-</div>
18972 <div style="background:
18977 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18979 <div style="background: #00FF00">-</div>
18981 <div style="background: #00FF00">-</div>
18985 Tags which are hidden from tidiers cannot pass through the Sanitizer
18987 <mw:toc><script>alert();</script></mw:toc>
18989 <p><mw:toc><script>alert();</script></mw:toc>
18994 ### Parser hooks (see tests/parser/ParserTestParserHook.php for the <tag> extension)
18998 Parser hook: empty input
19008 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19011 ## Don't expect parsoid to rt this form.
19013 Parser hook: empty input using terminated empty elements
19015 parsoid=wt2html,html2html
19025 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
19029 Parser hook: empty input using terminated empty elements (space before)
19039 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
19043 Parser hook: basic input
19053 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19056 ## Don't expect parsoid to rt this form.
19058 Parser hook: case insensitive
19060 parsoid=wt2html,html2html
19070 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19073 ## Don't expect parsoid to rt this form.
19075 Parser hook: case insensitive, redux
19077 parsoid=wt2html,html2html
19087 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19091 Parser hook: nested tags
19095 <tag><tag></tag></tag>
19106 </tag></pre><p></tag></p>
19108 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
19112 Parser hook: basic arguments
19114 <tag width="200" height="100" depth="50" square=""></tag>
19126 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19129 ## Don't expect parsoid to rt this form.
19131 Parser hook: basic arguments, variations
19133 parsoid=wt2html,html2html
19135 <tag width=200 height = "100" depth = '50' square></tag>
19147 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19151 Parser hook: argument containing a forward slash (T7344)
19153 <tag filename="/tmp/bla"></tag>
19158 'filename' => '/tmp/bla',
19162 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19165 ## Don't expect parsoid to rt this form.
19167 Parser hook: empty input using terminated empty elements (T4374)
19169 parsoid=wt2html,html2html
19180 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"}}'></pre><p>text</p>
19183 ## </tag> should be output literally since there is no matching tag that begins it
19184 ## Don't expect parsoid to rt this form.
19186 Parser hook: basic arguments using terminated empty elements (T4374)
19190 <tag width=200 height = "100" depth = '50' square/>
19207 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""}}' about="#mwt2"></pre><p>other stuff
19211 ## Don't expect parsoid to rt this form.
19213 Parser hook: Don't allow unclosed extension tags
19219 this is a '''test'''
19221 <p>test <tag>123
19222 </p><p>this is a <b>test</b>
19225 <p>test <tag>123</p>
19227 <p>this is a <b>test</b></p>
19231 Parser hook: horizontal rule inside extension tag that outputs <pre>
19251 ### (see tests/parser/ParserTestParserHook.php for the <statictag> extension)
19255 Parser hook: static parser hook not inside a comment
19257 <statictag>hello, world</statictag>
19259 <statictag action="flush" />
19265 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' about="#mwt2"></span></p>
19266 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"}}' about="#mwt4">hello, world</span></p>
19270 Parser hook: static parser hook inside a comment
19272 <!-- <statictag>hello, world</statictag> -->
19273 <statictag action="flush" />
19278 <!-- <statictag>hello, world</statictag> -->
19279 <p><span typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about='#mwt2'></span></p>
19282 # Nested template calls; this case was broken by Parser.php rev 1.506,
19286 Template:One-parameter
19288 (My parameter is: {{{1}}})
19292 Template:Map-one-parameter
19294 {{{{{1}}}|{{{2}}}}}
19298 Nested template calls
19300 {{Map-one-parameter|One-parameter|param}}
19302 <p>(My parameter is: param)
19312 Sanitizer: Closing of open tags
19314 <s></s><table></table>
19316 <p><s></s></p><table></table>
19318 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
19322 Sanitizer: Closing of open but not closed tags
19331 Sanitizer: Closing of closed but not open tags
19337 <p class="mw-empty-elt">
19342 Sanitizer: Closing of closed but not open table tags
19346 Table not started</td></tr></table>
19348 <p>Table not started</p>
19352 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
19354 title=[[Main Page]]
19356 wgFragmentMode=[ 'html5', 'legacy' ]
19358 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19360 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
19363 <p><span id="æ:_v" data-parsoid='{"stx":"html","a":{"id":"æ:_v"},"sa":{"id":"æ: v"}}'>byte</span><a rel="mw:WikiLink" href="./Main_Page#æ:_v" data-parsoid='{"stx":"piped","a":{"href":"./Main_Page#æ:_v"},"sa":{"href":"#æ: v"}}'>backlink</a></p>
19367 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
19369 wgFragmentMode=[ 'legacy' ]
19371 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19373 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
19377 # In HTML5, the restrictions are that id must contain at least one character,
19378 # and must not contain any space characters.
19380 Sanitizer: Validating the contents of the id attribute (T6515)
19384 <br id="" /><br id="a space" />
19389 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
19391 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
19395 <br id="foo" /><br id="foo" />
19397 Something need to be done. foo-2 ?
19401 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
19404 <meta itemprop="hello" content="world">
19405 <meta http-equiv="refresh" content="5">
19406 <meta itemprop="hello" http-equiv="refresh" content="5">
19407 <link itemprop="hello" href="{{SERVER}}">
19408 <link rel="stylesheet" href="{{SERVER}}">
19409 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
19413 <p> <meta itemprop="hello" content="world" />
19414 <meta http-equiv="refresh" content="5">
19415 <meta itemprop="hello" content="5" />
19416 <link itemprop="hello" href="http://example.org" />
19417 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
19418 <link itemprop="hello" href="http://example.org" />
19424 Sanitizer: Strip comments from CSS attributes
19426 parsoid=wt2html,wt2wt
19428 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
19430 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
19433 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
19437 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
19439 [[meatball:Soft"Security]]
19441 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
19444 <p><a rel="mw:WikiLink/Interwiki" href='http://www.usemod.com/cgi-bin/mb.pl?Soft"Security' title='meatball:Soft"Security'>meatball:Soft"Security</a></p>
19448 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
19450 [[meatball:Foo<Bar]]
19451 [[meatball:Foo>Bar]]
19452 [[meatball:Foo<bar]]
19453 [[meatball:Foo>bar]]
19455 <p>[[meatball:Foo<Bar]]
19456 [[meatball:Foo>Bar]]
19457 [[meatball:Foo<bar]]
19458 [[meatball:Foo>bar]]
19461 <p>[[meatball:Foo<Bar]]
19462 [[meatball:Foo>Bar]]
19463 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
19464 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
19468 Language converter: output gets cut off unexpectedly (T7757)
19472 this bit is safe: }-
19474 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
19476 then we get cut off here: }-
19478 all additional text is vanished
19480 <p>this bit is safe: }-
19481 </p><p>but if we add a conversion instance: xxx
19482 </p><p>then we get cut off here: }-
19483 </p><p>all additional text is vanished
19486 <p>this bit is safe: }-</p>
19487 <p>but if we add a conversion instance: <span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"xxx"},{"l":"zh-tw","t":"yyy"}]}'></span></p>
19488 <p>then we get cut off here: }-</p>
19489 <p>all additional text is vanished</p>
19493 Language converter glossary rules inside attributes (T119158)
19495 language=sr variant=sr-el
19497 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
19499 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
19502 </p><p><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="image"><img alt="" onload="alert(1)" data-foo="" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
19505 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
19507 <p><figure-inline class="mw-default-size" typeof="mw:Image mw:ExpandedAttrs" about="#mwt1" data-mw='{"attribs":[["alt",{"html":"alt=<span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\"\"}}' data-parsoid='{\"fl\":[],\"dsr\":[76,80,null,2]}'></span>foAjrjvi<span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\"\"}}' data-parsoid='{\"fl\":[],\"dsr\":[88,92,null,2]}'></span>","txt":"foAjrjvi"}]]}'><a href="./Датотека:Foobar.jpg"><img alt="foAjrjvi" resource="./Датотека: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":"./Датотека:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
19511 Self closed html pairs (T7487)
19513 <center><font id="bug" />Centered text</center>
19514 <div><font id="bug2" />In div text</div>
19516 <center><font id="bug"></font>Centered text</center>
19517 <div><font id="bug2"></font>In div text</div>
19521 Punctuation: nbsp before exclamation
19525 <p>C'est grave !
19530 Punctuation: CSS !important (T13874)
19532 <div style="width:50% !important">important</div>
19534 <div style="width:50% !important">important</div>
19538 Punctuation: CSS ! important (T13874; with space after)
19540 <div style="width:50% ! important">important</div>
19542 <div style="width:50% ! important">important</div>
19546 HTML bullet list, closed tags (T7497)
19558 <ul data-parsoid='{"stx":"html"}'>
19559 <li data-parsoid='{"stx":"html"}'>One</li>
19560 <li data-parsoid='{"stx":"html"}'>Two</li>
19565 HTML bullet list, unclosed tags (T7497)
19577 <ul data-parsoid='{"stx":"html"}'>
19578 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19579 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19584 HTML ordered list, closed tags (T7497)
19596 <ol data-parsoid='{"stx":"html"}'>
19597 <li data-parsoid='{"stx":"html"}'>One</li>
19598 <li data-parsoid='{"stx":"html"}'>Two</li>
19603 HTML ordered list, unclosed tags (T7497)
19616 <ol data-parsoid='{"stx":"html"}'>
19617 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19618 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19623 HTML nested bullet list, closed tags (T7497)
19645 <ul data-parsoid='{"stx":"html"}'>
19646 <li data-parsoid='{"stx":"html"}'>One</li>
19647 <li data-parsoid='{"stx":"html"}'>Two:
19648 <ul data-parsoid='{"stx":"html"}'>
19649 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19650 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19657 HTML nested bullet list, open tags (T7497)
19679 HTML nested ordered list, closed tags (T7497)
19703 HTML nested ordered list, open tags (T7497)
19738 HTML ordered list item with parameters oddity
19740 <ol><li id="fragment">One</li>
19743 <ol><li id="fragment">One</li>
19747 # parsoid doesn't explicitly mark autonumbered links, see T55505
19749 T7918: autonumbering
19751 [http://first/] [http://second] [ftp://ftp]
19755 [mailto:enclosed@mail.tld With target]
19757 [mailto:enclosed@mail.tld]
19759 mailto:inline@mail.tld
19761 <p><a rel="nofollow" class="external autonumber" href="http://first/">[1]</a> <a rel="nofollow" class="external autonumber" href="http://second">[2]</a> <a rel="nofollow" class="external autonumber" href="ftp://ftp">[3]</a>
19762 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19763 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19764 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19765 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19768 <p><a rel="mw:ExtLink" class="external autonumber" href="http://first/"></a> <a rel="mw:ExtLink" class="external autonumber" href="http://second"></a> <a rel="mw:ExtLink" class="external autonumber" href="ftp://ftp"></a></p>
19769 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19770 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19771 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19772 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19777 # Security and HTML correctness
19778 # From Nick Jenkins' fuzz testing
19782 Fuzz testing: Parser13
19795 # Note that Parsoid output differs from the PHP parser here: the PHP
19796 # parser breaks the URL for the magic word, while in Parsoid the URL
19797 # production takes precedence.
19799 Fuzz testing: Parser14
19804 <h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19805 http://<div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
19807 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19812 <h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2><p>
19813 http://</p><div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
19815 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19819 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19820 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19824 Fuzz testing: Parser14-table
19826 parsoid=wt2html,html2html
19831 <h2><span class="mw-headline" id="a">a</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19832 <table style="__TOC__">
19836 <h2><span class="mw-headline" id="a">a</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19837 <table style="__TOC__">
19838 <tbody><tr><td></td></tr>
19842 <table style="__TOC__"></table>
19845 # Known to produce bogus xml (extra </td>)
19846 # Don't add the html/php section since it generates broken HTML
19848 Fuzz testing: Parser16
19865 Fuzz testing: Parser21
19868 !irc://{{ftp://a" onmouseover="alert('hello world');"
19873 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19882 Fuzz testing: Parser22
19884 http://===r:::https://b
19888 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19895 ## Remex doesn't account for fostered content.
19896 ## Known to produce bad XML for now
19898 Fuzz testing: Parser24
19905 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19906 <br style="onmouseover='alert(document.cookie);' " />
19908 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19913 <u class="|">}}}} >
19914 <br style="onmouseover='alert(document.cookie);'" />
19916 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19925 <u class="|">}}}} >
19926 <br style="onmouseover='alert(document.cookie);'" />
19928 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19929 </u><table><tbody><tr>
19935 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
19937 <u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true}'><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>}}}} >
19938 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
19940 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
19941 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
19944 # Note: the current result listed for this is not what the original one was,
19945 # but the original bug was JavaScript injection, which is fixed in any case.
19946 # It's not clear that the original result listed was any more correct than the
19947 # current one. Original result:
19950 # <li class="||">
19951 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19953 Fuzz testing: Parser25 (T8055)
19959 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19961 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19964 <span about="#mwt1" typeof="mw:Param" data-parsoid='{"pi":[[{"k":"1"},{"k":"2"},{"k":"3"}]]}' data-mw='{"parts":[{"templatearg":{"target":{"wt":"\n"},"params":{"1":{"wt":" \n<LI CLASS="},"2":{"wt":""},"3":{"wt":"\n >\n"}},"i":0}},"blah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE CURSOR OVER HERE"]}'>
19965 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19969 Fuzz testing: URL adjacent extension (with space, clean)
19971 http://example.com <nowiki>junk</nowiki>
19973 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19976 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
19980 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19982 http://example.com<nowiki>junk</nowiki>
19984 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19987 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
19991 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19993 http://example.com<pre>junk</pre>
19995 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19997 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19999 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"junk"}}'>junk</pre>
20003 Fuzz testing: image with bogus manual thumbnail
20005 [[Image:foobar.jpg|thumbnail= ]]
20007 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
20009 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' data-mw='{"attribs":[["manualthumb",{"txt":""}]],"errors":[{"key":"apierror-invalidtitle","message":"Invalid thumbnail title.","params":{"name":""}}]}'><a href="./Special:FilePath/Foobar.jpg"><span resource="./File:Foobar.jpg" data-parsoid='{"a":{"resource":"./File:Foobar.jpg"},"sa":{"resource":"Image:foobar.jpg"}}'>File:Foobar.jpg</span></a><figcaption></figcaption></figure>
20012 # Parsoid will emit the newline literally in wt2wt; see next test case.
20014 Fuzz testing: encoded newline in generated HTML replacements (T8577)
20018 <pre dir=" "></pre>
20020 <pre dir=" "></pre>
20023 " typeof="mw:Extension/pre" about="#mwt2"data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
20027 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
20031 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
20032 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
20041 Templates in extension attributes are not expanded
20043 <pre dir="{{echo|ltr}}"></pre>
20045 <pre dir="{{echo|ltr}}"></pre>
20047 <pre dir="{{echo|ltr}}" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
20051 Parsing optional HTML elements (T8171)
20056 <td> Some tabular data</td>
20057 <td> More tabular data ...
20058 <td> And yet som tabular data</td>
20064 <td> Some tabular data</td>
20065 <td> More tabular data ...
20066 </td><td> And yet som tabular data</td>
20072 Correct handling of <td>, <tr> (T8171)
20077 <td> Some tabular data</td>
20078 <td> More tabular data ...</td>
20079 <td> And yet som tabular data</td>
20085 <td> Some tabular data</td>
20086 <td> More tabular data ...</td>
20087 <td> And yet som tabular data</td>
20094 Parsing crashing regression (fr:JavaScript)
20098 <p></body></x>
20103 Inline wiki vs wiki block nesting
20109 <p><b>Bold paragraph</b>
20110 </p><p>New wiki paragraph
20114 # FIXME: The current php output is documented
20115 # and desired output is the parsoid target.
20117 Inline HTML vs wiki block nesting
20123 <p><b>Bold paragraph
20124 </p><p>New wiki paragraph</b>
20127 <p><b>Bold paragraph
20128 </b></p><p><b>New wiki paragraph
20131 <p><b>Bold paragraph</b>
20132 </p><p>New wiki paragraph
20136 # Original result was this:
20137 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
20139 # While that might be marginally more intuitive, maybe, the six-apostrophe
20140 # construct is clearly pathological and the result stated here (which is what
20141 # the parser actually does) is about as reasonable as anything.
20143 Mixing markup for italics and bold
20146 '''bold''''''bold''bolditalics'''''
20148 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
20156 Article for special page transclusion test
20160 Special page transclusion
20163 {{Special:Prefixindex/Xyzzyx}}
20165 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20170 Special page transclusion twice (T7021)
20173 {{Special:Prefixindex/Xyzzyx}}
20174 {{Special:Prefixindex/Xyzzyx}}
20176 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20178 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20183 Transclusion of default MediaWiki message
20185 {{MediaWiki:Mainpage}}
20192 Transclusion of nonexistent MediaWiki message
20194 {{MediaWiki:Mainpagexxx}}
20196 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
20201 Transclusion of MediaWiki message with underscore
20203 {{MediaWiki:history_short}}
20210 Transclusion of MediaWiki message with space
20212 {{MediaWiki:history short}}
20219 Invalid header with following text
20229 Section extraction test (section 0)
20249 Section extraction test (section 1)
20271 Section extraction test (section 2)
20292 Section extraction test (section 3)
20312 Section extraction test (section 4)
20336 Section extraction test (section 5)
20356 Section extraction test (section 6)
20377 Section extraction test (section 7)
20397 Section extraction test (section 8)
20417 Section extraction test (section 9)
20438 Section extraction test (section 10)
20458 Section extraction test (nonexistent section 11)
20477 Section extraction test with bogus heading (section 1)
20482 ==bogus== not a legal section
20486 ==bogus== not a legal section
20490 Section extraction test with bogus heading (section 2)
20495 ==bogus== not a legal section
20502 Section extraction test with comment after heading (section 1)
20514 Section extraction test with comment after heading (section 2)
20526 Section extraction test with bogus <nowiki> heading (section 1)
20531 ==bogus== <nowiki>not a legal section</nowiki>
20535 ==bogus== <nowiki>not a legal section</nowiki>
20539 Section extraction test with bogus <nowiki> heading (section 2)
20544 ==bogus== <nowiki>not a legal section</nowiki>
20550 # Formerly testing for T4587, now resolved by the use of unmarked sections
20551 # instead of respecting commented sections
20553 Section extraction prefixed by comment (section 1)
20564 Section extraction prefixed by comment (section 2)
20573 # Formerly testing for T4607, now resolved by the use of unmarked sections
20574 # instead of respecting HTML-style headings
20576 Section extraction, mixed wiki and html (section 1)
20592 Section extraction, mixed wiki and html (section 2)
20608 # Formerly testing for T5342
20610 Section extraction, heading surrounded by <noinclude>
20614 <noinclude>==unmarked==</noinclude>
20620 # Test behavior of T21910
20622 Sectiion with all-equals
20627 The line above must have a trailing space
20630 But just in case it doesn't...
20634 But just in case it doesn't...
20638 Section replacement test (section 0)
20669 Section replacement test (section 1)
20698 Section replacement test (section 2)
20728 Section replacement test (section 3)
20759 Section replacement test (section 4)
20786 Section replacement test (section 5)
20817 Section replacement test (section 6)
20847 Section replacement test (section 7)
20878 Section replacement test (section 8)
20909 Section replacement test (section 9)
20938 Section replacement test (section 10)
20968 Section replacement test with initial whitespace (T15728)
20972 Preformatted initial line
20976 Preformatted initial line
20983 Section extraction, heading followed by pre with 20 spaces (T8398)
20995 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
21008 Section extraction, <pre> around bogus header (T12309)
21025 Section replacement, <pre> around bogus header (T12309)
21046 Handling of 
 in URLs
21050 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21052 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&#x0A;a"}}'>irc://%0Aa</a></li></ul>
21056 Handling of %0A in URLs
21060 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21062 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21065 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
21067 5 quotes, code coverage +1 line
21074 <p><b><i></i></b></p>
21077 # same html as previous, but wikitext adjusted to match parsoid html2wt
21078 # note that wt2html and html2html will put the <i> before the <b>
21080 5 quotes, code coverage +1 line w/ nowiki (1)
21082 parsoid=wt2wt,html2wt
21084 '''''<nowiki/>'''''
21089 <p><b><i></i></b></p>
21092 # same as previous, just swapping the <i> and <b>
21094 5 quotes, code coverage +1 line w/ nowiki (2)
21096 '''''<nowiki/>'''''
21101 <p><i><b></b></i></p>
21105 Special:Search page linking.
21109 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
21114 {{!}} is a magic word
21116 {{!}} is a magic word there and {{!}} is still a magic word here
21117 | is not a magic word here but {{!}} is still a magic word here
21119 <p>| is a magic word there and | is still a magic word here
21120 | is not a magic word here but | is still a magic word here
21123 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
21124 | is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
21130 title=[[Parser test]]
21144 *{{SUBJECTPAGENAME}}
21145 *{{SUBJECTPAGENAMEE}}
21148 *{{NAMESPACENUMBER}}
21153 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
21155 <ul><li>Parser test</li>
21156 <li>Parser_test</li>
21157 <li>Parser test</li>
21158 <li>Parser_test</li>
21159 <li>Parser test</li>
21160 <li>Parser_test</li>
21161 <li>Parser test</li>
21162 <li>Parser_test</li>
21163 <li>Parser test</li>
21164 <li>Parser_test</li>
21165 <li>Talk:Parser test</li>
21166 <li>Talk:Parser_test</li>
21167 <li>Parser test</li>
21168 <li>Parser_test</li>
21176 <li><a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a></li></ul>
21178 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
21181 Gallery with valid attributes
21183 <gallery type="123" summary="345">
21184 File:File:Foobar.jpg
21187 <ul class="gallery mw-gallery-traditional" type="123">
21188 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21189 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
21190 <div class="gallerytext">
21195 <ul class="gallery mw-gallery-traditional" type="123" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"type":"123","summary":"345"},"body":{}}'>
21196 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/File:Foobar.jpg"><span resource="./File:File:Foobar.jpg" data-width="120" data-height="120">File:File:Foobar.jpg</span></a></figure-inline></div><div class="gallerytext"></div></li>
21200 ## Parsoid thinks the "centre" here is a property, not a caption.
21205 "modes": ["wt2html"]
21213 image4 |300px| centre
21214 image5.svg| http://///////
21219 <ul class="gallery mw-gallery-traditional">
21220 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21221 <div class="thumb" style="height: 150px;">Image1.png</div>
21222 <div class="gallerytext">
21225 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21226 <div class="thumb" style="height: 150px;">Image2.gif</div>
21227 <div class="gallerytext">
21230 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21231 <div class="thumb" style="height: 150px;">Image3</div>
21232 <div class="gallerytext">
21235 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21236 <div class="thumb" style="height: 150px;">Image4</div>
21237 <div class="gallerytext">
21242 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21243 <div class="thumb" style="height: 150px;">Image5.svg</div>
21244 <div class="gallerytext">
21245 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
21249 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21250 <div class="thumb" style="height: 150px;">* image6</div>
21251 <div class="gallerytext">
21256 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21257 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Image1.png"><span resource="./File:Image1.png" data-width="120" data-height="120">File:Image1.png</span></a></figure-inline></div><div class="gallerytext"></div></li>
21258 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Image2.gif"><span resource="./File:Image2.gif" data-width="120" data-height="120">File:Image2.gif</span></a></figure-inline></div><div class="gallerytext"></div></li>
21259 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Image3"><span resource="./File:Image3" data-width="120" data-height="120">File:Image3</span></a></figure-inline></div><div class="gallerytext"></div></li>
21260 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Image4"><span resource="./File:Image4" data-width="300">File:Image4</span></a></figure-inline></div><div class="gallerytext"></div></li>
21261 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Image5.svg"><span resource="./File:Image5.svg" data-width="120" data-height="120">File:Image5.svg</span></a></figure-inline></div><div class="gallerytext"> <a rel="mw:ExtLink" class="external free" href="http://///////">http://///////</a></div></li>
21262 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/*_image6"><span resource="./File:*_image6" data-width="120" data-height="120">File:* image6</span></a></figure-inline></div><div class="gallerytext"></div></li>
21267 Gallery (with options, html)
21270 "modes": ["wt2html", "html2html"]
21273 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21274 File:Nonexistent.jpg|caption
21275 File:Nonexistent.jpg
21276 image:foobar.jpg|some '''caption''' [[Main Page]]
21278 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21281 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21282 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21283 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21284 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21285 <div class="gallerytext">
21290 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21291 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21292 <div class="gallerytext">
21295 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21296 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21297 <div class="gallerytext">
21298 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21302 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21303 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21304 <div class="gallerytext">
21307 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21308 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21309 <div class="gallerytext">
21316 <ul class="gallery mw-gallery-traditional" style="max-width: 226px; _width: 226px;" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"widths":"70px","heights":"40px","perrow":"2"},"body":{}}'>
21317 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21318 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Nonexistent.jpg"><span resource="./File:Nonexistent.jpg" data-width="70" data-height="40">File:Nonexistent.jpg</span></a></figure-inline></div><div class="gallerytext">caption</div></li>
21319 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Nonexistent.jpg"><span resource="./File:Nonexistent.jpg" data-width="70" data-height="40">File:Nonexistent.jpg</span></a></figure-inline></div><div class="gallerytext"></div></li>
21320 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
21321 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
21322 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="This is a foo-bar." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">blabla.</div></li>
21326 ## FIXME: This test can be dropped when Parsoid content versions 2.0.0 / 1.8.0
21327 ## are no longer in storage.
21329 Gallery (with options, extsrc)
21333 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21334 File:Nonexistent.jpg|caption
21335 File:Nonexistent.jpg
21336 image:foobar.jpg|some '''caption''' [[Main Page]]
21338 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21341 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21342 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21343 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21344 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21345 <div class="gallerytext">
21350 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21351 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21352 <div class="gallerytext">
21355 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21356 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21357 <div class="gallerytext">
21358 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21362 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21363 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21364 <div class="gallerytext">
21367 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21368 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21369 <div class="gallerytext">
21376 <ul class="gallery mw-gallery-traditional" style="max-width: 226px; _width: 226px;" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"widths":"70px","heights":"40px","perrow":"2","caption":"Foo [[Main Page]]"},"body":{"extsrc":"\nFile:Nonexistent.jpg|caption\nFile:Nonexistent.jpg\nimage:foobar.jpg|some '''caption''' [[Main Page]]\nimage:foobar.jpg\nimage:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.\n"}}'>
21377 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21378 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Nonexistent.jpg"><span resource="./File:Nonexistent.jpg" data-width="70" data-height="40">File:Nonexistent.jpg</span></a></figure-inline></div><div class="gallerytext">caption</div></li>
21379 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Nonexistent.jpg"><span resource="./File:Nonexistent.jpg" data-width="70" data-height="40">File:Nonexistent.jpg</span></a></figure-inline></div><div class="gallerytext"></div></li>
21380 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
21381 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
21382 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="This is a foo-bar." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">blabla.</div></li>
21387 Gallery (without px units)
21389 <gallery widths="70" heights="40">
21393 <ul class="gallery mw-gallery-traditional">
21394 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21395 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" decoding="async" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
21396 <div class="gallerytext">
21401 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70","heights":"40"},"body":{}}'>
21402 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
21407 Gallery (with invalid units)
21409 <gallery widths="70em" heights="40em">
21413 <ul class="gallery mw-gallery-traditional">
21414 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21415 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21416 <div class="gallerytext">
21421 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70em","heights":"40em"},"body":{}}'>
21422 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
21427 Gallery with link that has fragment
21430 "modes": ["wt2html", "html2html"]
21434 image:foobar.jpg|link=Main_Page
21435 image:foobar.jpg|link=Main_Page#section
21436 image:foobar.jpg|link=Main Page#section|caption
21439 <ul class="gallery mw-gallery-traditional">
21440 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21441 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21442 <div class="gallerytext">
21445 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21446 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21447 <div class="gallerytext">
21450 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21451 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21452 <div class="gallerytext">
21459 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21460 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Main_Page"><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></figure-inline></div><div class="gallerytext"></div></li>
21461 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Main_Page#section"><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></figure-inline></div><div class="gallerytext"></div></li>
21462 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Main_Page#section"><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></figure-inline></div><div class="gallerytext">caption</div></li>
21467 Gallery with template inside caption
21469 <gallery caption="{{echo|hi}}">
21470 File:Foobar.jpg|{{echo|ho}}
21473 <ul class="gallery mw-gallery-traditional">
21474 <li class='gallerycaption'>hi</li>
21475 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21476 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21477 <div class="gallerytext">
21484 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21485 <li class="gallerycaption"><span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span></li>
21486 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"><span about="#mwt5" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho"}},"i":0}}]}'>ho</span></div></li>
21491 Gallery with wikitext inside gallery caption
21494 "modes": ["wt2html", "html2html"]
21497 <gallery caption="# This should not be a list item
21499 Text '''bold''' [[link]] {{ns:-1}}
21501 [[File:Foobar.jpg|thumb|File in gallery caption]]">
21502 File:Foobar.jpg|Image caption
21505 <ul class="gallery mw-gallery-traditional">
21506 <li class='gallerycaption'># This should not be a list item Text <b>bold</b> <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">link</a> Special <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>File in gallery caption</div></div></div></li>
21507 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21508 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21509 <div class="gallerytext">
21516 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21517 <li class="gallerycaption"># This should not be a list item Text <b>bold</b> <a rel="mw:WikiLink" href="./Link" title="Link">link</a> <span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ns:-1","function":"ns"},"params":{},"i":0}}]}'>-1</span> <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>File in gallery caption</figcaption></figure></li>
21518 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext">Image caption</div></li>
21523 Gallery with wikitext inside caption
21526 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
21527 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
21530 <ul class="gallery mw-gallery-traditional">
21531 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21532 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21533 <div class="gallerytext">
21534 <p><a href="/wiki/File:Foobar.jpg" class="image" title="desc"><img alt="inneralt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" decoding="async" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
21538 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21539 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21540 <div class="gallerytext">
21541 <p>This is a test template
21547 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21548 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"><figure-inline typeof="mw:Image" data-mw='{"caption":"desc"}'><a href="./File:Foobar.jpg"><img alt="inneralt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></figure-inline></div></li>
21549 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"><span about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Test","href":"./Template:Test"},"params":{"1":{"wt":"unamedParam"},"alt":{"wt":"param"}},"i":0}}]}'>This is a test template</span></div></li>
21554 Gallery (with showfilename option)
21556 <gallery showfilename="">
21557 File:Nonexistent.jpg|caption
21558 File:Nonexistent.jpg
21559 File:Foobar.jpg|some '''caption''' [[Main Page]]
21563 <ul class="gallery mw-gallery-traditional">
21564 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21565 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21566 <div class="gallerytext">
21567 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21572 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21573 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21574 <div class="gallerytext">
21575 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21579 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21580 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21581 <div class="gallerytext">
21582 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21583 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21587 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21588 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21589 <div class="gallerytext">
21590 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21596 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
21597 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Nonexistent.jpg"><span resource="./File:Nonexistent.jpg" data-width="120" data-height="120">File:Nonexistent.jpg</span></a></figure-inline></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a>caption</div></li>
21598 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Nonexistent.jpg"><span resource="./File:Nonexistent.jpg" data-width="120" data-height="120">File:Nonexistent.jpg</span></a></figure-inline></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a></div></li>
21599 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a>some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
21600 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a></div></li>
21604 ## Should Parsoid be preserving these variations? See T151367
21606 Gallery (with namespace-less filenames)
21609 "modes": ["wt2html", "html2html"]
21613 File:Nonexistent.jpg
21619 <ul class="gallery mw-gallery-traditional">
21620 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21621 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21622 <div class="gallerytext">
21625 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21626 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21627 <div class="gallerytext">
21630 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21631 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21632 <div class="gallerytext">
21635 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21636 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21637 <div class="gallerytext">
21642 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21643 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Nonexistent.jpg"><span resource="./File:Nonexistent.jpg" data-width="120" data-height="120">File:Nonexistent.jpg</span></a></figure-inline></div><div class="gallerytext"></div></li>
21644 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Nonexistent.jpg"><span resource="./File:Nonexistent.jpg" data-width="120" data-height="120">File:Nonexistent.jpg</span></a></figure-inline></div><div class="gallerytext"></div></li>
21645 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
21646 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
21651 Gallery override link with wikilink (T36852)
21654 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21657 <ul class="gallery mw-gallery-traditional">
21658 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21659 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Wikilink"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21660 <div class="gallerytext">
21665 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21666 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Wikilink"><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></figure-inline></div><div class="gallerytext"></div></li>
21671 Gallery override link with absolute external link (T36852)
21674 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21677 <ul class="gallery mw-gallery-traditional">
21678 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21679 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21680 <div class="gallerytext">
21685 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21686 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
21690 ## Putting the caption at the end here runs into T49646 on the php side
21691 ## so reducing the modes this runs in Parsoid
21693 Gallery override link with absolute external link with LanguageConverter
21696 parsoid=wt2html,html2html
21699 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21702 <ul class="gallery mw-gallery-traditional">
21703 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21704 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21705 <div class="gallerytext">
21712 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21713 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext">caption</div></li>
21718 Gallery override link with malicious javascript (T36852)
21721 "modes": ["wt2html", "html2html"]
21725 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21728 <ul class="gallery mw-gallery-traditional">
21729 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21730 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%22_onclick%3D%22alert(%27malicious_javascript_code!%27);"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21731 <div class="gallerytext">
21736 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21737 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./%22_onclick=%22alert('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></figure-inline></div><div class="gallerytext"></div></li>
21742 Gallery with invalid title as link (T45964)
21745 "modes": ["wt2html", "html2html"]
21749 File:Foobar.jpg|link=<
21752 <ul class="gallery mw-gallery-traditional">
21753 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21754 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21755 <div class="gallerytext">
21760 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21761 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image" data-mw='{"attribs":[["link",{"txt":"<"}]]}'><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></figure-inline></div><div class="gallerytext"></div></li>
21766 Serialize gallery without attrs in data-mw
21769 "modes": ["html2wt"]
21772 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21773 <li class="gallerycaption">123</li>
21774 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span>File:Test.png</span></div><div class="gallerytext"></div></li>
21777 <gallery caption="123">
21783 Gallery with class and style attributes
21785 <gallery class="center" style="text-align: center;">
21789 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21790 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21791 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21792 <div class="gallerytext">
21797 <ul class="gallery mw-gallery-traditional center" style="text-align: center;" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"class":"center","style":"text-align: center;"},"body":{}}'>
21798 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
21803 Gallery in slideshow mode
21805 <gallery mode="slideshow" showthumbnails="">
21809 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21810 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21811 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21812 <div class="gallerytext">
21817 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21818 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"></div></li>
21823 Gallery in packed mode
21825 <gallery mode="packed">
21829 <ul class="gallery mw-gallery-packed">
21830 <li class="gallerybox" style="width: 1061.3333333333px"><div style="width: 1061.3333333333px">
21831 <div class="thumb" style="width: 1059.3333333333px;"><div style="margin:0px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1589px-Foobar.jpg" decoding="async" width="1060" height="120" srcset="http://example.com/images/3/3a/Foobar.jpg 1.5x" /></a></div></div>
21832 <div class="gallerytext">
21837 <ul class="gallery mw-gallery-packed" typeof="mw:Extension/gallery" about="#mwt3" data-parsoid='{"dsr":[0,50,23,10]}' data-mw='{"name":"gallery","attrs":{"mode":"packed"},"body":{}}'>
21838 <li class="gallerybox" style="width: 1061px;"><div class="thumb" style="width: 1059px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1589px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="120" width="1059"/></a></figure-inline></div><div class="gallerytext"></div></li>
21843 Serialize gallery image captions on a line
21846 "modes": ["html2wt"]
21849 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21850 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"><p>hi</p><p>ho</p></div></li>
21851 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext">hi<br />ho</div></li>
21855 File:Foobar.jpg| hi ho
21856 File:Foobar.jpg|hi<br />ho
21861 HTML Hex character encoding (spells the word "JavaScript")
21863 parsoid=wt2html,wt2wt,html2html
21865 JavaScript
21867 <p>JavaScript
21870 <p><span typeof="mw:Entity">J</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">v</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">S</span><span typeof="mw:Entity">c</span><span typeof="mw:Entity">r</span><span typeof="mw:Entity">i</span><span typeof="mw:Entity">p</span><span typeof="mw:Entity">t</span></p>
21874 HTML Hex character encoding bogus encoding (T28437 regression check)
21878 <p>&#xsee;&#XSEE;
21883 HTML Hex character encoding mixed case
21885 parsoid=wt2html,wt2wt,html2html
21892 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21895 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21896 # Note that U+000C (form feed) is not a valid XML character, so
21897 # it is banned even though allowed in HTML5.
21899 Illegal character references (T106578)
21904 ; Control (low): 
21905 ; Control (high):  Ÿ
21906 ; Surrogate: ��
21907 ; This is an okay astral character: 💩
21915 <dt>Control (low)</dt>
21917 <dt>Control (high)</dt>
21918 <dd>&#x7F; &#x9F;</dd>
21920 <dd>&#xD83D;&#xDCA9;</dd>
21921 <dt>This is an okay astral character</dt>
21922 <dd>💩</dd></dl>
21926 __FORCETOC__ override
21938 ISBN 978-0-1234-56 789
21940 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21943 <p><a href="./Special:BookSources/9780123456" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>789</p>
21947 ISBN followed by 5 spaces
21958 ISBN ISBN 1234567890
21960 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21963 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21966 # Uppercase X and lowercase x as well
21977 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21978 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21979 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21980 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21981 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21982 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21985 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21986 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21987 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21988 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21989 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21990 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21994 ISBN with empty prefix (parsoid test)
21998 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22001 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
22005 T24905: <abbr> followed by ISBN followed by </a>
22007 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
22009 <p><abbr>(fr)</abbr> <a href="/wiki/Special:BookSources/2753300917" class="internal mw-magiclink-isbn">ISBN 2753300917</a> <a rel="nofollow" class="external text" href="http://www.example.com">example.com</a>
22012 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" class="external text" href="http://www.example.com">example.com</a></p>
22020 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
22023 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
22027 Double RFC with a wiki link
22031 <p>RFC <a href="/index.php?title=RFC_1234&action=edit&redlink=1" class="new" title="RFC 1234 (page does not exist)">RFC 1234</a>
22034 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
22042 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
22045 <p><a href="https://tools.ietf.org/html/rfc983" rel="mw:ExtLink" class="external mw-magiclink" data-parsoid='{"stx":"magiclink"}'>RFC 983</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>987</p>
22049 Centre-aligned image
22051 [[Image:foobar.jpg|centre]]
22053 <div class="center"><div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div></div>
22055 <figure class="mw-default-size mw-halign-center" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"center","ak":"centre"}]}'><a href="./File:Foobar.jpg"><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><figcaption></figcaption></figure>
22061 [[Image:foobar.jpg|none]]
22063 <div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
22065 <figure class="mw-default-size mw-halign-none" typeof="mw:Image"><a href="./File:Foobar.jpg"><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><figcaption></figcaption></figure>
22069 Width + Height sized image (using px) (height is ignored)
22071 [[Image:foobar.jpg|640x480px]]
22073 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" decoding="async" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
22076 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640x480px"}]}'><a href="./File:Foobar.jpg"><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></figure-inline></p>
22080 Width-sized image (using px, no following whitespace)
22082 [[Image:foobar.jpg|640px]]
22084 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" decoding="async" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
22087 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640px"}]}'><a href="./File:Foobar.jpg"><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></figure-inline></p>
22091 Width-sized image (using px, with following whitespace - test regression from r39467)
22093 [[Image:foobar.jpg|640px ]]
22095 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" decoding="async" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
22098 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640px "}]}'><a href="./File:Foobar.jpg"><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></figure-inline></p>
22102 Width-sized image (using px, with preceding whitespace - test regression from r39467)
22104 [[Image:foobar.jpg| 640px]]
22106 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" decoding="async" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
22109 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":" 640px"}]}'><a href="./File:Foobar.jpg"><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></figure-inline></p>
22112 ## FIXME: Parsoid mocking should include the page in the url to catch regressions
22114 Image with page parameter
22118 [[File:LoremIpsum.djvu|page=2]]
22120 <p><a href="/index.php?title=File:LoremIpsum.djvu&page=2" class="image"><img alt="LoremIpsum.djvu" src="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-2480px-LoremIpsum.djvu.jpg" decoding="async" width="2480" height="3508" srcset="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-3720px-LoremIpsum.djvu.jpg 1.5x, http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-4960px-LoremIpsum.djvu.jpg 2x" /></a>
22123 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"attribs":[["page",{"txt":"2"}]]}'><a href="./File:LoremIpsum.djvu" data-parsoid='{"a":{"href":"./File:LoremIpsum.djvu"},"sa":{"href":"File:LoremIpsum.djvu"}}'><img resource="./File:LoremIpsum.djvu" src="//example.com/images/5/5f/LoremIpsum.djvu" data-file-width="2480" data-file-height="3508" data-file-type="bitmap" height="3508" width="2480" data-parsoid='{"a":{"resource":"./File:LoremIpsum.djvu","height":"3508","width":"2480"},"sa":{"resource":"File:LoremIpsum.djvu"}}'/></a></figure-inline></p>
22127 Another italics / bold test
22135 # FIXME: The php output seems broken. It's interleaving some open/close tags.
22141 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
22143 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
22146 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
22148 Images with the "|" character in the comment
22150 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
22152 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>An <a rel="nofollow" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx">external</a> URL</div></div></div>
22154 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>An <a rel="mw:ExtLink" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx" data-parsoid='{"a":{"href":"http://test/?param1=%7Cleft%7C&param2=%7Cx"},"sa":{"href":"http://test/?param1=|left|&param2=|x"}}'>external</a> URL</figcaption></figure>
22158 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
22160 <html><script>alert(1);</script></html>
22162 <p><html><script>alert(1);</script></html>
22167 HTML with raw HTML ($wgRawHtml==true)
22171 <html><script>alert(1);</script></html>
22173 <p><script>alert(1);</script>
22176 <p><script typeof="mw:Extension/html" about="#mwt3" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script></p>
22180 Parents of subpages, one level up
22182 subpage title=[[Subpage test/L1/L2/L3]]
22186 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">L2</a>
22192 Parents of subpages, one level up, not named
22194 subpage title=[[Subpage test/L1/L2/L3]]
22198 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">Subpage test/L1/L2</a>
22205 Parents of subpages, two levels up
22207 subpage title=[[Subpage test/L1/L2/L3]]
22213 <p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1</a>2
22214 </p><p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1l</a>
22219 Parents of subpages, two levels up, without trailing slash or name.
22221 subpage title=[[Subpage test/L1/L2/L3]]
22230 Parents of subpages, two levels up, with lots of extra trailing slashes.
22232 subpage title=[[Subpage test/L1/L2/L3]]
22236 <p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">Subpage test/L1</a>
22241 Subpage test/L1/L2/L3Sibling
22247 Transclusion of a sibling page (one level up)
22249 subpage title=[[Subpage test/L1/L2/L3]]
22258 Transclusion of a child page
22260 subpage title=[[Subpage test/L1/L2]]
22268 # This is wt2html only in Parsoid because we add <nowiki>
22269 # because of {{..}} and we don't expect to fix that to
22270 # eliminate the nowikis selective for {{..}} markup.
22272 Non-transclusion because of too many up levels
22274 subpage title=[[Subpage test/L1/L2/L3]]
22277 {{../../../../More than parent}}
22279 <p>{{../../../../More than parent}}
22282 <p>{{../../../../More than parent}}</p>
22286 Definition list code coverage
22299 <dl><dt>title </dt><dd>def</dd>
22300 <dt>title </dt><dd>def</dd>
22301 <dt>title</dt><dd>def</dd></dl>
22305 Don't fall for the self-closing div
22307 <div>hello world</div/>
22309 <div>hello world</div>
22317 <p>[[:Template:Msg]]
22326 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
22330 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
22332 Always escape literal '>' in output, not just after '<'
22346 <p>This is a test template
22347 This is a test template
22359 Inclusion of !userCanEdit() content
22363 <h2><span class="mw-headline" id="header">header</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=MediaWiki:Fake&action=edit&section=T-1" title="MediaWiki:Fake">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22368 Out-of-order TOC heading levels
22377 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
22379 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
22381 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
22382 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
22385 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
22387 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
22388 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
22394 <h2><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22395 <h6><span class="mw-headline" id="6">6</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: 6">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
22396 <h3><span class="mw-headline" id="3">3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: 3">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
22397 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
22398 <h5><span class="mw-headline" id="5">5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: 5">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
22399 <h2><span class="mw-headline" id="2_2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22404 ISBN with a dummy number
22414 ISBN with space-delimited number
22418 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
22421 <p data-parsoid='{"dsr":[0,18,0,0]}'><a href="./Special:BookSources/9290170328" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink","dsr":[0,18,2,2]}'>ISBN 92 9017 032 8</a></p>
22426 ISBN with multiple spaces, no number
22445 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22446 </p><p>ISBN 12345678901
22449 <p>ISBN 123456789</p>
22451 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22453 <p>ISBN 12345678901</p>
22458 ISBN with trailing year (T9110)
22460 ISBN 1-234-56789-0 - 2006
22462 ISBN 1 234 56789 0 - 2006
22464 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
22465 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
22468 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
22470 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
22477 wgFragmentMode=[ 'html5', 'legacy' ]
22479 {{anchorencode:foo bar©#%n}}
22484 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode:foo bar©#%n","function":"anchorencode"},"params":{},"i":0}}]}'>foo_bar©#%n</p>
22488 anchorencode (legacy)
22490 wgFragmentMode=[ 'legacy' ]
22492 {{anchorencode:foo bar©#%n}}
22494 <p>foo_bar.C2.A9.23.25n
22499 anchorencode trims spaces
22501 wgFragmentMode=[ 'html5', 'legacy' ]
22503 {{anchorencode: __pretty__please__}}
22508 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
22512 anchorencode deals with links
22514 wgFragmentMode=[ 'html5', 'legacy' ]
22516 {{anchorencode: [[hello|world]] [[hi]]}}
22521 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
22525 anchorencode deals with templates
22527 wgFragmentMode=[ 'html5', 'legacy' ]
22529 {{anchorencode: {{Foo}} x}}
22534 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
22538 anchorencode encodes like the TOC generator: (T20431)
22540 wgFragmentMode=[ 'html5', 'legacy' ]
22542 ===_ +:.3A%3A _ &&]] x===
22543 {{anchorencode: _ +:.3A%3A _ &&]] x}}
22546 <h3><span id=".2B:.3A.253A_.26.26.5D.5D_x"></span><span class="mw-headline" id="+:.3A%3A_&&]]_x">_ +:.3A%3A _ &&]] x</span></h3>
22547 <p>+:.3A%3A_&&]]_x
22550 <h3 id="+:.3A%3A_&&]]_x"><span id=".2B:.3A.253A_.26.26.5D.5D_x" typeof="mw:FallbackId"></span>_ +:.3A%3A _ &<span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&","dsr":[18,23,null,null]}'>&</span>]] x</h3>
22551 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: _ +:.3A%3A _ &&amp;]] x","function":"anchorencode"},"params":{},"i":0}}]}'>+:.3A%3A_&&<span typeof="mw:Entity">]</span><span typeof="mw:Entity">]</span>_x</p>
22552 <meta property="mw:PageProp/noeditsection"/>
22556 anchorencode encodes like the TOC generator: (T20431) (legacy)
22558 wgFragmentMode=[ 'legacy' ]
22560 ===_ +:.3A%3A&&]]===
22561 {{anchorencode: _ +:.3A%3A&&]] }}
22564 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
22565 <p>.2B:.3A.253A.26.26.5D.5D
22570 T8200: blockquotes and paragraph formatting
22591 T10293: Use of center tag ruins paragraph formatting
22612 Parsing of overlapping (improperly nested) inline html tags
22614 <span><s>x</span></s>
22616 <p><span><s>x</span></s></span>
22619 <p><span><s>x</s></span>
22624 ### Language variants related tests
22627 # Parsoid does not mark self-links.
22628 # Parsoid does not convert links; PHP will do any necessary redirects.
22631 Self-link in language variants
22633 title=[[Dunav]] language=sr
22635 Both [[Dunav]] and [[Дунав]] are names for this river.
22637 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22640 <p>Both <a rel="mw:WikiLink" href="./Dunav" title="Dunav">Dunav</a> and <a rel="mw:WikiLink" href="./Дунав" title="Дунав">Дунав</a> are names for this river.</p>
22650 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22652 title=[[Duna]] language=sr
22654 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22656 <p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <a class="mw-selflink selflink">Duna</a> and <a class="mw-selflink selflink">Dуна</a> are still self-links.
22659 <p><a rel="mw:WikiLink" href="./Дуна" title="Дуна">Дуна</a> is not a self-link while <a rel="mw:WikiLink" href="./Duna" title="Duna">Duna</a> and <a rel="mw:WikiLink" href="./Dуна" title="Dуна">Dуна</a> are still self-links.</p>
22663 Link to a section of a variant of this title shouldn't be parsed as self-link
22665 title=[[Duna]] language=sr
22667 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22669 <p><a class="mw-selflink selflink">Dуна</a> is a self-link while <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dunа#Foo</a> and <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dуна#Foo</a> are not self-links.
22672 <p><a rel="mw:WikiLink" href="./Dуна" title="Dуна">Dуна</a> is a self-link while <a rel="mw:WikiLink" href="./Dunа#Foo" title="Dunа">Dunа#Foo</a> and <a rel="mw:WikiLink" href="./Dуна#Foo" title="Dуна">Dуна#Foo</a> are not self-links.</p>
22676 Link to pages in language variants
22680 Main Page can be written as [[Маин Паге]]
22682 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22685 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22690 Multiple links to pages in language variants
22694 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22696 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a> can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a> same as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>.
22699 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a> can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a> same as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a>.</p>
22704 Simple template in language variants
22710 <p>This is a test template
22716 Template with explicit namespace in language variants
22722 <p>This is a test template
22728 Basic test for template parameter in language variants
22732 {{парамтест|param=foo}}
22734 <p>This is a test template with parameter foo
22739 Simple category in language variants
22743 [[Category:МедиаWики Усер'с Гуиде]]
22745 cat=МедиаWики_Усер'с_Гуиде sort=
22747 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22762 ## We used to, but no longer wt2wt this test since the default serializer
22763 ## will normalize all categories to serialize on their own line.
22764 ## This wikitext usage is going to be fairly uncommon in production and
22765 ## selser will take care of preserving formatting in those scenarios.
22767 Don't convert blue categorylinks to another variant (T35210)
22773 [[A]][[Category:分类]]
22777 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22778 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22782 Stripping -{}- tags (language variants)
22786 Latin proverb: -{Ne nuntium necare}-
22788 <p>Latin proverb: Ne nuntium necare
22791 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22796 Prevent conversion with -{}- tags (language variants)
22798 language=sr variant=sr-ec
22800 Latinski: -{Ne nuntium necare}-
22802 <p>Латински: Ne nuntium necare
22805 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22810 Prevent conversion of text with -{}- tags (language variants)
22812 language=sr variant=sr-ec
22814 Latinski: -{Ne nuntium necare}-
22816 <p>Латински: Ne nuntium necare
22819 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22824 Prevent conversion of links with -{}- tags (language variants)
22826 language=sr variant=sr-ec
22830 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22833 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<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>"}}'></span></p>
22838 -{}- tags within headlines (within html for parserConvert())
22840 wgFragmentMode=[ 'html5', 'legacy' ]
22842 language=sr variant=sr-ec
22846 Note that even an unprotected headline ID is not affected by language
22851 <h2><span id="-.7BNaslov.7D-"></span><span class="mw-headline" id="-{Naslov}-">Naslov</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Уредите одељак „Naslov”">уреди</a><span class="mw-editsection-bracket">]</span></span></h2>
22852 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22855 <h2><span class="mw-headline" id="Latinski">Латински</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Уредите одељак „Латински”">уреди</a><span class="mw-editsection-bracket">]</span></span></h2>
22857 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22859 <p>Note that even an unprotected headline ID is not affected by language
22862 <h2 id="Latinski">Latinski</h2>
22866 Explicit definition of language variant alternatives
22868 language=zh variant=zh-tw
22870 -{zh:China;zh-tw:Taiwan}-, not China
22872 <p>Taiwan, not China
22875 <p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'></span>, not China</p>
22879 Explicit definition of language variant alternatives (BCP 47 codes)
22881 language=zh variant=zh-tw
22883 -{zh:China;zh-Hant-TW:Taiwan}-, not China
22885 <p>Taiwan, not China
22888 <p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-Hant-TW","t":"Taiwan"}]}'></span>, not China</p>
22892 Filter syntax for language variants
22894 language=zh variant=zh-tw
22896 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22898 <p>fooblog, WEBJOURNAL, WEBLOGquux
22901 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22904 # Note that Parsoid post-processing for language variants needs to
22905 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22907 Conversion around HTML tags
22909 language=sr variant=sr-ec
22911 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22912 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22915 <span title="ЛаCтин">ски</span>
22918 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[8]}' data-mw-variant='{"add":true,"oneway":[{"f":"span","l":"sr-ec","t":"script"},{"f":"title","l":"sr-ec","t":"src"}]}'/>
22919 <span title="Latin" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"title"},{"html":"La<span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"sr-el\",\"t\":\"L\"},{\"l\":\"sr-ec\",\"t\":\"C\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[6],\"dsr\":[57,76,null,2]}'></span>tin"}]]}'>ski</span></p>
22923 Explicit session-wise two-way language variant mapping (A flag and - flag)
22925 language=zh variant=zh-tw
22927 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22929 Taiwan is not China.
22931 But -{A|zh:China; zh-tw:Taiwan}- is China,
22933 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22935 and -{China}- is China.
22937 <p>This is Taiwan, but we'll forget that now.
22938 </p><p>Taiwan is not China.
22939 </p><p>But Taiwan is Taiwan,
22940 </p><p>(This should be stripped!)
22941 </p><p>and China is China.
22944 <p>This is <span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'></span>, but we'll forget that now.</p>
22945 <p>Taiwan is not China.</p>
22946 <p>But <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'></span> is China,</p>
22947 <p>(This<meta typeof="mw:LanguageVariant" data-mw-variant='{"remove":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/> should be stripped!)</p>
22948 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22952 Explicit session-wise one-way language variant mapping (A flag and - flag)
22954 language=zh variant=zh-tw
22956 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22958 COUNTRY is China or Taiwan.
22960 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22962 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22964 and -{COUNTRY}- is COUNTRY.
22966 <p>This is Taiwan, but we'll forget that now.
22967 </p><p>COUNTRY is China or Taiwan.
22968 </p><p>But Taiwan is Taiwan,
22969 </p><p>(This should be stripped!)
22970 </p><p>and COUNTRY is COUNTRY.
22973 <p>This is <span typeof="mw:LanguageVariant" data-mw-variant='{"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}]}'></span>, but we'll forget that now.</p>
22974 <p>COUNTRY is China or Taiwan.</p>
22975 <p>But <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}]}'></span> is COUNTRY,</p>
22976 <p>(This<meta typeof="mw:LanguageVariant" data-mw-variant='{"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}],"remove":true}'/> should be stripped!)</p>
22977 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22981 Explicit session-wise two-way language variant mapping (H flag for hide)
22983 language=zh variant=zh-tw
22985 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22989 <p>(This should be stripped!)
22990 </p><p>Taiwan is Taiwan.
22993 <p>(This<meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/> should be stripped!)</p>
22994 <p>Taiwan is China.</p>
22998 Explicit session-wise one-way language variant mapping (H flag for hide)
23000 language=zh variant=zh-tw
23002 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
23004 COUNTRY is Taiwan or China.
23006 <p>(This should be stripped!)
23007 </p><p>Taiwan is Taiwan or China.
23010 <p>(This<meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[8]}' data-mw-variant='{"add":true,"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}]}'/> should be stripped!)</p>
23011 <p>COUNTRY is Taiwan or China.</p>
23014 ## Note that parsoid test runner does not support 'showtitle' option.
23016 Adding explicit conversion rule for title (T flag)
23018 language=zh variant=zh-tw showtitle
23020 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
23025 <p>Should be stripped!
23026 </p><p>Taiwan is China.
23029 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
23030 <p>Taiwan is China.</p>
23034 Code coverage: T combined with H flag
23036 language=zh variant=zh-tw showtitle
23038 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
23043 <p>Should be stripped!
23044 </p><p>Taiwan is Taiwan.
23047 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
23048 <p>Taiwan is China.</p>
23052 Code coverage: T with no variants
23054 language=zh variant=zh-tw showtitle
23056 -{H|zh:China; zh-tw:Taiwan}-
23057 Taiwan is China.-{T|Taiwan is China}-
23064 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23065 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
23069 Code coverage: rules with no variants
23071 language=zh variant=zh-tw
23073 -{H|zh:China; zh-tw:Taiwan}-
23084 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23086 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
23087 Taiwan is China.</p>
23092 Code coverage: D flag for conversion rule
23094 language=zh variant=zh-tw
23096 -{D|zh-cn:XA; zh-tw:YA}-
23097 -{A;D|zh-cn:XB; zh-tw:YB}-
23098 -{D;H|zh-cn:XC; zh-tw:YC}-
23100 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
23106 XA XB XC YA YB YC FOO BAR BAT 012345
23111 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
23115 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
23118 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
23119 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
23120 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
23121 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"FOO","l":"zh-tw","t":"BAR"},{"f":"FOO","l":"zh-cn","t":"BAT"}]}'></span></p>
23122 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
23123 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
23124 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
23125 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
23129 Code coverage: N flag for conversion rule
23131 language=zh variant=zh-cn
23141 </p><p>српски (ћирилица)
23144 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
23145 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
23146 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
23149 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
23151 Code coverage: N flag for conversion rule (wt2html only)
23153 language=zh variant=zh-cn
23154 parsoid=wt2html,html2html
23161 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
23165 Testing that changing the language variant here in the tests actually works
23167 language=zh variant=zh showtitle
23169 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23172 <p>Should be stripped!
23175 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
23179 Recursive conversion of alt and title attrs shouldn't clear converter state
23181 language=zh variant=zh-cn
23184 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
23185 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
23189 Should be stripped<span title="Exclamation">!</span>
23192 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
23193 Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh-cn","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/><span title="exclamation">!</span></p>
23197 T26072: more test on conversion rule for title
23199 language=zh variant=zh-tw showtitle
23201 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23203 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
23206 <p>This should be stripped!
23207 </p><p>This won't take interferes with the title rule.
23210 <p>This should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
23211 <p>This won't take interferes with the title rule<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"Beijing"},{"l":"zh-tw","t":"Taipei"}]}'/>.</p>
23215 Partly disable title conversion if variant == main language code
23217 language=zh variant=zh title=[[ZH]] showtitle
23219 -{T|zh-cn:CN;zh-tw:TW}-
23225 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"title":true,"twoway":[{"l":"zh-cn","t":"CN"},{"l":"zh-tw","t":"TW"}]}'/></p>
23229 Partly disable title conversion if variant == main language code, more
23231 language=zh variant=zh title=[[ZH]] showtitle
23239 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
23243 Raw output of variant escape tags (R flag)
23245 language=zh variant=zh-tw
23247 Raw: -{R|zh:China;zh-tw:Taiwan}-
23249 <p>Raw: zh:China;zh-tw:Taiwan
23252 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
23255 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
23257 Raw output of variant escape tags (R flag) (wt2html only)
23259 language=zh variant=zh-tw
23260 parsoid=wt2html,html2html
23262 -{Variant}- -{D|syntax}- -{D;R|options}-
23264 <p>Variant syntax options
23267 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Variant"}}'></span> <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"syntax"}}'></span> <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"options"}}'></span></p>
23271 Nested markup inside raw output of variant escape tags (R flag)
23273 language=zh variant=zh-tw
23275 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
23277 <p>Nested raw: nested Taiwan nested
23280 <p>Nested raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"nested <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh\",\"t\":\"China\"},{\"l\":\"zh-tw\",\"t\":\"Taiwan\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[6],\"dsr\":[23,48,null,2]}'></span> nested"}}'></span></p>
23284 Nested markup and spaces inside raw output of variant escape tags (R flag)
23286 language=zh variant=zh-tw
23288 X-{ outer -{ inner }- outer }-X
23290 <p>X outer inner outer X
23293 <p>X<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":" outer <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\" inner \"}}' data-parsoid='{\"fl\":[],\"dsr\":[10,21,null,2]}'></span> outer "}}'></span>X</p>
23297 Templates inside raw output of variant escape tags (R flag)
23299 language=zh variant=zh-tw
23301 Nested raw: -{R|nested {{echo|hi}} templates}-
23303 <p>Nested raw: nested hi templates
23306 <p>Nested raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"nested <span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[23,34,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span> templates"}}'></span></p>
23310 Strings evaluating false shouldn't be ignored by Language converter (T51072)
23312 language=zh variant=zh-cn
23314 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
23319 <p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[12]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"0"},{"l":"zh-sg","t":"1"},{"l":"zh-tw","t":"2"},{"l":"zh-hk","t":"3"}]}'></span></p>
23323 Conversion rules from [numeric-only string] to [something else] (T48634)
23325 language=zh variant=zh-cn
23327 -{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
23332 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"B"}]}'/><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"C"},{"f":"0","l":"zh-cn","t":"D"}]}'/><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-hans","t":"A"}]}'/>012345<span typeof="mw:LanguageVariant" data-parsoid='{"fl":["A"],"tSp":[7]}' data-mw-variant='{"add":true,"twoway":[{"l":"zh-tw","t":"0"},{"l":"zh-cn","t":"E"}]}'></span>012345</p>
23336 Two-way converter rule entries with an empty value should be ignored (T53551)
23338 language=zh variant=zh-cn
23340 -{H|zh-cn:foo;zh-tw:;}-foobar
23345 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[7]}' data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"foo"},{"l":"zh-tw","t":""}]}'/>foobar</p>
23349 One-way converter rule entries with an empty "from" string should be ignored (T53551)
23351 language=zh variant=zh-cn
23353 -{H|=>zh-cn:foo;}-foobar
23358 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
23362 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
23364 language=zh variant=zh-cn
23371 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
23375 Nested using of manual convert syntax
23377 language=zh variant=zh-hk
23379 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
23381 <p>Nested: Hello Hong Kong!
23384 <p>Nested: <span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[7]}' data-mw-variant='{"twoway":[{"l":"zh-hans","t":"Hi <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh-cn\",\"t\":\"China\"},{\"l\":\"zh-sg\",\"t\":\"Singapore\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[7],\"dsr\":[21,53,null,2]}'></span>"},{"l":"zh-hant","t":"Hello <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh-tw\",\"t\":\"Taiwan\"},{\"l\":\"zh-hk\",\"t\":\"H&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"ong\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[90,97,null,2]}&apos;>&lt;/span> K&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[99,103,null,2]}&apos;>&lt;/span>ong\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[7],\"dsr\":[68,109,null,2]}'></span>"}]}'></span>!</p>
23388 HTML markups with conversion syntax in attribs, nested in other conversion blocks
23390 language=zh variant=zh-cn
23392 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
23394 <p><span title="X">A</span>
23397 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"<span title=\"\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"title\":\"\"},\"sa\":{\"title\":\"-{X}-\"},\"dsr\":[21,49,20,7]}' data-mw='{\"attribs\":[[{\"txt\":\"title\"},{\"html\":\"&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[34,39,null,2]}&apos;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
23401 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
23403 language=zh variant=zh-cn
23405 -{<span title="-{X}-">A</span>}-
23406 !! html/php+disabled
23407 <p><span title="X">A</span>
23410 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span title=\"\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"title\":\"\"},\"sa\":{\"title\":\"-{X}-\"},\"dsr\":[2,30,20,7]}' data-mw='{\"attribs\":[[{\"txt\":\"title\"},{\"html\":\"&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[15,20,null,2]}&apos;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
23413 # Parsoid and PHP disagree on how to parse this example: Parsoid
23414 # insists that the content of a language converter element be a valid
23415 # DOM fragment or attribute string
23417 Language converter markup with block content
23419 language=zh variant=zh-cn
23421 <span>a-{b<div>c}-d
23423 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
23425 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
23429 <span>ad</span></div></span></div></span>
23431 <span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<div typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[10,16,5,0]}'>c</div>"}}'></div>d
23433 <span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<div typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[50,56,5,0]}'>c</div>"}}'></div>d
23435 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"x<span data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[82,89,6,0]}'>y</span>"},{"f":"0","l":"zh-tw","t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[100,106,5,0]}'>c</div>"}]}'/>d</span></p></span></span>
23439 LanguageConverter selser (1)
23441 language=zh variant=zh-cn
23443 "modes": ["wt2wt", "selser"],
23445 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23455 LanguageConverter selser (2)
23457 language=zh variant=zh-cn
23459 "modes": ["wt2wt", "selser"],
23461 ["span[class='x']", "contents", "text", "-{foo}-"],
23462 ["a", "contents", "text", "-{"],
23463 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
23467 <span class="x">TEXT1</span>
23468 [http://example.com TEXT2]
23472 <span class="x"><nowiki>-{foo}-</nowiki></span>
23473 [http://example.com -{]
23474 [[Foo|<nowiki>-{</nowiki>]]
23475 {{1x|<nowiki>-{</nowiki>}}
23478 # Tests LanguageVariantText in ConstrainedText
23480 LanguageConverter selser (3)
23482 language=zh variant=zh-cn
23484 "modes": ["wt2wt", "selser"],
23486 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
23487 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23498 |<nowiki/>-{edited}-
23502 # Tests LanguageVariantText._fromSelSer
23504 LanguageConverter selser (4)
23506 language=zh variant=zh-cn
23508 "modes": ["wt2wt", "selser"],
23510 ["td > span.x", "remove"]
23516 |<span class="x">Foo</span>-{Bar}-
23517 ||<span class="x">Foo</span>-{Bar}-
23527 # Since Parsoid is starting to emit canonical wikitext for links,
23528 # [http://example.com http://example.com] will not RT back to that
23530 # Parsoid does not language-convert links (it is done in a
23531 # post-processing step)
23533 Proper conversion of text in external links
23535 language=sr variant=sr-ec
23538 http://www.google.com
23539 gopher://www.google.com
23540 [http://www.google.com http://www.google.com]
23541 [gopher://www.google.com gopher://www.google.com]
23542 [https://www.google.com irc://www.google.com]
23543 [ftp://www.google.com www.google.com/ftp://dir]
23544 [//www.google.com www.google.com]
23546 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
23547 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23548 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
23549 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23550 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
23551 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
23552 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
23555 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
23556 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23557 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
23558 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23559 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
23560 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
23561 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
23565 Do not convert roman numbers to language variants
23567 language=sr variant=sr-ec
23571 <p>Фридрих IV је цар.
23574 <p>Fridrih IV je car.</p>
23578 Unclosed language converter markup "-{"
23589 Don't convert raw rule "-{R|=>}-" to "=>"
23598 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"=<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;gt;\",\"srcContent\":\">\",\"dsr\":[5,9,null,null]}'>></span>"}}'></span></p>
23602 Don't break link parsing if language converter markup is in the caption.
23604 language=sr variant=sr-ec
23606 [[Main Page|-{R|main page}-]]
23608 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23611 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"main page"}}' data-parsoid='{"fl":["R"]}'></span></a></p>
23615 T146304: Don't break template parsing if language converter markup is in the parameter.
23617 language=sr variant=sr-ec
23624 <p><span typeof="mw:Transclusion mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo"}}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Шаблон:Echo"},"params":{"1":{"wt":"-{R|foo}-"}},"i":0}}]}'></span></p>
23628 T146305: Don't break image parsing if language converter markup is in the caption.
23632 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23634 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="internal" title="Повећајте"></a></div>caption:</div></div></div>
23636 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"}]}'><a href="./Датотека:Foobar.jpg"><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"/></a><figcaption><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"caption:"}}' data-parsoid='{"fl":["R"]}'></span></figcaption></figure>
23640 T146305: Don't break image parsing if nested language converter markup is in the caption.
23642 language=zh variant=zh-cn
23644 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23646 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="放大"></a></div>blog (hk: WEBJOURNAL, tw: WEBLOG)</div></div></div>
23648 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"}]}'><a href="./File:Foobar.jpg"><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"/></a><figcaption><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"zh-cn","t":"blog (hk: <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"WEBJOURNAL\"}}' data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[43,65,null,2]}'></span>, tw: <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"WEBLOG\"}}' data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[71,89,null,2]}'></span>)"}]}'></span></figcaption></figure>
23651 # XXX html2wt disabled because rich markup in alt is not preserved.
23653 Don't break gallery if language converter markup is inside.
23656 parsoid=wt2html,html2html
23659 File:Foobar.jpg|alt=-{R|bat}-|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]
23660 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=-{R|param}-}}
23663 <ul class="gallery mw-gallery-traditional">
23664 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23665 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="bat" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
23666 <div class="gallerytext">
23667 <p><a href="/wiki/File:Foobar.jpg" class="image" title="bar"><img alt="foo" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" decoding="async" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
23671 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23672 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" decoding="async" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
23673 <div class="gallerytext">
23674 <p>This is a test template
23680 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
23681 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image mw:ExpandedAttrs" data-mw='{"attribs":[["alt",{"html":"alt=<span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\"bat\"}}' data-parsoid='{\"fl\":[\"R\"],\"dsr\":[84,93,null,2]}'></span>","txt":""}]]}'><a href="./File:Foobar.jpg"><img alt="" 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></figure-inline></div><div class="gallerytext"><figure-inline typeof="mw:Image mw:ExpandedAttrs" about="#mwt3" data-mw='{"attribs":[["alt",{"html":"alt=<span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\"foo\"}}' data-parsoid='{\"fl\":[\"R\"],\"dsr\":[58,67,null,2]}'></span>","txt":""}]],"caption":"<span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\"bar\"}}' data-parsoid='{\"fl\":[\"R\"],\"dsr\":[68,77,null,2]}'></span>"}'><a href="./File:Foobar.jpg"><img alt="" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></figure-inline></div></li>
23682 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><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></figure-inline></div><div class="gallerytext"><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Test","href":"./Template:Test"},"params":{"1":{"wt":"unamedParam"},"alt":{"wt":"-{R|param}-"}},"i":0}}]}'>This is a test template</span></div></li>
23687 T153135: Don't break list handling if language converter markup is in the item.
23689 language=zh variant=zh-cn
23691 ;-{zh-cn:AAA;zh-tw:BBB}-
23695 <dt>foo:bar</dt></dl>
23697 <dl><dt data-parsoid='{"dsr":[0,24,1,0]}'><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"AAA"},{"l":"zh-tw","t":"BBB"}]}'></span></dt>
23698 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23702 // Note that parsoid does not protect colons unless language converter
23703 // markup is properly nested, because it is a backtracking parser.
23705 T153135: Unclosed markup in definition list (code coverage)
23707 language=zh variant=zh-cn
23712 <dl><dt><b>foo:bar</b></dt><b>
23713 <dt>-{zh-cn:AAA</dt></b></dl>
23715 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23716 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23720 T153135: Nested language converter markup in definition list (code coverage)
23722 language=zh variant=zh-cn
23724 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23726 <dl><dt>AAA foo:bar bat:baz</dt>
23729 <dl><dt data-parsoid='{"dsr":[0,49,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"zh-cn","t":"AAA <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"foo:bar\"}}' data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[14,33,null,2]}'></span> <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\"bat:baz\"}}' data-parsoid='{\"fl\":[\"R\"],\"dsr\":[34,47,null,2]}'></span>"}]}'></span></dt>
23730 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23734 # html2wt mode disabled due to <nowiki> insertion.
23736 T153140: Don't break table handling if language converter markup is in the cell.
23738 language=sr variant=sr-ec
23739 parsoid=wt2html,wt2wt,html2html
23755 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23762 Language converter tricky html2wt cases (1)
23765 parsoid=html2wt,wt2wt
23767 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23769 -{<nowiki>}-</nowiki>}-
23776 Language converter tricky html2wt cases (2)
23779 parsoid=html2wt,wt2wt
23783 <nowiki>-{foo}-</nowiki>
23785 <p>-{foo}-
23790 Language converter tricky html2wt cases (3)
23793 parsoid=html2wt,wt2wt
23795 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23796 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23797 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23803 -{<nowiki>-{foo}-</nowiki>}-
23807 </p><p>-{foo}-
23812 Language converter tricky html2wt cases (4)
23815 parsoid=html2wt,wt2wt
23817 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hey\"}},\"i\":0}}]}'>hey</span>"}}'></span></p>
23825 # Note that the <nowiki> escaping added by parsoid for source text,
23826 # destination text, and language names only works on the PHP side
23827 # for *destination text*. (HTML entity escaping wouldn't work
23828 # any better.) This is probably a bug, at least for source texts.
23829 # (For language names PHP uses a precise regexp based on the languages
23830 # it currently knows have variants, which is fragile since this set
23831 # can grow/shrink over time.)
23833 Language converter tricky html2wt cases (5)
23835 language=zh variant=zh-cn
23837 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"a:b=>c","l":"zh-cn","t":"x;foo=>zh-cn:boo"},{"f":"bar","l":"zh-cn","t":"bat;xyz=>zh-cn:abc"}]}'/>foobar</p>
23838 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23839 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-tw","t":"xyz"},{"l":"zh-cn","t":"0;zh-tw:bar"}]}'></span></p>
23840 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23843 -{H|<nowiki>a:b=>c</nowiki>=>zh-cn:<nowiki>x;foo=>zh-cn:boo</nowiki>;bar=>zh-cn:<nowiki>bat;xyz=>zh-cn:abc</nowiki>}-foobar
23845 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23847 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23849 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23852 !! html/php+disabled
23853 <p>foobat;xyz=>zh-cn:abc
23857 </p><p>a:b=>c 0;zh-tw:bar
23862 T179579: Nowiki and lc interaction
23869 -{123<nowiki>|</nowiki>456}-
23871 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23873 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"123<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[23,41,8,9]}'>|</span>456"}}' data-parsoid='{"fl":[],"src":"-{123<nowiki>|</nowiki>456}-"}'></span></p>
23877 T2529: Uncovered bullet
23886 T2529: Uncovered bullet in a deeply nested list
23888 *******Foo {{bullet}}
23890 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li>Foo</li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li>
23895 T2529: Uncovered table already at line-start
23918 T2529: Uncovered bullet in parser function result
23920 *Foo {{lc:{{bullet}} }}
23927 T7678: Double-parsed template argument
23929 {{lc:{{{1}}}|hello}}
23936 T7678: Double-parsed template invocation
23938 {{lc:{{paramtest {{!}} param = hello }} }}
23940 <p>{{paramtest | param = hello }}
23945 Case insensitivity of parser functions for non-ASCII characters (T10143)
23948 title=[[Main Page]]
23950 {{PRVNÍVELKÉ:ěščř}}
23951 {{prvnívelké:ěščř}}
23971 Morwen/13: Unclosed link followed by heading
23978 <h2><span class="mw-headline" id="heading">heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
23982 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23989 <h1><span class="mw-headline" id="heading">heading</span></h1>
23993 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
24000 <h2><span class="mw-headline" id="heading">heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
24014 Paragraphs inside divs (no extra line breaks)
24025 Paragraphs inside divs (extra line break on open)
24039 Paragraphs inside divs (extra line break on close)
24053 Paragraphs inside divs (extra line break on open and close)
24068 # doBlockLevels screws up this output and Remex cleans up as much as it can.
24070 Nesting tags, paragraphs on lines which begin with <div>
24072 <div></div><strong>A
24075 <div></div><p><strong>A
24076 </strong></p><strong></strong><p><strong>B</strong>
24079 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
24080 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
24083 # T8200: <blockquote> should behave like <div> with respect to line breaks
24085 T8200: paragraphs inside blockquotes (no extra line breaks)
24087 <blockquote>Line one
24089 Line two</blockquote>
24091 <blockquote>Line one
24092 Line two</blockquote>
24094 <blockquote><p>Line one
24095 Line two</p></blockquote>
24099 T8200: paragraphs inside blockquotes (extra line break on open)
24104 Line two</blockquote>
24109 Line two</blockquote>
24114 Line two</p></blockquote>
24118 T8200: paragraphs inside blockquotes (extra line break on close)
24120 <blockquote>Line one
24125 <blockquote>Line one
24130 <blockquote><p>Line one
24137 T8200: paragraphs inside blockquotes (extra line break on open and close)
24152 ## This is a corner case interaction between the paragraph wrapping in the
24153 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
24154 ## some tags which close paragraphs (and thus prevent wrapping on their line),
24155 ## of which "div" is one, but do p-wrapping inside them. These are referred
24156 ## to as "never suppressing". Remex, for its part, doesn't traverse into
24157 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
24159 Paragraphs inside blockquotes/divs (no extra line breaks)
24161 <blockquote><div>Line one
24163 Line two</div></blockquote>
24165 <blockquote><div>Line one
24166 Line two</div></blockquote>
24170 Paragraphs inside blockquotes/divs (extra line break on open)
24175 Line two</div></blockquote>
24180 Line two</div></blockquote>
24184 Paragraphs inside blockquotes/divs (extra line break on close)
24186 <blockquote><div>Line one
24189 </div></blockquote>
24191 <blockquote><div>Line one
24194 </div></blockquote>
24198 Paragraphs inside blockquotes/divs (extra line break on open and close)
24204 </div></blockquote>
24210 </div></blockquote>
24214 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
24216 wgLinkHolderBatchSize=0
24222 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
24223 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
24224 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
24229 Free external link invading image caption
24231 [[Image:Foobar.jpg|thumb|http://x|hello]]
24233 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>hello</div></div></div>
24235 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"bogus","ak":"http://x"},{"ck":"caption","ak":"hello"}]}'><a href="./File:Foobar.jpg"><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":"Image:Foobar.jpg"}}'/></a><figcaption>hello</figcaption></figure>
24239 T17196: localised external link numbers
24243 [http://en.wikipedia.org/]
24245 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
24248 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
24252 Multibyte character in padleft
24254 {{padleft:-Hello|7|Æ}}
24259 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
24263 Multibyte character in padright
24265 {{padright:Hello-|7|Æ}}
24270 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
24274 formatdate parser function
24276 {{#formatdate:2009-03-24}}
24278 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
24283 formatdate parser function, with default format
24285 {{#formatdate:2009-03-24|mdy}}
24287 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
24292 Spacing of numbers in formatted dates
24294 {{#formatdate:January 15}}
24296 <p><span class="mw-formatted-date" title="01-15">January 15</span>
24301 formatdate parser function, with default format and on a page of which the content language is always English and different from the wiki content language
24303 language=nl title=[[MediaWiki:Common.css]]
24305 {{#formatdate:2009-03-24|dmy}}
24307 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
24312 formatdate with invalid month
24314 {{#formatdate:2019-22-22|dmy}}
24321 formatdate: dots in month name do not match any char (T220563)
24325 {{#formatdate:jun. 3|dmy}}
24326 {{#formatdate:junx 3|dmy}}
24328 <p><span class="mw-formatted-date" title="06-03">3 Juni</span>
24334 formatdate uses correct capitalisation in French
24338 {{#formatdate:Juin 3|dmy}}
24340 <p><span class="mw-formatted-date" title="06-03">3 juin</span>
24345 formatdate uses correct capitalisation in English
24347 {{#formatdate:june 3|dmy}}
24349 <p><span class="mw-formatted-date" title="06-03">3 June</span>
24363 Edit comment with link
24367 I like the [[Main Page]] a lot
24369 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
24373 Edit comment with link and link text
24377 I like the [[Main Page|best pages]] a lot
24379 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24383 Edit comment with link and link text with suffix
24387 I like the [[Main Page|best page]]s a lot
24389 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24393 Edit comment with section link (non-local, eg in history list)
24395 comment title=[[Main Page]]
24397 /* External links */ removed bogus entries
24399 <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→External links</a>: </span> removed bogus entries</span>
24403 Edit comment with section link and text before it (non-local, eg in history list)
24405 comment title=[[Main Page]]
24407 pre-comment text /* External links */ removed bogus entries
24409 pre-comment text <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→External links</a>: </span> removed bogus entries</span>
24413 Edit comment with section link (local, eg in diff view)
24415 comment local title=[[Main Page]]
24417 /* External links */ removed bogus entries
24419 <span dir="auto"><span class="autocomment"><a href="#External_links">→External links</a>: </span> removed bogus entries</span>
24423 Edit comment with section link that has a link in it
24425 comment local title=[[Main Page]]
24429 <span dir="auto"><span class="autocomment"><a href="#A_link">→[[A link]]</a></span></span>
24433 Edit comment with section link that has a template in it
24435 comment local title=[[Main Page]]
24437 /* {{foobar|param}} */
24439 <span dir="auto"><span class="autocomment"><a href="#.7B.7Bfoobar.7Cparam.7D.7D">→{{foobar|param}}</a></span></span>
24443 Edit comment with subpage link (T16080)
24447 title=[[Subpage test]]
24449 Poked at a [[/subpage]] here...
24451 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
24455 Edit comment with subpage link and link text (T16080)
24459 title=[[Subpage test]]
24461 Poked at a [[/subpage|neat little page]] here...
24463 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
24467 Edit comment with bogus subpage link in non-subpage NS (T16080)
24470 title=[[Subpage test]]
24472 Poked at a [[/subpage]] here...
24474 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
24478 Edit comment with bare anchor link (local, as on diff)
24482 title=[[Main Page]]
24486 <a href="#section">#section</a>
24490 Edit comment with bare anchor link (non-local, as on history)
24493 title=[[Main Page]]
24497 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
24501 Anchor starting with underscore
24507 <p><a href="#_ref">One</a>
24510 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
24514 Id starting with underscore
24516 <div id="_ref"></div>
24518 <div id="_ref"></div>
24522 Edit comment with link with more than one pipe (T99346)
24526 [[Main Page|Many|pipes]]
24528 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
24532 Complex edit comment with link with more than one pipe (T99346)
24536 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
24538 Created page with "<noinclude><a href="/index.php?title=Category:Requests_for_permissions/Bot&action=edit&redlink=1" class="new" title="Category:Requests for permissions/Bot (page does not exist)">{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}</a></noinclude> === <a href="/index.php?title=User:MineoBot&action=edit&redlink=1" class="new" title="User:MineoBot (page does not exist)">User:MineoBot</a> 8=== {{Request for permissions/links|Mineo..."
24542 Space normalisation on autocomment (T24784)
24545 title=[[Main Page]]
24547 /* __hello__world__ */
24549 <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#hello_world" title="Main Page">→__hello__world__</a></span></span>
24553 percent-encoding and + signs in comments (T28410)
24557 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
24559 <a href="/index.php?title=ABC3D%25_%2B%2B&action=edit&redlink=1" class="new" title="ABC3D% ++ (page does not exist)">ABC3D% ++</a> <a href="/index.php?title=ABC3D%25_%2B%2B&action=edit&redlink=1" class="new" title="ABC3D% ++ (page does not exist)">+%20</a>
24562 # Parsoid doesn't support this yet: see T75581
24563 # but it *should* omit the 'src' attribute if the image is bad.
24564 # PHP side of tests was disabled in
24565 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
24566 # because of issues in the PHP parserTests infrastructure
24567 # (but the output below is indeed what the PHP side emits)
24569 Bad images - basic functionality
24572 !! html/php+disabled
24574 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Bad.jpg"><span resource="./File:Bad.jpg">File:Bad.jpg</span></a></figure-inline></p>
24578 Bad images - T18039: text after bad image disappears
24583 !! html/php+disabled
24589 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Bad.jpg"><span resource="./File:Bad.jpg">File:Bad.jpg</span></a></figure-inline>
24594 Verify that displaytitle works (T24501) no displaytitle
24598 wgAllowDisplayTitle=true
24599 wgRestrictDisplayTitle=false
24601 this is not the the title
24604 <p>this is not the the title
24609 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
24614 wgAllowDisplayTitle=true
24615 wgRestrictDisplayTitle=false
24617 this is not the the title
24618 {{DISPLAYTITLE:whatever}}
24621 <p>this is not the the title
24626 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24631 wgAllowDisplayTitle=true
24632 wgRestrictDisplayTitle=true
24634 this is not the the title
24635 {{DISPLAYTITLE:whatever}}
24638 <p>this is not the the title
24643 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24648 wgAllowDisplayTitle=true
24649 wgRestrictDisplayTitle=true
24651 this is not the the title
24652 {{DISPLAYTITLE:screen}}
24655 <p>this is not the the title
24660 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24665 wgAllowDisplayTitle=false
24667 this is not the the title
24668 {{DISPLAYTITLE:screen}}
24671 <p>this is not the the title
24672 <a href="/index.php?title=Template:DISPLAYTITLE:screen&action=edit&redlink=1" class="new" title="Template:DISPLAYTITLE:screen (page does not exist)">Template:DISPLAYTITLE:screen</a>
24677 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24682 wgAllowDisplayTitle=false
24684 this is not the the title
24687 <p>this is not the the title
24692 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24697 wgAllowDisplayTitle=true
24698 wgRestrictDisplayTitle=true
24700 this is not the the title
24701 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24703 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24704 <p>this is not the the title
24709 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24714 wgAllowDisplayTitle=true
24715 wgRestrictDisplayTitle=true
24717 this is not the the title
24718 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24720 <span style="color: red;">s</span>creen
24721 <p>this is not the the title
24726 Page status indicators: Empty name is invalid
24730 <indicator name=" "></indicator>
24731 <indicator></indicator>
24733 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24734 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24739 Page status indicators: Weird syntaxes that are okay
24743 <indicator name="empty" />
24744 <indicator name="name"></indicator>
24753 Page status indicators: Torture test
24757 <indicator name="01">hello world</indicator>
24758 <indicator name="02">[[Main Page]]</indicator>
24759 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24760 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24761 <indicator name="05">*foo
24763 <indicator name="06"><nowiki>foo</nowiki></indicator>
24764 <indicator name="07"> Preformatted</indicator>
24765 <indicator name="08"><div>Broken tag</indicator>
24766 <indicator name="09">{| class=wikitable
24769 <indicator name="10">Two
24771 paragraphs</indicator>
24774 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24775 03=<img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" decoding="async" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" />
24776 04=<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" decoding="async" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" /></a>
24777 05=<ul><li>foo</li>
24780 07=<pre>Preformatted
24782 08=<div>Broken tag</div>
24784 09=<table class="wikitable">
24800 preload: check <noinclude> and <includeonly>
24804 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24810 preload: check <onlyinclude>
24814 Goodbye <onlyinclude>Hello world</onlyinclude>
24820 preload: can pass tags through if we want to
24824 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24826 <includeonly>Hello world</includeonly>
24830 preload: check that it doesn't try to do tricks
24834 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24836 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24840 Play a bit with r67090 and T5158
24842 <div style="width:50% !important"> </div>
24843 <div style="width:50% !important"> </div>
24844 <div style="width:50% !important"> </div>
24845 <div style="border : solid;"> </div>
24847 <div style="width:50% !important"> </div>
24848 <div style="width:50% !important"> </div>
24849 <div style="width:50% !important"> </div>
24850 <div style="border : solid;"> </div>
24852 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24853 <div style="width:50% !important" data-parsoid='{"stx":"html","a":{"style":"width:50% !important"},"sa":{"style":"width:50%&nbsp;!important"}}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24854 <div style="width:50% !important" data-parsoid='{"stx":"html","a":{"style":"width:50% !important"},"sa":{"style":"width:50%&#160;!important"}}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24855 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24859 French spaces in wikitext
24861 foo ! bar ? bat 50 % is less than 75 %.
24863 Hello : this ; is « something ‹ else › again »
24865 <p>foo ! bar ? bat 50 % is less than 75 %.
24866 </p><p>Hello : this ; is « something ‹ else › again »
24870 # It would be reasonable for Parsoid and PHP to differ here.
24871 # The PHP behavior is arguably a bug.
24873 Corner case: french spaces in definition list
24877 <dl><dt>foo </dt>
24882 T5158: Test for French spaces in attributes
24884 <br style=" clear : both ; " />
24886 <p><br style="clear : both ;" />
24891 HTML5 data attributes
24893 <span data-foo="bar">Baz</span>
24894 <p data-abc-def_hij="">Quuz</p>
24896 <p><span data-foo="bar">Baz</span>
24898 <p data-abc-def_hij="">Quuz</p>
24900 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24901 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24905 Strip reserved data attributes
24907 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-object-id="123" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24909 <div data-ok="fred" data-object-id="123">d</div>
24911 <div data-x-data-mw="foo" data-x-data-parsoid="bar" data-x-data-mw-someext="baz" data-ok="fred" data-x-data-object-id="123" data-parsoid='{"stx":"html","a":{"data-ooui":null,"data-bad:ns":null},"sa":{"data-ooui":"xyzzy","data-bad:ns":"ns"}}'>d</div>
24915 percent-encoding and + signs in internal links (T28410)
24917 [[User:+%]] [[Page+title%]]
24918 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24919 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24920 [[%33%45]] [[%33%45+]]
24922 <p><a href="/index.php?title=User:%2B%25&action=edit&redlink=1" class="new" title="User:+% (page does not exist)">User:+%</a> <a href="/index.php?title=Page%2Btitle%25&action=edit&redlink=1" class="new" title="Page+title% (page does not exist)">Page+title%</a>
24923 <a href="/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%+</a> <a href="/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%20</a> <a href="/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%+ </a> <a href="/index.php?title=%25%2Br&action=edit&redlink=1" class="new" title="%+r (page does not exist)">%+r</a>
24924 <a href="/index.php?title=%25&action=edit&redlink=1" class="new" title="% (page does not exist)">%</a> <a href="/index.php?title=%2B&action=edit&redlink=1" class="new" title="+ (page does not exist)">+</a> <a href="/index.php?title=Special:Upload&wpDestFile=%25%2Babc9" class="new" title="File:%+abc9">bar</a>
24925 <a href="/index.php?title=3E&action=edit&redlink=1" class="new" title="3E (page does not exist)">3E</a> <a href="/index.php?title=3E%2B&action=edit&redlink=1" class="new" title="3E+ (page does not exist)">3E+</a>
24928 <p><a rel="mw:WikiLink" href="./User:+%25" title="User:+%" data-parsoid='{"stx":"simple","a":{"href":"./User:+%25"},"sa":{"href":"User:+%"}}'>User:+%</a> <a rel="mw:WikiLink" href="./Page+title%25" title="Page+title%" data-parsoid='{"stx":"simple","a":{"href":"./Page+title%25"},"sa":{"href":"Page+title%"}}'>Page+title%</a>
24929 <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%+</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"piped","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%20</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+ "}}'>%+ </a> <a rel="mw:WikiLink" href="./%25+r" title="%+r" data-parsoid='{"stx":"simple","a":{"href":"./%25+r"},"sa":{"href":"%+r"}}'>%+r</a>
24930 <a rel="mw:WikiLink" href="./%25" title="%" data-parsoid='{"stx":"simple","a":{"href":"./%25"},"sa":{"href":"%"}}'>%</a> <a rel="mw:WikiLink" href="./+" title="+" data-parsoid='{"stx":"simple","a":{"href":"./+"},"sa":{"href":"+"}}'>+</a> <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"caption":"<a rel=\"mw:WikiLink\" href=\"./Bar\" title=\"Bar\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Bar\"},\"sa\":{\"href\":\"bar\"},\"dsr\":[94,101,2,2]}'>bar</a>","errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/%25+abc9"><span resource="./File:%25+abc9" data-parsoid='{"a":{"resource":"./File:%25+abc9"},"sa":{"resource":"File:%+abc%39"}}'>File:%+abc9</span></a></figure-inline>
24931 <a rel="mw:WikiLink" href="./3E" title="3E" data-parsoid='{"stx":"simple","a":{"href":"./3E"},"sa":{"href":"%33%45"}}'>3E</a> <a rel="mw:WikiLink" href="./3E+" title="3E+" data-parsoid='{"stx":"simple","a":{"href":"./3E+"},"sa":{"href":"%33%45+"}}'>3E+</a></p>
24935 Special characters in embedded file links (T29679)
24937 [[File:Contains & ampersand.jpg]]
24938 [[File:Does not exist.jpg|Title with & ampersand]]
24940 <p><a href="/index.php?title=Special:Upload&wpDestFile=Contains_%26_ampersand.jpg" class="new" title="File:Contains & ampersand.jpg">File:Contains & ampersand.jpg</a>
24941 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24944 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Contains_&_ampersand.jpg"><span resource="./File:Contains_&_ampersand.jpg" data-parsoid='{"a":{"resource":"./File:Contains_&_ampersand.jpg"},"sa":{"resource":"File:Contains & ampersand.jpg"}}'>File:Contains & ampersand.jpg</span></a></figure-inline>
24945 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"caption":"Title with &amp; ampersand","errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./Special:FilePath/Does_not_exist.jpg"><span resource="./File:Does_not_exist.jpg" data-parsoid='{"a":{"resource":"./File:Does_not_exist.jpg"},"sa":{"resource":"File:Does not exist.jpg"}}'>File:Does not exist.jpg</span></a></figure-inline></p>
24949 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24951 Text's been normalized?
24953 <p>Text's been normalized?
24958 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24960 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24962 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24967 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24969 [http://www.example.org/ ideograms]
24971 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24976 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24978 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24980 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
25004 T33098 Template which includes system messages which includes the template
25008 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
25009 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
25014 T33490 Turkish: ucfirst 'blah'
25025 T33490 Turkish: ucfirst 'ix'
25036 T33490 Turkish: lcfirst 'BLAH'
25047 T33490 Turkish: ucfırst (with a dotless i)
25053 <p><a href="/index.php?title=%C5%9Eablon:Ucf%C4%B1rst:blah&action=edit&redlink=1" class="new" title="Şablon:Ucfırst:blah (sayfa mevcut değil)">Şablon:Ucfırst:blah</a>
25058 T33490 ucfırst (with a dotless i) with English language
25064 <p><a href="/index.php?title=Template:Ucf%C4%B1rst:blah&action=edit&redlink=1" class="new" title="Template:Ucfırst:blah (page does not exist)">Template:Ucfırst:blah</a>
25068 # Note that Parsoid doesn't emit an explicit TOC.
25069 # Note also that the html2wt direction tends to emit an extra newline
25070 # between the __TOC__ magicword and the first heading unless *both*
25071 # the <meta> and the <h2> have a data-parsoid attribute set (even if
25075 T28375: TOC with italics
25077 title=[[Main Page]]
25080 ==''Lost'' episodes==
25082 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25084 <li class="toclevel-1 tocsection-1"><a href="#Lost_episodes"><span class="tocnumber">1</span> <span class="toctext"><i>Lost</i> episodes</span></a></li>
25088 <h2><span class="mw-headline" id="Lost_episodes"><i>Lost</i> episodes</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Lost episodes">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25090 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25091 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
25095 T28375: TOC with bold
25097 title=[[Main Page]]
25100 =='''should be bold''' then normal text==
25102 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25104 <li class="toclevel-1 tocsection-1"><a href="#should_be_bold_then_normal_text"><span class="tocnumber">1</span> <span class="toctext"><b>should be bold</b> then normal text</span></a></li>
25108 <h2><span class="mw-headline" id="should_be_bold_then_normal_text"><b>should be bold</b> then normal text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: should be bold then normal text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25110 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25111 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
25115 T35845: Headings become cursive in TOC when they contain an image
25117 title=[[Main Page]]
25120 ==Image [[Image:foobar.jpg]]==
25122 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25124 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
25128 <h2><span class="mw-headline" id="Image">Image <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Image">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25130 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25131 <h2 id="Image" data-parsoid='{}'>Image <figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><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-inline></h2>
25135 T35845 (2): Headings become bold in TOC when they contain a blockquote
25137 title=[[Main Page]]
25140 ==<blockquote>Quote</blockquote>==
25142 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25144 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25148 <h2><span class="mw-headline" id="Quote"><blockquote>Quote</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Quote">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25150 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25152 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25156 <h2><span class="mw-headline" id="Quote"><blockquote><p>Quote</p></blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Quote">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25158 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25159 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
25163 Unclosed tags in TOC
25165 wgFragmentMode=[ 'html5', 'legacy' ]
25167 title=[[Main Page]]
25171 <small>Hanc marginis exiguitas non caperet.</small>
25174 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25176 <li class="toclevel-1 tocsection-1"><a href="#Proof:_2_<_3"><span class="tocnumber">1</span> <span class="toctext">Proof: 2 < 3</span></a></li>
25180 <h2><span id="Proof:_2_.3C_3"></span><span class="mw-headline" id="Proof:_2_<_3">Proof: 2 < 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Proof: 2 < 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25181 <p><small>Hanc marginis exiguitas non caperet.</small>
25185 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25186 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
25187 <p><small>Hanc marginis exiguitas non caperet.</small>
25192 Multiple tags in TOC
25195 ==<i>Foo</i> <b>Bar</b>==
25197 ==<i>Foo</i> <blockquote>Bar</blockquote>==
25199 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25201 <li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
25202 <li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
25206 <h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25207 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote>Bar</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25209 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25211 <li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
25212 <li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
25216 <h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25217 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote><p>Bar</p></blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25219 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25220 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
25222 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
25225 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
25226 # html5 tag parsing.
25228 Tags with parameters in TOC
25233 ==<sup class="in-h2">Hello</sup>==
25235 ==<sup class="a > b">Evilbye</sup>==
25237 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25239 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
25240 <li class="toclevel-1 tocsection-2"><a href="#b.22.3EEvilbye"><span class="tocnumber">2</span> <span class="toctext"><sup> b">Evilbye</sup></span></a></li>
25244 <h2><span class="mw-headline" id="Hello"><sup class="in-h2">Hello</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Hello">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25245 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup class="a"> b">Evilbye</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">Evilbye">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25247 <meta property="mw:PageProp/toc" />
25248 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
25250 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
25254 span tags with directionality in TOC
25257 ==<span dir="ltr">C++</span>==
25259 ==<span dir="rtl">זבנג!</span>==
25261 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
25263 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
25265 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
25267 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25269 <li class="toclevel-1 tocsection-1"><a href="#C.2B.2B"><span class="tocnumber">1</span> <span class="toctext"><span dir="ltr">C++</span></span></a></li>
25270 <li class="toclevel-1 tocsection-2"><a href="#.D7.96.D7.91.D7.A0.D7.92.21"><span class="tocnumber">2</span> <span class="toctext"><span dir="rtl">זבנג!</span></span></a></li>
25271 <li class="toclevel-1 tocsection-3"><a href="#The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">3</span> <span class="toctext"><span>The attributes on these span tags must be deleted from the TOC</span></span></a></li>
25272 <li class="toclevel-1 tocsection-4"><a href="#All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">4</span> <span class="toctext"><span>All attributes on these span tags must be deleted from the TOC</span></span></a></li>
25273 <li class="toclevel-1 tocsection-5"><a href="#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">5</span> <span class="toctext"><span dir="ltr">Attributes after dir on these span tags must be deleted from the TOC</span></span></a></li>
25277 <h2><span class="mw-headline" id="C.2B.2B"><span dir="ltr">C++</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: C++">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25278 <h2><span class="mw-headline" id=".D7.96.D7.91.D7.A0.D7.92.21"><span dir="rtl">זבנג!</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: זבנג!">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25279 <h2><span class="mw-headline" id="The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: The attributes on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25280 <h2><span class="mw-headline" id="All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: All attributes on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25281 <h2><span class="mw-headline" id="Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Attributes after dir on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25283 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25284 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
25285 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
25286 <h2 id="The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span></h2>
25287 <h2 id="All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span></h2>
25288 <h2 id="Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span></h2>
25292 T74884: bdi element in ToC
25295 ==<bdi>test</bdi>==
25297 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25299 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
25303 <h2><span class="mw-headline" id="test"><bdi>test</bdi></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: test">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25305 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25306 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
25310 T35715: s/strike element in ToC
25313 ==<s>test</s> test <strike>test</strike>==
25315 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25317 <li class="toclevel-1 tocsection-1"><a href="#test_test_test"><span class="tocnumber">1</span> <span class="toctext"><s>test</s> test <strike>test</strike></span></a></li>
25321 <h2><span class="mw-headline" id="test_test_test"><s>test</s> test <strike>test</strike></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: test test test">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25323 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25324 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
25328 T198618: style element in ToC
25333 ==<style>.foo {}</style>Style<style>.bar {}</style>==
25335 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25337 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
25341 <h2><span class="mw-headline" id="Style"><style>.foo {}</style>Style<style>.bar {}</style></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Style">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25343 <meta property="mw:PageProp/toc" data-parsoid="{}"/>
25344 <h2 id="Style" data-parsoid="{}"><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo {}"}}'>.foo {}</style>Style<style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".bar {}"}}'>.bar {}</style></h2>
25348 T198618: script element in ToC
25353 ==<html><script>alert(1);</script></html>Script<html><script>alert(1);</script></html>==
25355 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25357 <li class="toclevel-1 tocsection-1"><a href="#Script"><span class="tocnumber">1</span> <span class="toctext">Script</span></a></li>
25361 <h2><span class="mw-headline" id="Script"><script>alert(1);</script>Script<script>alert(1);</script></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Script">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25363 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25364 <h2 id="Script" data-parsoid='{}'><script typeof="mw:Extension/html" about="#mwt4" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script>Script<script typeof="mw:Extension/html" about="#mwt6" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script></h2>
25368 Empty <p> tag in TOC, removed by Sanitizer (T92892)
25373 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
25375 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
25379 <h2><span class="mw-headline" id="x">x</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: x">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25381 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25382 <h2 id="x" data-parsoid='{}'>x</h2>
25388 == {{int:headline_sample}} ==
25392 T34057: Title needed when expanding <h> nodes.
25394 title=[[Main Page]]
25398 <h2><span class="mw-headline" id="Headline_text">Headline text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Headline text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25402 Strip marker in urlencode
25404 {{urlencode:x<nowiki/>y}}
25405 {{urlencode:x<nowiki/>y|wiki}}
25406 {{urlencode:x<nowiki/>y|path}}
25407 {{urlencode:x<pre id="one">two</pre>y}}
25435 Strip marker in formatNum
25437 {{formatnum:1<nowiki/>2}}
25438 {{formatnum:1<nowiki/>2|R}}
25446 Check noCommafy in formatNum
25450 {{formatnum:123456.78}}
25451 {{formatnum:123456.78|NOSEP}}
25459 Wrong option for formatNum (T58199)
25461 {{formatnum:1,234.56|Random}}
25462 {{formatnum:1,234.56|EVERYTHING}}
25463 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
25472 Strip marker in grammar
25476 {{grammar:elative|foo<nowiki/>bar}}
25483 Strip marker in padleft
25485 {{padleft:|2|x<nowiki/>y}}
25492 Strip marker in padright
25494 {{padright:|2|x<nowiki/>y}}
25501 Strip marker in anchorencode
25503 {{anchorencode:x<nowiki/>y}}
25508 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode:x<nowiki/>y","function":"anchorencode"},"params":{},"i":0}}]}'>xy</p>
25512 nowiki inside link inside heading (T20295)
25514 ==[[foo|x<nowiki>y</nowiki>z]]==
25516 <h2><span class="mw-headline" id="xyz"><a href="/wiki/Foo" title="Foo">xyz</a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: xyz">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25520 new support for bdi element (T33817)
25522 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25524 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25528 Ignore pipe between table row attributes
25532 |- id=foo | style='color: red'
25540 <tr id="foo" style="color: red">
25546 Language parser function
25555 Padleft and padright (default 0-padding)
25564 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
25565 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
25569 Padleft and padright (partial fill)
25571 {{padleft:xyz|6|ab}}
25572 {{padright:xyz|6|ab}}
25578 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"6"},"2":{"wt":"ab"}},"i":0}}]}'>abaxyz</span>
25579 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"6"},"2":{"wt":"ab"}},"i":0}}]}'>xyzaba</span></p>
25583 Padleft and padright as substr
25585 {{padleft:|3|abcde}}
25586 {{padright:|3|abcde}}
25592 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:","function":"padleft"},"params":{"1":{"wt":"3"},"2":{"wt":"abcde"}},"i":0}}]}'>abc</span>
25593 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:","function":"padright"},"params":{"1":{"wt":"3"},"2":{"wt":"abcde"}},"i":0}}]}'>abc</span></p>
25597 Padleft and padright with non-numerical length (T180403)
25599 {{padleft:abcdef|junk}}
25600 {{padright:abcdef|junk}}
25608 Special parser function
25610 {{#special:RandomPage}}
25611 {{#special:BaDtItLe}}
25612 {{#special:Foobar}}
25621 T36939 - Case insensitive link parsing ([HttP://])
25623 [HttP://MediaWiki.Org/]
25625 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25628 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
25632 T36939 - Case insensitive link parsing ([HttP:// title])
25634 [HttP://MediaWiki.Org/ MediaWiki]
25636 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25641 T36939 - Case insensitive link parsing (HttP://)
25643 HttP://MediaWiki.Org/
25645 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25648 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
25666 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25667 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25668 <h2><span class="mw-headline" id="Section_3">Section 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25669 <h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25670 <h2><span class="mw-headline" id="Section_5">Section 5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Section 5">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25675 ### Parsoid-specific tests
25676 ### Parsoid-PHP parser incompatibilities
25679 1. SOL-sensitive wikitext tokens as template-args
25681 parsoid=wt2html,wt2wt
25687 <ul><li>a</li></ul>
25688 <ol><li>a</li></ol>
25689 <dl><dd>a</dd></dl>
25691 <span about="#mwt1" typeof="mw:Transclusion">
25692 </span><ul about="#mwt1"><li>a</li>
25694 <span about="#mwt2" typeof="mw:Transclusion">
25695 </span><ol about="#mwt2"><li>a</li>
25697 <span about="#mwt3" typeof="mw:Transclusion">
25698 </span><dl about="#mwt3"><dd>a</dd>
25702 #### -----------------------------------------------------------------
25703 #### Parsoid-specific functionality tests
25704 #### -----------------------------------------------------------------
25706 # T65642/T68749: Formatting elt fixup around images.
25707 # We know wt2wt will fail, but we expect selser to pass.
25708 # Due to the nature of our testing, wt2wt and selser tests will enter the
25709 # blacklist and we'll catch selser regressions based on changes to the
25710 # blacklist entries for selser tests.
25712 1. Treebuilder fixup of formatting elt
25714 parsoid=wt2html,wt2wt
25719 [[Image:Foobar.jpg|right|Test]]
25727 </small></p><small>
25728 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Test"><img alt="Test" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a></div>
25729 </small><p><small></small>
25731 </td></tr></tbody></table>
25735 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25736 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><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"/></a><figcaption>Test</figcaption></figure></small>
25737 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25742 2. Treebuilder fixup of formatting elt
25744 parsoid=wt2html,wt2wt
25746 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25748 <small>[[Image:Foobar.jpg|right|300px]]</small>
25750 <p><b>foo</b></p><b><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div></b><p><b>bar</b>
25751 </p><small><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" decoding="async" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a></div></small>
25753 <p><b>foo</b></p><b><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure></b><p><b>bar</b></p>
25755 <small><figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a><figcaption></figcaption></figure></small>
25759 3. Treebuilder fixup of formatting elt
25761 parsoid=wt2html,wt2wt
25763 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25765 <p><small><b>foo</b></small></p><small><b><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div></b></small><p><small><b>bar</b></small></p>
25767 <p><small><b>foo</b></small></p><small><b><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure></b></small><p><small><b>bar</b></small></p>
25771 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25773 parsoid=wt2html,wt2wt
25775 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25777 <b><small><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" decoding="async" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a></div></small></b>
25779 <b><small><figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a><figcaption></figcaption></figure></small></b>
25782 #### ----------------------------------------------------------------
25783 #### Parsoid-only testing of Parsoid's impl of LST
25784 #### Not implemented yet, see
25785 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25786 #### ----------------------------------------------------------------
25788 ## We still need to support serializing the older format while content is stored.
25790 LST Sections: Backwards compatibility
25793 "suppressErrors": true,
25794 "modes": ["html2wt"]
25797 <section begin="2011-05-16" />
25798 <section end="2014-04-10 (MW 1.23wmf22)" />
25800 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25801 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25805 LST Sections: Newfangled approach
25807 <section begin="2011-05-16" />
25808 <section end="2014-04-10 (MW 1.23wmf22)" />
25810 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"}}'>
25812 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"}}'>
25816 #--------- Test stripping of empty nodes in template content ----------
25819 Empty LI and TR nodes should be stripped from template content
25824 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25828 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25841 Empty LI and TR nodes should not be stripped from top-level content
25855 <li class='mw-empty-elt'></li>
25860 <tr class='mw-empty-elt'></tr>
25869 Empty TR nodes should not be stripped if they have any attributes set
25871 {{EmptyTRWithHTMLAttrTest}}
25873 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25874 <tr align='center'></tr>
25875 <tr><td>foo</td></tr>
25876 <tr align='center'></tr>
25877 <tr><td>bar</td></tr>
25881 #### ----------------------------------------------------------------
25882 #### The following section of tests are primarily to test
25883 #### wikitext escaping capabilities of Parsoid. Given that
25884 #### escaping can be done any number of ways, the wikitext (input)
25885 #### is always adjusted to reflect how Parsoid adds nowiki
25888 #### We are marking several tests as parsoid-only since the
25889 #### HTML in the result section is different from what the
25890 #### PHP parser generates for it.
25891 #### ----------------------------------------------------------------
25894 #### --------------- Headings ---------------
25896 #### 1. Nested inside html <h1>=foo=</h1>
25897 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25898 #### 3. Nested inside html with wikitext split by html tags
25899 #### 4. No escape needed
25900 #### 5. Empty headings <h1></h1>
25901 #### 6. Heading chars in SOL context
25902 #### ----------------------------------------
25904 Headings: 0. Unnested
25914 <p>=foo<i>a</i>=</p>
25916 <nowiki>=foo=</nowiki>
25918 <nowiki> </nowiki>=foo=
25920 <nowiki>=foo=</nowiki>
25922 =foo''a''<nowiki>=</nowiki>
25925 # New headings and existing headings are handled differently
25927 Headings: 1. Nested inside html
25935 <h1 data-parsoid='{}'>=foo=</h1>
25936 <h2 data-parsoid='{}'>=foo=</h2>
25937 <h3 data-parsoid='{}'>=foo=</h3>
25938 <h4 data-parsoid='{}'>=foo=</h4>
25939 <h5 data-parsoid='{}'>=foo=</h5>
25940 <h6 data-parsoid='{}'>=foo=</h6>
25948 =<nowiki>=foo=</nowiki>=
25949 ==<nowiki>=foo=</nowiki>==
25950 ===<nowiki>=foo=</nowiki>===
25951 ====<nowiki>=foo=</nowiki>====
25952 =====<nowiki>=foo=</nowiki>=====
25953 ======<nowiki>=foo=</nowiki>======
25957 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25966 <nowiki>*</nowiki>bar
25972 <nowiki>=bar=</nowiki>
25976 Headings: 3. Nested inside html with wikitext split by html tags
25980 <h1>=<b>bold</b>foo=</h1>
25982 = ='''bold'''foo= =
25986 Headings: 4a. No escaping needed (testing just h1 and h2)
25997 <h1><i>=</i>foo=</h1>
26017 Headings: 4b. No escaping needed (inside p-tags)
26034 Headings: 4c. Short headings (1)
26041 <nowiki>===</nowiki>
26047 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
26049 Headings: 4d. Short headings (2)
26051 parsoid=wt2html,html2html
26062 <h1><span class="mw-headline" id=".3D">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
26063 <h1><span class="mw-headline" id=".3D.3D">==</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: ==">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
26064 <h2><span class="mw-headline" id=".3D_2">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
26068 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
26069 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
26070 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
26074 Headings: 5. Empty headings
26078 <h1 data-parsoid='{}'></h1>
26080 <h2 data-parsoid='{}'></h2>
26082 <h3 data-parsoid='{}'></h3>
26084 <h4 data-parsoid='{}'></h4>
26086 <h5 data-parsoid='{}'></h5>
26088 <h6 data-parsoid='{}'></h6>
26098 =====<nowiki/>=====
26100 ======<nowiki/>======
26104 Headings: 6a. Heading chars in SOL context (with trailing spaces)
26114 <nowiki>=a=</nowiki>
26116 <nowiki>=a=</nowiki>
26118 <nowiki>=a=</nowiki>
26122 Headings: 6b. Heading chars in SOL context (with trailing newlines)
26135 <nowiki>=a=</nowiki>
26138 <nowiki>=a=</nowiki>
26141 <nowiki>=a=</nowiki>
26146 Headings: 6c. Heading chars in SOL context (leading newline break)
26154 <nowiki>=b=</nowiki>
26158 Headings: 6d. Heading chars in SOL context (with interspersed comments)
26162 <!--c0--><p>=a=</p>
26164 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
26166 <!--c0--><nowiki>=a=</nowiki>
26168 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
26172 Headings: 6d. Heading chars in SOL context (No escaping needed)
26182 Headings: 7. Insert a newline between new content and headings
26188 <h2 data-parsoid='{}'>A</h2>
26189 <p data-parsoid='{}'>a</p>
26199 Headings: Used as horizontal rule
26201 wgFragmentMode=[ 'html5', 'legacy' ]
26207 <h6><span id=".3D.3D.3D"></span><span class="mw-headline" id="===">===</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: ===">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
26209 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
26212 #### --------------- Lists ---------------
26213 #### 0. Outside nests (*foo, etc.)
26214 #### 1. Nested inside html <ul><li>*foo</li></ul>
26215 #### 2. Inside definition lists
26216 #### 3. Only bullets at start should be escaped
26217 #### 4. No escapes needed
26218 #### 5. No unnecessary escapes
26219 #### 6. Escape bullets in SOL position
26220 #### 7. Escape bullets in a multi-line context
26221 #### ----------------------------------------
26224 Lists: 0. Outside nests
26234 <nowiki>*</nowiki>foo
26236 <nowiki>#</nowiki>foo
26238 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
26241 ## Making these next 3 tests Parsoid-only since they are html2wt tests
26242 ## to test wikitext escaping, and insignificant whitespace diffs
26243 ## cause PHP parser tests to barf
26245 Lists: 1. Nested inside html (No unnecessary escapes)
26254 <li data-parsoid='{}'>*foo</li>
26255 <li data-parsoid='{}'>#foo</li>
26256 <li data-parsoid='{}'>:foo</li>
26257 <li data-parsoid='{}'>;foo</li>
26265 <li data-parsoid='{}'>*foo</li>
26266 <li data-parsoid='{}'>#foo</li>
26267 <li data-parsoid='{}'>:foo</li>
26268 <li data-parsoid='{}'>;foo</li>
26275 *<nowiki>*foo</nowiki>
26276 *<nowiki>#foo</nowiki>
26277 *<nowiki>:foo</nowiki>
26278 *<nowiki>;foo</nowiki>
26284 #<nowiki>*foo</nowiki>
26285 #<nowiki>#foo</nowiki>
26286 #<nowiki>:foo</nowiki>
26287 #<nowiki>;foo</nowiki>
26291 Lists: 2. Inside definition lists
26295 <dl><dt>;foo</dt></dl>
26296 <dl><dt>:foo</dt></dl>
26299 <dl><dd>:foo</dd></dl>
26303 ; <nowiki>:foo</nowiki>
26305 ; <nowiki>:foo</nowiki>
26312 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
26318 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
26322 *<nowiki>*foo</nowiki>''it''*bar
26326 Lists: 4. No escapes needed
26339 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
26343 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
26357 Lists: 5. No unnecessary escapes
26361 <ul><li> bar <span>[[foo]]</span></li></ul>
26362 <ul><li> =bar <span>[[foo]]</span></li></ul>
26363 <ul><li> [[bar <span>[[foo]]</span></li></ul>
26364 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
26365 <ul><li> =bar <span>foo]]</span>=</li></ul>
26366 <ul><li> <s></s>: a</li></ul>
26367 <ul><li> <i>* foo</i></li></ul>
26370 * bar <span><nowiki>[[foo]]</nowiki></span>
26372 * =bar <span><nowiki>[[foo]]</nowiki></span>
26374 * [[bar <span><nowiki>[[foo]]</nowiki></span>
26376 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
26378 * =bar <span>foo]]</span>=
26386 Lists: 6. Escape bullets in SOL position
26390 <p><!--cmt-->*foo</p>
26392 <!--cmt--><nowiki>*</nowiki>foo
26396 Lists: 7. Escape bullets in a multi-line context
26405 <nowiki>*</nowiki>b
26409 Lists: 8. Escape colons only if not present in tags
26413 <dl><dt>a:b<i>c:d</i></dt></dl>
26415 ; <nowiki>a:b</nowiki>''c:d''
26418 #### --------------- HRs ---------------
26419 #### 1. Single line
26420 #### -----------------------------------
26423 HRs: 1. Single line
26431 ----<nowiki>----</nowiki>
26436 #### --------------- Tables ---------------
26437 #### 1a. Simple example
26438 #### 1b. No escaping needed (!foo)
26439 #### 1c. No escaping needed (|foo)
26440 #### 1d. No escaping needed (|}foo)
26442 #### 2a. Nested in td (<td>foo|bar</td>)
26443 #### 2b. Nested in td (<td>foo||bar</td>)
26444 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
26446 #### 3a. Nested in th (<th>foo!bar</th>)
26447 #### 3b. Nested in th (<th>foo!!bar</th>)
26448 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
26452 #### 4c. No escaping needed
26453 #### --------------------------------------
26456 Tables: 1a. Simple example
26464 <nowiki>{|</nowiki>
26469 Tables: 1b. No escaping needed
26480 Tables: 1c. No escaping needed
26491 Tables: 1d. No escaping needed
26502 Tables: 2a. Nested in td
26507 <td>foo|bar</td></tr>
26508 <tr><td>x<div>a|b</div></td>
26512 |<nowiki>foo|bar</nowiki>
26514 |x<div><nowiki>a|b</nowiki></div>
26522 <td>x<div>a|b</div>
26523 </td></tr></tbody></table>
26527 Tables: 2b. Nested in td
26533 <td>a<i>b||c</i></td>
26534 <td>a<i><div>b||c</div></i></td>
26535 </tr></tbody></table>
26538 |<nowiki>foo||bar</nowiki>
26539 |a''<nowiki>b||c</nowiki>''
26540 |a''<div><nowiki>b||c</nowiki></div>''
26549 <td>a<i><div>b||c</div></i>
26554 Tables: 2c. Nested in td -- no escaping needed
26569 Tables: 3a. Nested in th
26584 Tables: 3b. Nested in th
26589 <tr><th>foo!!bar</th>
26590 <th><i>foo|bar</i></th>
26591 <th><i>foo!!bar</i></th>
26592 <th><i><span>foo!!bar</span></i></th>
26593 </tr></tbody></table>
26596 !<nowiki>foo!!bar</nowiki>
26597 !''<nowiki>foo|bar</nowiki>''
26598 !''<nowiki>foo!!bar</nowiki>''
26599 !''<span><nowiki>foo!!bar</nowiki></span>''
26608 <th><i>foo!!bar</i>
26610 <th><i><span>foo!!bar</span></i>
26615 Tables: 3c. Nested in th
26620 <tr><th>foo||bar</th>
26621 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26622 </tr></tbody></table>
26625 !<nowiki>foo||bar</nowiki>
26626 !<nowiki>foo||bar</nowiki>
26638 Tables: 4a. Escape -
26653 |<nowiki>-bar</nowiki>
26658 Tables: 4b. Escape +
26673 |<nowiki>+bar</nowiki>
26678 Tables: 4c. No escaping needed
26683 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26684 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26690 <div>a|b</div></td>
26734 Tables: 4d. No escaping needed
26739 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26740 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26741 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26752 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26761 Tables: 4e. Escape }
26766 <tr><td>}</td></tr>
26767 <tr><td>x</td><td data-parsoid='{"stx":"row"}'>}</td></tr></table>
26771 |<nowiki>}</nowiki>
26787 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26791 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26793 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26795 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26797 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26800 | || align="center" | ||
26810 | {{!}}{{!}} align="center" | ||
26814 ! !! align="center" | !!
26820 <td align="center"></td>
26822 </td></tr></tbody></table>
26827 <td align="center">
26830 </td></tr></tbody></table>
26834 <td align="center"></td>
26836 </td></tr></tbody></table>
26840 <th align="center"></th>
26842 </th></tr></tbody></table>
26846 T97430: Don't emit empty nowiki pairs around marker meta tags
26850 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26851 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26853 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26854 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26858 Unclosed xmlish element in table line shouldn't eat end delimiters
26863 <tbody><tr><td> <foo</td>
26864 <td> bar></td></tr>
26880 #### --------------- Links ----------------
26881 #### 1. Quote marks in link text
26882 #### 2. Wikilinks: Escapes needed
26883 #### 3. Wikilinks: No escapes needed
26884 #### 4. Extlinks: Escapes needed
26885 #### 5. Extlinks: No escapes needed
26886 #### --------------------------------------
26888 Links 1. WikiLinks: No escapes needed
26892 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26893 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26894 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26898 [[Foo|x [Foobar] x]]
26900 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26901 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26902 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26907 Links 2. WikiLinks: Escapes needed
26911 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26912 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26913 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26914 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26915 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26916 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26917 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26918 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26919 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26920 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26922 [[Foo|<nowiki>Foobar]</nowiki>]]
26923 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26924 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26925 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26927 [[Foo|<nowiki>]]bar</nowiki>]]
26928 [[Foo|<nowiki>[[bar</nowiki>]]
26929 [[Foo|<nowiki>x [[ y</nowiki>]]
26930 [[Foo|<nowiki>x ]] y</nowiki>]]
26931 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26933 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26934 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26935 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26936 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26937 <a href="/wiki/Foo" title="Foo">|Bar</a>
26938 <a href="/wiki/Foo" title="Foo">]]bar</a>
26939 <a href="/wiki/Foo" title="Foo">[[bar</a>
26940 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26941 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26942 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26947 Links 3. WikiLinks: No escapes needed
26951 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26952 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26957 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26958 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26963 Links 4. ExtLinks: Escapes needed
26967 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26968 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26969 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26970 <p>[http://google.com]</p>
26971 <p>[http://google.com google]</p>
26972 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26973 <p>[<a rel="mw:ExtLink" href="http://google.com" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://google.com"}},"i":0}}]}'>http://google.com</a>]</p>
26975 [http://google.com <nowiki>[google]</nowiki>]
26976 [http://google.com <nowiki>google]</nowiki>]
26977 [http://google.com <nowiki>goog] le</nowiki>]
26979 <nowiki>[http://google.com]</nowiki>
26981 <nowiki>[http://google.com google]</nowiki>
26983 [http://google.com<nowiki>]</nowiki>
26985 [{{echo|http://google.com}}<nowiki>]</nowiki>
26987 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26988 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26989 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26990 </p><p>[http://google.com]
26991 </p><p>[http://google.com google]
26992 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26993 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26998 Links 5. ExtLinks: No escapes needed
27002 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
27003 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
27005 [http://google.com [google]
27007 [[http://google.com]]
27009 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
27010 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
27015 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
27019 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
27020 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
27021 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
27022 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
27023 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
27024 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
27025 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
27026 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
27027 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
27028 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
27029 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
27030 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
27031 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
27034 x<nowiki/>http://example.com<nowiki/>y
27035 http://example.com<nowiki/>?x
27036 http://example.com<nowiki/>&x
27037 http://example.com<nowiki/>'x
27038 http://example.com<nowiki/>,x
27039 http://example.com<nowiki/>.x
27040 http://example.com<nowiki/>;x
27041 http://example.com<nowiki/>:x
27042 http://example.com<nowiki/>;x
27043 http://example.com<nowiki/>!x
27044 http://example.com<nowiki/>=x
27045 http://example.com<nowiki/>(x)
27046 http://example.com(x<nowiki/>)
27050 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
27055 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
27057 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
27058 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
27059 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
27060 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
27061 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
27067 "http://example.com"
27068 (http://example.com)
27069 (http://example.com) foo
27070 http://example.com,
27071 http://example.com, foo
27074 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
27076 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
27077 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
27078 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
27079 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
27080 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
27085 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
27089 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
27090 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
27092 http://example.com.,;:!?\
27093 -http://example.com:
27095 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
27096 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
27101 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
27105 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
27106 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
27107 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
27111 X<nowiki/>RFC 123<nowiki/>y
27115 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
27119 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
27120 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
27121 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
27128 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
27129 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
27130 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
27135 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
27139 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
27140 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27141 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27145 X<nowiki/>PMID 123<nowiki/>y
27149 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
27153 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
27154 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
27155 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
27162 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
27163 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
27164 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
27169 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
27173 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
27174 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
27175 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
27178 ISBN 1234567890<nowiki/>1
27179 ISBN 1234567890<nowiki/>x
27180 a<nowiki/>ISBN 1234567890<nowiki/>b
27184 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
27188 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
27192 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
27197 Links 14. Protect link-like plain text. (Parsoid bug T78425)
27201 <p>this is not a link: http://example.com
27204 this is not a link: <nowiki>http://example.com</nowiki>
27208 Links 15. Link trails can't become link prefixes.
27213 <p><a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður" data-parsoid='{"stx":"simple","tail":"-"}'>Söfnuður-</a><a rel="mw:WikiLink" href="00" title="00">00</a></p>
27215 [[Söfnuður]]-[[00]]
27217 <p><a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">Söfnuður-</a><a href="/wiki/00" title="00">00</a>
27221 #### --------------- Quotes ---------------
27222 #### 1. Quotes inside <b> and <i>
27223 #### 2. Link fragments separated by <i> and <b> tags
27224 #### 3. Link fragments inside <i> and <b>
27225 #### 4. No escaping needed
27226 #### --------------------------------------
27228 1a. Quotes inside <b> and <i>
27239 <b>foo'<i>bar'</i>baz</b>
27248 <i>fools'<span> errand</span></i>
27249 <i><span>fool</span>'s errand</i>
27250 '<i>foo</i> bar '<i>baz</i>
27251 a|!*#-:;+-~[]{}b'<i>x</i>
27255 ''<nowiki>''foo''</nowiki>''
27256 ''<nowiki>'''foo'''</nowiki>''
27258 '''<nowiki/>'foo''''
27259 '''<nowiki>''foo''</nowiki>'''
27260 '''<nowiki>'''foo'''</nowiki>'''
27261 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
27262 '''foo'''<nowiki/>'s
27268 '''foo'''<nowiki/>'
27269 ''''foo'''<nowiki/>'
27270 ''fools'<span> errand</span>''
27271 ''<span>fool</span>'s errand''
27272 '<nowiki/>''foo'' bar '''baz''
27273 a|!*#-:;+-~[]{}b'''x''
27277 1b. Quotes inside <b> and <i> with other tags on same line
27281 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27282 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27283 <i>a'</i> foo <b><a rel="mw:WikiLink" href="Bar" title="Bar" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[bar]]"}},"i":0}}]}'>bar</a></b>
27284 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
27285 '<i>foo</i> <span class="mw-ref" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
27286 '<i>foo</i> <div title="name">test</div>
27287 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
27288 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
27289 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">test</span></li>
27292 '''a'' foo ''[[bar]]''
27293 ''a''' foo ''[[bar]]''
27294 ''a''' foo '''{{echo|[[bar]]}}'''
27295 [[foo]] x'''[[bar]]''
27296 '''foo'' <ref>test</ref>
27297 '''foo'' <div title="name">test</div>
27298 '''foo'' and <br> bar
27303 2. Link fragments separated by <i> and <b> tags
27307 <p>[[<i>foo</i>hello]]</p>
27308 <p>[[<b>foo</b>hello]]</p>
27310 [[''foo''<nowiki>hello]]</nowiki>
27312 [['''foo'''<nowiki>hello]]</nowiki>
27315 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
27316 # this is one of the shortcomings of this format
27318 3. Link fragments inside <i> and <b>
27322 <p><i>[[foo</i>]]</p>
27323 <p><b>[[foo</b>]]</p>
27325 ''[[foo''<nowiki>]]</nowiki>
27327 '''[[foo'''<nowiki>]]</nowiki>
27331 4. No escaping needed
27335 <p>'<span><i>bar</i></span>'
27336 '<span><b>bar</b></span>'
27340 '<span>''bar''</span>'
27341 '<span>'''bar'''</span>'
27345 #### ----------- Paragraphs ---------------
27346 #### 1. No unnecessary escapes
27347 #### --------------------------------------
27350 1. No unnecessary escapes
27354 <p>bar <span>[[foo]]</span>
27355 </p><p>=bar <span>[[foo]]</span>
27356 </p><p>[[bar <span>[[foo]]</span>
27357 </p><p>]]bar <span>[[foo]]</span>
27358 </p><p>=bar <span>foo]]</span>=
27361 bar <span><nowiki>[[foo]]</nowiki></span>
27363 =bar <span><nowiki>[[foo]]</nowiki></span>
27365 [[bar <span><nowiki>[[foo]]</nowiki></span>
27367 ]]bar <span><nowiki>[[foo]]</nowiki></span>
27369 =bar <span>foo]]</span><nowiki>=</nowiki>
27372 #### ----------------------- PRE --------------------------
27374 1. Leading whitespace in SOL context should be escaped
27397 <nowiki> </nowiki>a
27399 <nowiki> </nowiki> a
27403 <nowiki> </nowiki> a
27405 <nowiki> </nowiki>a
27408 <nowiki> </nowiki>b
27431 2. Leading whitespace in non-indent-pre contexts should not be escaped
27435 <p>foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
27436 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
27437 <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"><i>a</i>
27447 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
27466 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
27470 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption>caption</figcaption></figure>
27472 [[File:Foobar.jpg|thumb|caption]]
27476 5. Nowiki escaping should account for indent-pres
27486 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
27500 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
27503 "modes": ["html2wt"],
27504 "scrubWikitext": true
27512 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
27513 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
27514 <p> <!--boo-->*foo</p>
27515 <p><!--boo--> *foo</p>
27516 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
27517 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
27533 <nowiki>*</nowiki>foo
27535 <nowiki/><!--boo-->*foo
27537 <!--boo--><nowiki/>*foo
27539 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
27541 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
27544 #### --------------- Behavior Switches --------------------
27547 1. Valid behavior switches should be escaped
27554 <nowiki>__TOC__</nowiki>
27555 ''<nowiki>__TOC__</nowiki>''
27559 2. Invalid behavior switches should not be escaped
27570 # We use indent-pre as an indirect way to test for sol-transparent behavior.
27572 Behavior switches should be SOL-transparent
27576 <meta property="mw:PageProp/toc" />
27578 <!-- this one's bogus -->
27581 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
27583 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
27587 <!-- this one's bogus -->
27596 #### --------------- HTML tags ---------------
27599 #### 3. multi-line html tag
27600 #### 4. extension tags
27601 #### -----------------------------------------
27607 <a href="http://google.com">google</a>
27609 <a href="http://google.com">google</a>
27617 <ul><li> <div>foo</div></li>
27618 <li> <div style="color:red">foo</div></li>
27619 <li> <td></li></ul>
27622 * <nowiki><div>foo</div></nowiki>
27623 * <nowiki><div style="color:red">foo</div></nowiki>
27624 * <nowiki><td></nowiki>
27628 3. multi-line html tag
27647 <p><ref>foo</ref>
27648 </p><p><ref>bar
27649 </p><p>baz</ref>
27652 <nowiki><ref>foo</ref></nowiki>
27654 <nowiki><ref>bar</nowiki>
27656 baz<nowiki></ref></nowiki>
27660 Parsoid: newline inducing block nodes don't suppress <nowiki>
27666 <nowiki> </nowiki>a
27671 #### --------------- Others ---------------
27677 <p><nowiki>foo</nowiki>
27680 <nowiki>foo</nowiki>
27683 ## The quote-char in the input is necessary for triggering the bug
27685 (T54035) Nowiki-escaping should not get tripped by " :" in text
27694 #----------- End of wikitext escaping tests --------------
27698 Tag-like HTML structures are passed through as text
27720 </p><p>1<d e>f
27725 HTML tag with necessary entities in attributes
27727 <span title="&amp;">foo</span>
27729 <p><span title="&amp;">foo</span>
27734 HTML tag with 'unnecessary' entity encoding in attributes
27736 <span title="&">foo</span>
27738 <p><span title="&">foo</span>
27743 HTML tag with broken attribute value quoting
27745 parsoid=wt2html,html2html
27747 <span title="Hello world>Foo</span>
27749 <p><span title="Hello world">Foo</span>
27752 <p><span title="Hello world">Foo</span></p>
27756 Self-closed tag with broken attribute value quoting
27758 parsoid=wt2html,html2html
27760 <div title="Hello world />Foo
27762 <div title="Hello world"></div><p>Foo</p>
27764 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27768 Table with broken attribute value quoting
27770 parsoid=wt2html,html2html
27773 | title="Hello world|Foo
27778 <td title="Hello world">Foo
27783 <td title="Hello world">Foo
27788 Table with broken attribute value quoting on consecutive lines
27790 parsoid=wt2html,html2html
27793 | title="Hello world|Foo
27794 | style="color:red|Bar
27799 <td title="Hello world">Foo
27801 <td style="color:red">Bar
27806 <td title="Hello world">Foo
27807 </td><td style="color: red">Bar
27808 </td></tr></tbody></table>
27812 Accept empty td cell attribute
27815 | align="center" |foo|| |
27820 <td align="center">foo</td>
27826 Non-empty attributes in th-cells
27829 !Foo!! style="color: red" |Bar
27835 <th style="color: red">Bar
27840 Accept empty attributes in th-cells
27854 Empty table rows go away
27874 ### Parsoid-centric tests for testing RTing of inter-element separators
27875 ### Edge cases not tested by existing parser tests and specific to
27876 ### Parsoid-specific serialization strategies.
27880 RT-ed inter-element separators should be valid separators
27891 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27895 # Parsoid-only test of a DOM pass
27897 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27909 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27910 <p>bar</p></small></td></tr>
27914 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo<small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></small></td></tr>
27918 # Note that the "style" attribute is really a template parameter here.
27919 # The = would have to be {{=}} if you wanted the literal.
27921 Empty TD followed by TD with tpl-generated attribute
27926 |{{echo|style='color:red'}}|foo
27939 Indented table with an empty td
27957 Indented table with blank lines in between (T85627)
27975 <br /></p></td></tr>
27980 Indented block & table
27993 <div data-parsoid='{"stx":"html"}'>foo</div>
27995 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
28000 Indent and comment before table row
28014 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
28015 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
28019 # PHP parser omits empty TR
28021 Empty TR followed by a template-generated TR
28025 {{echo|<tr><td>foo</td></tr>}}
28030 <tbody><tr><td>foo</td></tr>
28035 <tr class='mw-empty-elt'></tr>
28036 <tr about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr><td>foo</td></tr>"}},"i":0}}]}'>
28041 ## PHP and parsoid output differ for this; as usual PHP omits empty
28042 ## elements, and since it strips the comments the TR is empty.
28044 Empty TR followed by mixed-ws-comment line should RT correctly
28060 <tr class='mw-empty-elt'></tr>
28063 <!--c--> </tr><!--d-->
28068 Multi-line image caption generated by templates with/without trailing newlines
28070 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
28071 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
28073 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a><figcaption>foo\n<span about="#mwt9" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"A"}},"i":0}}]}'>A</span>\n<span about="#mwt10" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"B"}},"i":0}}]}'>B</span>\n<span about="#mwt11" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"C"}},"i":0}}]}'>C</span></figcaption></figure>
28074 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a><figcaption>foo\n<span about="#mwt12" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"A"}},"i":0}}]}'>A</span>\n<span about="#mwt13" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"B"}},"i":0}}]}'>B</span>\n<span about="#mwt14" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"C"}},"i":0}}]}'>C</span>\n\n</figcaption></figure>
28078 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
28082 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}' data-mw='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
28084 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
28086 <includeonly>foo</includeonly>
28094 ## PHP emits broken html for this, and since this is primarily
28095 ## a Parsoid serializer test, marking this Parsoid only
28097 Improperly nested inline or quotes tags with whitespace in between
28099 <span> <s>x</span> </s>
28102 <p><span> <s>x</s></span><s> </s>
28103 <b> <i>x</i></b><i> </i>
28108 Encapsulate protected attributes from wt
28110 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
28112 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
28116 <div data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">foo</div>
28118 <table data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">
28119 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
28123 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
28124 ## Having nested or stray pre tags results in the attempt to add duplicates,
28125 ## causing an assertion fail. This test tries to prevent that situation.
28127 Ensure ParagraphWrapper can deal with stray closing pre tags
28136 ## Remex doesn't account for fostered content.
28138 1. Ensure fostered text content is wrapped in element nodes
28142 <table>hi</table><table>ho</table>
28144 hi<table></table>ho<table></table>
28146 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>hi</p><table data-parsoid='{"stx":"html"}'></table><p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>ho</p><table data-parsoid='{"stx":"html"}'></table>
28149 ## Remex doesn't account for fostered content.
28151 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
28153 parsoid=wt2html,wt2wt
28163 </td></tr></tbody></table>
28165 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
28166 <table data-parsoid='{"stx":"html"}'>
28167 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
28168 </td></tr></tbody></table>
28171 ## Remex doesn't account for fostered content.
28173 Encapsulation properly handles null DSR information from foster box
28175 parsoid=wt2html,wt2wt
28177 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
28179 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>foo<tr><td>bar</td></tr></table>"}},"i":0}}]}'>foo</p><table about="#mwt1" data-parsoid='{"stx":"html"}'><tbody><tr><td>bar</td></tr></tbody></table>
28182 ## Remex doesn't account for fostered content.
28184 1. Encapsulate foster-parented transclusion content
28186 parsoid=wt2wt,wt2html
28188 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
28190 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
28192 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<tr><td>bar</td></tr>"}},"i":0}},"</table>"]}'>foo</p><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td>bar</td></tr></tbody></table>
28196 2. Encapsulate foster-parented transclusion content
28198 parsoid=wt2wt,wt2html
28200 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
28202 <div typeof="mw:Transclusion" data-mw="{"parts":["<table><div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div><tr><td>bar</td></tr></table>"]}">foo</div>
28213 3. Encapsulate foster-parented transclusion content
28215 parsoid=wt2wt,wt2html
28217 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28219 <div typeof="mw:Transclusion" data-mw="{"parts":["<table><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div><tr><td>"}},"i":0}},"bar</td></tr></table>"]}">
28232 4. Encapsulate foster-parented transclusion content
28234 parsoid=wt2wt,wt2html
28236 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28238 <div typeof="mw:Transclusion" data-mw="{"parts":["<table><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div><tr><td>"}},"i":0}},"bar</td></tr></table>"]}">
28250 ## Remex doesn't account for fostered content.
28252 5. Encapsulate foster-parented transclusion content
28254 parsoid=wt2wt,wt2html
28256 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
28258 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
28260 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}'>foo</p><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
28263 ## Remex doesn't account for fostered content.
28265 6. Encapsulate foster-parented transclusion content
28267 parsoid=wt2wt,wt2html
28269 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
28271 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
28273 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}'>foo</p><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p data-parsoid='{"stx":"html"}'>ok</p>
28277 7. Encapsulate foster-parented transclusion content
28279 parsoid=wt2wt,wt2html
28281 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
28283 <p typeof="mw:Transclusion" data-mw="{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<p>foo</p>"}},"i":0}},"<td>bar</td></table>"]}">foo</p>
28293 ## Remex doesn't account for fostered content.
28294 # Note that the wt is broken on purpose: the = should be {{=}} if you
28295 # don't want it to be a template parameter key.
28297 8. Encapsulate foster-parented transclusion content
28299 parsoid=wt2wt,wt2html
28302 }}{|{{echo|style='color:red'}}
28313 </td></tr></tbody></table>
28315 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p><span about="#mwt1">
28316 </span><p about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"style","named":true}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"style":{"wt":"'color:red'"}},"i":0}},"\n|-\n|b\n|}"]}'>{{{1}}}</p><table about="#mwt3">
28319 </td></tr></tbody></table>
28322 ## Remex doesn't account for fostered content.
28324 9. Encapsulate foster-parented transclusion content
28326 parsoid=wt2wt,wt2html
28328 <table>{{echo|hi</table>hello}}
28330 hi<table></table><p>hello</p>
28332 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi</table>hello"}},"i":0}}]}'>hi</p><table about="#mwt2"></table><p about="#mwt2">hello</p>
28336 Table in fosterable position
28347 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"OpenTable","href":"./Template:OpenTable"},"params":{},"i":0}},"\n<div>\n"]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[]]}'></div><span about="#mwt1">
28349 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
28355 # Parsoid only for T66747
28356 # (Also core doesn't define {{#if}} in default install)
28358 Properly encapsulate empty-content transclusions in fosterable positions
28366 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["<table>\n",{"template":{"target":{"wt":"#if:","function":"if"},"params":{"1":{"wt":"\n<td>foo</td>\n"}},"i":0}},"\n</table>"]}' data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}'>
28371 ## No longer captures its original intention
28373 Always encapsulate foster box when template range is expanded to table
28386 T115289: Unclosed table
28388 {{echo|<table>}}<!--c-->[[Category:Two]]
28390 <link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:Two"},"sa":{"href":"Category:Two"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>"}},"i":0}},"<!--c-->[[Category:Two]]"]}'/><table about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><!--c--></table>
28394 T115289: Don't migrate newlines out of tables with fostered content
28396 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
28398 <link rel="mw:PageProp/Category" href="./Category:One" about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:One"},"sa":{"href":"Category:One"},"fostered":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><td></td>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr>[[Category:One]]"}},"i":0}},"<!--c-->[[Category:Two]]"]}'/><link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt2"/><table about="#mwt2" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr><td></td></tr><tr><!--c--></tr></tbody></table>
28402 T73074: More fostering fun
28404 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
28406 <link rel="mw:PageProp/Category" href="./Category:Two" data-parsoid='{"stx":"simple","a":{"href":"./Category:Two"},"sa":{"href":"Category:Two"},"fostered":true}'/><table data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"stx":"html"}'></td></tr><tr about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr>"}},"i":0}},"<!--c-->[[Category:Two]]"]}'><!--c--></tr></tbody></table>
28410 Support <object> element with .data attribute
28414 <object data="test.swf"></object>
28416 <object data="test.swf"></object>
28420 Don't block XML namespace declaration
28422 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28424 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28427 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
28430 # -----------------------------------------------------------------
28431 # The following section of tests are primarily to spec requirements
28432 # around Parsoid's serialization (old, new, edited content)
28434 # All these tests are marked Parsoid html2wt and html2html only
28435 # ----------------------------------------------------------------
28438 Ignore rel attribute in a-tags during serialization to url-links
28442 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
28443 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
28444 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
28446 http://en.wikipedia.org/wiki/Foobar
28447 http://en.wikipedia.org/wiki/Foobar
28448 http://en.wikipedia.org/wiki/Foobar
28451 # 'mi' is a localinterwiki prefix as well as a language
28453 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
28457 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
28463 Parsoid should accept interwiki shortcuts
28467 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
28468 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
28469 <a href='./fr:Foo'>Foo</a></p>
28470 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
28471 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
28472 <a href='fr%3AFoo'>Foo</a></p>
28473 <p><a href='FR%3AFoo'>Foo</a>
28474 <a href='./FR:Foo'>Foo</a></p>
28489 Parsoid should not accept invalid interwiki shortcuts
28493 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
28494 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
28495 <a href='news:Foo'>Foo</a></p>
28504 New wikilinks should be serialized properly
28508 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
28509 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
28510 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
28511 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
28512 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
28516 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
28517 http://en.wikipedia.org/wiki/Foo
28518 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
28522 New wiki links (href variations)
28526 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28527 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
28528 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
28529 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
28534 [[Toxine bactérienne]]
28538 New wiki links (content string variations)
28542 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28543 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
28544 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
28548 [[Foo_bar|./Foo_bar]]
28552 New category links (href variations)
28556 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
28557 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
28558 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
28560 [[Category:Toxine bactérienne]]
28561 [[Category:Toxine bactérienne]]
28562 [[Category:Toxine bactérienne]]
28566 New sol transparent links don't need indent-pre nowiki protection
28571 <link rel="mw:PageProp/redirect" href="./Main_Page">
28572 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
28573 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
28575 #WEITERLEITUNG [[Main Page]]
28576 <!-- this is good --> [[Category:Good]]
28577 <!-- this is great --> [[Kategorie:Great]]
28581 New interlanguage links (href variations)
28585 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
28586 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
28587 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
28589 [[es:Toxine bactérienne]]
28590 [[es:Toxine_bactérienne]]
28591 [[es:Toxine_bactérienne]]
28595 Image: Modifying size of an image (1)
28598 "modes": ["wt2wt"],
28600 ["img[height]", "attr", "height", "22"],
28601 ["img[width]", "attr", "width", "200"]
28605 [[Image:Foobar.jpg|230x230px]]
28607 [[Image:Foobar.jpg|200x200px]]
28611 Image: Modifying size of an image (2)
28614 "modes": ["wt2wt"],
28616 ["img[height]", "attr", "height", "100"],
28617 ["img[width]", "attr", "width", "500"]
28621 [[Image:Foobar.jpg|230x230px]]
28623 [[Image:Foobar.jpg|500x500px]]
28626 # Change in size is ignored so long as class='mw-default-size'
28628 Image: Modifying size of an image (3)
28631 "modes": ["wt2wt"],
28633 ["figure[class]", "removeClass", "mw-default-size"],
28634 ["figure img", "attr", "height", "19"],
28635 ["figure img", "attr", "width", "170"]
28639 [[Image:Foobar.jpg|thumb]]
28641 [[Image:Foobar.jpg|thumb|170x170px]]
28645 Image: Modifying alignment of an image (T50665)
28648 "modes": ["wt2wt"],
28650 ["figure[class]", "removeClass", "mw-halign-right"],
28651 ["figure[class]", "addClass", "mw-halign-left"]
28655 [[Image:Foobar.jpg|thumb|caption|right]]
28657 [[Image:Foobar.jpg|thumb|caption|left]]
28661 Image: Modifying mw-default-size of an frameless image (T64805)
28664 "modes": ["wt2wt"],
28666 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28670 [[Image:Foobar.jpg|frameless|right]]
28672 [[Image:Foobar.jpg|frameless|right|220x220px]]
28676 Image: Modifying valign of an image (T51221)
28679 "modes": ["wt2wt"],
28681 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28682 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28686 [[File:Foobar.jpg|20px|middle]]
28688 [[File:Foobar.jpg|20px|text-top]]
28692 Image: Modifying alt attribute of an image (T58400)
28696 "modes": ["wt2wt"],
28698 ["img[alt]", "attr", "alt", "some alternate edited text"]
28702 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28704 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28708 Image: Modifying caption of an image
28711 "modes": ["wt2wt"],
28713 ["figcaption", "text", "new caption"]
28717 [[Image:Foobar.jpg|thumb|original caption]]
28719 [[Image:Foobar.jpg|thumb|new caption]]
28723 Image: empty alt attribute (T50924)
28725 [[File:Foobar.jpg|thumb|alt=|bar]]
28727 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>bar</div></div></div>
28729 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"alt","ak":"alt="},{"ck":"caption","ak":"bar"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img alt="" 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":{"alt":"","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=","resource":"File:Foobar.jpg"}}'/></a><figcaption>bar</figcaption></figure>
28733 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28739 <figure class="mw-default-size mw-halign-right" typeof="mw:Image/Thumb"><a href="./Imagen:Foobar.jpg"><img resource="./Imagen:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="20" width="180"/></a></figure>
28741 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28745 Image: Block level image should have \n before and after
28748 [[File:Foobar.jpg|right|thumb|150x150px]]
28752 <figure class="mw-halign-right" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/150px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="17" width="150"/></a><figcaption></figcaption></figure>
28757 Image: New block level image should have \n before and after (existing content)
28760 [[File:Foobar.jpg|right|thumb|150x150px]]
28764 <figure class="mw-halign-right" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"right","ak":"right"},{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"150x150px"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/150px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="17" width="150" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"17","width":"150"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption></figcaption></figure>
28769 Image: upright option (parsoid)
28771 [[File:Foobar.jpg|thumb|upright|caption]]
28772 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28773 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28775 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/170px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="19" width="170"/></a><figcaption>caption</figcaption></figure>
28776 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/110px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="12" width="110"/></a><figcaption>caption</figcaption></figure>
28777 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/500px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="57" width="500"/></a><figcaption>caption</figcaption></figure>
28781 Image: upright option is ignored on inline and frame images (parsoid)
28783 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28785 <p><figure-inline typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/500px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="57" width="500"/></a></figure-inline></p>
28789 Image: in template parameter with empty parameter
28791 {{echo|[[File:Foobar.jpg|link=]]}}
28793 <p><figure-inline class="mw-default-size" typeof="mw:Transclusion mw:Image" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[File:Foobar.jpg|link=]]"}},"i":0}}]}'><span><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"/></span></figure-inline></p>
28797 Image: from basic HTML (1)
28801 <span typeof="mw:Image">
28802 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28805 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28809 Image: from basic HTML (2)
28813 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28815 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28819 Image: from basic HTML (3)
28823 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28825 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28829 Image: from basic HTML (4)
28833 <img src="./File:Foobar.jpg">
28835 [[File:Foobar.jpg|link=]]
28839 Image: Invalid title as link
28841 [[File:Foobar.jpg|link=<]]
28843 <p><a href="/wiki/File:Foobar.jpg" class="image" title="link=<"><img alt="link=<" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
28846 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=<"}]}' data-mw='{"attribs":[["link",{"txt":"<"}]]}'><a href="./File:Foobar.jpg"><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"/></a></figure-inline></p>
28850 Various link types in alt and link options
28852 [[File:Foobar.jpg|link=[[Main Page]]|alt=[[Main Page]]|caption]]
28854 [[File:Foobar.jpg|link=[[Media:Thumb.png]]|alt=[[Media:Thumb.png]]|caption]]
28856 [[File:Foobar.jpg|link=[[wikipedia:Foo]]|alt=[[wikipedia:Foo]]|caption]]
28858 <p><a href="/wiki/Main_Page" title="caption"><img alt="Main Page" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
28859 </p><p><a href="/wiki/Media:Thumb.png" title="caption"><img alt="Media:Thumb.png" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
28860 </p><p><a href="http://en.wikipedia.org/wiki/Foo" title="caption"><img alt="wikipedia:Foo" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
28863 <p><figure-inline class="mw-default-size" typeof="mw:Image mw:ExpandedAttrs" about="#mwt1" data-mw='{"attribs":[["alt",{"html":"alt=<a rel=\"mw:WikiLink\" href=\"./Main_Page\" title=\"Main Page\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main Page\"},\"dsr\":[41,216,2,2]}'>Main Page</a>","txt":"Main Page"}]],"caption":"caption"}'><a href="./Main_Page" data-parsoid='{"a":{"href":"./Main_Page"},"sa":{"href":"link=[[Main Page]]"}}'><img alt="Main Page" 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"/></a></figure-inline></p>
28865 <p><figure-inline class="mw-default-size" typeof="mw:Image mw:ExpandedAttrs" about="#mwt3" data-mw='{"attribs":[["alt",{"html":"alt=<a rel=\"mw:MediaLink\" href=\"//example.com/images/e/ea/Thumb.png\" resource=\"./Media:Thumb.png\" title=\"Thumb.png\" data-parsoid='{\"a\":{\"resource\":\"./Media:Thumb.png\"},\"sa\":{\"resource\":\"Media:Thumb.png\"},\"dsr\":[113,216,null,null]}'>Media:Thumb.png</a>","txt":"Media:Thumb.png"}]],"caption":"caption"}'><a href="./Media:Thumb.png" data-parsoid='{"a":{"href":"./Media:Thumb.png"},"sa":{"href":"link=[[Media:Thumb.png]]"}}'><img alt="Media:Thumb.png" 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"/></a></figure-inline></p>
28867 <p><figure-inline class="mw-default-size" typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-mw='{"attribs":[["alt",{"html":"alt=<a rel=\"mw:WikiLink/Interwiki\" href=\"http://en.wikipedia.org/wiki/Foo\" title=\"wikipedia:Foo\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://en.wikipedia.org/wiki/Foo\"},\"sa\":{\"href\":\"wikipedia:Foo\"},\"isIW\":true,\"dsr\":[189,216,2,2]}'>wikipedia:Foo</a>","txt":"wikipedia:Foo"}]],"caption":"caption"}'><a href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"link=[[wikipedia:Foo]]"}}'><img alt="wikipedia:Foo" 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"/></a></figure-inline></p>
28871 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28876 <li><p>foo</p></li>
28883 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28887 <ul> <li>foo</li></ul>
28893 Don't strip leading whitespace when handling indent-pre suppressing tags
28898 <tr><td> indented row</td></tr>
28901 <b>This is very bold of you!</b>
28904 indented cell (no pre-wrapping!)
28914 '''This is very bold of you!'''
28918 indented cell (no pre-wrapping!)
28926 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28948 <nowiki> </nowiki></span>bar2
28951 <nowiki> </nowiki><span>bar</span>
28954 <nowiki> </nowiki><span>foo</span>
28959 Lists: Dont insert newlines in a serialized list item.
28963 <ul><li>a<br>b</li><li>c</li></ul>
28970 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28973 "modes": ["html2wt"],
28974 "scrubWikitext": false
28977 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28978 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28980 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28981 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28983 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28985 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28987 == hello there [[Category:A1]] ==
28989 == [[Category:A2]] hi pal ==
28991 == <!--foo--> [[Category:A3]] how goes it ==
28993 == it goes well [[Category:A4]] <!--bar--> ==
28995 ==howdy [[Category:A5]]==
29001 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
29004 "modes": ["html2wt"],
29005 "scrubWikitext": true
29008 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
29009 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
29011 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
29012 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
29014 <h2><meta property="mw:PageProp/toc" /> ok</h2>
29022 <!--foo-->[[Category:A3]]
29027 [[Category:A4]] <!--bar-->
29035 Headings: Don't hoist metas that come from templates
29038 "modes": ["html2wt"],
29039 "scrubWikitext": true
29042 <h2><span about="#mwt1" typeof="mw:Transclusion" data-parsoid="{}" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo [[Category:Foo]]"}},"i":0}}]}'>foo </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" data-parsoid="{}" /></h2>
29044 == {{echo|foo [[Category:Foo]]}} ==
29048 Headings: Category in ref isn't hoisted
29051 "modes": ["html2wt"],
29052 "scrubWikitext": true
29055 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
29057 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">bar <link rel="mw:PageProp/Category" href="./Category:Baz" /> </span></li></ol>
29060 [[Category:Baz]] </ref> ==
29066 Parsoid: Serialize positional parameters with = in them as named parameter
29070 <p about="#mwt1" typeof="mw:Transclusion"
29071 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
29073 <p about="#mwt1" typeof="mw:Transclusion"
29074 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
29076 <!--Orig params with data-parsoid has heuristics for handling = chars-->
29077 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
29078 <p data-parsoid='{"pi":[[{"k":"1"},{"k":"2"}]]}' about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"},"2":{"wt":"bar"}},"i":0}}]}'>foo</p>
29082 {{echo|1=f=oo|2=bar}}
29084 <!--Orig params with data-parsoid has heuristics for handling = chars-->
29085 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
29086 {{echo|<nowiki>f=oo</nowiki>|bar}}
29090 Parsoid: Serialize positional parameters with = in extlink as named parameter
29094 <p><a rel="mw:ExtLink" href="http://stuff?is=ok" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://stuff?is=ok"}},"i":0}}]}'>http://stuff?is=ok</a></p>
29096 {{echo|1=http://stuff?is=ok}}
29100 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
29104 <div>a<p>b</p></div>
29125 Substrings resembling wikitext in hrefs should not get nowiki escapes
29129 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
29135 Enforce single-line context in the serializer
29142 <h2> hi <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bogus","href":"./Template:Bogus"},"params":{"1":{"wt":"there\nyou"}},"i":0}}]}'>there</span><span about="#mwt1">
29143 </span><span about="#mwt1">you</span> </h2>
29145 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
29147 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">hello
29148 there</span></li></ol>
29160 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
29167 </tbody></table></dd></dl>
29171 == hi {{bogus|there
29182 * foo '''bar''' baz
29194 Serialize new placeholder space without spans
29198 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
29200 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
29202 <span typeof="mw:Extension/ref" data-mw="{"name":"ref","body":{"html":"foo<span typeof=\"mw:Placeholder\">&nbsp;</span>: bar"}}"><sup>[1]</sup></span>ok</p>
29208 <ref>foo : bar</ref>ok
29212 #-----------------------
29213 # Tag minimization tests
29214 #-----------------------
29217 1. I/B quote minimization: wikitext-only tags should be combined
29221 <p><i>A</i><i>B</i></p>
29222 <p><b>A</b><b>B</b></p>
29223 <p><i>A</i><b><i>B</i></b></p>
29224 <p><b>A</b><i><b>B</b></i></p>
29225 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
29226 <p><i><b>A</b></i><i><b>B</b></i></p>
29227 <p><i><b>A</b></i><b><i>B</i></b></p>
29228 <p><b><i>A</i></b><i><b>B</b></i></p>
29248 2. I/B quote minimization: wikitext and html tags should not be combined
29252 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
29253 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
29257 ''A''<nowiki/>'''<i>B</i>'''
29261 3. I/B quote minimization: templated content stops minimization
29265 <p><i>A</i><i about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''B''"}},"i":0}}]}'>B</i>
29266 <p><i>A</i><b about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"'''''B'''''"}},"i":0}}]}'><i>B</i></b>
29268 ''A''{{echo|''B''}}
29270 ''A''{{echo|'''''B'''''}}
29274 4. I/B quote minimization: new content should be mimimized with adjacent old content
29278 <p><i>A</i><i>B</i></p>
29279 <p><b>A</b><b>B</b></p>
29280 <p><i>A</i><b><i>B</i></b></p>
29290 5a. Merge adjacent quote nodes if they've been edited
29293 "modes": ["wt2wt", "selser"],
29295 ["p", "contents", "remove", ":contains('b')"]
29305 5b. Merge adjacent quote nodes if they've been edited
29308 "modes": ["wt2wt", "selser"],
29314 ''a''<span id="x">b</span>''c''
29320 1. Merge adjacent link nodes as long as at least one element is new
29323 "modes": ["html2wt"],
29324 "scrubWikitext": true
29327 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29328 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29329 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
29333 [[Football|Foot]][[Football|ball]]
29337 2. Merge adjacent link nodes and enable additional normalizations
29340 "modes": ["html2wt"],
29341 "scrubWikitext": true
29344 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
29350 3. Don't merge adjacent link nodes if scrubWikitext is false
29353 "modes": ["html2wt"],
29354 "scrubWikitext": false
29357 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29359 [[Football|Foot]][[Football|ball]]
29363 1. Move format tags outside of WikiLink
29366 "modes": ["html2wt"],
29367 "scrubWikitext": true
29370 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
29371 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
29372 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
29375 '''''[[Football]]'''''
29376 <u>'''''[[Football]]'''''</u>
29380 2. Move format tags outside of WikiLink with mergable A tags
29383 "modes": ["html2wt"],
29384 "scrubWikitext": true
29387 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
29389 '''''[[Football]]'''''
29393 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
29396 "modes": ["html2wt"],
29397 "scrubWikitext": true
29400 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
29402 <font color="red"><u>'''[[Foo]]'''</u></font>
29406 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
29409 "modes": ["html2wt"],
29410 "scrubWikitext": true
29413 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
29414 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
29415 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
29417 [[Foo|<font color="red">Foo</font>]]
29418 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
29419 [[Foo|<span class="Bar">Foo</span>]]
29423 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
29426 "modes": ["selser"],
29427 "scrubWikitext": true,
29429 ["a", "html", "<i>Foo</i>"]
29439 6. Regression test: Manual edit test to ensure diff markers are not lost
29442 "modes": ["selser"],
29443 "scrubWikitext": true,
29445 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
29455 7. T194083 Regression test: Manual edit test to ensure nested diff markers aren't inserted
29458 "modes": ["selser"],
29459 "scrubWikitext": true,
29461 ["div", "after", "\n<p><a href='./Foo' rel='mw:WikiLink'>Foo </a>, placeholder</p>"]
29465 <div>placeholder</div>
29467 <div>placeholder</div>
29468 [[Foo]] , placeholder
29471 #------------------------------
29472 # End of tag minimization tests
29473 #------------------------------
29476 T56262: New entities
29480 <span typeof="mw:Entity"> </span>
29485 ## Note that there is no wikitext output for 'unknownproperty' ##
29486 ## Unknown magic words are silently dropped ##
29493 <meta property='mw:PageProp/toc' />
29494 <meta property='mw:PageProp/notoc' />
29495 <meta property='mw:PageProp/forcetoc' />
29496 <meta property='mw:PageProp/index' />
29497 <meta property='mw:PageProp/noindex' />
29498 <meta property='mw:PageProp/nogallery' />
29499 <meta property='mw:PageProp/noeditsection' />
29500 <meta property='mw:PageProp/notitleconvert' />
29501 <meta property='mw:PageProp/nocontentconvert' />
29502 <meta property='mw:PageProp/unknownproperty' />
29512 __NOCONTENTCONVERT__
29516 Consecutive <pre>s should not get merged
29518 parsoid=html2wt,html2html
29520 <pre>a</pre><pre>b</pre>
29548 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
29552 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
29554 [[Special:BookSources/1234567890|ISBN 1234567895]]
29558 Edited RFC links not serializable as RFC links should serialize as extlinks
29562 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
29564 [https://tools.ietf.org/html/rfc123 New RFC]
29568 Edited PMID links not serializable as PMID links should serialize as extlinks
29572 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
29574 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
29578 WTS of autolinks with trailing/surrounding context
29582 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
29583 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
29584 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
29585 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
29586 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
29587 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
29589 http://cscott.net'''foo'''
29591 http://cscott.net<b>foo</b>
29593 '''http://cscott.net'''
29595 '''http://cscott.net '''
29597 '''http://cscott.net<nowiki/>x'''
29599 http://cscott.net<nowiki/>x
29603 WTS of autolinks with nowikis (round-trip)
29605 x<nowiki/>http://cscott.net<nowiki/>x
29607 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
29610 # this is the "easy" test because it leaves in place all the
29611 # data-parsoid information indicating this is an autolink
29613 WTS of autolinks with escapes (editing)
29616 "modes": ["wt2wt"],
29618 [ "span", "remove" ]
29622 x<nowiki/>http://cscott.net<nowiki/>x
29624 x<nowiki/>http://cscott.net<nowiki/>x
29628 WTS of edited autolink-like text (T103364)
29631 "modes": ["wt2wt"],
29633 [ "span[typeof]", "removeAttr", "typeof" ]
29637 Not a link: <nowiki>http://example.com</nowiki>.
29639 Not a link: <span><nowiki>http://example.com</nowiki></span>.
29643 WTS of newly-authored autolink-like text (T103364)
29647 <p>http://example.com is not a link.</p>
29649 <nowiki>http://example.com</nowiki> is not a link.
29653 WTS of autolink-like text after an autolink (T108563)
29657 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
29659 http://example.com <nowiki>http://example.com</nowiki> is not a link.
29663 Magic links inside links (not autolinked)
29665 [[Foo|http://example.com]]
29668 [[Foo|ISBN 123456789x]]
29670 [http://foo.com http://example.com]
29671 [http://foo.com RFC 1234]
29672 [http://foo.com PMID 1234]
29673 [http://foo.com ISBN 123456789x]
29675 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29676 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29677 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29678 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29679 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29680 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29681 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29682 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29685 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29686 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29687 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29688 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29690 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
29691 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
29692 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
29693 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
29697 Magic links inside image captions (autolinked)
29699 [[File:Foobar.jpg|thumb|http://example.com]]
29700 [[File:Foobar.jpg|thumb|RFC 1234]]
29701 [[File:Foobar.jpg|thumb|PMID 1234]]
29702 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
29704 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
29705 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a></div></div></div>
29706 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div></div></div>
29707 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div></div></div>
29709 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
29710 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption><a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></figcaption></figure>
29711 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></figcaption></figure>
29712 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><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"/></a><figcaption><a href="./Special:BookSources/123456789X" rel="mw:WikiLink">ISBN 123456789x</a></figcaption></figure>
29716 WTS of magic word text (T109371)
29721 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
29722 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
29724 <nowiki>RFC 1234</nowiki>
29726 [http://foo.com RFC 1234]
29732 Edited Redirect link should emit a non-piped wikitext link
29736 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29742 T75121: Infer extension name from typeOf if data-mw is not present
29744 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29746 <div typeOf="mw:Extension/foo"></div>
29751 # Note that the <p> wrapping isn't present in PHP parser output
29752 # The important thing for this test is that P-wrapping doesn't
29753 # interfere with the <nowiki> protection for leading - in <td>
29754 # (which isn't necessary for <th>).
29756 T88318: p-wrapped dash in table.
29758 parsoid=html2wt,wt2wt
29761 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29762 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29763 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
29770 |<nowiki>-</nowiki>
29771 |<nowiki>- </nowiki>
29791 <td><small>-</small>
29798 </td></tr></tbody></table>
29802 T149209: WTS: Handle newlines in table cells properly
29810 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29812 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29818 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29820 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29842 T149209: Selser: Handle newlines in table cells properly
29845 "modes": ["selser"],
29847 [ "#h1", "html", "a\nb\n" ],
29848 [ "#h2", "html", "a\nb\n" ],
29849 [ "#c1", "html", "a\nb\n" ],
29850 [ "#c2", "html", "<p>a</p>" ],
29851 [ "#c3", "html", "<p>a</p>" ],
29852 [ "#c4", "html", "edit-me<p>a</p>" ]
29857 ! id="h1" |edit-me!!1
29859 ! id="h2" |edit-me||2
29861 | id="c1" |edit-me||3
29863 | id="c2" |edit-me||4
29865 | id="c3" |edit-me||p||q||r
29867 | id="c4" |edit-me||p||q||r
29896 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29901 <td id='mwAc'>foo</td>
29902 <td id='serialize-this'>bar</td>
29907 | id="serialize-this" |bar
29912 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29916 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29918 <div id="hello">ok</div>
29922 Testing serialization after deletion in references
29925 "modes": ["wt2wt"],
29931 hi <ref><div id="x">ho</div></ref>
29941 Testing serialization after deletion of table cells
29944 "modes": ["wt2wt", "selser"],
29952 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29962 Testing selser after addition of new row before first row (T125419)
29965 "modes": ["wt2wt", "selser"],
29967 [ "tr", "before", "<tr><td>X</td></tr>" ]
29983 Serialize new table rows in a HTML table using HTML tags
29986 "modes": ["wt2wt", "selser"],
29988 [ "tr", "before", "<tr><td>X</td></tr>" ]
29992 <table><tr><td>a</td></tr></table>
29994 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29998 Serialize new table cells in a HTML row using HTML tags
30001 "modes": ["wt2wt", "selser"],
30003 [ "td", "before", "<td>X</td>" ]
30007 <table><tr><td>a</td></tr></table>
30009 <table><tr><td>X</td><td>a</td></tr></table>
30013 Serialize wikitext list items as HTML list items when embedded in a HTML list
30017 <ul data-parsoid='{"stx": "html"}'>
30018 <li data-parsoid='{}'>a</li>
30033 # Nested list should be inside <li>, that is
30034 # <ul><li>foo<ul>..</ul></li></ul> instead of
30035 # <ul><li>foo</li><ul>..</ul></ul>
30036 # See https://stackoverflow.com/questions/5899337/proper-way-to-make-html-nested-list
30038 Wikitext lists can be nested inside HTML lists
30042 <ul data-parsoid='{"stx": "html"}'>
30043 <li data-parsoid='{"stx": "html"}'>a
30044 <ul><li>b</li></ul>
30048 <ul data-parsoid='{"stx": "html"}'>
30050 <ul><li>y</li></ul>
30068 <ul><li>b</li></ul>
30073 <ul><li>y</li></ul>
30082 "modes": ["wt2wt"],
30084 [ "#xyz", "before", "<b>before</b> stuff " ],
30085 [ "#xyz", "after", " stuff <i>after</i>" ],
30086 [ "#xyz", "html", "x <b>y</b> z" ]
30090 <span id="xyz">hello</span>
30092 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
30096 Never serialize a-tag as html, regardless of what data-parsoid has to say
30098 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30100 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
30105 ## SSS FIXME: This is broken output nevertheless.
30106 ## What might be a reasonable non-broken output for this?
30107 ## This is an edge case unlikely to be seen in production
30108 ## that I am not wasting more time on this right now.
30110 Never serialize a-tag as html, no matter what attributes it has
30112 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30114 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
30116 [http://boo.org http://boohoo.org]
30119 # Misnested is an indication that selser can reuse the source but these have
30120 # shown to sneak through on occasion. See T101768.
30121 # The original wikitext here is: [http://test.com [[one]] two three]
30123 Strip span tags added to mark misnested links
30127 <p data-parsoid='{}'><a rel="mw:ExtLink" href="http://test.com" data-parsoid='{"targetOff":17,"contentOffsets":[17,34]}'></a><a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"simple","a":{"href":"./One"},"sa":{"href":"one"},"misnested":true}'>one</a><span data-parsoid='{"misnested":true}'> two three</span></p>
30129 [http://test.com][[one]] two three
30133 Catch regression when unpacking misnested links
30137 {{echo|hi}}[http://example.com [[ho]]]
30139 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"misnested":true}'>ho</a></p>
30143 Catch regression when unpacking with trailing content
30145 {{echo|Foo <references/> bar}}
30147 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Foo <references/> bar"}},"i":0}}]}'>Foo </p><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol><p about="#mwt2"> bar</p>
30151 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
30155 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span><table about="#mwt2" typeof="mw:Transclusion mw:ExpandedAttrs" data-parsoid='{"a":{"{{echo|c\n{{!}}d\n}}":null},"sa":{"{{echo|c\n{{!}}d\n}}":""},"firstWikitextNode":"table","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c\n{{!}}d\n"}},"i":0}},"\n|}"]}'>
30167 ## This test verifies the presence and computation of this attribute indirectly
30168 ## by making an edit and ensuring that the serialization is correct (which it would be
30169 ## only if firstWikitextNode is properly set).
30171 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
30174 "modes": ["wt2wt"],
30176 [ "div#x", "remove" ],
30177 [ "div", "before", "<div>new</div>" ]
30181 <div id="x">foo</div>
30183 {{echo|<div>boo</div>
30191 {{echo|<div>boo</div>
30197 ## Don't necessarily expect this to roundtrip, but run serialization to catch crashers
30199 File in link scenarios
30202 "modes": ["wt2html","html2wt"],
30203 "suppressErrors": true
30206 [http://www.google.com [[File:Foobar.jpg|123]]]
30208 [http://www.google.com [[File:Foobar.jpg|thumb|123]]]
30210 <p><a rel="nofollow" class="external text" href="http://www.google.com"></a><a href="/wiki/File:Foobar.jpg" class="image" title="123"><img alt="123" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" /></a>
30212 <a rel="nofollow" class="external text" href="http://www.google.com"></a><div class="thumb tright"><a rel="nofollow" class="external text" href="http://www.google.com"></a><div class="thumbinner" style="width:182px;"><a rel="nofollow" class="external text" href="http://www.google.com"></a><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>123</div></div></div>
30214 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com" data-parsoid='{"targetOff":23,"contentOffsets":[23,46]}'><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"123"}]}' data-mw='{"caption":"123"}'></figure-inline></a><a href="./File:Foobar.jpg" data-parsoid='{"misnested":true}'><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":"File:Foobar.jpg"},"misnested":true}'/></a></p>
30216 <a rel="mw:ExtLink" class="external autonumber" href="http://www.google.com" data-parsoid='{"targetOff":72,"contentOffsets":[72,101]}'></a><figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"123"}]}'><a rel="mw:ExtLink" class="external autonumber" href="http://www.google.com" data-parsoid='{"targetOff":72,"contentOffsets":[72,101]}'></a><a href="./File:Foobar.jpg" data-parsoid='{"misnested":true}'><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"},"misnested":true}'/></a><figcaption data-parsoid='{"misnested":true}'>123</figcaption></figure>
30219 # --------------------------------------------
30220 # Tests spec'ing wikitext serialization norms |
30221 # --------------------------------------------
30224 Serialize multi-line indent-pre starting with wikitext syntax
30238 1. Categories should always be serialized on their own line
30242 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
30250 2. Categories that are part of templates should not introduce a line break
30252 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
30254 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span>bar</span> [[Category:baz]]"}},"i":0}}]}'>bar</span><span about="#mwt1"> </span><link rel="mw:PageProp/Category" href="./Category:Baz" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:baz"}}'/> bar</p>
30257 # Careful while editing these next 2 tests. There are \u200f characters
30258 # before and after the <link> tags in the HTML and following some
30259 # of the categories in wikitext
30260 # Do not remove these characters in edits.
30262 # As part of the serialization, these bidi characters will get stripped.
30264 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
30267 "modes": ["html2wt"],
30268 "scrubWikitext": true
30271 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
30272 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
30275 [[קטגוריה: שיטות משפט]]
30279 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
30282 "modes": ["html2wt"],
30283 "scrubWikitext": true
30286 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
30293 Lists: Add space after bullets
30300 <li><span> baz</span></li>
30305 * <span> baz</span>
30309 1. Headings: Add space before/after == (T53744)
30316 <h2><span> baz</span></h2>
30324 == <span> baz</span> ==
30328 2. Headings: Add space before/after == even after hoisted content
30331 "modes": ["html2wt"],
30332 "scrubWikitext": true
30335 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
30343 1. Headings: suppress newly created empty headings
30346 "modes": ["html2wt"],
30347 "scrubWikitext": true
30355 2. Headings: don't suppress empty headings if scrubWikitext is false
30365 3. Headings: suppress empty headings on edits
30368 "modes": ["selser"],
30369 "scrubWikitext": true,
30375 ==<span id="x">foo</span>==
30380 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
30383 "modes": ["html2wt"],
30384 "scrubWikitext": true
30387 <h2>foo<br/>bar</h2>
30388 <h2>foo <span><br/>bar</span> baz</h2>
30392 == foo <span> bar</span> baz ==
30396 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
30399 "modes": ["html2wt"],
30400 "scrubWikitext": false
30403 <h2>foo<br/>bar</h2>
30409 1. WT Quote Tags: suppress newly created empty style tags
30412 "modes": ["html2wt"],
30413 "scrubWikitext": true
30421 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
30427 ''<nowiki/>'''''<nowiki/>'''
30431 3. WT Quote Tags: suppress empty style tags on edits
30434 "modes": ["selser"],
30435 "scrubWikitext": true,
30441 '''<span id="x">foo</span>'''
30446 1. Anchors: suppress newly created empty anchors
30449 "modes": ["html2wt"],
30450 "scrubWikitext": true
30453 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30458 2. Anchors: don't suppress empty anchors if scrubWikitext is false
30461 "modes": ["html2wt"],
30462 "scrubWikitext": false
30465 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30471 3. Anchors: suppress empty anchors on edits
30474 "modes": ["selser"],
30475 "scrubWikitext": true,
30481 [[Test|<span id="x">foo</span>]]
30486 3a. Anchors: do not suppress numbered extlinks
30489 "modes": ["wt2wt"],
30490 "scrubWikitext": true
30495 <a rel="mw:ExtLink" href="http://foo.com"></a>
30499 3b. Anchors: do not suppress numbered extlinks
30502 "modes": ["wt2wt"],
30503 "scrubWikitext": true,
30509 [http://foo.com <span id="x">foo</span>]
30515 Normalizations should be restricted to edited content
30518 "modes": ["selser"],
30519 "scrubWikitext": true,
30521 [ "h1", "before", "<i></i>"]
30535 1. Multiple normalizations (html2wt)
30538 "modes": ["html2wt"],
30539 "scrubWikitext": true
30543 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
30544 </a><b><i></i></b>x</p>
30552 2. Multiple normalizations (selser)
30555 "modes": ["selser"],
30556 "scrubWikitext": true,
30558 [ "#x", "after", "<h1><i></i></h1>\n<p> bar<b></b></p>"]
30562 <div id="x">foo</div>
30564 <div id="x">foo</div>
30569 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
30572 "modes": ["html2wt"],
30573 "scrubWikitext": true
30585 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
30592 <nowiki> </nowiki>hi
30594 <nowiki> </nowiki> hello
30598 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
30601 "modes": ["html2wt"],
30602 "scrubWikitext": true
30611 baz bang</td></tr></table>
30617 bar<span>boo</span></p>
30633 bar<span>boo</span>
30637 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
30640 "modes": ["selser"],
30641 "scrubWikitext": true,
30643 [ "p", "html", " a\n b" ]
30654 1. New links that end in spaces
30657 "modes": ["html2wt"],
30658 "scrubWikitext": false
30661 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30662 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30663 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30665 [[Berlin ]]<nowiki/>is the capital of Germany.
30669 [[Boston ]] is a city.
30673 2. New links that end in spaces
30676 "modes": ["html2wt"],
30677 "scrubWikitext": true
30680 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30681 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30682 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30684 [[Berlin]] is the capital of Germany.
30688 [[Boston]] is a city.
30692 1. Table cells with escapable prefixes
30695 "modes": ["html2wt"],
30696 "scrubWikitext": false
30700 <tr><td>a</td></tr>
30701 <tr><td>-</td></tr>
30702 <tr><td>+</td></tr>
30703 <tr><td>}</td></tr>
30709 |<nowiki>-</nowiki>
30711 |<nowiki>+</nowiki>
30713 |<nowiki>}</nowiki>
30718 2. Table cells with escapable prefixes
30721 "modes": ["html2wt"],
30722 "scrubWikitext": true
30726 <tr><td>a</td></tr>
30727 <tr><td>-</td></tr>
30728 <tr><td>+</td></tr>
30729 <tr><td>}</td></tr>
30744 3a. Table cells with escapable prefixes after edits
30747 "modes": ["selser"],
30748 "scrubWikitext": true,
30750 [ "table tbody tr:first-child td:first-child", "remove"]
30764 3b. Table cells with escapable prefixes after edits
30767 "modes": ["selser"],
30768 "scrubWikitext": true,
30770 [ "table tbody tr:first-child td:first-child", "html", "-" ],
30777 |<span id="x">foo</span>+
30786 # FIXME: This test will fail because
30787 # normalization doesn't realize that the id attribute
30788 # will eliminate the escapable scenario
30790 4a. Table cells without escapable prefixes after edits
30793 "modes": ["selser"],
30794 "scrubWikitext": true,
30796 [ "#x", "html", "-" ]
30809 ## This tests normalizer's ability to discriminate between
30810 ## cells having identical content.
30812 4b. Table cells without escapable prefixes after edits
30815 "modes": ["selser"],
30816 "scrubWikitext": true,
30818 [ "td", "html", "-" ]
30831 ## This tests normalizer's ability to not be tripped by
30832 ## comments (and whitespace)
30834 4c. Table cells without escapable prefixes after edits
30837 "modes": ["selser"],
30838 "scrubWikitext": true,
30840 [ "table tbody tr td:first-child", "remove" ]
30855 ## This tests normalizer's ability to handle HTML cells
30857 4d. Table cells without escapable prefixes after edits
30860 "modes": ["selser"],
30861 "scrubWikitext": true,
30863 [ "td", "html", "-" ]
30868 <tr><td>a</td></tr>
30872 <tr><td>-</td></tr>
30876 ## T111151 Remove font elements without attributes
30878 5a. font tags without attributes should be dropped in scrubWikitext mode
30881 "modes": ["html2wt"],
30882 "scrubWikitext": true
30886 <font><font>bar</font></font>
30887 <font class="x">boo</font>
30891 <font class="x">boo</font>
30895 5b. font tags should not be dropped without scrubWikitext being enabled
30898 "modes": ["html2wt"],
30899 "scrubWikitext": false
30908 Ignore empty <p></p> when scrubWikitext is false
30911 "modes": ["html2wt"],
30912 "scrubWikitext": false
30916 <p>a</p><p></p><p>b</p>
30957 Normalize empty paragraphs to HTML form that html2wt expects
30960 "modes": ["html2wt"],
30961 "scrubWikitext": true
30965 <p>a</p><p></p><p>b</p>
31030 Empty paragraphs (marked with mw-empty-elt) found in source should not be normalized away
31033 "modes": ["html2wt"],
31034 "scrubWikitext": true
31042 <p class="mw-empty-elt"></p>
31046 <caption></caption>
31057 Templated content should be skipped over by normalization
31060 "modes": ["html2wt"],
31061 "scrubWikitext": true
31064 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"SomeTemplate1","href":"./Template:SomeTemplate1"},"params":{"1":{"wt":"boo"}},"i":0}}]}'>foobar</p><p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"SomeTemplate2","href":"./Template:SomeTemplate2"},"params":{"1":{"wt":"booboo"}},"i":0}}]}'>foobar</p><span about="#mwt2">
31065 </span><p about="#mwt2"></p><span about="#mwt2">
31068 {{SomeTemplate1|boo}}{{SomeTemplate2|booboo}}
31072 Escape nowiki DOM elements
31076 <nowiki><i>foo</i></nowiki>
31078 <nowiki>''foo''</nowiki>
31081 # This is meant to be an interim fix while we go about figuring out
31082 # how to not introduce these trailing <nowiki/>s in the first place.
31084 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
31088 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
31090 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
31091 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
31105 New list is serialized on newlines
31109 <p>The quick brown fox jumps over the lazy dog.</p><ul>
31113 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
31115 The quick brown fox jumps over the lazy dog.
31121 The quick onyx goblin jumps over the lazy dwarf.
31125 New lists in formatting elements serialized w/o newlines
31137 <small><ul><li>hi</li></ul></small>
31149 New list in table doesn't need newlines
31153 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
31162 # ---------------------------------------------------
31163 # End of tests spec'ing wikitext serialization norms |
31164 # ---------------------------------------------------
31168 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
31176 <td><b>c</b><p>d</p></td>
31195 Anchor without href scenarios
31197 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
31200 <a class="no">dice</a>
31205 <span name="foo"></span>
31209 New transclusion added after a list should be serialized after the list
31213 <ul><li>a</li></ul><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>
31219 # -----------------------------------------------------------------
31220 # End of section for Parsoid-only html2wt tests for serialization
31222 # -----------------------------------------------------------------
31224 # -----------------------------------------------------------------
31225 # The following section of tests are primarily to spec behavior of
31226 # the selective serializer. All these tests have manual selser
31227 # changes. The automated selser changes for all tests handle the
31228 # wide variation of changes, but these tests here capture specs
31229 # deterministically.
31230 # ----------------------------------------------------------------
31234 Selser: New comments should not be lost
31237 "modes": ["selser"],
31239 [ "#a", "after", "<!--c1-->" ],
31240 [ "#b", "before", "<!--c2-->" ]
31244 <span id="a">a</span>
31246 <span id="b">b</span>
31248 <span id="a">a</span><!--c1-->
31250 <!--c2--><span id="b">b</span>
31255 Selser: Check for validity of DSR before using it
31258 "modes": ["selser"],
31260 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
31264 <span id="a">a</span>
31266 {{DISPLAYTITLE:foo}}
31267 <span id="a">a</span>
31271 1. DOMDiff: Changes to <ref> content should be looked up using id
31274 "modes": ["selser"],
31276 ["#X", "after", "bar"],
31277 ["#Y", "after", "baz"]
31281 X <ref><span id="X">foo</span></ref>
31284 <ref name="a"><span id="Y">foo</span></ref>
31287 X <ref><span id="X">foo</span>bar</ref>
31290 <ref name="a"><span id="Y">foo</span>baz</ref>
31295 2. DOMDiff: Changes to <ref> content should be looked up using id
31298 "modes": ["selser"],
31300 ["#Z", "after", "bar"]
31304 A <ref>foo bar for a</ref>
31305 B <ref group="X" name="b" />
31309 <references group="X">
31310 <ref name="b"><span id="Z">foo</span></ref>
31313 A <ref>foo bar for a</ref>
31314 B <ref group="X" name="b" />
31318 <references group="X">
31319 <ref name="b"><span id="Z">foo</span>bar</ref>
31324 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
31327 "modes": ["selser"],
31329 [ "div:first-child", "text", "bar" ]
31333 <div style="{{1x|color:red;}}%">foo</div>
31335 <div style="{{1x|color:red;}}%">bar</div>
31347 <li class="mw-empty-elt"></li>
31348 <li class="mw-empty-elt"></li>
31355 [[File:Thumb.png|thumb]]
31357 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Thumb.png" class="image"><img alt="Thumb.png" src="http://example.com/images/e/ea/Thumb.png" decoding="async" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div></div></div></div>
31359 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Thumb.png"><img resource="./File:Thumb.png" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption></figcaption></figure>
31363 unclosed internal link XSS (T137264)
31365 [[#%3Cscript%3Ealert(1)%3C/script%3E|
31367 <p>[[#<script>alert(1)</script>|
31370 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
31374 Validating that <style> isn't eaten by tidy (T167349)
31379 <style>.foo::before { content: "<foo>"; }</style>
31380 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31384 <style>.foo::before { content: "<foo>"; }</style>
31385 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31389 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31390 <style data-x-data-mw-foobar="baz" typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{"data-x-data-mw-foobar":"baz"},"body":{"extsrc":".foo::after { content: \"<bar>\"; }"}}'>.foo::after { content: "<bar>"; }</style>
31394 ## Right now, Parsoid doesn't de-duplicate style tags.
31395 ## So, we shouldn't see link tags that need to bypass the sanitizer.
31396 ## In a followup patch, when we de-duplicate style tags and
31397 ## introduce link tags, we'll add a hook for link tags in
31398 ## the parser test runner script.
31400 Validating that <style> isn't wrapped in a paragraph (T186965)
31404 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31406 <style>.foo::before { content: "<foo>"; }</style>
31408 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31410 But if it's on a line with other content, let it be wrapped.
31412 <style>.foo::before { content: "<foo>"; }</style> bar
31414 foo <style>.foo::before { content: "<foo>"; }</style>
31416 foo <style>.foo::before { content: "<foo>"; }</style> bar
31418 And the same if we have non-paragraph-breaking whitespace
31421 <style>.foo::before { content: "<foo>"; }</style>
31424 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31426 <style>.foo::before { content: "<foo>"; }</style>
31427 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31428 <p>But if it's on a line with other content, let it be wrapped.
31429 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
31430 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
31431 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
31432 </p><p>And the same if we have non-paragraph-breaking whitespace
31434 <style>.foo::before { content: "<foo>"; }</style>
31438 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph</p>
31440 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31442 <p><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style></p>
31444 <p>But if it's on a line with other content, let it be wrapped.</p>
31446 <p><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> bar</p>
31448 <p>foo <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style></p>
31450 <p>foo <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> bar</p>
31452 <p>And the same if we have non-paragraph-breaking whitespace</p>
31455 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31460 Validating that <link> isn't wrapped in a paragraph (T186965)
31464 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31466 <link rel="foo" href="bar"/>
31468 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31470 But if it's on a line with other content, let it be wrapped.
31472 <link rel="foo" href="bar"/> bar
31474 foo <link rel="foo" href="bar"/>
31476 foo <link rel="foo" href="bar"/> bar
31478 And the same if we have non-paragraph-breaking whitespace
31481 <link rel="foo" href="bar"/>
31484 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31486 <link rel="foo" href="bar"/>
31487 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31488 <p>But if it's on a line with other content, let it be wrapped.
31489 </p><p><link rel="foo" href="bar"/> bar
31490 </p><p>foo <link rel="foo" href="bar"/>
31491 </p><p>foo <link rel="foo" href="bar"/> bar
31492 </p><p>And the same if we have non-paragraph-breaking whitespace
31494 <link rel="foo" href="bar"/>
31500 Extension returning multiple nodes starting with a style tag roundtrips
31505 {{echo|<html><style>.hi { color: red; }</style>
31507 <tr><td class="hi">ho</td></tr>
31510 <p about="#mwt5" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<html><style>.hi { color: red; }</style>\n</html>"}},"i":0}},"\n<tr><td class=\"hi\">ho</td></tr>\n</table>"]}'><style typeof="mw:Extension/html" about="#mwt4" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<style>.hi { color: red; }</style>\n"}}'>.hi { color: red; }</style><span about="#mwt4">
31511 </span></p><table about="#mwt5" data-parsoid='{"stx":"html"}'>
31513 <tbody><tr><td class="hi">ho</td></tr>
31518 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
31520 wgFragmentMode=[ 'html5', 'legacy' ]
31522 ==A&B&C&amp;D&amp;amp;E==
31523 [[#A&B&C&amp;D&amp;amp;E]]
31525 <h2><span id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE"></span><span class="mw-headline" id="A&B&C&amp;D&amp;amp;E">A&B&C&amp;D&amp;amp;E</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A&B&C&amp;D&amp;amp;E">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31526 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
31529 <h2 id="A&B&C&amp;D&amp;amp;E"><span id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE" typeof="mw:FallbackId" data-parsoid="{}"></span>A&B<span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>C<span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp;D<span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp;amp;E</h2>
31530 <p><a rel="mw:WikiLink" href="./Parser_test#A&B&C&amp;D&amp;amp;E" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#A&B&C&amp;D&amp;amp;E"},"sa":{"href":"#A&B&amp;C&amp;amp;D&amp;amp;amp;E"}}'>#A&B&C&amp;D&amp;amp;E</a></p>
31534 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
31536 wgFragmentMode=[ 'legacy' ]
31538 ==A&B&C&amp;D&amp;amp;E==
31539 [[#A&B&C&amp;D&amp;amp;E]]
31541 <h2><span class="mw-headline" id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">A&B&C&amp;D&amp;amp;E</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A&B&C&amp;D&amp;amp;E">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31542 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
31547 Decoding of HTML entities in embedded HTML tags
31549 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31551 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31553 <table class="1&2&3&amp;4&amp;amp;5" data-parsoid='{"stx":"html","a":{"class":"1&2&3&amp;4&amp;amp;5"},"sa":{"class":"1&2&amp;3&amp;amp;4&amp;amp;amp;5"}}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>x</td></tr></tbody></table>
31557 Decoding of HTML entities in indicator names for IDs (T104196)
31559 parsoid=wt2html,html2html
31562 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31564 1&2&3&4&amp;5=Indicator
31567 <p><span typeof="mw:Extension/indicator" about="#mwt3" data-mw='{"name":"indicator","attrs":{"name":"1&2&3&amp;4&amp;amp;5"},"body":{"extsrc":"Indicator"}}'></span></p>
31570 # this version of the test strips out the ambiguity so Parsoid rts cleanly
31572 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
31576 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31578 1&2&3&4&amp;5=Indicator
31581 <p><span typeof="mw:Extension/indicator" about="#mwt3" data-mw='{"name":"indicator","attrs":{"name":"1&2&3&amp;4&amp;amp;5"},"body":{"extsrc":"Indicator"}}'></span></p>
31584 # This fragment mode is what Parsoid supports.
31586 HTML5 ids: fallback to legacy
31588 wgFragmentMode=[ 'html5', 'legacy' ]
31600 ==Hey < # " > % : '==
31601 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31603 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31605 <!-- These two links should produce identical HTML -->
31606 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31609 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
31611 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31612 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31613 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31614 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31615 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31616 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31620 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31621 <h2><span class="mw-headline" id="foo_Bar_2">foo Bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31622 <h2><span id=".D0.A2.D0.B5.D1.81.D1.82"></span><span class="mw-headline" id="Тест">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31623 <h2><span id=".D0.A2.D0.B5.D1.81.D1.82_2"></span><span class="mw-headline" id="Тест_2">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31624 <h2><span id=".D1.82.D0.B5.D1.81.D1.82"></span><span class="mw-headline" id="тест">тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31625 <h2><span id="Hey_.3C_.23_.22_.3E_.25_:_.27"></span><span class="mw-headline" id="Hey_<_#_"_>_%_:_'">Hey < # " > % : '</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Hey < # " > % : '">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31626 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#Тест">#Тест</a> <a href="#тест">#тест</a> <a href="#Hey_<_#_"_>_%_:_'">#Hey < # " > % : '</a>
31627 </p><p>💩 <span id="💩"></span>
31628 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31631 <h2 id="Foo_bar">Foo bar</h2>
31633 <h2 id="foo_Bar_2">foo Bar</h2>
31635 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
31637 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
31639 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
31641 <h2 id="Hey_<_#_"_>_%_:_'"><span id="Hey_.3C_.23_.22_.3E_.25_:_.27" typeof="mw:FallbackId"></span>Hey < # " > %<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: '</h2>
31642 <p><a rel="mw:WikiLink" href="./Parser_test#Foo_bar">#Foo bar</a> <a rel="mw:WikiLink" href="./Parser_test#foo_Bar">#foo Bar</a> <a rel="mw:WikiLink" href="./Parser_test#Тест">#Тест</a> <a rel="mw:WikiLink" href="./Parser_test#тест">#тест</a> <a rel="mw:WikiLink" href="./Parser_test#Hey_<_#_"_>_%_:_'" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Hey_<_#_\"_>_%_:_'"},"sa":{"href":"#Hey < # \" > % : '"}}'>#Hey < # " > % : '</a></p>
31644 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode:💩","function":"anchorencode"},"params":{},"i":0}}]}'>💩</span> <span id="💩" about="#mwt3" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"id"},{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[178,197,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:💩\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>💩</span>"}]]}'></span></p>
31646 <!-- These two links should produce identical HTML -->
31647 <p><a rel="mw:WikiLink" href="./Parser_test#啤酒">#啤酒</a> <a rel="mw:WikiLink" href="./Parser_test#啤酒" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#啤酒"},"sa":{"href":"#%E5%95%A4%E9%85%92"}}'>#啤酒</a></p>
31650 # Parsoid doesn't support this mode
31652 HTML5 ids: legacy with a fallback to modern
31654 wgFragmentMode=[ 'legacy', 'html5' ]
31666 ==Hey < # " > % : '==
31667 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31669 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31671 <!-- These two links should produce identical HTML -->
31672 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31675 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
31677 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31678 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31679 <li class="toclevel-1 tocsection-3"><a href="#.D0.A2.D0.B5.D1.81.D1.82"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31680 <li class="toclevel-1 tocsection-4"><a href="#.D0.A2.D0.B5.D1.81.D1.82_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31681 <li class="toclevel-1 tocsection-5"><a href="#.D1.82.D0.B5.D1.81.D1.82"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31682 <li class="toclevel-1 tocsection-6"><a href="#Hey_.3C_.23_.22_.3E_.25_:_.27"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31686 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31687 <h2><span class="mw-headline" id="foo_Bar_2">foo Bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31688 <h2><span id="Тест"></span><span class="mw-headline" id=".D0.A2.D0.B5.D1.81.D1.82">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31689 <h2><span id="Тест_2"></span><span class="mw-headline" id=".D0.A2.D0.B5.D1.81.D1.82_2">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31690 <h2><span id="тест"></span><span class="mw-headline" id=".D1.82.D0.B5.D1.81.D1.82">тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31691 <h2><span id="Hey_<_#_"_>_%_:_'"></span><span class="mw-headline" id="Hey_.3C_.23_.22_.3E_.25_:_.27">Hey < # " > % : '</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Hey < # " > % : '">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31692 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#.D0.A2.D0.B5.D1.81.D1.82">#Тест</a> <a href="#.D1.82.D0.B5.D1.81.D1.82">#тест</a> <a href="#Hey_.3C_.23_.22_.3E_.25_:_.27">#Hey < # " > % : '</a>
31693 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
31694 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
31698 # Parsoid doesn't support this mode.
31700 HTML5 ids: no legacy
31702 wgFragmentMode=[ 'html5' ]
31714 ==Hey < # " > % : '==
31715 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31717 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31719 <!-- These two links should produce identical HTML -->
31720 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31723 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
31725 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31726 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31727 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31728 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31729 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31730 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31734 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31735 <h2><span class="mw-headline" id="foo_Bar_2">foo Bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31736 <h2><span class="mw-headline" id="Тест">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31737 <h2><span class="mw-headline" id="Тест_2">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31738 <h2><span class="mw-headline" id="тест">тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31739 <h2><span class="mw-headline" id="Hey_<_#_"_>_%_:_'">Hey < # " > % : '</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Hey < # " > % : '">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31740 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#Тест">#Тест</a> <a href="#тест">#тест</a> <a href="#Hey_<_#_"_>_%_:_'">#Hey < # " > % : '</a>
31741 </p><p>💩 <span id="💩"></span>
31742 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31747 T90902: Normalize weird characters in section IDs
31749 wgFragmentMode=[ 'html5', 'legacy' ]
31755 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31756 <p><a href="#Foo_bar">#Foo bar</a>
31759 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
31760 <p><a rel="mw:WikiLink" href="./Parser_test#Foo_bar" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#Foo_bar"},"sa":{"href":"#Foo&nbsp;bar"}}'>#Foo bar</a></p>
31764 T51672: Test for brackets in attributes of elements in external link texts
31766 [http://example.com/ link <span title="title with [brackets]">span</span>]
31767 [http://example.com/ link <span title="title with [brackets]">span</span>]
31770 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31771 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31774 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31775 <a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]" data-parsoid='{"stx":"html","a":{"title":"title with [brackets]"},"sa":{"title":"title with &#91;brackets&#93;"}}'>span</span></a></p>
31779 T72875: Test for brackets in attributes of elements in internal link texts
31781 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31782 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31785 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31786 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31789 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31790 <a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]" data-parsoid='{"stx":"html","a":{"title":"title with [[double brackets]]"},"sa":{"title":"title with &#91;&#91;double brackets&#93;&#93;"}}'>span</span></a></p>
31794 T199926: html arrow wt: Parsoid sometimes trips up on verticalbar chars in hrefs
31797 "modes": ["html2wt"]
31800 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total">9</a>
31801 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total">10</a>
31803 [https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total 9]
31804 [[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|10]]
31807 ## FIXME: "gerrit" isn't in PHP's setupInterwikis
31809 T199926: Hash only interwiki link
31811 [[meatball:Test#1/2]]
31812 [[gerrit:#/q/project:mediawiki/services/parsoid|Gerrit]]
31814 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Test#1.2F2" class="extiw" title="meatball:Test">meatball:Test#1/2</a>
31815 <a href="/index.php?title=Gerrit:&action=edit&redlink=1" class="new" title="Gerrit: (page does not exist)">Gerrit</a>
31818 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Test#1.2F2" title="meatball:Test" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Test#1.2F2"},"sa":{"href":"meatball:Test#1/2"},"isIW":true}'>meatball:Test#1/2</a>
31819 <a rel="mw:WikiLink/Interwiki" href="https://gerrit.wikimedia.org/#/q/project:mediawiki/services/parsoid">Gerrit</a></p>
31823 T179544: {{anchorencode:}} output should be always usable in links
31825 wgFragmentMode=[ 'html5' ]
31827 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
31829 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
31832 <p><span id="[foo]" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"id":"[foo]"},"sa":{"id":"{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"id"},{"html":"<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt1\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[10,32,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt1\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'></span><a typeof="mw:ExpandedAttrs" about="#mwt4" rel="mw:WikiLink" href="./Parser_test#[foo]" data-parsoid='{"stx":"simple","a":{"href":"./Parser_test#[foo]"},"sa":{"href":"#{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"#<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt2\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[44,66,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt2\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt2\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'>#[foo]</a></p>
31835 ## ------------------------------
31836 ## Parsoid section-wrapping tests
31837 ## ------------------------------
31839 Section wrapping for well-nested sections (no leading content)
31843 "wrapSections": true
31865 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
31868 <h1><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
31871 <h2><span class="mw-headline" id="2.1">2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31874 <h2><span class="mw-headline" id="2.2">2.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 2.2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31877 <h3><span class="mw-headline" id="2.2.1">2.2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: 2.2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
31880 <h1><span class="mw-headline" id="3">3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: 3">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
31884 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1" data-parsoid="{}">1</h1>
31887 </section><section data-mw-section-id="2"><h1 id="2" data-parsoid="{}">2</h1>
31890 <section data-mw-section-id="3"><h2 id="2.1" data-parsoid="{}">2.1</h2>
31893 </section><section data-mw-section-id="4"><h2 id="2.2" data-parsoid="{}">2.2</h2>
31896 <section data-mw-section-id="5"><h3 id="2.2.1" data-parsoid="{}">2.2.1</h3>
31899 </section></section></section><section data-mw-section-id="6"><h1 id="3" data-parsoid="{}">3</h1>
31906 Section wrapping for well-nested sections (with leading content)
31910 "wrapSections": true
31915 Para 2 with a <div>nested in it</div>
31930 Para 2 with a </p><div>nested in it</div>
31933 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
31936 <h1><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
31939 <h2><span class="mw-headline" id="2.1">2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31943 <section data-mw-section-id="0"><p>Para 1.</p>
31945 <p>Para 2 with a </p><div>nested in it</div>
31949 </section><section data-mw-section-id="1"><h1 id="1" data-parsoid="{}">1</h1>
31952 </section><section data-mw-section-id="2"><h1 id="2" data-parsoid="{}">2</h1>
31955 <section data-mw-section-id="3"><h2 id="2.1" data-parsoid="{}">2.1</h2>
31958 </section></section>
31962 Section wrapping with template-generated sections (good nesting 1)
31966 "wrapSections": true
31983 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
31986 <h2><span class="mw-headline" id="1.1">1.1</span></h2>
31989 <h2><span class="mw-headline" id="1.2">1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
31992 <h1><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
31996 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1" data-parsoid="{}">1</h1>
31999 <section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.1" data-parsoid='{"dsr":[9,33,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"==1.1==\nb"}},"i":0}}]}'>1.1</h2><span about="#mwt1">
32000 </span><p about="#mwt1">b</p>
32001 </section><section data-mw-section-id="3"><h2 id="1.2" data-parsoid="{}">1.2</h2>
32004 </section></section><section data-mw-section-id="4"><h1 id="2" data-parsoid="{}">2</h1>
32008 # In this example, the template scope is mildly expanded to incorporate the
32009 # trailing newline after the transclusion since that is part of section 1.1.1
32011 Section wrapping with template-generated sections (good nesting 2)
32015 "wrapSections": true,
32016 "modes": ["wt2html", "wt2wt"]
32032 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32035 <h2><span class="mw-headline" id="1.1">1.1</span></h2>
32038 <h3><span class="mw-headline" id="1.1.1">1.1.1</span></h3>
32041 <h1><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32045 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32048 <section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.1" data-parsoid='{"dsr":[9,50,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"==1.1==\nb\n===1.1.1===\nd"}},"i":0}},"\n"]}'>1.1</h2><span about="#mwt1">
32049 </span><p about="#mwt1">b</p><span about="#mwt1">
32050 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
32051 </span><p about="#mwt1">d</p><span about="#mwt1">
32052 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
32056 # In this example, the template scope is mildly expanded to incorporate the
32057 # trailing newline after the transclusion since that is part of section 1.2.1
32059 Section wrapping with template-generated sections (good nesting 3)
32063 "wrapSections": true,
32064 "modes": ["wt2html", "wt2wt"]
32083 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32087 <h2><span class="mw-headline" id="1.1">1.1</span></h2>
32090 <h2><span class="mw-headline" id="1.2">1.2</span></h2>
32093 <h3><span class="mw-headline" id="1.2.1">1.2.1</span></h3>
32096 <h1><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32100 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
32103 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[9,60,0,0],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"x\n==1.1==\nb\n==1.2==\nc\n===1.2.1===\nd"}},"i":0}},"\n"]}'>x</p><span about="#mwt1">
32104 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
32105 </span><p about="#mwt1">b</p><span about="#mwt1">
32106 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
32107 </span><p about="#mwt1">c</p><span about="#mwt1">
32108 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
32109 </span><p about="#mwt1">d</p><span about="#mwt1">
32110 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
32114 # Because of section-wrapping and template-wrapping interactions,
32115 # the scope of the template is expanded so that the template markup
32116 # is valid in the presence of <section> tags.
32117 # This exercises the s1 is null scenario in the wrapSections code
32119 Section wrapping with template-generated sections (bad nesting 1)
32123 "wrapSections": true
32140 <h1><span class="mw-headline" id="1">1</span></h1>
32146 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
32149 <section data-mw-section-id="-1"><h1 about="#mwt1" typeof="mw:Transclusion" id="1" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"=1=\nb"}},"i":0}}]}'>1</h1><span about="#mwt1">
32150 </span><p about="#mwt1">b</p>
32153 </section></div></section>
32156 # Because of section-wrapping and template-wrapping interactions,
32157 # the scope of the template is expanded so that the template markup
32158 # is valid in the presence of <section> tags.
32159 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
32161 Section wrapping with template-generated sections (bad nesting 2)
32165 "wrapSections": true
32184 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32187 <h1><span class="mw-headline" id="2">2</span></h1>
32190 <h2><span class="mw-headline" id="2.1">2.1</span></h2>
32194 <h1><span class="mw-headline" id="3">3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 3">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32198 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1" data-parsoid="{}">1</h1>
32201 </section><section data-mw-section-id="-1"><h1 about="#mwt1" typeof="mw:Transclusion" id="2" data-parsoid='{"dsr":[9,45,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"=2=\nb\n==2.1==\nc"}},"i":0}},"\n\nd\n\n"]}'>2</h1><span about="#mwt1">
32202 </span><p about="#mwt1">b</p><span about="#mwt1">
32203 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
32204 </span><p about="#mwt1">c</p><span about="#mwt1">
32206 </span><p about="#mwt1">d</p><span about="#mwt1">
32208 </span></section></section><section data-mw-section-id="4"><h1 id="3" data-parsoid="{}">3</h1>
32212 # Because of section-wrapping and template-wrapping interactions,
32213 # additional template wrappers are added to <section> tags
32214 # so that template wrapping semantics are valid whether section
32215 # tags are retained or stripped. But, the template scope can expand
32216 # greatly when accounting for section tags.
32217 # This exercises the s1 and s2 are in different subtrees scenario
32219 Section wrapping with template-generated sections (bad nesting 3)
32223 "wrapSections": true,
32224 "modes": ["wt2html", "wt2wt"]
32243 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32246 <h2><span class="mw-headline" id="1.2">1.2</span></h2>
32249 <h1><span class="mw-headline" id="2">2</span></h1>
32253 <h1><span class="mw-headline" id="3">3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 3">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32257 <section data-mw-section-id="0"></section><section data-mw-section-id="1" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["=1=\na\n\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"==1.2==\nb\n=2=\nc"}},"i":0}},"\n\nd\n\n"]}'><h1 id="1">1</h1>
32260 <section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"==1.2==\nb\n=2=\nc"}},"i":0}}]}'>1.2</h2><span about="#mwt1">
32261 </span><p about="#mwt1">b</p><span about="#mwt1">
32262 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
32263 </span><p about="#mwt1">c</p>
32266 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
32271 Section wrapping with uneditable lead section + div wrapping multiple sections
32275 "wrapSections": true
32280 <div style="border:1px solid red;">
32299 <div style="border:1px solid red;">
32301 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32304 <h2><span class="mw-headline" id="1.1">1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32307 <h1><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32311 <h1><span class="mw-headline" id="3">3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 3">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32314 <h2><span class="mw-headline" id="3.1">3.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: 3.1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32318 <section data-mw-section-id="-1"><p>foo</p>
32320 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
32321 <section data-mw-section-id="1"><h1 id="1" data-parsoid="{}">1</h1>
32324 <section data-mw-section-id="2"><h2 id="1.1" data-parsoid="{}">1.1</h2>
32327 </section></section><section data-mw-section-id="-1"><h1 id="2" data-parsoid="{}">2</h1>
32331 </section><section data-mw-section-id="4"><h1 id="3" data-parsoid="{}">3</h1>
32334 <section data-mw-section-id="5"><h2 id="3.1" data-parsoid="{}">3.1</h2>
32336 </section></section>
32340 Section wrapping with editable lead section + div overlapping multiple sections
32344 "wrapSections": true
32351 <div style="border:1px solid red;">
32371 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32374 <div style="border:1px solid red;">
32377 <h2><span class="mw-headline" id="1.1">1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32380 <h1><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32386 <h1><span class="mw-headline" id="3">3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 3">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32389 <h2><span class="mw-headline" id="3.1">3.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: 3.1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32393 <section data-mw-section-id="0"><p>foo</p>
32395 </section><section data-mw-section-id="-1"><h1 id="1" data-parsoid="{}">1</h1>
32397 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
32400 <section data-mw-section-id="2"><h2 id="1.1" data-parsoid="{}">1.1</h2>
32403 </section><section data-mw-section-id="-1"><h1 id="2" data-parsoid="{}">2</h1>
32408 </section><section data-mw-section-id="4"><h1 id="3" data-parsoid="{}">3</h1>
32411 <section data-mw-section-id="5"><h2 id="3.1" data-parsoid="{}">3.1</h2>
32413 </section></section>
32417 HTML header tags should not be wrapped in section tags
32421 "wrapSections": true
32437 <h1><span class="mw-headline" id="a">a</span></h1>
32438 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32439 <h1><span class="mw-headline" id="c">c</span></h1>
32440 <h1><span class="mw-headline" id="d">d</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: d">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32442 <section data-mw-section-id="0"><p>foo</p>
32444 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
32446 </section><section data-mw-section-id="1"><h1 id="b" data-parsoid="{}">b</h1>
32448 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
32450 </section><section data-mw-section-id="2"><h1 id="d" data-parsoid="{}">d</h1></section>
32454 Lead section containing only whitespace and comments.
32458 "wrapSections": true
32462 <!-- this is a comment, presumably significant to editors -->
32469 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32472 <h1><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
32476 <section data-mw-section-id="0" data-parsoid="{}">
32477 <!-- this is a comment, presumably significant to editors -->
32478 </section><section data-mw-section-id="1"><h1 id="1" data-parsoid="{}">1</h1>
32481 </section><section data-mw-section-id="2"><h1 id="2" data-parsoid="{}">2</h1>
32487 Pseudo-sections emitted by templates should have id -2
32491 "wrapSections": true
32504 <h2><span class="mw-headline" id="a">a</span></h2>
32505 <h2><span class="mw-headline" id="b">b</span></h2>
32508 <section data-mw-section-id="-1"><p>foo</p>
32509 </section><section data-mw-section-id="-2"><div about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>\n==a==\n==b==\n</div>\n"}},"i":0}}]}'>
32510 <section data-mw-section-id="-1"><h2 id="a">a</h2>
32511 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
32512 </section></div><span about="#mwt1">
32517 T213468: Transcluded sections don't get PHP section numbers
32521 "wrapSections": true
32526 == This is counted as if it were section 2 ==
32530 <h2><span class="mw-headline" id="PHP_section.3D1">PHP section=1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: PHP section=1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32531 <h2><span class="mw-headline" id="This_is_counted_as_if_it_were_section_2">This is counted as if it were section 2</span></h2>
32532 <h2><span class="mw-headline" id="PHP_section.3D3">PHP section=3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: PHP section=3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32534 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h2 id="PHP_section=1" data-parsoid="{}"><span id="PHP_section.3D1" typeof="mw:FallbackId"></span>PHP section=1</h2>
32535 </section><section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="This_is_counted_as_if_it_were_section_2" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== This is counted as if it were section 2 =="}},"i":0}}]}'>This is counted as if it were section 2</h2>
32536 </section><section data-mw-section-id="3"><h2 id="PHP_section=3" data-parsoid="{}"><span id="PHP_section.3D3" typeof="mw:FallbackId"></span>PHP section=3</h2></section>
32540 T213468: Corner cases in edit section ID assignment in tokenizer
32544 "wrapSections": true
32548 {{echo|Not a section|
32549 == This is counted as if it were section 2 ==
32553 == This is counted as if it were section 4 ==
32556 {{#tag:p|Not a section|data-ignored=
32557 == This is counted as if it were section 6 ==
32560 {{echo|1=Not a ==heading==}}
32562 [[File:Foobar.jpg|thumb|
32563 ==This is section 9, even though it's in a caption==
32568 <h2><span class="mw-headline" id="PHP_section.3D1">PHP section=1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: PHP section=1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32571 <h2><span class="mw-headline" id="PHP_section.3D3">PHP section=3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: PHP section=3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32572 <h2><span class="mw-headline" id="This_is_counted_as_if_it_were_section_4">This is counted as if it were section 4</span></h2>
32573 <h2><span class="mw-headline" id="This_is_counted_as_if_it_were_section_4_2">This is counted as if it were section 4</span></h2>
32574 <h2><span class="mw-headline" id="This_is_counted_as_if_it_were_section_4_3">This is counted as if it were section 4</span></h2>
32575 <h2><span class="mw-headline" id="PHP_section.3D5">PHP section=5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: PHP section=5">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32576 <p data-ignored="== This is counted as if it were section 6 ==">Not a section</p>
32577 <h2><span class="mw-headline" id="PHP_section.3D7">PHP section=7</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=7" title="Edit section: PHP section=7">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32578 <p>Not a ==heading==
32580 <h2><span class="mw-headline" id="PHP_section.3D8">PHP section=8</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=8" title="Edit section: PHP section=8">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32581 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" decoding="async" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><h2><span class="mw-headline" id="This_is_section_9.2C_even_though_it.27s_in_a_caption">This is section 9, even though it's in a caption</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=9" title="Edit section: This is section 9, even though it's in a caption">edit</a><span class="mw-editsection-bracket">]</span></span></h2></div></div></div>
32582 <h2><span class="mw-headline" id="PHP_section.3D10">PHP section=10</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=10" title="Edit section: PHP section=10">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32584 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h2 id="PHP_section=1" data-parsoid="{}"><span id="PHP_section.3D1" typeof="mw:FallbackId"></span>PHP section=1</h2>
32585 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"2"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Not a section"},"2":{"wt":"\n== This is counted as if it were section 2 ==\n"}},"i":0}}]}'>Not a section</p>
32586 </section><section data-mw-section-id="3"><h2 id="PHP_section=3" data-parsoid="{}"><span id="PHP_section.3D3" typeof="mw:FallbackId"></span>PHP section=3</h2>
32587 </section><section data-mw-section-id="-1" about="#mwt5" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":["",{"template":{"target":{"wt":"echo3","href":"./Template:Echo3"},"params":{"1":{"wt":"== This is counted as if it were section 4 =="}},"i":0}},"\n"]}'><h2 about="#mwt2" typeof="mw:Transclusion" id="This_is_counted_as_if_it_were_section_4" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo3","href":"./Template:Echo3"},"params":{"1":{"wt":"== This is counted as if it were section 4 =="}},"i":0}}]}'>This is counted as if it were section 4</h2><span about="#mwt2">
32588 </span></section><section data-mw-section-id="-1" about="#mwt5"><h2 about="#mwt2" id="This_is_counted_as_if_it_were_section_4_2">This is counted as if it were section 4</h2><span about="#mwt2">
32589 </span></section><section data-mw-section-id="-1" about="#mwt5"><h2 about="#mwt2" id="This_is_counted_as_if_it_were_section_4_3">This is counted as if it were section 4</h2>
32590 </section><section data-mw-section-id="5"><h2 id="PHP_section=5" data-parsoid="{}"><span id="PHP_section.3D5" typeof="mw:FallbackId"></span>PHP section=5</h2>
32591 <p data-ignored=" This is counted as if it were section 6 " about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"data-ignored","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:p","function":"tag"},"params":{"1":{"wt":"Not a section"},"data-ignored":{"wt":"== This is counted as if it were section 6 =="}},"i":0}}]}'>Not a section</p>
32592 </section><section data-mw-section-id="7"><h2 id="PHP_section=7" data-parsoid="{}"><span id="PHP_section.3D7" typeof="mw:FallbackId"></span>PHP section=7</h2>
32593 <p about="#mwt4" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Not a ==heading=="}},"i":0}}]}'>Not a ==heading==</p>
32594 </section><section data-mw-section-id="8"><h2 id="PHP_section=8" data-parsoid="{}"><span id="PHP_section.3D8" typeof="mw:FallbackId"></span>PHP section=8</h2>
32595 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n== This is counted as if it were section 9 ==\n"}]}'><a href="./File:Foobar.jpg"><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>
32596 <section data-mw-section-id="-1"><h2 id="This_is_section_9,_even_though_it's_in_a_caption" data-parsoid="{}"><span id="This_is_section_9.2C_even_though_it.27s_in_a_caption" typeof="mw:FallbackId"></span>This is section 9, even though it's in a caption</h2>
32597 </section></figcaption></figure>
32598 </section><section data-mw-section-id="10"><h2 id="PHP_section=10" data-parsoid="{}"><span id="PHP_section.3D10" typeof="mw:FallbackId" data-parsoid='{"dsr":[412,412]}'></span>PHP section=10</h2></section>
32602 T215628: Section numbering and <includeonly> and <noinclude> on a page
32606 "wrapSections": true
32615 ==This is not counted as section 4==
32620 <h2><span class="mw-headline" id="PHP_section.3D1">PHP section=1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: PHP section=1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32621 <h2><span class="mw-headline" id="PHP_section.3D2">PHP section=2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: PHP section=2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32622 <h2><span class="mw-headline" id="PHP_section.3D3">PHP section=3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: PHP section=3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32623 <h2><span class="mw-headline" id="PHP_section.3D4">PHP section=4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: PHP section=4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32625 PARSOID HAS A BUG HERE: T215628
32628 ##########################################################################
32629 Tests demonstrating white-space insensitivity in input wikitext
32630 for wikitext headings, wikitext list items, and wikitext table captions,
32631 headings, and cells. HTML versions of the same should preserve whitespace.
32632 ##########################################################################
32634 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
32637 "modes": ["wt2html"],
32638 "preserveIEW": true
32642 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
32643 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
32644 == <!--Headings with fallback ids--> Личная жизнь ==
32645 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
32646 ; <!--term to define--> term : <!--term's definition--> definition
32648 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
32650 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
32652 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32654 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
32656 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
32659 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32662 <h2><span class="mw-headline" id="Spaces">Spaces</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Spaces">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32663 <h2><span class="mw-headline" id="Tabs">Tabs</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Tabs">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32664 <h2><span class="mw-headline" id=".D0.9B.D0.B8.D1.87.D0.BD.D0.B0.D1.8F_.D0.B6.D0.B8.D0.B7.D0.BD.D1.8C">Личная жизнь</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Личная жизнь">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
32665 <ul><li>List item</li></ul>
32666 <dl><dt>term </dt>
32667 <dd>definition</dd></dl>
32669 <caption>Table Caption
32672 <th>Table Heading 1</th>
32673 <th>Table Heading 2
32676 <td>Table Cell 1</td>
32680 <td>class="foo"</td>
32684 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
32685 </td></tr></tbody></table>
32688 <td>Table Cell 1</td>
32690 </td></tr></tbody></table> foo</dd></dl>
32692 <meta property="mw:PageProp/notoc">
32693 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
32694 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
32695 <h2 id="Личная_жизнь"><span id=".D0.9B.D0.B8.D1.87.D0.BD.D0.B0.D1.8F_.D0.B6.D0.B8.D0.B7.D0.BD.D1.8C" typeof="mw:FallbackId"></span><!--Headings with fallback ids-->Личная жизнь</h2>
32696 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
32697 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
32699 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
32701 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
32703 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32705 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
32707 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
32710 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32711 </tbody></table> foo<!--c1--></dd></dl>
32714 # Looks like <caption> is not accepted in HTML
32716 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
32719 "modes": ["wt2html"],
32720 "preserveIEW": true
32724 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32725 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32727 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
32728 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
32731 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
32732 <ul><li> List item </li></ul>
32734 <tbody><tr><th> Table Heading </th><th></th></tr>
32735 <tr><td> Table Cell </td><th></th></tr>
32738 <meta property="mw:PageProp/notoc"/>
32739 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32740 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32742 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
32743 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
32748 Do not trim whitespace in links and quotes
32751 "modes": ["wt2html"],
32752 "preserveIEW": true
32755 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
32756 [[Foo| some text ]]
32758 <p>foo <i> italic </i> and <b> bold </b>
32759 <a href="/wiki/Foo" title="Foo"> some text </a>
32762 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
32763 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
32767 Remove p tags surrounding a single element in a figcaption
32771 [[File:Foobar.jpg|right|200x200px|Caption]]
32773 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption><p>Caption</p></figcaption></figure>
32777 Selser preserves lack of newline before list and allows newline after the list
32780 "modes": ["selser"],
32781 "scrubWikitext": true,
32783 [ "ul", "after", "<p>footer</p>" ]
32800 Selser does not introduce newlines between unedited paragraph preceding the list
32803 "modes": ["selser"],
32805 [ "table tbody tr td p:last-child", "empty" ]
32827 Selser does not introduce newlines between unedited paragraph following the list
32830 "modes": ["selser"],
32832 [ "table tbody tr td p:first-child", "empty" ]
32854 Remove a list item but do not insert newline above list
32857 "modes": ["selser"],
32859 [ "ul li:last-child", "remove" ]