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" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" class="external text" 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" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" class="external free" 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" href="http://example.org/index.php?title=Parser_test&action=edit" typeof="mw:Transclusion" class="external text" 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" href="news:alt.wikipedia.rox" class="external free" 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?
4673 # From old whitelist description:
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" href="http://example.com" class="external autonumber"></a>
4832 Numbered: <a rel="mw:ExtLink" href="http://example.net" class="external autonumber"></a>
4833 Numbered: <a rel="mw:ExtLink" href="http://example.com" class="external autonumber"></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" href="http://example.com/1$2345" class="external autonumber"></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" href="http://example.com/1" class="external free">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" href="http://example.com/1" class="external text">[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" href="//example.com" class="external autonumber"></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" href="http://en.wikipedia.org/wiki/Foo" class="external autonumber"></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" href="http://example.com" class="external free">http://example.com</a>,
5047 <a rel="mw:ExtLink" href="http://example.com" class="external free">http://example.com</a>;
5048 <a rel="mw:ExtLink" href="http://example.com" class="external free">http://example.com</a>\
5049 <a rel="mw:ExtLink" href="http://example.com" class="external free">http://example.com</a>.
5050 <a rel="mw:ExtLink" href="http://example.com" class="external free">http://example.com</a>:
5051 <a rel="mw:ExtLink" href="http://example.com" class="external free">http://example.com</a>!
5052 <a rel="mw:ExtLink" href="http://example.com" class="external free">http://example.com</a>?
5053 <a rel="mw:ExtLink" href="http://example.com" class="external free">http://example.com</a>)
5054 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)" class="external free">http://example.com/url_with_(brackets)</a>
5055 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets" class="external free">http://example.com/url_without_brackets</a>)
5056 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&" class="external free">http://example.com/url_with_entity&</a>
5057 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&" class="external free">http://example.com/url_with_entity&</a>
5058 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&" class="external free">http://example.com/url_with_entity&</a>
5059 <a rel="mw:ExtLink" href="http://example.com/url_with_entity" class="external free">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
5060 <a rel="mw:ExtLink" href="http://example.com/url_with_entity" class="external free">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
5061 <a rel="mw:ExtLink" href="http://example.com/url_with_entity" class="external free">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
5062 <a rel="mw:ExtLink" href="http://example.com/url_with_entity" class="external free">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
5063 <a rel="mw:ExtLink" href="http://example.com/url_with_entity" class="external free">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
5064 <a rel="mw:ExtLink" href="http://example.com/url_with_entity" class="external free">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" href="http://example.com/url_with_entity&amp" class="external free">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" href="news:'a'b" class="external free">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" href="http://+www.librarieswithoutborders.org" class="external text" 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" href="http://example.com" class="external text">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" href="http://example.com" class="external text"><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" href="http://x&y" class="external free">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" href="http://example.com/?foo=bar" class="external free">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" href="http://x&y" class="external autonumber"></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" href="http://x&y" class="external autonumber"></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" href="http://example.com/?foo=bar" class="external autonumber"></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" href="http://example.com/?foo=bar" class="external autonumber"></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" href="http://example.com/" class="external autonumber"></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" href="http://example.com/" class="external free">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" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" class="external autonumber"></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" href="http://www.example.com/" class="external free" 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" href="http://example.com" class="external autonumber"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5516 <p><a rel="mw:ExtLink" href="http://example.com" class="external text">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" href="http://example.com" class="external free">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" href="http://example.com" class="external free">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>
5604 ## FIXME: Parsoid doesn't support this and may never. See T226523
5606 Template returning pipe used in wikilink target
5610 <p><a href="/index.php?title=Main&action=edit&redlink=1" class="new" title="Main (page does not exist)">Page</a>
5613 <p>[[<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"pipe page","href":"./Template:Pipe_page"},"params":{},"i":0}}]}'>Main|Page</span>]]</p>
5616 # Italic/link nesting is changed in this test, but the rendered result is the
5617 # same. Currently the result is actually an improvement over the MediaWiki
5620 T4702: Mismatched <i>, <b> and <a> tags are invalid
5622 ''[http://example.com text'']
5623 [http://example.com '''text]'''
5624 ''Something [http://example.com in italic'']
5625 ''Something [http://example.com mixed''''', even bold]'''
5626 '''''Now [http://example.com both''''']
5628 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5629 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5630 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5631 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5632 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5635 <p><i data-parsoid='{"autoInsertedEnd":true}'><a rel="mw:ExtLink" href="http://example.com" class="external text">text<i data-parsoid='{"autoInsertedEnd":true}'></i></a></i>
5636 <a rel="mw:ExtLink" href="http://example.com" class="external text"><b data-parsoid='{"autoInsertedEnd":true}'>text</b></a><b data-parsoid='{"autoInsertedEnd":true}'></b>
5637 <i data-parsoid='{"autoInsertedEnd":true}'>Something <a rel="mw:ExtLink" href="http://example.com" class="external text">in italic<i data-parsoid='{"autoInsertedEnd":true}'></i></a></i>
5638 <i>Something <a rel="mw:ExtLink" href="http://example.com" class="external text">mixed<b data-parsoid='{"autoInsertedEnd":true}'><i data-parsoid='{"autoInsertedEnd":true}'>, even bold</i></b></a>'</i>
5639 <b data-parsoid='{"autoInsertedEnd":true}'><i data-parsoid='{"autoInsertedEnd":true}'>Now <a rel="mw:ExtLink" href="http://example.com" class="external text">both<b data-parsoid='{"autoInsertedEnd":true}'><i data-parsoid='{"autoInsertedEnd":true}'></i></b></a></i></b></p>
5646 http://www.example.com/?title=AT%26T
5648 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5651 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T" class="external free">http://www.example.com/?title=AT%26T</a></p>
5654 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5655 # % is actually legal in HTML5. Any change in output would need testing though.
5657 T6781, T7267: %25 in URL
5659 http://www.example.com/?title=100%25_Bran
5661 <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>
5664 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran" class="external free">http://www.example.com/?title=100%25_Bran</a></p>
5668 T6781, T7267: %28, %29 in URL
5670 http://www.example.com/?title=Ben-Hur_%281959_film%29
5672 <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>
5675 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external free">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
5680 T6781: %26 in autonumber URL
5682 [http://www.example.com/?title=AT%26T]
5684 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5687 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T" class="external autonumber"></a></p>
5691 T6781, T7267: %26 in autonumber URL
5693 [http://www.example.com/?title=100%25_Bran]
5695 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5698 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran" class="external autonumber"></a></p>
5702 T6781, T7267: %28, %29 in autonumber URL
5704 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5706 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5709 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external autonumber"></a></p>
5714 T6781: %26 in bracketed URL
5716 [http://www.example.com/?title=AT%26T link]
5718 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5721 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T" class="external text">link</a></p>
5725 T6781, T7267: %25 in bracketed URL
5727 [http://www.example.com/?title=100%25_Bran link]
5729 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5734 T6781, T7267: %28, %29 in bracketed URL
5736 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5738 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5741 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external text">link</a></p>
5745 External link containing a period in the anchor. (T65947)
5747 [//foo.org/bar#baz. bang]
5749 [//foo.org/bar. bang]
5751 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5752 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5755 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz." class="external text">bang</a></p>
5756 <p><a rel="mw:ExtLink" href="//foo.org/bar." class="external text">bang</a></p>
5760 External link containing a single quote. (T65947)
5764 [//foo.org/bar'baz bang]
5766 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5767 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5770 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz" class="external autonumber"></a></p>
5771 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz" class="external text">bang</a></p>
5775 External link containing double-single-quotes in text '' (T6598 sanity check)
5777 Some [http://example.com/ pretty ''italics'' and stuff]!
5779 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5784 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5786 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5788 <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>
5792 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5794 External link containing double-single-quotes with no space separating the url from text in italics
5796 [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]].]
5798 <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>.
5801 <p><a rel="mw:ExtLink" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm" class="external text"><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>
5805 External link with comments in link text
5807 [http://www.google.com Google <!-- comment -->]
5809 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5812 <p><a rel="mw:ExtLink" href="http://www.google.com" class="external text">Google <!-- comment --></a></p>
5816 External link to bare IPv4 address
5818 [http://192.168.0.1 Link]
5820 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5823 <p><a rel="mw:ExtLink" href="http://192.168.0.1" class="external text">Link</a></p>
5827 URL-encoding in URL functions (single parameter)
5829 {{localurl:Some page|amp=&}}
5831 <p>/index.php?title=Some_page&amp=&
5836 URL-encoding in URL functions (multiple parameters)
5838 {{localurl:Some page|q=?&=&}}
5840 <p>/index.php?title=Some_page&q=?&amp=&
5847 http://example.com/index.php?foozoid%5B%5D=bar
5849 http://example.com/index.php?foozoid[]=bar
5851 <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>
5852 </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>
5855 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid%5B%5D=bar" class="external free">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5857 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid%5B%5D=bar" class="external free" 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>
5861 IPv6 urls, autolink format (T23261)
5863 http://[2404:130:0:1000::187:2]/index.php
5865 Examples from RFC 2373, section 2.2:
5867 *http://[1080::8:800:200C:417A]/unicast
5868 *http://[FF01::101]/multicast
5869 *http://[::1]/loopback
5870 *http://[::]/unspecified
5871 *http://[::13.1.68.3]/ipv4compat
5872 *http://[::FFFF:129.144.52.38]/ipv4compat
5874 Examples from RFC 2732, section 2:
5876 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5877 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5878 *http://[3ffe:2a00:100:7031::1]
5879 *http://[1080::8:800:200C:417A]/foo
5880 *http://[::192.9.5.5]/ipng
5881 *http://[::FFFF:129.144.52.38]:80/index.html
5882 *http://[2010:836B:4179::836B:4179]
5884 <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>
5885 </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:
5887 <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>
5888 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5889 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5890 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5891 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5892 <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>
5893 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5895 <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>
5896 <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>
5897 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5898 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5899 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5900 <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>
5901 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5903 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php" class="external free">http://[2404:130:0:1000::187:2]/index.php</a></p>
5905 <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>
5906 <ul><li><a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast" class="external free">http://[1080::8:800:200C:417A]/unicast</a></li>
5907 <li><a rel="mw:ExtLink" href="http://[FF01::101]/multicast" class="external free">http://[FF01::101]/multicast</a></li>
5908 <li><a rel="mw:ExtLink" href="http://[::1]/loopback" class="external free">http://[::1]/loopback</a></li>
5909 <li><a rel="mw:ExtLink" href="http://[::]/unspecified" class="external free">http://[::]/unspecified</a></li>
5910 <li><a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat" class="external free">http://[::13.1.68.3]/ipv4compat</a></li>
5911 <li><a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat" class="external free">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5913 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5914 <ul><li><a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html" class="external free">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5915 <li><a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html" class="external free">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5916 <li><a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]" class="external free">http://[3ffe:2a00:100:7031::1]</a></li>
5917 <li><a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo" class="external free">http://[1080::8:800:200C:417A]/foo</a></li>
5918 <li><a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng" class="external free">http://[::192.9.5.5]/ipng</a></li>
5919 <li><a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html" class="external free">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5920 <li><a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]" class="external free">http://[2010:836B:4179::836B:4179]</a></li></ul>
5924 IPv6 urls, bracketed format (T23261)
5926 [http://[2404:130:0:1000::187:2]/index.php test]
5928 Examples from RFC 2373, section 2.2:
5930 *[http://[1080::8:800:200C:417A] unicast]
5931 *[http://[FF01::101] multicast]
5932 *[http://[::1]/ loopback]
5933 *[http://[::] unspecified]
5934 *[http://[::13.1.68.3] ipv4compat]
5935 *[http://[::FFFF:129.144.52.38] ipv4compat]
5937 Examples from RFC 2732, section 2:
5939 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5940 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5941 *[http://[3ffe:2a00:100:7031::1] 3]
5942 *[http://[1080::8:800:200C:417A]/foo 4]
5943 *[http://[::192.9.5.5]/ipng 5]
5944 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5945 *[http://[2010:836B:4179::836B:4179] 7]
5947 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5948 </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:
5950 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5951 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5952 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5953 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5954 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5955 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5956 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5958 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5959 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5960 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5961 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5962 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5963 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5964 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5966 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php" class="external text">test</a></p>
5968 <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>
5969 <ul><li><a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]" class="external text">unicast</a></li>
5970 <li><a rel="mw:ExtLink" href="http://[FF01::101]" class="external text">multicast</a></li>
5971 <li><a rel="mw:ExtLink" href="http://[::1]/" class="external text">loopback</a></li>
5972 <li><a rel="mw:ExtLink" href="http://[::]" class="external text">unspecified</a></li>
5973 <li><a rel="mw:ExtLink" href="http://[::13.1.68.3]" class="external text">ipv4compat</a></li>
5974 <li><a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]" class="external text">ipv4compat</a></li></ul>
5976 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5977 <ul><li><a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html" class="external text">1</a></li>
5978 <li><a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html" class="external text">2</a></li>
5979 <li><a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]" class="external text">3</a></li>
5980 <li><a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo" class="external text">4</a></li>
5981 <li><a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng" class="external text">5</a></li>
5982 <li><a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html" class="external text">6</a></li>
5983 <li><a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]" class="external text">7</a></li></ul>
5987 Non-extlinks in brackets
5996 [{{echo|foo}} ''bar'']
5997 [{{echo|foo}}l's] errand
5998 [{{echo|foo}}l's errand]
6000 [url=http://example.com]
6001 [http:// bare protocols don't count]
6014 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
6015 [http:// bare protocols don't count]
6023 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6024 [<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]
6025 [<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>]
6026 [<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
6027 [<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]
6028 [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>]
6029 [url=<a rel="mw:ExtLink" href="http://example.com" class="external free">http://example.com</a>]
6030 [http:// bare protocols don't count]</p>
6034 Percent encoding in external links
6036 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6038 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6041 <p><a rel="mw:ExtLink" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia" class="external text">Search</a></p>
6045 Use url link syntax for links where the content is equal the link target
6049 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6052 <p><a rel="mw:ExtLink" href="http://example.com" class="external free">http://example.com</a></p>
6056 Parenthesis in external links, especially URL links
6060 http://example.com/test)
6062 http://example.com/(test)
6064 http://example.com/((test)
6066 (http://example.com/(test))
6068 (http://example.com/(test)))))
6070 http://example.com/a)b
6072 [http://example.com) foo]
6074 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6075 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6076 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6077 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6078 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6079 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6080 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6081 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6084 <p><a rel="mw:ExtLink" href="http://example.com" class="external free">http://example.com</a>)</p>
6085 <p><a rel="mw:ExtLink" href="http://example.com/test" class="external free">http://example.com/test</a>)</p>
6086 <p><a rel="mw:ExtLink" href="http://example.com/(test)" class="external free">http://example.com/(test)</a></p>
6087 <p><a rel="mw:ExtLink" href="http://example.com/((test)" class="external free">http://example.com/((test)</a></p>
6088 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))" class="external free">http://example.com/(test))</a></p>
6089 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))" class="external free">http://example.com/(test)))))</a></p>
6090 <p><a rel="mw:ExtLink" href="http://example.com/a)b" class="external free">http://example.com/a)b</a></p>
6091 <p><a rel="mw:ExtLink" href="http://example.com)" class="external text">foo</a></p>
6095 Parenthesis in external links, w/ transclusion or comment
6097 (http://example.com/{{echo|hi}})
6099 (http://example.com<!-- hi -->)
6101 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6102 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6105 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" href="http://example.com/hi" class="external free" 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>
6107 <p>(<a rel="mw:ExtLink" href="http://example.com" class="external free" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
6111 Serialize <a> tags with invalid link targets as plain text
6113 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6115 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6116 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6117 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6118 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6121 <nowiki>*</nowiki>text
6122 <nowiki>[[foo]]</nowiki>
6123 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6127 mw:ExtLink -vs- mw:WikiLink (T94723)
6131 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6132 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6133 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6134 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6136 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6137 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6145 [[:en:European_Robin|European Robin]]
6146 [[:en:European_Robin|European Robin]]
6150 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6154 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6156 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6167 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6169 Normal text. '''''Bold italic text.''''' Normal text.
6171 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6172 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6177 Quotes wrapping HTML table
6179 '''<table><tr><td>hi</td></tr></table>'''
6181 <b><table><tbody><tr><td>hi</td></tr></tbody></table></b>
6183 <b><table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>hi</td></tr></tbody></table></b>
6186 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6187 # parser strips. The wikitext contains just the first half of the bold
6190 Unclosed and unmatched quotes
6192 '''''Bold italic text '''with bold deactivated''' in between.'''''
6194 '''''Bold italic text ''with italic deactivated'' in between.'''''
6198 ..spanning two paragraphs (should not work).'''
6200 '''Bold tag left open
6202 ''Italic tag left open
6206 <!-- Unmatching number of opening, closing tags: -->
6207 '''This year''''s election ''should'' beat '''last year''''s.
6209 ''Tom'''s car is bigger than ''Susan'''s.
6211 Plain ''italic'''s plain
6213 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6214 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6215 </p><p><b>Bold text..</b>
6216 </p><p>..spanning two paragraphs (should not work).
6217 </p><p><b>Bold tag left open</b>
6218 </p><p><i>Italic tag left open</i>
6220 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6221 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6222 </p><p>Plain <i>italic'</i>s plain
6225 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6226 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6227 </p><p><b>Bold text..</b>
6228 </p><p>..spanning two paragraphs (should not work).<b></b>
6229 </p><p><b>Bold tag left open</b>
6230 </p><p><i>Italic tag left open</i>
6233 <!-- Unmatching number of opening, closing tags: -->
6234 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6235 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6236 </p><p>Plain <i>italic'</i>s plain
6243 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6246 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6247 # is the bare minimum required by the spec, see:
6248 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6249 # Parsoid team replies: empty table tags are legal in HTML5
6251 A table with no data.
6262 A table with stray table end tags on start tag line (wt2html)
6266 {|style="color: red;"|}
6268 {|style="color: red;" |}
6272 {|style="color: red;"|} id="foo"
6276 {|style="color: red;" |} id="foo"
6280 <table style="color: red;">
6282 </table><table style="color: red;">
6285 </td></tr></tbody></table>
6286 <table style="color: red;" id="foo">
6289 </td></tr></tbody></table>
6290 <table style="color: red;" id="foo">
6293 </td></tr></tbody></table>
6295 <table style="color: red;"></table>
6297 <table style="color: red;">
6303 <table style="color: red;" id="foo">
6309 <table style="color: red;" id="foo">
6317 A table with no data (take 2)
6325 # A table with nothing but a caption is invalid XHTML, we might want to render
6326 # this as <p>caption</p>
6327 # Parsoid team replies: table with only a caption is legal in HTML5
6329 A table with nothing but a caption
6337 </caption><tr><td></td></tr></table>
6339 <table><caption>caption</caption></table>
6343 A table with caption with default-spaced attributes and a table row
6346 |+ style="color: red;" |caption1
6352 <caption style="color: red;">caption1
6360 A table with captions with non-default spaced attributes and a table row
6363 |+style="color: red;"|caption2
6364 |+ style="color: red;"|caption3
6370 <caption style="color: red;">caption2
6372 <caption style="color: red;">caption3
6380 Table td-cell syntax variations
6385 |style='color:red;'|baz
6386 |style='color:red;'||baz
6393 <td>foo bar foo</td>
6396 <td style="color:red;">baz
6398 <td>style='color:red;'</td>
6424 Simple table but with multiple dashes for row wikitext
6442 Multiplication table
6444 {| border="1" cellpadding="2"
6445 |+Multiplication table
6465 <table border="1" cellpadding="2">
6466 <caption>Multiplication table
6512 Accept "||" in table headings
6526 Accept "!!" in table data
6539 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6544 Accept "||" in indented table headings
6554 </th></tr></table></dd></dl>
6558 Accept "!!" in templates
6571 <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>
6575 Accept "!!" in table headings after newline
6591 <p>b!!c</p></th></tr>
6596 Accept "!!" in table data of mixed wikitext / html syntax
6600 <tr><td>b!!c</td></tr>
6606 </th></tr><tr><td>b!!c</td></tr>
6610 <tbody><tr><th>a</th></tr>
6611 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6616 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6632 Accept "| !" at start of line in tables (ignore !-attribute)
6636 |!style="color:red"|bar
6647 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 +/-
6651 |style='color:red;'|+1
6652 |style='color:blue;'|-1
6664 <td style="color:red;">+1
6666 <td style="color:blue;">-1
6684 # Differences between Parsoid and PHP re: trailing whitespace in a
6691 |rowspan=2|Cell 2, row 1 (and 2)
6702 <td rowspan="2">Cell 2, row 1 (and 2)
6713 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>Cell 1, row 1</td>
6714 <td rowspan="2">Cell 2, row 1 (and 2)</td>
6715 <td>Cell 3, row 1</td></tr>
6716 <tr data-parsoid='{"startTagSrc":"|-"}'>
6717 <td>Cell 1, row 2</td>
6718 <td>Cell 3, row 2</td></tr>
6728 {| bgcolor=#ABCDEF border=2
6733 |the original table again
6741 <table bgcolor="#ABCDEF" border="2">
6749 <td>the original table again
6754 Invalid attributes in table cell (T3830)
6767 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6771 |title="foo<nowiki>|</nowiki>" |bar
6772 |title="foo<nowiki>|</nowiki>" bar
6779 <td title="foo|">bar
6781 <td>title="foo|" bar
6785 <tbody><tr><td title="foo">bar</td>
6786 <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>
6787 <td>title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6791 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6792 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6793 # *2wt modes will fail.
6795 Table security: embedded pipes
6797 parsoid=wt2html,html2html
6800 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6804 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6805 <td>]" onmouseover="alert(document.cookie)">test
6812 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" href="ftp://%7Cx" class="external free" 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>
6816 Element attributes with double ! should not be broken up by <th>
6819 !hi <div class="!!">ha</div> ho
6824 <th>hi <div class="!!">ha</div> ho
6828 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6833 ! and || in element attributes should not be parsed as <th>/<td>
6836 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6841 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6845 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6849 # FIXME: The output seems broken. Filed as T110268.
6851 ! and || in td attributes should not be parsed as <th>/<td>
6856 |style="color: red !important;" data-contrived="put this here ||"|foo
6861 <td>style="color: red !important;" data-contrived="put this here</td>
6866 <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>
6871 Break on | in element attribute in template
6873 parsoid=wt2html,html2html
6875 {{echo|1=<div class="hi|ho">ha</div>}}
6877 <p>ho">ha</div>
6880 <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>
6884 Break on | in element attribute name in template
6886 {{echo|<div cla|ss="hiho">ha</div>}}
6888 <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>
6892 Don't break on | in extension attribute in template
6894 {{echo|<ref name="hi|ho">ha</ref>}}
6898 <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>
6900 <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>
6903 ## We don't support roundtripping of these attributes in Parsoid.
6904 ## Selective serialization takes care of preventing dirty diffs.
6905 ## But, on edits, we dirty-diff the invalid attribute text.
6907 Invalid text in table attributes should be discarded
6911 {| <span>boo</span> style='border:1px solid black'
6912 | <span>boo</span> style='color:blue' |1
6913 |<span>boo</span> style='color:blue'|2
6916 <table style="border:1px solid black">
6918 <td style="color:blue">1
6920 <td style="color:blue">2
6923 <table style="border:1px solid black">
6925 <td style="color:blue">1</td>
6926 <td style="color:blue">2</td>
6932 Invalid text in table attributes should be preserved by selective serializer
6935 "modes": ["selser"],
6937 ["td:first-child", "text", "abc"],
6938 ["td + td", "text", "xyz"]
6942 {| <span>boo</span> style='border:1px solid black'
6943 | <span>boo</span> style='color:blue' | 1
6944 |<span>boo</span> style='color:blue'| 2
6947 {| <span>boo</span> style='border:1px solid black'
6948 | <span>boo</span> style='color:blue' | abc
6949 |<span>boo</span> style='color:blue'| xyz
6954 1. Template-generated table cell attributes and cell content
6959 || {{table_attribs_5}}
6960 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6961 |align=center {{table_attribs}}
6962 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6967 <td style="color:red;">Foo
6969 <td style="color:red;">Foo
6971 <td>style="color:red;"</td>
6974 <td style="color:red;">Foo
6976 <td align="center" style="color:red;">Foo
6978 <td align="center" style="color:red;">Foo
6983 2. Template-generated table cell attributes and cell content
6986 |{{table_attribs_2}}
6991 <td style="color:red;">Foo
6998 <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>
6999 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
7004 3. Template-generated table cell attributes and cell content
7007 !align=center {{table_header_cells}}
7009 |align=center {{table_cells}}
7014 <th align="center" style="color:red;">Foo</th>
7015 <th style="color:red;"><i>Bar</i></th>
7016 <th style="color:brown;"><i>Foo</i> and Baz
7019 <td align="center" style="color:red;">Foo</td>
7020 <td style="color:red;"><i>Bar</i></td>
7021 <td style="color:brown;"><i>Foo</i> and Baz
7025 <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>
7026 <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>
7031 4. Template-generated table cell attributes and cell content inside a templated table
7034 !align=center {{table_header_cells}}
7036 |align=center {{table_cells}}
7041 <th align="center" style="color:red;">Foo</th>
7042 <th style="color:red;"><i>Bar</i></th>
7043 <th style="color:brown;"><i>Foo</i> and Baz
7046 <td align="center" style="color:red;">Foo</td>
7047 <td style="color:red;"><i>Bar</i></td>
7048 <td style="color:brown;"><i>Foo</i> and Baz
7051 <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}}]}'>
7052 <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>
7054 <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>
7058 ## Edge case fix to prevent future regressions
7060 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7063 |{{table_attribs_7}}
7068 <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>
7070 <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>
7074 Table with row followed by newlines and table heading
7076 parsoid=wt2html,html2html
7093 Table with empty line following the start tag
7095 parsoid=wt2html,html2html
7112 Table attributes with empty value
7114 parsoid=wt2html,html2html
7126 <tbody><tr><td style="">hello</td></tr>
7131 Wikitext table with a lot of comments
7153 Wikitext table comments represented in parsoid dom
7155 {|<!--c1--><!--c2-->
7164 </td></tr></tbody></table>
7166 <table><!--c1--><!--c2-->
7167 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7168 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7173 Wikitext table with double-line table cell
7189 Table cell with a single comment
7205 Table-cell after a comment-only-empty-line
7221 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7223 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7228 Build table with {{!}}
7230 {{{!}} class="wikitable"
7233 {{!}}- style="color:red;"
7234 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7237 <table class="wikitable">
7243 <tr style="color:red;">
7245 <td style="color:red;">second data
7250 Build table with pipe as data
7252 {| class="wikitable"
7255 |- style="color:red;"
7256 |data|| style="color:red;" |second data
7258 | style="color:red;" |data with | || style="color:red;" | second data with |
7260 ||data with | |||second data with |
7263 <table class="wikitable">
7269 <tr style="color:red;">
7271 <td style="color:red;">second data
7274 <td style="color:red;">data with |</td>
7275 <td style="color:red;">second data with |
7278 <td>data with |</td>
7279 <td>second data with |
7284 Build table with wikilink
7286 {| class="wikitable"
7287 !header||second header
7288 |- style="color:red;"
7289 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7291 |data||second data [[Main Page|link|text with pipe]]
7294 <table class="wikitable">
7299 <tr style="color:red;">
7300 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7301 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7305 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7309 # The expected HTML structure in this test is debatable. The PHP parser does
7310 # not parse this kind of table at all. The main focus for Parsoid is on
7311 # round-tripping, so this output is ok for now. TODO: revisit!
7313 Wikitext table with html-syntax row
7323 <td>foo</td></tr></tbody></table>
7326 ## Remex doesn't account for fostered content.
7328 Fostered content in tables: Plain text
7347 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7350 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7354 Fostered content in tables: Lists
7356 parsoid=wt2html,html2html
7368 <ul><li>a</li></ul><table>
7373 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7374 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7376 </tr></tbody></table>
7380 Template generated table cell with attributes
7384 {{table_attribs_4}} ||a||b
7390 <td style="background-color:#DC241f;" width="10px"></td>
7393 </td></tr></tbody></table>
7396 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7397 <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>
7401 Parsoid: Round-trip tables directly followed by content (T53219)
7403 parsoid=wt2html,wt2wt
7416 </td></tr></tbody></table><p> bar
7420 </td></tr></tbody></table><p><b>quux</b></p>
7424 Parsoid: Default to a newline after tables in new content (T53219)
7429 <tr><td>foo</td></tr></tbody></table> bar
7431 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7436 <nowiki> </nowiki>bar
7444 Parsoid: Row-syntax table headings followed by comment & table cells
7446 parsoid=wt2html,wt2wt
7450 <!-- foo --> ||baz||quux
7463 <tbody><tr><th>foo</th><th>bar
7464 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7469 Parsoid: Recover better from broken table attributes
7483 </td></tr></tbody></table>
7488 <p>foo</p></td></tr>
7492 # Note: PHP parser omits empty rows
7494 Tables: Digest broken attributes on table and tr tag
7510 <tr class='mw-empty-elt'></tr>
7511 <tr class='mw-empty-elt'></tr>
7516 Table with missing opening <tr> tag
7518 parsoid=wt2html,wt2wt
7526 <tbody><tr><td>foo</td>
7531 # T137406: Whitespace in the HTML
7533 1. Generate correct wikitext for tables with thead/tbody/tfoot
7538 <caption>Test</caption>
7600 </td></tr></tbody></table>
7603 # T137406: No whitespace in the HTML
7605 2. Generate correct wikitext for tables with thead/tbody/tfoot
7609 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7619 Wikitext tables can be nested inside HTML tables
7623 <table data-parsoid='{"stx":"html"}'>
7626 <tr><td>foo</td></tr>
7644 </td></tr></tbody></table>
7653 Plain link, capitalized
7657 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7662 Plain link, uncapitalized
7666 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7673 [[Main Page|The Main Page]]
7675 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7680 Piped link with comment in link text
7682 [[Main Page|The Main<!--front--> Page]]
7684 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7689 Piped link with multiple pipe characters in link text
7691 [[Main Page||The|Main|Page|]]
7693 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7696 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7700 Piped link with no link text
7702 [[Thomas Bek (bishop of St David's)|]]
7704 <p>[[Thomas Bek (bishop of St David's)|]]
7707 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7711 Piped link with empty link text
7713 [[Main Page|<nowiki/>]] - empty nowiki
7714 [[Main Page| ]] - empty space
7715 [[Main Page| ]] - empty non breaking space
7717 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7718 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7719 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7722 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7723 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7724 <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>
7732 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7736 # The PHP parser strips the hash fragment for non-existent pages, but
7737 # Parsoid does not. (T227693)
7739 Broken link with fragment
7741 [[Zigzagzogzagzig#zug]]
7743 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7746 <p><a rel="mw:WikiLink" href="./Zigzagzogzagzig#zug" title="Zigzagzogzagzig" data-parsoid="{"tsr":[0,23],"src":"[[Zigzagzogzagzig#zug]]","bsp":[0,23],"stx":"simple"}">Zigzagzogzagzig#zug</a></p>
7750 Special page link with fragment
7752 [[Special:Version#anchor]]
7754 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7758 # Parsoid does not strip fragment from red links: T227693
7760 Nonexistent special page link with fragment
7762 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7764 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7767 <p><a rel="mw:WikiLink" href="./Special:ThisNameWillHopefullyNeverBeUsed#anchor" title="Special:ThisNameWillHopefullyNeverBeUsed">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a></p>
7773 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7775 <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>
7782 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7784 <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>!!!
7795 T45661: Piped links with identical prefixes
7797 [[prefixed article|prefixed articles with spaces]]
7799 [[prefixed article|prefixed articlesaoeu]]
7801 [[Main Page|Main Page test]]
7803 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7804 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7805 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7811 Link with HTML entity in suffix / tail
7813 [[Main Page]]", [[Main Page]]a
7815 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7818 <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>
7822 Link with 3 brackets
7833 Link with 4 brackets
7837 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7842 Piped link with 3 brackets
7844 [[[main page|the main page]]]
7846 <p>[[[main page|the main page]]]
7851 Piped link with extlink-like text
7854 [[Main Page|This is a [bar]]]
7857 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7858 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7859 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7862 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7863 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7864 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7868 Link with multiple pipes
7870 [[Main Page|The|Main|Page]]
7872 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7877 Anchor containing a #. (T65430)
7879 wgFragmentMode=[ 'html5', 'legacy' ]
7881 [[Main Page#And#Link]]
7883 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7886 <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>
7892 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7894 <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>
7899 Link with space in namespace
7901 [[User talk:Foo bar]]
7903 <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>
7908 MemoryAlpha:AlphaTest
7910 This is an article in the MemoryAlpha namespace
7911 (which shadows the memoryalpha interwiki link).
7915 Namespace takes precedence over interwiki link (T53680)
7917 [[MemoryAlpha:AlphaTest]]
7919 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7923 # The previous test doesn't work correctly in html2*, due to not recognizing the
7924 # link as an internal one. This one checks for the correct behavior.
7926 Link to namespace preferred over interwiki with correct rel attribute
7928 parsoid=html2wt,html2html
7930 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7932 [[MemoryAlpha:AlphaTest]]
7936 Piped link to namespace
7938 [[Meta:Disclaimers|The disclaimers]]
7940 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7947 [[Usually caused by a typo (oops}]]
7949 <p>[[Usually caused by a typo (oops}]]
7956 Just a test of an article title containing a percent.
7960 Link containing % (not as a hex sequence)
7963 [[7% Solution|7%25 Solution]]
7965 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7966 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7969 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7970 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7973 # note that the parsoid HTML is identical to the previous test output,
7974 # so the previous test ensures that the html2wt mode will generate the
7975 # "not as a hex sequence" wikitext.
7977 Link containing % as a single hex sequence interpreted to char
7979 parsoid=wt2wt,wt2html,html2html
7982 [[7%25 Solution|7%25 Solution]]
7984 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7985 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7988 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7989 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7993 Link containing % as a double hex sequence interpreted to hex sequence
7997 <p>[[7%2525 Solution]]
8001 ## Example for such a section: == < ==
8003 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
8007 wgFragmentMode=[ 'html5', 'legacy' ]
8009 [[%23%3c]][[%23%3e]]
8011 <p><a href="#<">#<</a><a href="#>">#></a>
8014 <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>
8017 ## Example for such a section: == < ==
8019 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
8021 wgFragmentMode=[ 'legacy' ]
8023 [[%23%3c]][[%23%3e]]
8025 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
8030 Link containing "<#" and ">#" as a hex sequences
8032 [[%3c%23]][[%3e%23]]
8034 <p>[[%3c%23]][[%3e%23]]
8039 Link containing an equals sign
8041 [[Special:BookSources/isbn=4-00-026157-6]]
8043 <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>
8046 <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>
8052 Just a test of an article title containing an ampersand
8056 Link containing an ampersand
8062 [[Foo &amp; bar]]
8064 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8065 </p><p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8066 </p><p>[[Foo &amp; bar]]
8069 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar">Foo & bar</a></p>
8070 <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>
8071 <p>[[Foo <span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp; bar]]</p>
8077 Just a test of an article title containing a tilde.
8080 # note that links containing signatures, like [[Foo~~~~]], are
8081 # massaged by the pre-save transform (PST) and so the tildes are never
8082 # seen by the parser.
8084 Link containing a tilde
8088 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8091 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8095 Link containing double-single-quotes '' (T6598)
8097 [[Lista d''e paise d''o munno]]
8099 <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>
8102 <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>
8106 Link containing double quotes and spaces
8110 <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>
8113 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8117 File containing double quotes and spaces
8119 [[File:Cool "Gator".png]]
8121 <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>
8124 <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>
8128 File containing single quotes
8130 [[File:Foo's ''italic'' bar.jpg]]
8131 [[File:Foo's ''italic'' bar.jpg|Foo's ''italic'' bar]]
8133 <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>
8134 <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>
8139 Redirect containing double quotes and spaces
8141 #REDIRECT [[Cool "Gator"]]
8143 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8147 Link containing double-single-quotes '' in text (T6598 sanity check)
8149 Some [[Link|pretty ''italics'' and stuff]]!
8151 <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>!
8154 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8158 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8160 ''Some [[Link|pretty ''italics'' and stuff]]!''
8162 <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>
8166 ## FIXME: Title part of filename is interpreted in php
8168 Link with double quotes in title part (literal) and alternate part (interpreted)
8170 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8174 [[''Pentecoste''|Pentecoste]]
8176 [[''Pentecoste''|''Pentecoste'']]
8178 <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>
8179 </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>
8180 </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>
8181 </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>
8184 <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>
8185 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8186 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8187 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8191 Broken image links with HTML captions (T41700)
8193 [[File:Nonexistent|<script></script>]]
8194 [[File:Nonexistent|100x100px|<script></script>]]
8195 [[File:Nonexistent|<]]
8196 [[File:Nonexistent|a<i>b</i>c]]
8198 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8199 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8200 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8201 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8204 <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>
8205 <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>
8206 <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>
8207 <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>
8213 [[http://www.example.com]]
8215 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8218 <p>[<a rel="mw:ExtLink" href="http://www.example.com" class="external autonumber"></a>]</p>
8222 Plain link to URL with link text
8224 [[http://www.example.com Link text]]
8226 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8231 Plain link to URL containing special characters, with link text (see T213950).
8233 [[http://www.example.com/?q=%7Babc%7D Link text]]
8235 <p>[<a rel="nofollow" class="external text" href="http://www.example.com/?q=%7Babc%7D">Link text</a>]
8240 Plain link to protocol-relative URL
8242 [[//www.example.com]]
8244 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8247 <p>[<a rel="mw:ExtLink" href="//www.example.com" class="external autonumber"></a>]</p>
8251 Plain link to protocol-relative URL with link text
8253 [[//www.example.com Link text]]
8255 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8260 Plain link to page with question mark in title
8266 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8267 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8271 # I'm fairly sure the expected result here is wrong.
8272 # We want these to be URL links, not pseudo-pages with URLs for titles....
8273 # However the current output is also pretty screwy.
8276 # I'm changing it to match the current output--it arguably makes more
8277 # sense in the light of the test above. Old expected result was:
8278 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8280 # But I think this test is bordering on "garbage in, garbage out" anyway.
8285 Piped link to URL: [[http://www.example.com|an example URL]]
8287 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8290 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com%7Can" class="external text" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
8294 Plain link in template argument
8298 {{echo|[http://www.example.com |123]}}
8300 {{echo|[[http://www.example.com |123]]}}
8302 {{echo|[[http://www.example.com |123]}}
8304 {{echo|[http://www.example.com |123]]}}
8306 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8307 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8308 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8309 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8312 <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" href="http://www.example.com" class="external free">http://www.example.com</a> </p>
8314 <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" href="http://www.example.com" class="external text">|123</a>]</p>
8316 <p>{{echo|[<a rel="mw:ExtLink" href="http://www.example.com" class="external text" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
8318 <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" href="http://www.example.com" class="external free">http://www.example.com</a> </p>
8322 T2002: [[page|http://url/]] should link to page, not http://url/
8324 [[Main Page|http://url/]]
8326 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8329 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8332 # Parsoid does not mark self-links, by design.
8334 T2337: Escaped self-links should be bold
8338 [[Bug462]] [[Bug462]]
8340 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8343 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8347 Self-link to section should not be bold
8351 [[Main Page#section]]
8353 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8364 Self-link to numeric title
8370 <p><a class="mw-selflink selflink">0</a>
8375 Link to numeric-equivalent title
8381 <p><a href="/wiki/00" title="00">00</a>
8386 <nowiki> inside a link
8388 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8390 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8393 <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>
8396 ## Parsoid doesn't get this right and even fails wt2html because, when doing the
8397 ## normalization for comparison, the html serialization / re-parse doesn't
8398 ## roundtrip. This is T49963
8402 [[Main<pre> Page</pre>]] [[Main Page|the main page <pre>[it's not very good]</pre>]]
8404 <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>
8406 <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>
8410 Non-breaking spaces in title
8412 [[ Main Page ]]
8414 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8418 # Add new article for the test below so that it doesn't red-link
8426 Multiple spaces in titles should normalize to a single underscore
8428 parsoid=wt2html,wt2wt
8434 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8435 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8436 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8439 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8440 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8441 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8446 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8452 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8457 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8463 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8468 Internal link with en linktrail: no apostrophes (T29473)
8474 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8479 Internal link with ca linktrail with apostrophes (T29473)
8485 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8490 Internal link with kaa linktrail with apostrophes (T29473)
8496 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8501 Link with multiple ":" in a subpage-supporting namespace (T65636)
8503 [[User:Foo/Test/63636:Bar|Test]]
8505 <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>
8508 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8511 ## Mainly a sanity check for Parsoid
8513 Handle title parsing for subpages
8533 Link to a subpage from a namespace other than main
8540 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8543 <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>
8547 Ensure that transclusion titles are not url-decoded
8549 subpage title=[[Test]]
8552 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8554 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8557 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8561 Purely hash wikilink
8563 title=[[User:Test/123]]
8568 <p><a href="#a">b</a>
8571 <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>
8575 Serialization of purely hash wikilink
8577 title=[[User:Test/123]]
8581 <p><a href="#a">[[</a></p>
8583 [[#a|<nowiki>[[</nowiki>]]
8585 <p><a href="#a">[[</a>
8590 1. Interaction of linktrail and template encapsulation
8594 <p><a href="/wiki/Foo" title="Foo">Fool</a>
8597 <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>
8601 2. Interaction of linktrail and template encapsulation
8603 {{echo|Some [[Fool]]}}s
8605 <p>Some <a href="/index.php?title=Fool&action=edit&redlink=1" class="new" title="Fool (page does not exist)">Fools</a>
8608 <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>
8612 3. Interaction of linktrail and template encapsulation
8614 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8616 <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>
8619 <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>
8629 Internal link with is link prefix
8633 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8635 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8646 Internal link with is link trail and link prefix
8650 [[mótmælendatrú|xxx]]ar
8652 mótmælenda[[söfnuður]]
8653 mótmælenda[[söfnuður|söfnuðir]]
8654 mótmælenda[[söfnuður|söfnuðir]]xxx
8656 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8657 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8658 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8659 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8660 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8665 Parsoid link trail escaping
8667 parsoid=html2wt,html2html
8669 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8675 Parsoid link prefix escaping
8678 parsoid=html2wt,html2html
8680 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8682 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8686 Parsoid link bracket escaping
8688 parsoid=html2wt,html2html
8690 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8691 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8692 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8693 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8694 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8695 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8703 [[[<nowiki/>[[Test]]]]]
8707 [[[[[<nowiki/>[[Test]]]]]]]
8711 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8719 [http://wp.org ''foo'']
8721 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8722 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8723 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8724 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8729 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8731 [[Foo|{{echo|a}} b {{echo|c}}]]
8733 <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>
8737 Link with angle bracket after anchor
8739 wgFragmentMode=[ 'html5', 'legacy' ]
8743 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8746 <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>
8750 Link with angle bracket after anchor (legacy)
8752 wgFragmentMode=[ 'legacy' ]
8756 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8761 ### Interwiki links (see maintenance/interwiki.sql)
8765 Inline interwiki link
8767 parsoid=wt2html,wt2wt,html2html
8769 [[MeatBall:SoftSecurity]]
8771 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8774 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8778 Inline interwiki link with empty title (T4372)
8780 parsoid=wt2html,wt2wt,html2html
8784 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8787 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8790 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8792 Interwiki link encoding conversion (T3636)
8794 parsoid=wt2html,wt2wt
8796 *[[Wikipedia:ro:Olteniţa]]
8797 *[[Wikipedia:ro:Olteniţa]]
8799 <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>
8800 <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>
8802 <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>
8803 <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>
8806 <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>
8807 <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>
8812 Interwiki link with fragment (T4130)
8814 [[MeatBall:SoftSecurity#foo]]
8816 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8820 ## The interwiki case here continued to be legacy escaped because of the
8821 ## default setting of $wgExternalInterwikiFragmentMode
8823 Link scenarios with escaped fragments
8827 wgFragmentMode=[ 'html5', 'legacy' ]
8830 [[Foo#Is this great?]]
8831 [[meatball:Foo#Is this great?]]
8833 <p><a href="#Is_this_great?">#Is this great?</a>
8834 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8835 <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>
8838 <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>
8839 <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>
8840 <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>
8844 Link scenarios with escaped fragments (legacy)
8846 wgFragmentMode=[ 'legacy' ]
8849 [[Foo#Is this great?]]
8850 [[meatball:Foo#Is this great?]]
8852 <p><a href="#Is_this_great.3F">#Is this great?</a>
8853 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8854 <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>
8858 # Ideally the wikipedia: prefix here should be proto-relative too
8859 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8860 # define the 'en' prefix, and originally the test used 'wikipedia',
8861 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8864 Different interwiki prefixes mapping to the same URL
8872 [[:wikipedia:Foo|Foo]]
8874 [[wikipedia:en:Foo]]
8876 [[:wikipedia:en:Foo]]
8880 <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>
8882 <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>
8884 <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>
8886 <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>
8888 <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>
8890 <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>
8892 <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>
8896 Interwiki links that cannot be represented in wiki syntax
8899 [[meatball:ok#foo|ok with fragment]]
8900 [[meatball:ok_as_well?|ok ending with ? mark]]
8901 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8902 [http://de.wikipedia.org/wiki/#foo is just fragment]
8905 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8906 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8907 <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>
8908 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8909 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8912 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8913 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8914 <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>
8915 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history" class="external text">has query</a>
8916 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo" class="external text">is just fragment</a></p>
8920 Interwiki links: trail
8922 [[wikipedia:Foo|Ba]]r
8924 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8927 <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>
8931 Local interwiki link
8933 parsoid=wt2html,wt2wt,html2html
8935 [[local:Template:Foo]]
8937 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8940 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8943 # Parsoid does not mark self-links, by design.
8945 Local interwiki link: self-link to current page
8948 parsoid=wt2html,wt2wt,html2html
8952 <p><a class="mw-selflink selflink">local:Main Page</a>
8955 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8959 Local interwiki link: prefix only (T66167)
8961 parsoid=wt2html,wt2wt,html2html
8965 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8968 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8972 Local interwiki link: with additional interwiki prefix (T63357)
8974 parsoid=wt2html,wt2wt,html2html
8976 [[local:meatball:Hello]]
8978 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8981 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8985 Multiple local interwiki link prefixes
8987 [[local:local:local:local:mi:local:Foo]]
8989 parsoid=wt2html,wt2wt,html2html
8991 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8994 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8998 Interwiki link with percent encoded target
9000 [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]]
9002 <p><a href="http://es.wikipedia.org/wiki/Nueva_Guip%C3%BAzcoa" class="extiw" title="es:Nueva Guipúzcoa">Nueva Guipúzcoa</a>
9005 <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>
9009 ### Interlanguage links
9010 ### Language links (so that searching for '### language' matches..)
9022 <p>Blah blah blah</p>
9023 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9026 ## parsoid html2wt will lose the space variations
9028 Interlanguage link with spacing
9030 parsoid=wt2html,wt2wt,html2html
9038 <p>Blah blah blah</p>
9039 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9043 Double interlanguage link
9052 <p>Blah blah blah</p>
9053 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9054 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9057 ## parsoid html2wt will lose the space variations
9059 Interlanguage link variations
9061 parsoid=wt2html,wt2wt,html2html
9071 <p>Blah blah blah</p>
9072 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
9073 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
9074 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
9078 Escaping of interlanguage links (T129218, T156308)
9082 [[ : zh : Chinese ]]
9085 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9086 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
9090 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9091 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
9095 Multiple colons escaping interlanguage links
9103 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9108 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9110 [[:::es:Spanish]]</p>
9113 ## parsoid html2wt will normalize the space to _
9115 Space and question mark encoding in interlanguage links (T95473)
9117 parsoid=wt2html,wt2wt,html2html
9125 <p>Blah blah blah</p>
9126 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9130 Interlanguage link, with prefix links
9140 <p>Blah blah blah</p>
9141 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9145 Double interlanguage link, with prefix links (T10897)
9156 <p>Blah blah blah</p>
9157 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9158 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9162 "Extra" interlanguage links (T34189 / gerrit 111390)
9170 <p>Blah blah blah</p>
9171 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9174 ## PHP parser tests script needs an update
9175 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9177 Language links render as inline links if $wgInterwikiMagic=false
9179 wgInterwikiMagic=false
9180 parsoid=wt2html,wt2wt,html2html
9185 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9188 ## PHP parser tests script needs an update
9189 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9191 Language links render as inline links in the Talk namespace
9194 parsoid=wt2html,wt2wt,html2html
9199 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9203 Parsoid-specific test: Wikilinks with should RT properly
9209 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9214 Parsoid T55221: Wikilinks should be properly entity-escaped
9216 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9218 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9219 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9221 He&nbsp;llo [[Foo|He&nbsp;llo]]
9223 He&nbsp;llo He&nbsp;llo
9225 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9226 </p><p>He&nbsp;llo He&nbsp;llo
9230 # html2wt will fail because of title normalization without data-parsoid
9232 Parsoid: handle constructor well
9234 parsoid=wt2html,wt2wt
9240 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9241 </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>
9244 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9246 <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>
9250 Template parameter named "constructor"
9252 {{echo| constructor = |hi}}
9254 <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>
9263 # Note that `ko` isn't a known interlanguage prefix
9265 Parsoid: recognize interlanguage links without a target page
9275 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9277 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9280 # Note that `ko` isn't a known interwiki prefix
9282 Parsoid: recognize interwiki links without a target page
9284 parsoid=wt2html,wt2wt,html2html
9290 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9291 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9294 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9295 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9299 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9303 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9306 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9310 Interlanguage link with preceding local interwiki link (T70085)
9312 parsoid=wt2html,wt2wt,html2html
9315 [[local:es:Spanish]]
9318 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9322 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9326 Looks like an interlanguage link, but is actually a local interwiki
9328 parsoid=wt2html,wt2wt,html2html
9334 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9338 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9342 ### Redirects, Parsoid-only
9346 1. Simple redirect to page
9348 #REDIRECT [[Main Page]]
9350 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9354 2. Other redirect variants
9356 #REDIRECT [[Main_Page]]
9358 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9361 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9362 # This tests the Parsoid bail-out code.
9364 3. Other redirect variants
9368 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9370 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9374 4. Redirect to a templated destination
9376 #REDIRECT [[{{echo|Foo}}bar]]
9378 <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"}]]}'/>
9384 parsoid=wt2html,wt2wt
9389 <li>REDIRECT [[]]</li></ol>
9393 Optional colon in #REDIRECT
9395 # the colon is archaic syntax. we support it for wt2html, but we
9396 # don't care that it roundtrips back to the modern syntax.
9397 parsoid=wt2html,html2html
9399 #REDIRECT:[[Main Page]]
9401 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9405 Whitespace in #REDIRECT with optional colon
9407 # the colon and gratuitous whitespace is archaic syntax. we support
9408 # it for wt2html, but we don't care that it roundtrips back to the
9409 # modern syntax (without extra whitespace)
9410 parsoid=wt2html,html2html
9417 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9421 Piped link in #REDIRECT
9423 # content after piped link is ignored. we support this syntax,
9424 # but don't care that the piped link is lost when we roundtrip this.
9427 #REDIRECT [[Main Page|bar]]
9429 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9433 Redirect to category (T104502)
9435 parsoid=wt2html,wt2wt
9437 #REDIRECT [[Category:Foo]]
9439 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9443 Redirect to category with URL encoding (T104502)
9447 #REDIRECT [[Category%3AFoo]]
9449 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9453 Redirect to category page
9455 #REDIRECT [[:Category:Foo]]
9457 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9461 Redirect to image page (1)
9463 #REDIRECT [[File:Wiki.png]]
9465 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9469 Redirect to image page (2)
9471 #REDIRECT [[Image:Wiki.png]]
9473 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9476 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9477 # Next test confirms this.
9479 Redirect to language (1) (T104918)
9481 parsoid=wt2html,wt2wt,html2html
9483 #REDIRECT [[en:File:Wiki.png]]
9485 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9489 Redirect to language (2) (T104918)
9491 #REDIRECT [[:en:File:Wiki.png]]
9493 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9497 Redirect to interwiki (T104918)
9499 #REDIRECT [[meatball:File:Wiki.png]]
9501 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9505 Non-English #REDIRECT
9509 #TILVÍSUN [[Main Page]]
9511 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9515 Redirect syntax under text isn't considered a redirect
9519 #redirect [[Main Page]]
9522 <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>
9530 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9537 Redirect followed by block on the same line
9541 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9543 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9547 Redirect followed by a newline
9549 #REDIRECT [[Main Page]]
9552 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9557 Redirect followed by multiple newlines
9559 #REDIRECT [[Main Page]]
9564 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9571 Drop duplicate redirects
9575 <link rel="mw:PageProp/redirect" href="./Foo"/>
9576 <link rel="mw:PageProp/redirect" href="./Bar"/>
9577 <link rel="mw:PageProp/redirect" href="./Baz"/>
9596 Broken br tag sanitization
9604 # TODO: Fix html2html mode (T53055)!
9606 Parsoid: Broken br tag recognition
9620 Incorrecly removing closing slashes from correctly formed XHTML
9622 <br style="clear:both;" />
9624 <p><br style="clear:both;" />
9629 Failing to transform badly formed HTML into correct XHTML
9631 <br style="clear: left;">
9632 <br style="clear: right;">
9633 <br style="clear: both;">
9635 <p><br style="clear: left;" />
9636 <br style="clear: right;" />
9637 <br style="clear: both;" />
9641 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9642 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9644 Handling html with a div self-closing tag
9653 <div title=""></div>
9654 <div title=""></div>
9656 <div title="bar"></div>
9657 <div title="bar"></div>
9658 <div title="bar/"></div></div>
9660 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9661 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9662 <div title="" data-parsoid='{"stx":"html","autoInsertedEnd":true}'>
9663 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9664 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9665 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div></div>
9669 Elements with solidus in various attribute positions
9671 parsoid=wt2html,html2html
9673 <div cla/ss="123">ha</div>
9675 <div / class="123">ha</div>
9677 <div class= / "123">ha</div>
9680 <div class="123">ha</div>
9681 <div class="/">ha</div>
9683 <div data-parsoid='{"stx":"html","a":{"cla":null,"ss":null},"sa":{"cla":"","ss":"123"}}'>ha</div>
9685 <div class="123" data-parsoid='{"stx":"html"}'>ha</div>
9687 <div class="/" data-parsoid='{"stx":"html","a":{"\"123\"":null},"sa":{"\"123\"":""}}'>ha</div>
9691 Handling html with a br self-closing tag
9718 Quoted attributes without spaces
9722 <div class="foo"style="color:red">red</div>
9724 <div class="foo" style="color:red">red</div>
9726 <div class="foo" style="color:red">red</div>
9730 Horizontal ruler (should it add that extra space?)
9739 foo </p><hr /><p> bar</p>
9743 Horizontal ruler -- 4+ dashes render hr
9751 Horizontal ruler -- eats additional dashes on the same line
9759 Horizontal ruler -- does not collapse dashes on consecutive lines
9769 Horizontal ruler -- <4 dashes render as plain text
9778 Horizontal ruler -- Supports content following dashes on same line
9788 ### Block-level elements
9797 <ul><li>Common list</li>
9799 <li>item 3</li></ul>
9809 <ol><li>Numbered list</li>
9811 <li>item 3</li></ol>
9814 # the switch from level 3 to ordered should not introduce a newline between
9825 ***#Number on level 4
9827 **#Number on level 3
9828 **#Number on level 3
9832 #**Level 3, but ordered
9835 <ol><li>with numbers</li></ol>
9836 <ul><li>and bullets</li></ul>
9837 <ol><li>and numbers</li></ol></li>
9839 <ul><li>bullet level 2
9840 <ul><li>bullet level 3
9841 <ol><li>Number on level 4</li></ol></li></ul></li>
9843 <ol><li>Number on level 3</li>
9844 <li>Number on level 3</li></ol></li></ul>
9845 <ol><li>number level 2</li></ol></li>
9847 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9848 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9852 1. Nested mixed wikitext and html list
9855 *<ul><li>ho</li></ul>
9860 <li><ul><li>ho</li></ul></li>
9862 <ul><li>ho</li></ul></li></ul>
9865 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9867 <ul><li>ho</li></ul></li></ul>
9871 2. Nested mixed wikitext and html list (incompatible)
9874 :{{echo|<li>ho</li>}}
9877 <dd><li>ho</li></dd></dl>
9880 <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>
9890 <ul><li>bar</li></ul></li></ul>
9899 <ul><li><ul><li>foo</li></ul></li>
9904 Nested lists 3 (first element empty)
9910 <ul><li>bar</li></ul></li></ul>
9914 Nested lists 4 (first element empty)
9919 <ul><li><ul><li></li></ul></li>
9924 Nested lists 5 (both elements empty)
9929 <ul><li><ul><li></li></ul></li>
9934 Nested lists 6 (both elements empty)
9940 <ul><li></li></ul></li></ul>
9944 Nested lists 7 (skip initial nesting levels)
9948 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9952 Nested lists 8 (multiple nesting transitions)
9960 <ul><li><ul><li>bar</li></ul></li>
9961 <li>baz</li></ul></li>
9965 # XXX this test should be moved to citeParserTests, since it depends
9966 # on the Cite extension, which is "built in" to Parsoid.
9968 Nested lists 9 (extension interaction)
9971 !! html/php+tidy-DISABLED
9972 <ul><li class="mw-empty-elt"></li></ul>
9974 <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>
9978 1. Lists with start-of-line-transparent tokens before bullets: Comments
9990 Nested lists 10 (list and span siblings: wt2wt regression)
9995 <ul><li>a <span>x</span>
9996 <ul><li>b <span>y</span></li></ul></li></ul>
10000 2. Lists with start-of-line-transparent tokens before bullets: Template close
10005 <ul><li>foo bar</li>
10010 List items are not parsed correctly following a <pre> block (T2785)
10016 <ul><li><pre>foo</pre></li>
10017 <li><pre>bar</pre></li>
10020 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
10021 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
10025 # FIXME: Might benefit from a html/parsoid since this has a template
10027 List items from template
10038 *notSOL{{inner list}}
10041 <ul><li>item 1</li>
10042 <li>item 2</li></ul>
10043 <ul><li>item 0</li>
10045 <li>item 2</li></ul>
10046 <ul><li>item 0</li>
10049 <li>item 2</li></ul>
10053 List interrupted by empty line or heading
10061 <ul><li>foo</li></ul>
10062 <ul><li><ul><li>bar</li></ul></li></ul>
10063 <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>
10064 <ul><li>Another list item</li></ul>
10068 Multiple list tags generated by templates
10085 <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>
10086 <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>
10087 <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>
10091 Multiple newlines in between HTML list items don't induce paragraph wrapping
10104 <dd>ho<div>123</div>
10120 <dd>ho<div>123</div>
10128 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10131 <!--This line will NOT split the list-->
10133 <!--This line will NOT split the list either-->
10135 <!--foo--> <!----> <!--This line NOT split the list either-->
10145 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10148 <!--This line will NOT split the list-->
10150 <!--This line will NOT split the list either-->
10152 <!--foo--> <!----> <!--This line NOT split the list
10162 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10163 # That pass could possibly be removed.
10165 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10167 parsoid=wt2html,wt2wt
10171 *{{echo|<li>templated li-hack}}
10172 *<!--foo--><li> unsupported li-hack with preceding comments
10175 <li><li>not a li-hack
10180 <li class="mw-empty-elt"></li><li>li-hack</li>
10181 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10182 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10184 <li class="mw-empty-elt"></li><li>not a li-hack
10189 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10190 <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>
10191 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10193 <ul data-parsoid='{"stx":"html"}'>
10194 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10200 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10212 <ol><li>bar</li></ol></li></ol>
10214 <ul><li>bar</li></ul></li></ul>
10216 <dl><dd>bar</dd></dl></dd></dl>
10234 Parsoid: Test of whitespace serialization with Templated bullets
10241 <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>
10245 # ------------------------------------------------------------------------
10246 # The next set of tests are about Parsoid's ability to handle badly nested
10247 # tags (parse, minimize scope of fixup, and roundtrip back)
10248 # ------------------------------------------------------------------------
10250 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10251 # Parsoid's list handling is more aware of block structure.
10253 Unbalanced closing block tags break a list
10260 <ul><li>a</li></ul></div><div>
10272 Unbalanced closing non-block tags don't break a list
10274 parsoid=wt2html,html2html
10282 <ul><li>a<span></span></li>
10285 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></p>
10286 <ul><li>a<span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></li>
10290 # Parsoid does some post-dom-building cleanup
10291 # which is why its output differs from Remex.
10293 Unclosed formatting tags that straddle lists are closed and reopened
10295 parsoid=wt2html,wt2wt,html2html
10300 <ol><li><s> a</s></li><s>
10301 </s><li><s>b </s></li></ol>
10303 <ol><li><s> a</s></li>
10304 <li><s>b </s></li></ol>
10307 # Output is ugly because of all the misnested tag fixups.
10309 1. List embedded in a formatting tag
10316 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10319 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
10320 <ul><li data-parsoid='{}'>foo</li></ul></small>
10321 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p>
10324 # Output is ugly because of all the misnested tag fixups.
10326 2. List embedded in a formatting tag in a misnested way
10333 </small></p><small></small><ul><small><li>a</li>
10334 </small><li><small>b</small></li></ul>
10336 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10337 <ul><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'><li>a</li></small>
10338 <li><small data-parsoid='{"stx":"html","autoInsertedStart":true}'>b</small></li></ul>
10341 # Output is ugly because of all the misnested tag fixups.
10343 3. List embedded in a formatting tag in a misnested way
10350 </small></p><small></small><ul><small></small><li><small></small><ul><small></small><li><small>123</small></li></ul></li></ul>
10352 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10354 <ul><li><ul><li data-parsoid='{}'><small data-parsoid='{"stx":"html","autoInsertedStart":true}'> 123</small></li></ul></li></ul>
10361 # Note that the current date is hard-coded as
10362 # 1970-01-01T00:02:03Z (a Thursday)
10363 # when running parser tests. The timezone is also fixed to GMT, so
10364 # local date will be identical to current date.
10367 Magic Word: {{CURRENTDAY}}
10376 Magic Word: {{CURRENTDAY2}}
10385 Magic Word: {{CURRENTDAYNAME}}
10394 Magic Word: {{CURRENTDOW}}
10403 Magic Word: {{CURRENTMONTH}}
10412 Magic Word: {{CURRENTMONTH1}}
10421 Magic Word: {{CURRENTMONTHABBREV}}
10423 {{CURRENTMONTHABBREV}}
10430 Magic Word: {{CURRENTMONTHNAME}}
10432 {{CURRENTMONTHNAME}}
10439 Magic Word: {{CURRENTMONTHNAMEGEN}}
10441 {{CURRENTMONTHNAMEGEN}}
10448 Magic Word: {{CURRENTTIME}}
10457 Magic Word: {{CURRENTHOUR}}
10466 Magic Word: {{CURRENTWEEK}} (T6594)
10475 Magic Word: {{CURRENTYEAR}}
10484 Magic Word: {{CURRENTTIMESTAMP}}
10486 {{CURRENTTIMESTAMP}}
10493 Magic Words LOCAL (UTC)
10497 *{{LOCALMONTHNAME}}
10498 *{{LOCALMONTHNAMEGEN}}
10499 *{{LOCALMONTHABBREV}}
10508 *{{LOCALTIMESTAMP}}
10523 <li>19700101000203</li></ul>
10527 Magic Word: {{FULLPAGENAME}}
10529 title=[[User:Ævar Arnfjörð Bjarmason]]
10530 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10534 <p>User:Ævar Arnfjörð Bjarmason
10539 Magic Word: {{FULLPAGENAMEE}}
10541 title=[[User:Ævar Arnfjörð Bjarmason]]
10542 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10546 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10551 Magic Word: {{TALKSPACE}}
10553 title=[[User:Ævar Arnfjörð Bjarmason]]
10554 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10563 Magic Word: {{TALKSPACE}}, same namespace
10565 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10566 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10575 Magic Word: {{TALKSPACE}}, main namespace
10577 title=[[Parser Test]]
10578 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10587 Magic Word: {{TALKSPACEE}}
10589 title=[[User:Ævar Arnfjörð Bjarmason]]
10590 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10599 Magic Word: {{SUBJECTSPACE}}
10601 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10602 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10611 Magic Word: {{SUBJECTSPACE}}, same namespace
10613 title=[[User:Ævar Arnfjörð Bjarmason]]
10614 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10623 Magic Word: {{SUBJECTSPACE}}, main namespace
10625 title=[[Parser Test]]
10626 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10633 Magic Word: {{SUBJECTSPACEE}}
10635 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10636 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10645 Magic Word: {{NAMESPACE}}
10647 title=[[User:Ævar Arnfjörð Bjarmason]]
10648 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10657 Magic Word: {{NAMESPACEE}}
10659 title=[[User:Ævar Arnfjörð Bjarmason]]
10660 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10669 Magic Word: {{NAMESPACENUMBER}}
10671 title=[[User:Ævar Arnfjörð Bjarmason]]
10672 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10674 {{NAMESPACENUMBER}}
10681 Magic Word: {{SUBPAGENAME}}
10683 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10684 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10693 Magic Word: {{SUBPAGENAMEE}}
10695 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10696 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10705 Magic Word: {{ROOTPAGENAME}}
10707 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10708 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10712 <p>Ævar Arnfjörð Bjarmason
10717 Magic Word: {{ROOTPAGENAMEE}}
10719 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10720 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10724 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10729 Magic Word: {{BASEPAGENAME}}
10731 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10732 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10736 <p>Ævar Arnfjörð Bjarmason
10741 Magic Word: {{BASEPAGENAMEE}}
10743 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10744 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10748 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10753 Magic Word: {{TALKPAGENAME}}
10755 title=[[User:Ævar Arnfjörð Bjarmason]]
10756 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10760 <p>User talk:Ævar Arnfjörð Bjarmason
10765 Magic Word: {{TALKPAGENAMEE}}
10767 title=[[User:Ævar Arnfjörð Bjarmason]]
10768 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10772 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10777 Magic Word: {{SUBJECTPAGENAME}}
10779 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10780 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10782 {{SUBJECTPAGENAME}}
10784 <p>User:Ævar Arnfjörð Bjarmason
10789 Magic Word: {{SUBJECTPAGENAMEE}}
10791 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10792 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10794 {{SUBJECTPAGENAMEE}}
10796 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10801 Magic Word: {{NUMBEROFFILES}}
10803 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10812 Magic Word: {{PAGENAME}}
10814 title=[[User:Ævar Arnfjörð Bjarmason]]
10815 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10819 <p>Ævar Arnfjörð Bjarmason
10824 Magic Word: {{PAGENAME}} with metacharacters
10826 title=[['foo & bar = baz']]
10827 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10831 <p><i>'foo & bar = baz'</i>
10836 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10838 title=[[*RFC 1234 http://example.com/]]
10839 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10843 <p>*RFC 1234 http://example.com/
10848 Magic Word: {{PAGENAMEE}}
10850 title=[[User:Ævar Arnfjörð Bjarmason]]
10851 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10855 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10860 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10862 title=[[*RFC 1234 http://example.com/]]
10863 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10867 <p>*RFC_1234_http://example.com/
10872 Magic Word: {{REVISIONID}} on latest revision
10875 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10882 flags=vary-revision-id
10886 Magic Word: {{REVISIONID}} on non-latest revision
10888 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10895 flags=vary-revision-id
10899 Magic Word: {{REVISIONTIMESTAMP}} on latest revision
10902 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10905 {{REVISIONTIMESTAMP}}
10913 Magic Word: {{REVISIONTIMESTAMP}} on non-existing page
10915 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10918 {{REVISIONTIMESTAMP}}
10922 flags=vary-revision-timestamp
10926 Magic Word: {{REVISIONUSER}} on latest revision
10929 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10940 Parser Function: {{REVISIONID:{{PAGENAME}}}} on latest revision
10943 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10946 {{REVISIONID:{{PAGENAME}}}}
10950 flags=vary-revision-id
10954 Parser Function: {{REVISIONID:{{PAGENAME}}}} on non-saved revision
10956 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10959 {{REVISIONID:{{PAGENAME}}}}
10962 flags=vary-revision-id
10966 Parser Function: {{REVISIONTIMESTAMP:{{PAGENAME}}}} on latest revision
10969 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10972 {{REVISIONTIMESTAMP:{{PAGENAME}}}}
10976 flags=vary-revision-timestamp
10980 Parser Function: {{REVISIONDAY:{{PAGENAME}}}} on latest revision
10983 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10986 {{REVISIONDAY:{{PAGENAME}}}}
10990 flags=vary-revision-timestamp
10994 Parser Function: {{REVISIONMONTH:{{PAGENAME}}}} on latest revision
10997 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11000 {{REVISIONMONTH:{{PAGENAME}}}}
11004 flags=vary-revision-timestamp
11008 Parser Function: {{REVISIONYEAR:{{PAGENAME}}}} on latest revision
11011 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11014 {{REVISIONYEAR:{{PAGENAME}}}}
11018 flags=vary-revision-timestamp
11022 Parser Function: {{PAGESIZE:{{PAGENAME}}}} on latest revision
11025 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11028 {{PAGESIZE:{{PAGENAME}}}}
11032 flags=vary-revision-sha1
11036 Magic Word: {{SCRIPTPATH}}
11038 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11045 Magic Word: {{STYLEPATH}}
11047 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11056 Magic Word: {{SERVER}}
11058 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11062 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
11067 Magic Word: {{SERVERNAME}}
11069 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11078 Magic Word: {{SITENAME}}
11080 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11089 Magic Word: {{PAGELANGUAGE}}
11092 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11101 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
11103 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
11112 Case-sensitive magic words, when cased differently, should just be template transclusions
11119 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
11120 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
11121 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
11122 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
11127 Case-insensitive magic words should still work with weird casing.
11137 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
11141 # From plwiki:PLOS_ONE
11143 Parsoid: Page property magic word with magic word contents
11147 wgAllowDisplayTitle=true
11148 wgRestrictDisplayTitle=false
11150 {{DISPLAYTITLE:''{{PAGENAME}}''}}
11155 <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>"}]]}'/>
11158 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
11159 # But, this is a limitation of our representation and is documented in
11160 # TemplateHandler.js in processSpecialMagicWord
11162 Parsoid: Template-generated DISPLAYTITLE
11164 {{{{echo|DISPLAYTITLE}}:Foo}}
11168 wgAllowDisplayTitle=true
11169 wgRestrictDisplayTitle=false
11174 <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"}]]}'/>
11178 Namespace 1 {{ns:1}}
11187 Namespace 1 {{ns:01}}
11196 Namespace 0 {{ns:0}} (T6783)
11203 Namespace 0 {{ns:00}} (T6783)
11210 Namespace -1 {{ns:-1}}
11219 Namespace User {{ns:User}}
11228 Namespace User talk {{ns:User_talk}}
11237 Namespace User talk {{ns:uSeR tAlK}}
11246 Namespace File {{ns:File}}
11255 Namespace File {{ns:Image}}
11264 Namespace (lang=de) Benutzer {{ns:User}}
11275 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11281 <p>Benutzer Diskussion
11288 {{urlencode:hi world?!}}
11289 {{urlencode:hi world?!|WIKI}}
11290 {{urlencode:hi world?!|PATH}}
11291 {{urlencode:hi world?!|QUERY}}
11301 Magic Word: prioritize type info over data-parsoid
11305 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11311 Magic Word: serialize on separate line (parsoid)
11313 parsoid=wt2wt,html2wt
11319 foo<meta property="mw:PageProp/notoc"/>bar
11323 Magic Word: rt non-english wikis
11330 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11334 __proto__ is treated as normal wikitext (T105997)
11346 Magic links: internal link to RFC (T2479)
11350 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11353 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11357 Magic links: RFC (T2479)
11361 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11364 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11368 Magic links: RFC (T67278)
11370 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11372 <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.
11375 <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>
11379 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11381 RFC      822
11385 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11390 <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>
11396 Magic links: ISBN (T3937)
11400 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11403 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11407 Magic links: ISBN (T67278)
11409 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11411 <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.
11414 <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>
11418 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11420 ISBN      978 0 316 09811 3
11426 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11433 <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>
11441 Magic links: PMID incorrectly converts space to underscore
11445 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11448 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11452 Magic links: PMID (T67278)
11454 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11456 <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.
11459 <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>
11463 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11465 PMID      1234
11469 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11474 <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>
11479 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11480 # since these are ExtLinkText, not MagicLinkText
11482 Magic links: use appropriate serialization for "almost" magic links.
11484 X[[Special:BookSources/0978739256|foo]]
11486 X[https://tools.ietf.org/html/rfc1234 foo]
11488 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11489 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11492 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11493 <p>X<a rel="mw:ExtLink" href="https://tools.ietf.org/html/rfc1234" class="external text">foo</a></p>
11497 Magic links: All disabled (T47942)
11499 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11505 <p>ISBN 0-306-40615-2
11516 Nonexistent template
11518 {{thistemplatedoesnotexist}}
11520 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11525 Template with invalid target containing tags
11527 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11529 <p>{{a<b>b</b>|foo|a=b|a = b}}
11534 Template with invalid target containing unclosed tag
11536 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11538 <p>{{a<b>|foo|a=b|a = b}}</b>
11543 Template with invalid target containing wikilink
11547 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11550 <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>
11553 # The html2html output of this test is currently failing
11554 # because the html2wt output is broken; see
11555 # https://phabricator.wikimedia.org/T220018#5123777 for a discussion.
11556 # Not (yet) including html2wt as a test mode because there are
11557 # a couple of different correct ways this could be <nowiki>'ed.
11559 Template with just whitespace in it, T70421
11563 parsoid=wt2html,html2html
11568 <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>
11571 # This is currently the wikitext output of html2wt on the above test
11572 # case; note that it is broken! Adding a <nowiki> around the closing
11573 # brace changes how the open braces associate, breaking the outer
11574 # {{echo}} template invocation. *However* this "broken" wikitext
11575 # exposed a useful tokenizer bug (T221384) in how the broken_template
11576 # rule was being backtracked into, so it's a useful test case even
11577 # if/when the above test case gets its html2wt output fixed.
11579 Template with just whitespace (bad template brace matching)
11583 {{echo|{{ }<nowiki>}</nowiki>}}
11588 <p>{{echo|{{ }<span typeof="mw:Nowiki">}</span>}}</p>
11594 This is a test template
11602 <p>This is a test template
11607 Template with explicit namespace
11611 <p>This is a test template
11619 This is a test template with parameter {{{param}}}
11625 {{paramtest|param=foo}}
11627 <p>This is a test template with parameter foo
11632 Template:paramtestnum
11634 [[{{{1}}}|{{{2}}}]]
11638 Template unnamed parameter
11640 {{paramtestnum|Main Page|the main page}}
11642 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11647 Template:templatesimple
11653 Template:templateredirect
11655 #redirect [[Template:templatesimple]]
11659 Template:templateasargtestnum
11665 Template:templateasargtest
11667 {{template{{{templ}}}}}
11671 Template:templateasargtest2
11677 Template with template name as unnamed argument
11679 {{templateasargtestnum|templatesimple}}
11686 Template with template name as argument
11688 {{templateasargtest|templ=simple}}
11695 Template with template name as argument (2)
11697 {{templateasargtest2|templ=templatesimple}}
11704 Template:templateasargtestdefault
11706 {{{{{templ|templatesimple}}}}}
11716 Template with default value
11718 {{templateasargtestdefault}}
11725 Template with default value (value set)
11727 {{templateasargtestdefault|templ=templa}}
11736 {{templateredirect}}
11741 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11745 Template with argument in separate line
11747 {{ templateasargtest |
11755 Template with complex template as argument
11758 param ={{ templateasargtest |
11759 templ = simple }}}}
11761 <p>This is a test template with parameter (test)
11766 Templates with templated name
11768 {{{{echo|echo}}|foo}}
11769 {{{{echo|inner list}} }}
11773 <ul><li>item 1</li></ul>
11775 <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>
11776 <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>
11779 ## Regression test; the output here isn't really that interesting.
11781 Templates with templated name and top level template args
11783 {{1{{2{{{3}}}|4=5}}}}
11785 <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>
11788 # Parsoid markup is deliberate "broken". This is an edge case.
11789 # See long comment in TemplateHandler.js:convertAttribsToString.
11791 Templates with invalid templated targets
11802 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11807 Template with thumb image (with link in description)
11809 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11811 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>
11813 <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>
11815 <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>
11819 Template:complextemplate
11821 {{{1}}} {{paramtest|
11822 param ={{{param}}}}}
11826 Template with complex arguments
11829 param ={{ templateasargtest |
11830 templ = simple }}|[[Template:complextemplate|link]]}}
11832 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11837 T2553: link with two variables in a piped link
11840 |[[{{{1}}}|{{{2}}}]]
11845 <td>[[{{{1}}}|{{{2}}}]]
11849 <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>
11855 Abort table cell attribute parsing on wikilink
11858 |testing [[one|two]] |three||four
11859 |testing one two |three||four
11860 |testing="[[one|two]]" |three||four
11865 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11871 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11876 <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>
11877 <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>
11878 <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>
11883 Don't abort table cell attribute parsing if wikilink is found in template arg
11886 |Test {{#tag:ref|One two "[[three]]" four}}
11890 <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>
11895 Magic variable as template parameter
11897 {{paramtest|param={{SITENAME}}}}
11899 <p>This is a test template with parameter MediaWiki
11906 [[{{{param}}}|link]]
11910 Template parameter as link source
11912 {{linktest|param=Main Page}}
11914 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11919 Template:paramtest2
11921 including another template, {{paramtest|param={{{arg}}}}}
11925 Template passing argument to another template
11927 {{paramtest2|arg='hmm'}}
11929 <p>including another template, This is a test template with parameter 'hmm'
11940 Template as link source
11944 [[{{linktest2}}|Main Page]]
11946 [[{{linktest2}}]]Page
11948 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11949 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11950 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11968 Template infinite loop
11972 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11975 <p><span class="error" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"loop1","href":"./Template:Loop1"},"params":{},"i":0}}]}'>Template loop detected: <a rel="mw:WikiLink" href="./Template:Loop1" title="Template:Loop1">Template:Loop1</a></span></p>
11979 Template from main namespace
11988 Template from non-includable namespace
11990 wgNonincludableNamespaces=10
11994 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
12009 T2529: Template with table, not included at beginning of line
12027 T2523: Template shouldn't eat newline (or add an extra one before table)
12046 T2041: Template parameters shown as broken links
12055 Template with targets containing wikilinks
12061 {{[[{{echo|foo}}]]}}
12063 {{{{echo|[[foo}}]]}}
12065 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
12066 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
12070 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
12071 <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>
12072 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
12082 Templates: Double quotes as template target
12089 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
12093 ## This test is about making sure Parsoid's data-mw is well formed in the
12094 ## face of multiple templates with intersecting and overlapping ranges. The
12095 ## wikitext itself is wretched.
12097 Templates with intersecting and overlapping ranges
12108 </table><p>ho</p><table>
12112 </td></tr></tbody></table>
12114 <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":""}]]}'>
12116 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
12118 <tbody><tr><td>hi</td></tr>
12123 Template:MSGNW test
12125 ''None'' of '''this''' should be
12127 but rather passed unmodified
12135 # hmm, fix this or just deprecate msgnw and document its behavior?
12139 {{msgnw:MSGNW test}}
12141 <p>''None'' of '''this''' should be
12143  but rather passed unmodified
12144 {{test}}
12148 <!-- comment -->
12155 {{int:youhavenewmessages|lots of money|not!}}
12157 <p>You have lots of money (not!).
12162 int keyword - non-existing message
12173 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
12177 <includeonly> and <noinclude> being included
12188 <onlyinclude>Foo</onlyinclude>bar
12192 <onlyinclude> being included
12199 <p><meta typeof="mw:Transclusion mw:Includes/OnlyInclude" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"Includes2","href":"./Template:Includes2"},"params":{},"i":0}}]}'/><span about="#mwt1">Foo</span><meta typeof="mw:Includes/OnlyInclude/End" about="#mwt1"/></p>
12206 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
12210 <onlyinclude> and <includeonly> being included
12217 <p><meta typeof="mw:Transclusion mw:Includes/OnlyInclude" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"Includes3","href":"./Template:Includes3"},"params":{},"i":0}}]}'/><span about="#mwt1">Foo</span><meta typeof="mw:Includes/OnlyInclude/End" about="#mwt1"/></p>
12220 # FIXME: Parsoid's markup for this is quite ugly.
12222 <includeonly> and <noinclude> on a page
12224 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
12229 <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="{}"/>
12233 Un-closed <noinclude>
12238 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12244 Hello<noinclude></noinclude>!
12249 <p>Hello<meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>!</p>
12253 <onlyinclude> on a page
12255 <onlyinclude>Foo</onlyinclude>bar
12262 Un-closed <onlyinclude>
12269 Self-closed noinclude, includeonly, onlyinclude tags
12280 Unbalanced includeonly and noinclude tags
12284 |b</noinclude></noinclude>
12285 |c</noinclude></includeonly>
12286 |d</includeonly></includeonly>
12295 <td>c</includeonly>
12297 <td>d</includeonly></includeonly>
12302 Template:Includeonly section
12305 ==Includeonly section==
12311 T8563: Edit link generation for section shown by <includeonly>
12313 {{includeonly section}}
12315 <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>
12316 <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>
12319 # Uses same input as the contents of [[Template:Includeonly section]]
12321 T8563: Section extraction for section shown by <includeonly>
12326 ==Includeonly section==
12334 T8563: Edit link generation for section suppressed by <includeonly>
12337 ==Includeonly section==
12341 <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>
12345 T8563: Section extraction for section suppressed by <includeonly>
12350 ==Includeonly section==
12358 Un-closed <includeonly>
12363 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}' data-mw='{"src":"<includeonly>"}'/>
12366 ## We used to, but no longer wt2wt this test since the default serializer
12367 ## will normalize the include directives to serialize on their own line.
12368 ## Selser will take care of preserving formatting in scenarios where they
12369 ## intermingled with other wikitext.
12370 ## This test also triggered T223411 during Parsoid-PHP porting.
12372 Includes and comments at SOL
12374 parsoid=wt2html,html2html
12376 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12384 some</noinclude>* stuff
12387 <includeonly>can have stuff</includeonly>===here===
12390 <h2><span class="mw-headline" id="hu">hu</span></h2>
12398 <ul><li>here</li></ul>
12399 <h3><span class="mw-headline" id="here">here</span></h3>
12401 <!-- 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>
12403 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12405 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12408 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12409 <p>some<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>* stuff</p>
12410 <ul><li>here</li></ul>
12412 <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>
12415 # TODO: test with DOM fragment reuse!
12417 Parsoid: DOM fragment reuse
12419 parsoid=wt2wt,wt2html
12421 a{{echo|b<table></table>c}}d
12433 <p>ab</p><table></table><p>cd
12444 <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>
12446 <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">
12447 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12448 </span><p about="#mwt2">cd</p>
12450 <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">
12452 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12454 </span><p about="#mwt3">b</p>
12458 Parsoid: Merge double tds (T52603)
12461 |{{echo|{{!}} foo}}
12467 </td></tr></tbody></table>
12470 <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>
12475 Parsoid: Merge double tds in nested transclusion content (T52603)
12479 |{{echo|{{!}} foo}}
12487 </td></tr></tbody></table>
12490 <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}}]}'>
12492 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12498 ### <includeonly> and <noinclude> in attributes
12501 0. includeonly around the entire attribute
12503 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12505 <p><span id="v2">bar</span>
12510 1. includeonly in html attr key
12512 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12514 <p><span id="foo">bar</span>
12519 2. includeonly in html attr value
12521 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12522 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12524 <p><span id="v1">bar</span>
12525 <span id="v1">bar</span>
12530 3. includeonly in part of an attr value
12532 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12534 <p><span style="color:red;">bar</span>
12539 4. includeonly in table attributes
12562 ### Preprocessor precedence tests
12563 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12565 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12567 Preprocessor precedence 1: link is rightmost opening
12573 But close-brace is not a valid character in a link title:
12576 However, we can still tell this was handled as a link in the preprocessor:
12577 {{echo|[[Foo}}|bar]]|bat}}
12579 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12580 </p><p>But close-brace is not a valid character in a link title:
12582 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12586 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12587 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12588 <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>
12592 Preprocessor precedence 2: template is rightmost opening
12601 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12605 Preprocessor precedence 3: language converter is rightmost opening
12621 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12622 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12623 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12627 Preprocessor precedence 4: left-most angle bracket
12638 Template:Precedence5
12644 Preprocessor precedence 5: tplarg takes precedence over template
12646 {{Precedence5|Bullet}}
12648 <ul><li>Bar</li></ul>
12650 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12654 Preprocessor precedence 6: broken link is rightmost opening
12660 {{echo|[[Foo|bar|bat=baz}}
12663 </p><p>{{echo|[[Foo|bar|bat=baz}}
12666 <p>{{echo|[[Foo}}</p>
12667 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12670 # This next test exposes a difference between PHP and Parsoid:
12671 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12672 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12673 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12674 # outer `[[Foo` extends until the `y]]`
12675 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12676 # intermediate result (after template expansion), and link processing
12677 # happens on this intermediate result, which moves the wikilink
12678 # boundary leftward to `[[Foo|Bar]]`
12679 # 2b) Parsoid works in a single step, so it's going to keep the
12680 # wikilink as extending to the `y]]`
12681 # 3a) Then PHP does linktrail processing which slurps up the trailing
12682 # `xy` inside the link.
12683 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12684 # `z` inside the link.
12685 # This is "correct" behavior. Parsoid's basic worldview is that the
12686 # `]]` inside the template shouldn't be allowed to leak out to affect
12687 # the surrounding wikilink. PHP may match Parsoid (in the future)
12688 # if you use {{#balance}} (T114445).
12691 Preprocessor precedence 7: broken template is rightmost opening
12697 [[Foo|{{echo|Bar]]-x}}-y]]-z
12699 Careful: linktrails can move the end of the wikilink:
12700 [[Foo|{{echo|y']]a}}l]]l
12702 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12703 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12704 </p><p>Careful: linktrails can move the end of the wikilink:
12705 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12708 <p>[[Foo|{{echo|Bar]]</p>
12709 <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>
12710 <p>Careful: linktrails can move the end of the wikilink:
12711 <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>
12715 Preprocessor precedence 8: broken language converter is rightmost opening
12726 Template:Preprocessor_precedence_9
12731 ;7: {{{{{{{4}}}}}}}
12735 Preprocessor precedence 9: groups of braces
12737 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12743 <ul><li>Bar</li></ul>
12747 <dd>{Bullet}</dd></dl>
12749 <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}}]}'>
12754 </dl><ul about="#mwt1">
12756 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12765 Template:Preprocessor_precedence_10
12772 ;6: -{{{{{{4}}}}}}-
12773 ;7: -{{{{{{{5}}}}}}}-
12777 Preprocessor precedence 10: groups of braces with leading dash
12781 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12787 <ul><li>Bar-</li></ul>
12794 <ul><li>Bar-</li></ul>
12800 <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}}]}'>
12802 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12805 </dl><ul about="#mwt1">
12807 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12811 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12814 </dl><ul about="#mwt1">
12816 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12820 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12825 Preprocessor precedence 11: found during visual diff testing
12827 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12829 {{echo|-{{echo|-{{echo|x}}}}}}
12831 {{echo|-{{echo|x}}}}
12833 <p><span>-<span>-x</span></span>
12838 <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>
12840 <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>
12842 <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>
12846 Preprocessor precedence 12: broken language converter closed by brace.
12850 This form breaks the template, which is unfortunate:
12851 *{{echo|foo-{bar}bat}}
12853 But if the broken language converter markup is inside an extension
12854 tag, nothing bad happens:
12855 *<nowiki>foo-{bar}bat</nowiki>
12856 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12857 *<pre>foo-{bar}bat</pre>
12858 *{{echo|<pre>foo-{bar}bat</pre>}}
12860 <tag>foo-{bar}bat</tag>
12861 {{echo|<tag>foo-{bar}bat</tag>}}
12864 <p>This form breaks the template, which is unfortunate:
12866 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12867 <p>But if the broken language converter markup is inside an extension
12868 tag, nothing bad happens:
12870 <ul><li>foo-{bar}bat</li>
12871 <li>foo-{bar}bat</li>
12872 <li><pre>foo-{bar}bat</pre></li>
12873 <li><pre>foo-{bar}bat</pre></li></ul>
12874 <pre>'foo-{bar}bat'
12878 <pre>'foo-{bar}bat'
12883 <p>This form breaks the template, which is unfortunate:</p>
12885 <li>{{echo|foo-{bar}bat}}</li>
12887 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12889 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12890 <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>
12891 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12892 <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>
12894 <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>
12898 Preprocessor precedence 13: broken language converter in external link
12902 *[http://example.com/-{foo Example in URL]
12903 *[http://example.com Example in -{link} description]
12904 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12906 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12907 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12908 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12911 <li><a rel="mw:ExtLink" href="http://example.com/-{foo" class="external text">Example in URL</a></li>
12912 <li><a rel="mw:ExtLink" href="http://example.com" class="external text">Example in -{link} description</a></li>
12913 <li>{{echo|<a rel="mw:ExtLink" href="http://example.com/-{foo" class="external text">Breaks template, however</a>}}</li>
12918 Preprocessor precedence 14: broken language converter in comment
12920 *<!--{{foo}}-->...should be ok
12921 *<!---{{foo}}-->...extra dashes
12922 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12924 <ul><li>...should be ok</li>
12925 <li>...extra dashes</li>
12926 <li>foobat...should be ok</li></ul>
12929 <li><!--{{foo}}-->...should be ok</li>
12930 <li><!---{{foo}}-->...extra dashes</li>
12931 <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>
12936 Preprocessor precedence 15: broken brace markup in headings
12938 wgFragmentMode=[ 'html5', 'legacy' ]
12942 __NOTOC__ __NOEDITSECTION__
12951 ===5 foo{{{bar 5===
12956 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12959 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12962 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12965 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12968 <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>
12971 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12975 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12976 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12978 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12980 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12982 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12984 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12986 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12991 Preprocessor precedence 16: matching closing braces to opening braces
12996 -{{{echo|foo}}bar}-
13001 <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>
13005 Preprocessor precedence 17: template w/o target shouldn't prevent closing
13014 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
13017 # Ensure we're using a language without variants for this test; even
13018 # if $wgUsePigLatinVariant is true. We've picked `de` arbitrarily.
13020 Preprocessor precedence 18: another rightmost wins scenario
13025 {{ -{{{{1|tplarg}}} }} }-
13027 <p>{{ -{tplarg }} }-
13030 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
13034 Preprocessor precedence 19: break syntax
13047 ### Token Stream Patcher tests
13049 ### These tests won't always pass wt2wt and other modes because
13050 ### on serialization, the table will be output on a new line.
13051 ### For now, we are blacklisting them, and using this to test selser.
13055 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
13057 parsoid=wt2html,wt2wt
13059 {{echo|}}{| width = '100%'
13063 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
13064 <tbody><tr><td>foo</td></tr>
13068 ## We used to, but no longer wt2wt this test since the default serializer
13069 ## will normalize the include directives to serialize on their own line.
13070 ## Selser will take care of preserving formatting in scenarios where they
13071 ## intermingled with other wikitext.
13073 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
13077 <includeonly>a</includeonly>{| {{{b}}}
13081 <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":""}]]}'>
13082 <tbody><tr><td>c</td></tr>
13087 Table wikitext syntax outside wiki-tables
13091 ! not a table heading
13094 | class="foo bar" | baz
13102 ! not a table heading
13105 | class="foo bar" | baz
13114 ### Testing parsing of templates where a template arg
13115 ### has the same name as the template itself.
13121 {{{quote|{{{1}}}}}}
13125 Templates: Template Name/Arg clash: 1. Use of positional param
13134 Templates: Template Name/Arg clash: 2. Use of named param
13136 {{quote|quote=foo}}
13143 Templates: Template Name/Arg clash: 3. Use of named param with empty input
13152 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
13156 Templates: 1. Simple use
13165 Templates: 2. Inside a block tag
13167 <div>{{echo|Foo}}</div>
13168 <blockquote>{{echo|Foo}}</blockquote>
13171 <blockquote>Foo</blockquote>
13174 <blockquote><p>Foo</p></blockquote>
13178 Templates: P-wrapping: 1a. Templates on consecutive lines
13189 Templates: P-wrapping: 1b. Templates on consecutive lines
13203 Templates: P-wrapping: 1c. Templates on consecutive lines
13206 {{echo|bar}} <div>baz</div>
13214 bar </p><div>baz</div>
13218 Templates: P-wrapping: 1d. Template preceded by comment-only line
13228 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
13232 Templates: Scopes should not be expanded unnecessarily
13234 parsoid=wt2html,wt2wt
13236 {{echo|<div>a</div>}}b{{echo|
13242 <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}}]}'>
13243 </span><div about="#mwt2">c</div>
13247 Templates: Inline Text: 1. Multiple template uses
13249 {{echo|Foo}}bar{{echo|baz}}
13256 Templates: Inline Text: 2. Back-to-back template uses
13258 {{echo|Foo}}{{echo|bar}}
13265 Templates: Block Tags: 1. Multiple template uses
13267 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
13269 <div>Foo</div><div>bar</div><div>baz</div>
13273 Templates: Block Tags: 2. Back-to-back template uses
13275 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
13277 <div>Foo</div><div>bar</div>
13280 ## Parsoid drops empty elements in templates.
13282 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
13289 b</p><p class="mw-empty-elt"></p>
13291 <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">
13292 </span><p about="#mwt1">b</p>
13296 Templates: Links: 1. Simple example
13298 {{echo|[[Foo|bar]]}}
13300 <p><a href="/wiki/Foo" title="Foo">bar</a>
13305 Templates: Links: 2. Generation of link href
13307 [[{{echo|Foo}}|bar]]
13309 <p><a href="/wiki/Foo" title="Foo">bar</a>
13314 Templates: Links: 3. Generation of part of a link href
13316 [[Fo{{echo|o}}|bar]]
13318 [[Foo{{echo|bar}}]]
13320 [[Foo{{echo|bar}}baz]]
13322 [[Foo{{echo|bar}}|bar]]
13324 [[:Foo{{echo|bar}}]]
13326 [[:Foo{{echo|bar}}|bar]]
13328 <p><a href="/wiki/Foo" title="Foo">bar</a>
13329 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13330 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
13331 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13332 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13333 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13338 Templates: Links: 4. Multiple templates generating link href
13340 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
13342 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13347 Templates: Links: 5. Generation of link text
13349 [[Foo|{{echo|bar}}]]
13351 <p><a href="/wiki/Foo" title="Foo">bar</a>
13356 Templates: Links: 5. Nested templates (only outermost template should be marked)
13358 {{echo|[[{{echo|Foo}}|bar]]}}
13360 <p><a href="/wiki/Foo" title="Foo">bar</a>
13365 File with template filename
13367 [[File:{{echo|Foobar.jpg}}]]
13369 <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>
13373 Templates: HTML Tag: 1. Generation of HTML attr. key
13375 <div {{echo|style}}="color:red;">foo</div>
13377 <div style="color:red;">foo</div>
13381 Templates: HTML Tag: 2. Generation of HTML attr. value
13383 <div style={{echo|'color:red;'}}>foo</div>
13385 <div style="color:red;">foo</div>
13389 Templates: HTML Tag: 3. Generation of HTML attr key and value
13391 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13393 <div style="color:red;">foo</div>
13397 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13399 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13401 <div title="This is a long title with just one piece templated">foo</div>
13405 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13407 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13409 <div title="This is a long title with just one piece templated">foo</div>
13413 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13415 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13417 <div title="This is a long title with just one piece templated">foo</div>
13420 # SSS FIXME: While it is great we added support for all this,
13421 # do we want to make this part of the spec? Maybe we want to
13422 # deprecate this kind of usage in the future?
13424 Templates: HTML Tag: 7. Generation of partial attribute key string
13426 <div st{{echo|yle}}="color:red;">foo</div>
13428 <div style="color:red;">foo</div>
13432 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13434 <div {{echo|1=id="v1"}}>bar</div>
13436 <div id="v1">bar</div>
13440 Templates: HTML Tag: 9. Multiple template-generated attributes
13442 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13444 <div id="v1" title="foo">bar</div>
13448 Templates: Support for templates generating attributes and content
13450 {| {{mixed_attr_content_template}}
13455 <table style="color:red;" title="T48811">
13464 <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|}"]}'>
13473 Template:attribute_from_template
13479 Table cell with attribute before expanded attribute
13482 | align="center" {{attribute_from_template}} |456
13486 <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>
13491 1. Entities and nowikis inside templated attributes should be handled correctly
13493 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13495 <div style="background:#f9f9f9;">foo</div>
13497 <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>
13501 2. Entities and nowikis inside templated attributes should be handled correctly
13504 |{{table_attribs_3}}
13509 <td style="background:#f9f9f9;">Foo
13513 <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>
13518 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13521 |{{table_attribs_3}}
13526 <td style="background:#f9f9f9;">Foo
13529 <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}}]}'>
13530 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13536 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13539 |{{table_attribs_6}} hi
13544 <td style="background: red;">hi
13548 <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>
13553 Templates: HTML Tables: 1. Generating start of a HTML table
13555 {{echo|<table><tr><td>foo</td>}}</tr></table>
13557 <table><tr><td>foo</td></tr></table>
13561 Templates: HTML Tables: 2a. Generating middle of a HTML table
13563 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13565 <table><tr><td>foo</td></tr></table>
13569 Templates: HTML Tables: 2b. Generating middle of a HTML table
13571 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13573 <table><tr><td>foo</td></tr></table>
13577 Templates: HTML Tables: 3. Generating end of a HTML table
13579 <table><tr>{{echo|<td>foo</td></tr></table>}}
13581 <table><tr><td>foo</td></tr></table>
13585 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13587 {{echo|<table>}}<tr><td>foo</td></tr></table>
13589 <table><tr><td>foo</td></tr></table>
13593 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13595 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13597 <table><tr><td>foo</td></tr></table>
13601 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13603 <table><tr>{{echo|<td>}}foo</td></tr></table>
13605 <table><tr><td>foo</td></tr></table>
13609 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13611 <table><tr><td>foo{{echo|</td>}}</tr></table>
13613 <table><tr><td>foo</td></tr></table>
13617 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13619 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13621 <table><tr><td>foo</td></tr></table>
13625 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13627 <table><tr><td>foo</td></tr>{{echo|</table>}}
13629 <table><tr><td>foo</td></tr></table>
13633 Templates: HTML Tables: 5. Proper fostering of categories from inside
13635 parsoid=wt2html,wt2wt
13637 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13638 <!--Two categories (T52330)-->
13639 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13641 <table><tbody><tr><td>foo</td></tr></tbody></table>
13642 <table><tbody><tr><td>foo</td></tr></tbody></table>
13644 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13645 <!--Two categories (T52330)-->
13646 <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>
13649 ## Remex doesn't account for fostered content.
13651 Templates: Wiki Tables: 1a. Fostering of entire template content
13659 <tr><td></td></tr></table>
13663 <table><tbody><tr><td></td></tr></tbody></table>
13665 <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">
13671 Templates: Wiki Tables: 1b. Fostering of entire template content
13684 <tr><td></td></tr></table>
13691 <tbody><tr><td></td></tr></tbody></table>
13693 <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|}"]}'>
13695 </div><table about="#mwt3">
13700 ## Remex doesn't account for fostered content.
13702 Templates: Wiki Tables: 2. Fostering of partial template content
13712 <tr><td></td></tr></table>
13716 <div>b</div><table>
13717 <tbody><tr><td></td></tr></tbody></table>
13719 <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">
13726 Templates: Wiki Tables: 3. td-content via multiple templates
13729 {{echo|{{pipe}}a}}{{echo|b}}
13739 Templates: Wiki Tables: 4. Templated tags, no content
13745 <tr><td></td></tr></table>
13749 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13762 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13774 ## This test case is very specific to Parsoid's internals
13775 ## and is hence only tested for Parsoid's code. Parsoid uses
13776 ## a <meta> marker tag for <ref> tags and they are expanded
13777 ## much later. We are verifying that this <meta> tag usage
13778 ## doesn't prevent foster parenting.
13780 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13782 {{PartialTable}}<ref>foo</ref>
13787 <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">
13791 <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>
13795 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13805 <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{{!}}}"]}'>
13806 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13810 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13815 Templates: Lists: Multi-line list-items via templates
13817 *{{echo|a {{nonexistent|
13819 *{{echo|b {{nonexistent|
13822 <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>
13823 <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>
13827 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13829 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13831 <p><i>ab</i>c<i>d</i>e
13836 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13837 (PHP parser generates misnested html)
13839 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13841 <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>
13845 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13846 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13848 parsoid=wt2html,wt2wt
13850 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13852 <div><i>a</i></div><div><i>b</i>c<i>d</i></div><div>e</div>
13854 <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>
13855 <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>
13856 <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>
13860 Templates: Ugly nesting: 4. Divs opened/closed across templates
13862 a<div>b{{echo|c</div>d}}e
13866 <p>a</p><div>bc</div><p>de</p>
13870 Templates: Ugly templates: 3. newline-only template parameter
13879 # This looks like a bug: a single newline triggers p/br for some reason.
13881 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13890 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13891 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13893 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13899 <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">
13900 </span><table about="#mwt1">
13904 # T66017 -- ugly wikitext with fostered content generates two template ranges
13905 # that are "identical" and generate nesting cycles in the algorithm
13907 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13909 {{echo|<table><tr><td><table>}}
13913 <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"}'>
13914 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13915 </table></td></tr></tbody></table>
13919 Templates: Parameters substituted at the top-level
13921 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13925 <p><i>who</i> me? <b>never!</b>
13929 <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>
13931 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13935 Templates: Param with empty arg in the final position
13939 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13943 Parser Functions: 1. Simple example
13952 Parser Functions: 2. Nested use (only outermost should be marked up)
13960 ## Note that the templates inside the references are not wrapped
13962 Template nested in extension tag in template
13964 title=[[Main Page]]
13967 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13968 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13969 {{echo|hi<ref>-{ho|{{echo|hi}}}-</ref>}}
13972 <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>
13973 <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>
13974 <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>
13975 <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" href="http://test.com?q=ho" class="external autonumber"></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>
13979 ### Pre-save transform tests
13983 pre-save transform: subst:
13989 This is a test template
13993 pre-save transform: normal template
14003 pre-save transform: nonexistent template
14007 {{thistemplatedoesnotexist}}
14009 {{thistemplatedoesnotexist}}
14013 pre-save transform: subst magic variables
14022 # This is T2089, which I fixed. -- wtm
14024 pre-save transform: subst: templates with parameters
14028 {{subst:paramtest|param="something else"}}
14030 This is a test template with parameter "something else"
14034 Template:nowikitest
14036 <nowiki>'''not wiki'''</nowiki>
14040 pre-save transform: nowiki in subst (T3188)
14044 {{subst:nowikitest}}
14046 <nowiki>'''not wiki'''</nowiki>
14050 Template:commenttest
14052 This template has <!-- a comment --> in it.
14056 pre-save transform: comment in subst (T3936)
14060 {{subst:commenttest}}
14062 This template has <!-- a comment --> in it.
14066 pre-save transform: unclosed tag
14070 <nowiki>'''not wiki'''
14072 <nowiki>'''not wiki'''
14076 pre-save transform: mixed tag case
14080 <NOwiki>'''not wiki'''</noWIKI>
14082 <NOwiki>'''not wiki'''</noWIKI>
14086 pre-save transform: unclosed comment in <nowiki>
14090 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
14092 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
14095 # Leading @ in this template definition works around a limitation
14096 # in parsoid's parserTests which otherwise strips the <span> from the
14097 # result (confusing it for a template wrapper)
14101 @<span onmouseover="alert('crap')">Oh no</span>
14105 (confirming safety of fix for subst T3936)
14107 {{Template:dangerous}}
14109 <p>@<span>Oh no</span>
14114 pre-save transform: comment containing gallery (T7024)
14118 <!-- <gallery>data</gallery> -->
14120 <!-- <gallery>data</gallery> -->
14124 pre-save transform: comment containing extension
14128 <!-- <tag>data</tag> -->
14130 <!-- <tag>data</tag> -->
14134 pre-save transform: comment containing nowiki
14138 <!-- <nowiki>data</nowiki> -->
14140 <!-- <nowiki>data</nowiki> -->
14144 pre-save transform: <noinclude> in subst (T5298)
14154 pre-save transform: <onlyinclude> in subst (T5298)
14158 {{subst:Includes2}}
14166 {{<includeonly>subst:</includeonly>Includes}}
14170 Template:SafeSubstTest
14172 {{<includeonly>safesubst:</includeonly>Includes}}
14176 T24297: safesubst: works during PST
14180 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
14186 T24297: safesubst: works during normal parse
14195 subst: does not work during normal parse
14199 <p>{{subst:Includes}}
14204 pre-save transform: context links ("pipe trick")
14208 [[Article (context)|]]
14211 [[Bar:Article (context)|]]
14212 [[:Bar:Article (context)|]]
14214 [[|Article (context)]]
14218 [[Article (context)|Article]]
14219 [[Bar:Article|Article]]
14220 [[:Bar:Article|Article]]
14221 [[Bar:Article (context)|Article]]
14222 [[:Bar:Article (context)|Article]]
14224 [[Article (context)]]
14225 [[Bar:X (Y) Z|X (Y) Z]]
14226 [[:Bar:X (Y) Z|X (Y) Z]]
14230 pre-save transform: context links ("pipe trick") with interwiki prefix
14234 [[interwiki:Article|]]
14235 [[:interwiki:Article|]]
14236 [[interwiki:Bar:Article|]]
14237 [[:interwiki:Bar:Article|]]
14239 [[interwiki:Article|Article]]
14240 [[:interwiki:Article|Article]]
14241 [[interwiki:Bar:Article|Bar:Article]]
14242 [[:interwiki:Bar:Article|Bar:Article]]
14246 pre-save transform: context links ("pipe trick") with parens in title
14248 pst title=[[Somearticle (context)]]
14252 [[Article (context)|Article]]
14256 pre-save transform: context links ("pipe trick") with comma in title
14258 pst title=[[Someplace, Somewhere]]
14261 [[Otherplace, Elsewhere|]]
14262 [[Otherplace, Elsewhere, Anywhere|]]
14264 [[Otherplace, Somewhere|Otherplace]]
14265 [[Otherplace, Elsewhere|Otherplace]]
14266 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
14270 pre-save transform: context links ("pipe trick") with parens and comma
14272 pst title=[[Someplace (IGNORED), Somewhere]]
14275 [[Otherplace (place), Elsewhere|]]
14277 [[Otherplace, Somewhere|Otherplace]]
14278 [[Otherplace (place), Elsewhere|Otherplace]]
14282 pre-save transform: context links ("pipe trick") with comma and parens
14284 pst title=[[Who, me? (context)]]
14287 [[Me, Myself, and I (1937 song)|]]
14289 [[Yes, you. (context)|Yes, you.]]
14290 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
14294 pre-save transform: context links ("pipe trick") with namespace
14296 pst title=[[Ns:Somearticle]]
14300 [[Ns:Article|Article]]
14304 pre-save transform: context links ("pipe trick") with namespace and parens
14306 pst title=[[Ns:Somearticle (context)]]
14310 [[Ns:Article (context)|Article]]
14314 pre-save transform: context links ("pipe trick") with namespace and comma
14316 pst title=[[Ns:Somearticle, Context, Whatever]]
14320 [[Ns:Article, Context, Whatever|Article]]
14324 pre-save transform: context links ("pipe trick") with namespace, comma and parens
14326 pst title=[[Ns:Somearticle, Context (context)]]
14330 [[Ns:Article (context)|Article]]
14334 pre-save transform: context links ("pipe trick") with namespace, parens and comma
14336 pst title=[[Ns:Somearticle (IGNORED), Context]]
14340 [[Ns:Article, Context|Article]]
14344 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14348 [[Article(context)|]]
14349 [[Bar:Article(context)|]]
14350 [[:Bar:Article(context)|]]
14351 [[|Article(context)]]
14355 [[Article(context)|Article]]
14356 [[Bar:Article(context)|Article]]
14357 [[:Bar:Article(context)|Article]]
14358 [[Article(context)]]
14359 [[Bar:X(Y)Z|X(Y)Z]]
14360 [[:Bar:X(Y)Z|X(Y)Z]]
14364 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14368 [[Article (context)|]]
14369 [[Bar:Article (context)|]]
14370 [[:Bar:Article (context)|]]
14371 [[|Article (context)]]
14375 [[Article (context)|Article]]
14376 [[Bar:Article (context)|Article]]
14377 [[:Bar:Article (context)|Article]]
14378 [[Article (context)]]
14379 [[Bar:X (Y) Z|X (Y) Z]]
14380 [[:Bar:X (Y) Z|X (Y) Z]]
14384 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14388 [[Article(context)|]]
14389 [[Bar:Article(context)|]]
14390 [[:Bar:Article(context)|]]
14391 [[|Article(context)]]
14395 [[Article(context)|Article]]
14396 [[Bar:Article(context)|Article]]
14397 [[:Bar:Article(context)|Article]]
14398 [[Article(context)]]
14399 [[Bar:X(Y)Z|X(Y)Z]]
14400 [[:Bar:X(Y)Z|X(Y)Z]]
14404 pre-save transform: context links ("pipe trick") with commas (T23660)
14408 [[Article (context), context|]]
14409 [[Article (context),context|]]
14410 [[Bar:Article (context), context|]]
14411 [[Bar:Article (context),context|]]
14412 [[:Bar:Article (context), context|]]
14413 [[:Bar:Article (context),context|]]
14415 [[Article (context), context|Article]]
14416 [[Article (context),context|Article]]
14417 [[Bar:Article (context), context|Article]]
14418 [[Bar:Article (context),context|Article]]
14419 [[:Bar:Article (context), context|Article]]
14420 [[:Bar:Article (context),context|Article]]
14424 Parsoid: backwards pipe trick
14431 <p>[[|<b>bar</b>]]</p>
14435 pre-save transform: trim trailing empty lines
14439 Empty lines are trimmed
14445 Empty lines are trimmed
14449 pre-save transform: Signature expansion
14456 * <noinclude>~~~</noinclude>
14457 * <includeonly>~~~</includeonly>
14458 * <onlyinclude>~~~</onlyinclude>
14460 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14461 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14462 * 00:02, 1 January 1970 (UTC)
14463 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14464 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14465 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14470 ParserOutput flags from signature expansion (T84843)
14477 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14478 flags=user-signature
14483 pre-save transform: Signature expansion in nowiki tags (T2093)
14489 <nowiki>~~~~</nowiki>
14491 <includeonly><nowiki>~~~~</nowiki></includeonly>
14493 <noinclude><nowiki>~~~~</nowiki></noinclude>
14495 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14497 {{subst:Foo}} shall be converted to FOO
14499 As well as inside noinclude/onlyinclude
14500 <noinclude>{{subst:Foo}}</noinclude>
14501 <onlyinclude>{{subst:Foo}}</onlyinclude>
14503 But not inside includeonly
14504 <includeonly>{{subst:Foo}}</includeonly>
14508 <nowiki>~~~~</nowiki>
14510 <includeonly><nowiki>~~~~</nowiki></includeonly>
14512 <noinclude><nowiki>~~~~</nowiki></noinclude>
14514 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14516 FOO shall be converted to FOO
14518 As well as inside noinclude/onlyinclude
14519 <noinclude>FOO</noinclude>
14520 <onlyinclude>FOO</onlyinclude>
14522 But not inside includeonly
14523 <includeonly>{{subst:Foo}}</includeonly>
14527 Parsoid: Recognize nowiki with trailing space in tags
14531 <nowiki ><div>[[foo]]</nowiki >
14539 <p><div>[[foo]]
14540 </p><p>a<nowiki / >b
14542 </p><p>e<nowiki/ >f
14545 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14547 <p>a<nowiki / >b</p>
14549 <p>c<span typeof="mw:Nowiki"></span>d</p>
14551 <p>e<nowiki/ >f</p>
14555 Parsoid: Recognize nowiki with odd capitalization
14559 <noWikI ><div>[[foo]]</Nowiki >
14561 <p><div>[[foo]]
14564 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14569 Parsoid: Escape nowiki with trailing space in tags
14573 <p><nowiki > foo </nowiki ></p>
14574 <p>a<nowiki />b</p>
14575 <p>c<nowiki/ >d</p>
14577 <nowiki > foo </nowiki >
14585 Parsoid: Escape weird noWikI capitalizations
14589 <p><noWikI > foo </NoWikI ></p>
14591 <noWikI > foo </NoWikI >
14595 ### Message transform tests
14598 message transform: magic variables
14608 message transform: should not transform wiki markup
14618 message transform: <noinclude> in transcluded template (T6926)
14628 message transform: <onlyinclude> in transcluded template (T6926)
14638 {{#special:}} page name, known
14642 {{#special:Recentchanges}}
14644 Special:RecentChanges
14648 {{#special:}} page name with subpage, known
14652 {{#special:Recentchanges/param}}
14654 Special:RecentChanges/param
14658 {{#special:}} page name, unknown
14662 {{#special:foobar nonexistent}}
14664 Special:Foobar nonexistent
14668 {{#speciale:}} page name, known
14672 {{#speciale:Recentchanges}}
14674 Special:RecentChanges
14678 {{#speciale:}} page name with subpage, known
14682 {{#speciale:Recentchanges/param}}
14684 Special:RecentChanges/param
14688 {{#speciale:}} page name, unknown
14692 {{#speciale:foobar nonexistent}}
14694 Special:Foobar_nonexistent
14700 ### For Parsoid-specific tests, see
14701 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14706 parsoid=wt2html,wt2wt,html2html
14708 [[Image:foobar.jpg]]
14710 <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>
14713 <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>
14717 Serialize simple image with span wrapper
14721 <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>
14723 [[File:Foobar.jpg]]
14727 Simple image (using File: namespace, now canonical)
14729 [[File:Foobar.jpg]]
14731 <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>
14734 <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>
14738 Right-aligned image
14740 [[File:Foobar.jpg|right]]
14742 <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>
14744 <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>
14750 [[File:Foobar.jpg|right|Caption text]]
14752 <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>
14754 <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>
14758 Image with caption, T55312 #1
14760 [[File:Foobar.jpg|right|Caption page stuff]]
14762 <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>
14764 <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>
14768 Image with caption, T55312 #2
14770 [[File:Foobar.jpg|right|Caption page=]]
14772 <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>
14774 <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>
14778 Image with caption, T55312 #3
14780 [[File:Foobar.jpg|right|Caption page=stuff]]
14782 <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>
14784 <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>
14788 Image caption with pipe entity
14790 [[File:Foobar.jpg|thumb|one | two]]
14791 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14793 <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>
14794 <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>
14796 <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>
14797 <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>
14801 Allow empty links in image captions (T62753)
14805 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14810 <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>
14812 <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>
14814 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14815 </figcaption></figure>
14819 Titles in unlinked images (T23454)
14821 [[File:Foobar.jpg|link=|stuff]]
14823 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" title="stuff" width="1941" height="220" />
14826 <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>
14830 Link with empty target
14839 Image with link trail
14841 Linktrails should not work for images: [[File:Foobar.jpg]]s
14843 <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
14846 <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>
14850 Image with empty attribute
14852 parsoid=wt2html,wt2wt,html2html
14854 [[File:Foobar.jpg|right||Caption text]]
14856 <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>
14858 <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>
14862 1. Block image with individual attributes from templates
14864 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14866 <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>
14868 <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>
14872 2. Block Image with individual attributes from templates
14874 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14876 <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>
14878 <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>
14882 3. Inline image with individual attributes from templates
14884 [[File:Foobar.jpg|{{echo|50px}}]]
14886 <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>
14889 <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>
14892 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14893 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14895 Image with multiple attributes from the same template
14897 [[File:Foobar.jpg|{{image_attribs}}]]
14899 <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>
14901 <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>
14905 Image with link tails
14909 123[[File:Foobar.jpg]]456
14910 123[[File:Foobar.jpg|right]]456
14911 123[[File:Foobar.jpg|thumb]]456
14913 <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
14915 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
14916 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
14918 <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
14920 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
14921 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>
14923 <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>
14924 <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
14925 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>
14929 Image with multiple captions -- only last one is accepted
14931 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14933 <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>
14935 <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>
14939 Image with multiple widths -- use last
14941 [[File:Foobar.jpg|200px|300px|caption]]
14943 <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>
14946 <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>
14950 Image with multiple alignments -- use first (T50664)
14954 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14956 [[File:Foobar.jpg|middle|text-top|caption]]
14958 <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>
14959 <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>
14962 <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>
14963 <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>
14967 Image with width attribute at different positions
14969 [[File:Foobar.jpg|200px|right|Caption]]
14970 [[File:Foobar.jpg|right|200px|Caption]]
14971 [[File:Foobar.jpg|right|Caption|200px]]
14973 <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>
14974 <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>
14975 <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>
14977 <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>
14978 <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>
14979 <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>
14982 # a sad bit of backward-compatibility
14984 Image with size specified with pxpx (T15500, T53628)
14986 parsoid=wt2html,wt2wt,html2html
14988 [[File:Foobar.jpg|20pxpx]]
14989 [[File:Foobar.jpg|200x20pxpx]]
14991 <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>
14992 <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>
14995 <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>
14999 Image with link parameter, wiki target
15001 [[File:Foobar.jpg|link=Main Page]]
15003 <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>
15006 <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>
15009 # parsoid T51293 (part 1)
15011 Image with link parameter, URL target
15013 [[File:Foobar.jpg|link=http://example.com/]]
15015 <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>
15018 <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>
15021 # parsoid T51293 (part 2)
15023 Image with link parameter, protocol-less URL target
15025 [[File:Foobar.jpg|link=//example.com/]]
15027 <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>
15030 <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>
15034 Escaping non-block captions (T107435)
15037 "modes": ["wt2wt"],
15039 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
15043 [[Image:Foobar.jpg|caption]]
15045 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
15048 # wgExternalLinkTarget not supported by Parsoid
15050 Image with link parameter, wgExternalLinkTarget
15052 [[Image:foobar.jpg|link=http://example.com/]]
15054 wgExternalLinkTarget='foobar'
15056 <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>
15061 Image with link parameter, wgNoFollowLinks set to false
15063 [[Image:foobar.jpg|link=http://example.com/]]
15065 wgNoFollowLinks=false
15067 <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>
15072 Image with link parameter, wgNoFollowDomainExceptions
15074 [[Image:foobar.jpg|link=http://example.com/]]
15076 wgNoFollowDomainExceptions='example.com'
15078 <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>
15082 # wgExternalLinkTarget not supported by Parsoid
15084 Image with link parameter, wgExternalLinkTarget, unnamed parameter
15086 [[Image:foobar.jpg|link=http://example.com/|Title]]
15088 wgExternalLinkTarget='foobar'
15090 <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>
15095 Image with empty link parameter
15097 [[File:Foobar.jpg|link=]]
15099 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" />
15102 <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>
15106 Image with link parameter (wiki target) and unnamed parameter
15108 [[File:Foobar.jpg|link=Main_Page|Title]]
15110 <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>
15113 <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>
15117 Image with link parameter (URL target) and unnamed parameter
15119 [[File:Foobar.jpg|link=http://example.com/|Title]]
15121 <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>
15124 <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>
15128 Thumbnail image with link parameter
15131 parsoid=wt2html,wt2wt,html2html
15133 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
15135 <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>
15137 <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>
15141 Manually-specified thumbnail image
15145 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
15147 <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>
15149 <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>
15153 Manually-specified thumbnail image (backwards compat)
15158 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
15160 <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>
15162 <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>
15166 Manually-specified thumbnail image with explicit link to wiki page
15169 parsoid=wt2html,wt2wt,html2html
15171 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
15173 <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>
15175 <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>
15179 Manually-specified thumbnail image with explicit link to url
15182 parsoid=wt2html,wt2wt,html2html
15184 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
15186 <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>
15188 <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>
15192 Manually-specified thumbnail image with explicit no link
15195 parsoid=wt2html,wt2wt,html2html
15197 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
15199 <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>
15201 <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>
15205 Manually-specified thumbnail image with explicit link and alt text
15208 parsoid=wt2html,wt2wt,html2html
15210 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
15212 <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>
15214 <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>
15218 Image with frame and link
15220 parsoid=wt2html,wt2wt,html2html
15222 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
15224 <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>
15226 <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>
15230 Image with frame and link and explicit alt
15232 parsoid=wt2html,wt2wt,html2html
15234 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
15236 <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>
15238 <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>
15242 Image with wiki markup in implicit alt
15244 [[Image:Foobar.jpg|testing '''bold''' in alt]]
15246 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
15248 <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>
15249 </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>
15252 <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>
15254 <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>
15258 Alt image option should handle most kinds of wikitext without barfing
15260 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
15262 <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>
15264 <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>
15268 Ampersand in alt attribute (T206940)
15270 [[File:Foobar.jpg|alt=&amp;]]
15272 <!-- consistency with gallery extension -->
15274 File:Foobar.jpg|alt=&amp;
15277 <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>
15279 <ul class="gallery mw-gallery-traditional">
15280 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15281 <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>
15282 <div class="gallerytext">
15287 <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>
15289 <!-- consistency with gallery extension -->
15290 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt5" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15291 <li class="gallerybox" style="width: 155px;">
15292 <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>
15293 <div class="gallerytext"></div>
15298 ## FIXME: The inconsistency in the gallery extension on the php side is T49646
15300 Link with encoded pipe in alt option
15303 "modes": ["wt2html", "html2html"]
15306 [[File:Foobar.jpg|alt=http://testing.123?4=5|6|caption]]
15308 <!-- consistency with gallery extension -->
15310 File:Foobar.jpg|alt=http://testing.123?4=5|6|caption
15313 <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>
15315 <ul class="gallery mw-gallery-traditional">
15316 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15317 <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>
15318 <div class="gallerytext">
15323 <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>
15325 <!-- consistency with gallery extension -->
15326 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt5" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15327 <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>
15331 Italics markup in alt attribute (T206940)
15333 parsoid=wt2html,html2html
15335 [[File:Foobar.jpg|alt=''x''|caption]]
15337 <!-- consistency with gallery extension -->
15339 File:Foobar.jpg|alt=''x''|caption
15342 <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>
15344 <ul class="gallery mw-gallery-traditional">
15345 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15346 <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>
15347 <div class="gallerytext">
15354 <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>
15356 <!-- consistency with gallery extension -->
15357 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt5" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15358 <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>
15362 ## FIXME: This test can be dropped when Parsoid content versions 2.0.0 / 1.8.0
15363 ## are no longer in storage.
15365 Nowiki markup in alt attribute (T206940)
15369 [[File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption]]
15371 <!-- consistency with gallery extension -->
15373 File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption
15376 <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>
15378 <ul class="gallery mw-gallery-traditional">
15379 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15380 <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>
15381 <div class="gallerytext">
15388 <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>
15390 <!-- consistency with gallery extension -->
15391 <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"}}'>
15392 <li class="gallerybox" style="width: 155px;">
15393 <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>
15394 <div class="gallerytext">caption</div>
15400 Nowiki markup in alt attribute (edited html, no data-parsoid) (T206940)
15402 [[File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption]]
15404 <!-- consistency with gallery extension -->
15406 File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption
15409 <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>
15411 <ul class="gallery mw-gallery-traditional">
15412 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15413 <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>
15414 <div class="gallerytext">
15421 <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>
15423 <!-- consistency with gallery extension -->
15424 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt9" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15425 <li class="gallerybox" style="width: 155px;">
15426 <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>
15427 <div class="gallerytext">caption</div>
15432 ## FIXME: This test can be dropped when Parsoid content versions 2.0.0 / 1.8.0
15433 ## are no longer in storage.
15435 Ampersand in link attribute (T206940)
15439 [[File:Foobar.jpg|link=Foo & bar]]
15441 <!-- consistency with gallery extension -->
15443 File:Foobar.jpg|link=Foo & bar
15446 <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>
15448 <ul class="gallery mw-gallery-traditional">
15449 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15450 <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>
15451 <div class="gallerytext">
15456 <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>
15458 <!-- consistency with gallery extension -->
15459 <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"}}'>
15460 <li class="gallerybox">
15461 <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>
15462 <div class="gallerytext"></div>
15468 Ampersand in link attribute (edited html, no data-parsoid) (T206940)
15470 [[File:Foobar.jpg|link=Foo_&_bar]]
15472 <!-- consistency with gallery extension -->
15474 File:Foobar.jpg|link=Foo_&_bar
15477 <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>
15479 <ul class="gallery mw-gallery-traditional">
15480 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15481 <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>
15482 <div class="gallerytext">
15487 <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>
15489 <!-- consistency with gallery extension -->
15490 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15491 <li class="gallerybox">
15492 <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>
15493 <div class="gallerytext"></div>
15499 Italics markup in link attribute (T206940)
15501 parsoid=wt2html,html2html
15505 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15506 [[File:Foobar.jpg|link=Foo''s bar''s|caption1]]
15508 [[File:Foobar.jpg|link=''Main Page''|caption2]]
15510 <!-- consistency with gallery extension -->
15512 File:Foobar.jpg|link=Foo''s bar''s|caption1
15513 File:Foobar.jpg|link=''Main Page''|caption2
15516 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="Foo''s bar''s">Foo''s bar''s</a>
15517 </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>
15518 </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>
15520 <ul class="gallery mw-gallery-traditional">
15521 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15522 <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>
15523 <div class="gallerytext">
15528 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15529 <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>
15530 <div class="gallerytext">
15537 <p><a rel="mw:WikiLink" href="./Foo''s_bar''s" title="Foo''s bar''s">Foo''s bar''s</a></p>
15539 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15540 <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>
15542 <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>
15544 <!-- consistency with gallery extension -->
15545 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15546 <li class="gallerybox">
15547 <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>
15548 <div class="gallerytext">caption1</div>
15550 <li class="gallerybox">
15551 <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>
15552 <div class="gallerytext">caption2</div>
15557 ## FIXME: This test can be dropped when Parsoid content versions 2.0.0 / 1.8.0
15558 ## are no longer in storage.
15560 Nowiki markup in link attribute (T206940)
15564 [[File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption]]
15566 <!-- consistency with gallery extension -->
15568 File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption
15571 <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>
15573 <ul class="gallery mw-gallery-traditional">
15574 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15575 <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>
15576 <div class="gallerytext">
15583 <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>
15585 <!-- consistency with gallery extension -->
15586 <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"}}'>
15587 <li class="gallerybox">
15588 <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>
15589 <div class="gallerytext">caption</div>
15595 Nowiki markup in link attribute (edited html, no data-parsoid) (T206940)
15597 [[File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption]]
15599 <!-- consistency with gallery extension -->
15601 File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption
15604 <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>
15606 <ul class="gallery mw-gallery-traditional">
15607 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15608 <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>
15609 <div class="gallerytext">
15616 <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>
15618 <!-- consistency with gallery extension -->
15619 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15620 <li class="gallerybox">
15621 <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>
15622 <div class="gallerytext">caption</div>
15628 HTML entity prefix in link markup (T209236)
15630 [[File:Foobar.jpg|link=https://example.com?foo¶ms=bar]]
15632 <!-- consistency with gallery extension -->
15634 File:Foobar.jpg|link=https://example.com?foo¶ms=bar
15637 <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>
15639 <ul class="gallery mw-gallery-traditional">
15640 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15641 <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>
15642 <div class="gallerytext">
15647 <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>
15649 <!-- consistency with gallery extension -->
15650 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15651 <li class="gallerybox">
15652 <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>
15653 <div class="gallerytext"></div>
15659 Image with table with attributes in caption
15661 parsoid=wt2html,html2html
15663 [[File:Foobar.jpg|thumb|
15670 <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>
15671 <table class="123">
15672 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
15675 </figcaption></figure>
15679 Image with table with rows from templates in caption
15681 [[File:Foobar.jpg|thumb|
15687 <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>
15689 <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>
15691 </figcaption></figure>
15695 Image with nested tables in caption
15697 [[File:Foobar.jpg|thumb|Foo<br />
15706 <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}'/>
15710 <tbody><tr><td>z</td></tr>
15711 </tbody></table></td></tr>
15713 </figcaption></figure>
15717 Image with heading and horizontal rule in caption
15719 [[File:Foobar.jpg|thumb|
15725 <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>
15727 <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>
15728 <h3 id="Testing">Testing</h3>
15730 <hr data-parsoid='{"extra_dashes":10}'/>
15731 </figcaption></figure>
15734 ###################
15735 # Conflicting image format options.
15736 # First option specified should 'win'.
15737 # All three cases in each test should be identical.
15740 Image with 'frameless' first.
15742 parsoid=wt2html,wt2wt,html2html
15744 [[File:Foobar.jpg|frameless|caption]]
15746 [[File:Foobar.jpg|frameless|frame|caption]]
15748 [[File:Foobar.jpg|frameless|thumb|caption]]
15750 <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>
15751 </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>
15752 </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>
15755 <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>
15756 <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>
15757 <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>
15761 Image with 'frame' first.
15763 parsoid=wt2html,wt2wt,html2html
15765 [[File:Foobar.jpg|frame|caption]]
15766 [[File:Foobar.jpg|frame|frameless|caption]]
15767 [[File:Foobar.jpg|frame|thumb|caption]]
15769 <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>
15770 <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>
15771 <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>
15773 <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>
15774 <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>
15775 <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>
15779 Image with 'thumb' first.
15781 parsoid=wt2html,wt2wt,html2html
15783 [[File:Foobar.jpg|thumb|caption]]
15784 [[File:Foobar.jpg|thumb|frameless|caption]]
15785 [[File:Foobar.jpg|thumb|frame|caption]]
15787 <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>
15788 <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>
15789 <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>
15791 <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>
15792 <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>
15793 <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>
15796 ###################
15798 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15799 # and https://phabricator.wikimedia.org/T64258
15800 # Foobar has actual size of 1941x220
15801 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15802 # a scalable format.
15803 # 2. Framed images always ignore size options; always render at default size.
15804 # 3. "Unspecified format" and border are the only types which can be
15808 Image: unspecified format and border enlarge
15810 parsoid=wt2html,wt2wt,html2html
15812 [[File:Foobar.jpg|2000px]]
15814 [[File:Foobar.jpg|border|2000px]]
15816 <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>
15817 </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>
15820 <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>
15821 <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>
15825 Image: "unspecified format" and border reduce
15827 parsoid=wt2html,wt2wt,html2html
15829 [[File:Foobar.jpg|1000px]]
15831 [[File:Foobar.jpg|border|1000px]]
15833 <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>
15834 </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>
15837 <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>
15838 <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>
15842 Image: thumbs reduce
15844 parsoid=wt2html,wt2wt,html2html
15846 [[File:Foobar.jpg|thumb|50px]]
15848 <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>
15850 <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>
15854 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15856 parsoid=wt2html,wt2wt,html2html
15858 [[File:Foobar.jpg|thumb|2000px]]
15860 [[File:Foobar.svg|thumb|2000px]]
15862 <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>
15863 <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>
15865 <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>
15866 <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>
15870 Image: frameless can reduce in size
15872 parsoid=wt2html,wt2wt,html2html
15874 [[File:Foobar.jpg|frameless|50px]]
15876 <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>
15879 <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>
15883 Image: bitmap frameless can't be enlarged past original size, but vector can
15885 parsoid=wt2html,wt2wt,html2html
15887 [[File:Foobar.jpg|frameless|2000px]]
15889 [[File:Foobar.svg|frameless|2000px]]
15891 <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>
15892 </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>
15895 <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>
15896 <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>
15900 Image: framed images are always unscaled.
15902 parsoid=wt2html,wt2wt,html2html
15904 [[File:Foobar.jpg|frame]]
15906 [[File:Foobar.jpg|frame|50px]]
15908 [[File:Foobar.jpg|frame|50x50px]]
15910 [[File:Foobar.jpg|frame|2000px]]
15912 <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>
15913 <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>
15914 <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>
15915 <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>
15917 <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>
15918 <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>
15919 <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>
15920 <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>
15923 ###################
15926 Link to image page- image page normally doesn't exist, hence edit link
15927 Add test with existing image page
15928 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15932 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15937 T20784 Link to non-existent image page with caption should use caption as link text
15939 [[:Image:test|caption]]
15941 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15946 Frameless image caption with a free URL
15948 [[File:Foobar.jpg|http://example.com]]
15950 <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>
15953 <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>
15957 Thumbnail image caption with a free URL
15961 [[File:Foobar.jpg|thumb|http://example.com]]
15963 <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>
15965 <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" href="http://example.com" class="external free">http://example.com</a></figcaption></figure>
15969 Thumbnail image caption with a free URL and explicit alt
15972 parsoid=wt2html,wt2wt,html2html
15974 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15976 <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>
15978 <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" href="http://example.com" class="external free">http://example.com</a></figcaption></figure>
15982 SVG thumbnails with no language set
15985 [[File:Foobar.svg|thumb|caption]]
15987 <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>
15989 <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>
15993 SVG thumbnails with language de
15995 parsoid=wt2html,wt2wt,html2html
15997 [[File:Foobar.svg|thumb|caption|lang=de]]
15999 <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>
16001 <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>
16005 SVG thumbnails with invalid language code
16007 parsoid=wt2html,wt2wt,html2html
16009 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
16011 <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>
16013 <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>
16017 SVG thumbnails in page language
16021 [[File:Foobar.svg]] [[File:Foobar.svg|lang=en]]
16023 <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>
16028 SVG thumbnails in page language not present in the file
16032 [[File:Foobar.svg]] [[File:Foobar.svg|lang=ru]]
16034 <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>
16039 T3887: A ISBN with a thumbnail
16041 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
16043 <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>
16045 <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>
16049 T3887: A RFC with a thumbnail
16051 [[File:Foobar.jpg|thumb|This is RFC 12354]]
16053 <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>
16055 <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>
16059 T3887: A mailto link with a thumbnail
16061 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
16063 <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>
16065 <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" href="mailto:nobody@example.com" class="external free">mailto:nobody@example.com</a></figcaption></figure>
16068 # Pending resolution to T2368
16070 T2648: Frameless image caption with a link
16072 [[File:Foobar.jpg|text with a [[link]] in it]]
16074 <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>
16077 <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>
16081 T2648: Frameless image caption with a link (suffix)
16083 [[File:Foobar.jpg|text with a [[link]]foo in it]]
16085 <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>
16088 <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>
16092 T2648: Frameless image caption with an interwiki link
16094 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
16096 <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>
16099 <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>
16103 T2648: Frameless image caption with a piped interwiki link
16105 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
16107 <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>
16110 <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>
16114 T107474: Frameless image caption with <nowiki>
16116 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
16118 <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>
16122 Escape HTML special chars in image alt text
16124 [[File:Foobar.jpg|& < > "]]
16126 <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>
16129 <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>
16133 Escape HTML special chars in image alt text with LanguageConverter
16137 [[File:Foobar.jpg|& < > "]]
16139 <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>
16142 <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>
16146 Entities in file name and attributes
16148 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
16150 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
16153 <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>
16157 T2499: Alt text should have Ӓ, not &1234;
16159 [[File:Foobar.jpg|♀]]
16161 <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>
16164 <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>
16168 Broken image caption with link
16170 parsoid=wt2html,wt2wt,html2html
16172 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
16174 <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.
16177 <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>
16181 Image caption containing another image
16183 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
16185 <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>
16187 <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>
16191 Image: caption containing a newline
16193 [[File:Foobar.jpg|This
16196 <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>
16199 <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>
16203 Image: caption containing leading space
16204 (The leading space should not trigger nowiki escaping in wt2wt mode)
16206 [[File:Foobar.jpg|thumb| bar]]
16208 <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>
16210 <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>
16213 # html/php output not have newlines after table, td, th, etc. because
16214 # Linker::makeThumbLink2() replaces the newlines with spaces since
16215 # the table is inside a caption.
16216 # FIXME: Verify if that circa 2004 fix is still required.
16218 Image: caption containing a table
16220 parsoid=wt2html,wt2wt,html2html
16222 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
16228 and some more text.]]
16230 <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>
16232 <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
16235 <tr><th>Foo</th><th>Bar</th></tr>
16238 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
16242 T5090: External links other than http: in image captions
16244 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
16246 <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>
16248 <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" href="irc://example.net" class="external text">irc</a> and <a rel="mw:ExtLink" href="https://example.com" class="external text">Secure</a> ext links in it.</figcaption></figure>
16254 parsoid=wt2html,wt2wt,html2html
16256 [[Image:foobar.jpg|a|class=b]]
16258 <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>
16261 <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>
16265 Localized image handling (1).
16267 parsoid=wt2html,wt2wt,html2html
16270 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
16272 <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>
16274 <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>
16278 Localized image handling (2).
16281 parsoid=wt2html,wt2wt,html2html
16284 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
16286 <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>
16288 <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>
16292 Localized image handling (3).
16297 <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>
16299 [[File:Foobar.jpg|بندانگشتی]]
16303 "border", "frameless" and "class" attributes on an image.
16306 parsoid=wt2html,wt2wt,html2html
16308 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
16310 <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>
16313 <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>
16316 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
16318 Invalid image attributes (T64500)
16321 parsoid=wt2html,wt2wt,html2html
16323 [[File:Foobar.jpg|thumb|float|left|caption]]
16325 [[File:Foobar.jpg|thumb|righ|caption]]
16327 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
16329 <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>
16330 <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>
16331 <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>
16333 <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>
16334 <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>
16335 <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>
16341 #REDIRECT [[File:Barfoo.jpg]]
16344 # FIXME: Parsoid should run this test -- but we'd need to teach the
16345 # mockAPI about the redirected Barfoo.jpg image.
16349 [[Image:Barfoo.jpg]]
16351 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
16355 ## FIXME: Parsoid needs to learn about this flag.
16357 Missing image with uploads disabled
16361 [[File:Foobaz.jpg]]
16363 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
16366 <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>
16369 # Parsoid-specific testing for images
16370 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
16371 # Currently imperfect due to a flaw in the Parsoid testrunner
16373 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
16377 Parsoid-specific image handling - simple image with size and middle alignment
16379 [[File:Foobar.jpg|middle|50px]]
16381 <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>
16385 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
16387 parsoid=wt2wt,wt2html,html2html
16389 [[Image:Foobar.jpg|middle|50px]]
16391 <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>
16395 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
16397 [[File:Foobar.jpg|50px|middle]]
16399 <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>
16403 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
16405 parsoid=wt2html,wt2wt,html2html
16407 [[Image:Foobar.jpg|50px|middle]]
16409 <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>
16413 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
16415 [[File:Foobar.jpg|500x10px|baseline|caption]]
16417 <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>
16421 Parsoid-specific image handling - simple image with border and size spec
16423 [[File:Foobar.jpg|50px|border|caption]]
16425 <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>
16429 Parsoid-specific image handling - thumbnail with halign, valign, and caption
16431 parsoid=wt2html,html2html
16433 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
16435 <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>
16439 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
16441 parsoid=wt2html,html2html
16443 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
16445 <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>
16449 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
16451 parsoid=wt2html,html2html
16453 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
16455 <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>
16459 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
16461 parsoid=wt2html,html2html
16463 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
16465 <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>
16469 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
16471 parsoid=wt2html,wt2wt,html2html
16473 [[File:Foobar.jpg|frame|500x50px|caption]]
16475 <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>
16479 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
16481 parsoid=wt2html,html2html
16483 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
16485 <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>
16489 Parsoid-specific image handling - frameless image with specific size, border, and caption
16491 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
16493 <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>
16497 Parsoid-specific image handling - simple image with a formatted caption
16499 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
16501 <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>
16505 Parsoid-specific image handling - caption with a template in it
16507 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
16509 <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>
16513 Parsoid-specific image handling - caption with unbalanced tags in it
16515 parsoid=wt2html,wt2wt,html2html
16518 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
16522 <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>
16527 Parsoid-specific image handling - empty caption (1)
16529 parsoid=wt2html,wt2wt
16531 [[File:Foobar.jpg|thumb|]]
16533 <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>
16536 # empty captions don't get serialized unless we're in the "round trip" case
16538 Parsoid-specific image handling - empty caption (2)
16542 <figure class="mw-default-size" typeof="mw:Image/Thumb">
16543 <a href="./File:Foobar.jpg">
16544 <img resource="./File:Foobar.jpg"
16545 src="//example.com/images/3/3a/Foobar.jpg"
16546 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
16547 height="25" width="220"/>
16549 <figcaption></figcaption>
16552 [[File:Foobar.jpg|thumb]]
16556 Parsoid-specific image handling - whitespace caption
16558 [[File:Foobar.jpg|thumb| ]]
16560 <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>
16564 Parsoid-specific image handling - lang option
16567 [[File:Foobar.svg|lang=de|caption]]
16571 <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>
16575 ## Edge case bugs in Parsoid from T93580
16577 T93580: 1. Templated <ref> inside block images
16579 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
16583 <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>
16585 <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>
16589 T93580: 2. <ref> inside inline images
16591 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
16595 <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>
16597 <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>
16601 T93580: 3. Templated <ref> inside inline images
16603 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
16607 <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>
16609 <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>
16616 Subpage test/subpage
16624 subpage title=[[Subpage test]]
16628 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
16633 Subpage noslash link
16635 subpage title=[[Subpage test]]
16639 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
16644 Subpage test/1/2/subpage
16650 Relative subpage noslash link
16652 parsoid=wt2wt,wt2html,html2html
16653 subpage title=[[Subpage test/1/2/3/4]]
16659 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
16660 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
16663 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
16664 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
16668 Parsoid: dot-slash prefixed wikilinks
16678 </p><p>[[././baz/]]
16683 </p><p>[[././baz/]]
16688 Render invalid page names as plain text (T53090)
16700 [[foo[http://example.com]xyz]]
16702 [[{{echo|./../foo}}|bar]]
16703 [[{{echo|foo/.}}|bar]]
16704 [[{{echo|foo/..}}|bar]]
16705 [[{{echo|foo~~~~bar}}]]
16706 [[{{echo|foo>bar}}]]
16707 [[{{echo|foo././bar}}]]
16708 [[{{echo|foo{bar}}]]
16709 [[{{echo|foo}bar}}]]
16710 [[{{echo|foo[bar}}]]
16711 [[{{echo|foo]bar}}]]
16712 [[{{echo|foo<bar}}]]
16714 <p>[[./../foo|bar]]
16724 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
16725 </p><p>[[./../foo|bar]]
16738 <p>[[./../foo|bar]]
16748 [[foo<a rel="mw:ExtLink" href="http://example.com" class="external autonumber"></a>xyz]]</p>
16750 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16751 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16752 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16753 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16754 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16755 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16756 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16757 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16758 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16759 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16760 [[<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>
16768 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16773 T2561: {{/Subpage}}
16775 subpage title=[[Page]]
16779 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16787 Category:MediaWiki User's Guide
16795 [[:Category:MediaWiki User's Guide]]
16797 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16806 [[Category:MediaWiki User's Guide]]
16808 cat=MediaWiki_User's_Guide sort=
16810 <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"}}'/>
16814 PAGESINCATEGORY invalid title fatal (r33546 fix)
16816 {{PAGESINCATEGORY:<bogus>}}
16823 Category with different sort key
16827 [[Category:MediaWiki User's Guide|Foo]]
16829 cat=MediaWiki_User's_Guide sort=Foo
16831 <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"}}'/>
16835 Category with identical sort key
16839 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16841 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16843 <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"}}'/>
16847 Category with template-generated sort key
16851 [[Category:MediaWiki User's Guide|MediaWiki {{echo|Foo}} Guide]]
16853 cat=MediaWiki_User's_Guide sort=MediaWiki Foo Guide
16855 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#MediaWiki%20Foo%20Guide" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"mw:sortKey"},{"html":"MediaWiki <span typeof=\"mw:Transclusion\" data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span> Guide"}]]}'/>
16859 Category with empty sort key
16864 [[Category:MediaWiki User's Guide|]]
16866 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16870 Category with empty sort key and parentheses
16875 [[Category:Foo (bar)|]]
16877 [[Category:Foo (bar)|Foo]]
16881 Category with link tail
16886 123[[Category:Foo]]456
16888 123[[Category:Foo]]456
16892 Category with template
16897 [[Category:{{echo|Foo}}]]
16899 [[Category:{{echo|Foo}}]]
16903 Category with template in sort key
16908 [[Category:Foo|{{echo|Bar}}]]
16910 [[Category:Foo|{{echo|Bar}}]]
16914 Category with template in sort key and title
16919 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16921 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16924 ## We used to, but no longer wt2wt this test since the default serializer
16925 ## will normalize all categories to serialize on their own line.
16926 ## This wikitext usage is going to be fairly uncommon in production and
16927 ## selser will take care of preserving formatting in those scenarios.
16929 Category / paragraph interactions
16933 Foo [[Category:Baz]] Bar
16935 Foo [[Category:Baz]]
16943 [[Category:Baz]] Bar
16956 {{echo|[[Category:Baz]]}}
16969 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16970 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16971 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16972 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16973 <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>
16974 <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}}]}'/>
16975 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16978 ## We used to, but no longer wt2wt this test since the default serializer
16979 ## will normalize all categories to serialize on their own line.
16980 ## This wikitext usage is going to be fairly uncommon in production and
16981 ## selser will take care of preserving formatting in those scenarios.
16983 ## The whitespace on the empty line is part of the test. Please do not delete
16985 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16991 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16993 {{echo|[[Category:Foo]] and so should this!}}
16995 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
17000 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
17002 <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>
17005 ## Parsoid will not try to wt2wt this while preserving newlines because
17006 ## it suppresses excess newlines within list items -- and we don't want to
17007 ## introduce a special case just for categories, which is, in reality somewhat
17008 ## odd behavior -- categories are unlikely to be used in list items like this
17009 ## in top-level pages and are only likely to show up in template-generated
17010 ## list items where this RT-ing is a non-issue.
17012 ## The whitespace on the empty line is part of the test. Please do not delete
17014 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
17020 [[Category:Foo]] and this should be part of the same list item
17023 {{echo|[[Category:Foo]] and this should be part of the same list item}}
17025 <ul><li>This and this should be part of the same list item</li>
17026 <li>So should this and this should be part of the same list item</li></ul>
17029 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
17030 <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>
17034 ## Newlines and categories that follow the last item of a list
17035 ## are treated differently because this (list followed by categories)
17036 ## is an extremely common pattern on wikis.
17038 3. Categories and newlines: newline suppression for last list item should RT properly
17059 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
17061 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
17062 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
17064 <dl><dd>c</dd></dl>
17066 <link rel="mw:PageProp/Category" href="./Category:C"/>
17068 <dl><dt>d</dt></dl>
17070 <link rel="mw:PageProp/Category" href="./Category:D"/>
17074 4. Categories and newlines: newline suppression for last list item should RT properly
17082 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
17084 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
17087 ## only wt2html for this to make sure the algo only applies to the rightmost path
17089 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
17102 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
17104 <ul><li>d</li></ul></li></ul>
17105 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
17108 ## We used to, but no longer wt2wt this test since the default serializer
17109 ## will normalize all categories to serialize on their own line.
17110 ## This wikitext usage is going to be fairly uncommon in production and
17111 ## selser will take care of preserving formatting in those scenarios.
17113 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
17117 *a [[Category:Foo]]
17119 <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>
17122 # This test also demonstrates because of newline+category tunneling
17123 # through the list hander, template wrapping doesn't expand to the
17124 # containing list when the list item swallows the category.
17126 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
17131 <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
17132 </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>
17136 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
17140 {{echo|[[Category:Foo]]
17144 <ul><li>a</li></ul>
17146 <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">
17147 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
17148 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
17152 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
17156 [[Category:Bar]]<!--boo1--> <!--boo2-->
17157 [[Category:Baz]]<!--boo3--> <!--boo4-->
17159 <ul><li>a</li></ul>
17161 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
17162 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
17166 Categories and newlines: should behave properly with linkprefix (T87753)
17181 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
17182 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
17186 No regressions on internal links following category (T174639)
17188 parsoid=wt2html,html2html
17190 [[Category:Foo]]<div>a
17195 <a href="/wiki/Foo" title="Foo">Foo</a></div>
17197 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
17199 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
17202 # Note that Parsoid differs slightly from PHP due to T175421
17204 11. Special case where only newlines separate links (T175416)
17206 parsoid=wt2html,html2html
17210 [[Foo]][[es:Alimento]]
17215 <a href="/wiki/Foo" title="Foo">Foo</a>
17216 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
17219 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
17221 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17223 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
17227 Category links with multiple namespaces
17229 [[Category:Project:Foo]]
17231 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
17235 Parsoid: Serialize link to category page with colon escape
17239 [[:Category:Foo|Bar]]
17241 <p><a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Category:Foo</a>
17242 <a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Bar</a>
17246 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
17247 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
17251 # We used to, but no longer wt2wt this test since the default serializer
17252 # will normalize all categories to serialize on their own line.
17253 # This wikitext usage is going to be fairly uncommon in production and
17254 # selser will take care of preventing whitespace insertion if this
17255 # occurs in an article.
17257 # html2html disabled for the same reason (whitespace insertion between
17260 # html2wt disabled because it localizes the "Category" namespace.
17262 Link prefix/suffixes aren't applied to category links
17272 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
17276 Link prefix/suffixes aren't applied to language links
17286 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
17290 Parsoid: Serialize link to file page with colon escape
17294 [[:File:Foo.png|Bar]]
17296 <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>
17297 <a href="/index.php?title=File:Foo.png&action=edit&redlink=1" class="new" title="File:Foo.png (page does not exist)">Bar</a>
17301 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
17302 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
17307 Parsoid: Serialize a genuine category link without colon escape
17310 [[Category:Foo|Bar]]
17313 <link rel="mw:PageProp/Category" href="./Category:Foo">
17314 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
17318 Normalize hrefs properly before testing for invalid link targets (T72894)
17322 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
17324 [[Category:Toxine bactérienne]]
17328 Parsoid: Defaultsort
17330 {{DEFAULTSORT:Foo}}
17332 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
17335 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
17336 # But, this is a limitation of our representation and is documented in
17337 # TemplateHandler.js in processSpecialMagicWord
17339 Parsoid: Defaultsort (template-generated)
17341 {{{{echo|DEFAULTSORT}}:Foo}}
17343 <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"}]]}'/>
17347 ### Inter-language links
17350 Interlanguage links
17358 es:Alimento fr:Nourriture zh:食品
17360 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17361 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
17362 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
17366 Duplicate interlanguage links (T26502)
17377 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
17378 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
17379 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
17380 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
17387 Basic section headings
17394 ===Smaller headline===
17397 <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>
17400 <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>
17403 <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>
17409 Section headings with TOC
17412 ===Subheadline 1===
17413 =====Skipping a level=====
17414 ======Skipping a level======
17418 ===Another headline===
17420 <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>
17422 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
17424 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
17426 <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>
17428 <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>
17435 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
17437 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
17443 <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>
17444 <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>
17445 <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>
17446 <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>
17447 <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>
17450 <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>
17454 TOC anchors don't collide
17462 <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>
17464 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
17465 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
17466 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
17467 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
17471 <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>
17472 <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>
17473 <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>
17474 <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>
17477 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
17478 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
17480 Handling of sections up to level 6 and beyond
17485 ==Level 2 Heading==
17486 ===Level 3 Heading===
17487 ====Level 4 Heading====
17488 =====Level 5 Heading=====
17489 ======Level 6 Heading======
17490 =======Level 7 Heading=======
17491 ========Level 8 Heading========
17492 =========Level 9 Heading=========
17493 ==========Level 10 Heading==========
17495 <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>
17497 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
17499 <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>
17501 <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>
17503 <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>
17505 <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>
17507 <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>
17508 <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>
17509 <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>
17510 <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>
17511 <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>
17525 <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>
17526 <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>
17527 <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>
17528 <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>
17529 <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>
17530 <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>
17531 <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>
17532 <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>
17533 <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>
17534 <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>
17536 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
17537 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
17538 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
17539 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
17540 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
17541 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
17542 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
17543 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
17544 <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>
17545 <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>
17549 TOC regression (T11764)
17553 ====title 1.1.1====
17558 <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>
17560 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17562 <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>
17564 <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>
17567 <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>
17570 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17572 <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>
17578 <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>
17579 <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>
17580 <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>
17581 <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>
17582 <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>
17583 <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>
17587 TOC for heading containing <span id="..."></span> (T96153)
17590 ==<span id="old-anchor"></span>New title==
17592 <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>
17594 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
17598 <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>
17602 TOC with wgMaxTocLevel=3 (T8204)
17608 ====title 1.1.1====
17613 <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>
17615 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17617 <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>
17618 <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>
17621 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17623 <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>
17629 <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>
17630 <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>
17631 <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>
17632 <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>
17633 <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>
17634 <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>
17638 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
17644 ====Section 1.1.1====
17645 ====Section 1.1.1.1====
17648 <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>
17650 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
17652 <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>
17655 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
17659 <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>
17660 <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>
17661 <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>
17662 <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>
17663 <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>
17668 Resolving duplicate section names
17673 <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>
17674 <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>
17678 Resolving duplicate section names with differing case (T12721)
17683 <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>
17684 <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>
17695 Template with sections, __NOTOC__
17702 <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>
17703 <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>
17704 <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>
17705 <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>
17709 __NOEDITSECTION__ keyword
17715 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
17716 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
17720 Link inside a section heading
17722 ==Section with a [[Main Page|link]] in it==
17724 <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>
17728 TOC regression (T14077)
17735 <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>
17737 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17739 <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>
17742 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17746 <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>
17747 <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>
17748 <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>
17752 T3219 URL next to image (good)
17754 http://example.com [[File:Foobar.jpg]]
17756 <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>
17759 <p><a rel="mw:ExtLink" href="http://example.com" class="external free">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>
17762 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17764 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17766 parsoid=wt2html,html2html
17769 The line above must have a trailing space!
17772 But just in case it doesn't...
17774 <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>
17775 <p>The line above must have a trailing space!
17777 <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>
17778 <p>But just in case it doesn't...
17781 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17782 <p>The line above must have a trailing space!</p>
17783 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17785 <p>But just in case it doesn't...</p>
17789 Header with special characters (T27462)
17791 The tooltips shall not show entities to the user (ie. be double escaped)
17808 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17810 <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>
17812 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17813 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17814 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17815 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17816 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17820 <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>
17823 <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>
17826 <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>
17829 <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>
17832 <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>
17836 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17838 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17841 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17844 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17847 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17850 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17855 Header with space, plus and underscore as entity
17857 Id should not contain + for spaces
17859 ==Space between Text==
17862 ==Space-Entity between Text==
17865 ==Plus+between+Text==
17868 ==Plus-Entity+between+Text==
17871 ==Underscore_between_Text==
17874 ==Underscore-Entity_between_Text==
17877 [[#Space between Text]]
17878 [[#Space-Entity between Text]]
17879 [[#Plus+between+Text]]
17880 [[#Plus-Entity+between+Text]]
17881 [[#Underscore_between_Text]]
17882 [[#Underscore-Entity_between_Text]]
17884 <p>Id should not contain + for spaces
17886 <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>
17888 <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>
17889 <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>
17890 <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>
17891 <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>
17892 <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>
17893 <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>
17897 <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>
17900 <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>
17903 <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>
17906 <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>
17909 <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>
17912 <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>
17914 </p><p><a href="#Space_between_Text">#Space between Text</a>
17915 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17916 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17917 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17918 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17919 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17922 <p>Id should not contain + for spaces</p>
17924 <h2 id="Space_between_Text">Space between Text</h2>
17927 <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>
17930 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17933 <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>
17936 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17939 <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>
17942 <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>
17943 <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>
17944 <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>
17945 <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>
17946 <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>
17947 <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>
17950 # Parsoid html2wt disabled because it adds padding spaces around =
17952 Headers with excess '=' characters
17953 (Are similar tests necessary beyond the 1st level?)
17955 parsoid=wt2html,wt2wt,html2html
17959 =''italic'' heading==
17960 ==''italic'' heading=
17962 <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>
17964 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17965 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17966 <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>
17967 <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>
17971 <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>
17972 <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>
17973 <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>
17974 <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>
17976 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17977 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17978 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17979 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17983 HTML headers vs TOC (T25393)
17984 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17996 <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>
17998 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
18000 <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>
18001 <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>
18004 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
18006 <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>
18007 <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>
18013 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
18014 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
18015 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
18016 <h1><span class="mw-headline" id="Header_2">Header 2
18018 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
18019 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
18021 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
18022 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
18023 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
18025 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
18027 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
18028 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
18029 <meta property="mw:PageProp/noeditsection"/>
18033 Single-line or multiline-comments can follow headings
18035 parsoid=wt2html,wt2wt
18043 <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>
18044 <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>
18045 <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>
18047 <h2 id="foo">foo</h2><!---->
18048 <h2 id="bar">bar</h2><!--c1-->
18049 <h2 id="baz">baz</h2><!--
18055 T3219 URL next to image (broken)
18057 http://example.com[[File:Foobar.jpg]]
18059 <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>
18062 <p><a rel="mw:ExtLink" href="http://example.com" class="external free">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>
18066 T3186 news: in the middle of text
18068 http://en.wikinews.org/wiki/Wikinews:Workplace
18070 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
18076 Namespaced link must have a title
18085 Namespaced link must have a title (bad fragment version)
18087 [[Project:#fragment]]
18089 <p>[[Project:#fragment]]
18095 ### HTML tags and HTML attributes
18099 div with no attributes
18101 <div>HTML rocks</div>
18103 <div>HTML rocks</div>
18107 div with double-quoted attribute
18109 <div id="rock">HTML rocks</div>
18111 <div id="rock">HTML rocks</div>
18115 div with single-quoted attribute
18117 <div id='rock'>HTML rocks</div>
18119 <div id="rock">HTML rocks</div>
18123 div with unquoted attribute
18125 <div id=rock>HTML rocks</div>
18127 <div id="rock">HTML rocks</div>
18131 div with illegal double attributes
18133 <div id="a" id="b">HTML rocks</div>
18135 <div id="b">HTML rocks</div>
18139 div with empty attribute value, space before equals
18141 parsoid=wt2html,html2html
18143 <div class =>HTML rocks</div>
18145 <div class="">HTML rocks</div>
18147 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
18151 div with multiple empty attribute values
18153 wgFragmentMode=[ 'html5', 'legacy' ]
18155 parsoid=wt2html,html2html
18157 <div id= title=>HTML rocks</div>
18159 <div id="title=">HTML rocks</div>
18161 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
18164 # FIXME Parsoid doesn't actually match PHP here.
18166 Extension tag in attribute value
18170 <span title="<html><div>123</div></html>">ok</span>
18172 <p><span title="<div>123</div>">ok</span>
18175 <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>
18179 table with multiple empty attribute values
18181 parsoid=wt2html,html2html
18187 <table title="id=">
18192 <table title="id=">
18193 <tbody><tr><td>hi</td></tr>
18198 div with braces in attribute value
18200 <div title="{}">Foo</div>
18202 <div title="{}">Foo</div>
18204 <div title="{}">Foo</div>
18208 div with empty attribute value, no space before equals
18210 parsoid=wt2html,html2html
18212 <div class=>HTML rocks</div>
18214 <div class="">HTML rocks</div>
18216 <div class="">HTML rocks</div>
18220 HTML multiple attributes correction
18222 <p class="error" class="awesome">Awesome!</p>
18224 <p class="awesome">Awesome!</p>
18228 Table multiple attributes correction
18231 !+ class="error" class="awesome"|status
18236 <th class="awesome">status
18243 <DIV ID="x">HTML ROCKS</DIV>
18245 <div id="x">HTML ROCKS</div>
18249 Non-ASCII pseudo-tags are rendered as text
18258 Pseudo-tag with URL 'name' renders as url link
18260 <http://example.com/>
18262 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
18267 text with amp in the middle of nowhere
18271 <p>Remember AT&T?
18276 text with character entity: eacute
18278 I always thought é was a cute letter.
18280 <p>I always thought é was a cute letter.
18285 text with entity-escaped character entity-like string: eacute
18287 I always thought &eacute; was a cute letter.
18289 <p>I always thought &eacute; was a cute letter.
18294 text with undefined character entity: xacute
18296 I always thought &xacute; was a cute letter.
18298 <p>I always thought &xacute; was a cute letter.
18303 Text with HTML5 semicolon-less entity (should not decode)
18310 <p>&ampamp;</p>
18316 <data value="5">five</data>
18317 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18318 <mark>This highlighted text</mark>
18320 <p><data value="5">five</data>
18321 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
18322 <mark>This highlighted text</mark>
18327 HTML tag with leading space is parsed as text
18331 <p>< div>foo< /div>
18335 ## FIXME: The untrimmed attribute in Parsoid is T205737
18337 Element with broken attribute syntax
18341 <div style=" style="123">hi</div>
18344 <div style="style=">hi</div>
18347 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
18348 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
18352 ### Nesting tests (see T43545, T52604, T53081)
18355 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
18356 # Note that html2wt is considerably more difficult if we use <b> in
18357 # the test case, instead of <small>
18359 Ensure that HTML adoption agency algorithm is properly implemented.
18361 <small>X<small>Y</small>Z</small>
18363 <p><small>X<small>Y</small>Z</small>
18367 # This was T43545 in the PHP parser.
18371 <kbd>X<kbd>Y</kbd>Z</kbd>
18373 <p><kbd>X<kbd>Y</kbd>Z</kbd>
18377 # The following cases were T53081 in the PHP parser.
18378 # Note that there are some other nestable tags (b, i, etc) which are
18379 # not covered; see T53081 for discussion.
18384 <em>X<em>Y</em>Z</em>
18386 <p><em>X<em>Y</em>Z</em>
18391 Nesting of <strong>
18393 <strong>X<strong>Y</strong>Z</strong>
18395 <p><strong>X<strong>Y</strong>Z</strong>
18404 <p><q>X<q>Y</q>Z</q>
18411 <ruby>X<ruby>Y</ruby>Z</ruby>
18413 <p><ruby>X<ruby>Y</ruby>Z</ruby>
18420 <bdo>X<bdo>Y</bdo>Z</bdo>
18422 <p><bdo>X<bdo>Y</bdo>Z</bdo>
18434 [[Media:Foobar.jpg]]
18435 [[Media:Video.ogv]]
18436 [[:Media:Video.ogv]]
18438 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
18439 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18440 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18443 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
18444 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv">Media:Video.ogv</a>
18445 <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>
18449 Media link with text
18451 [[Media:Foobar.jpg|A neat file to look at]]
18453 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
18456 <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>
18460 Localized media link
18464 [[Miðill:Foobar.jpg]]
18466 [[Miðill:Foobar.jpg|Icelandic]]
18468 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Miðill:Foobar.jpg</a>
18469 </p><p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Icelandic</a>
18472 <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>
18473 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Icelandic</a></p>
18476 # FIXME: this is still bad HTML tag nesting
18477 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
18478 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
18480 Media link with nasty text
18482 parsoid=wt2html,html2html
18484 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
18486 <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>
18488 <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>
18490 <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>
18494 Media link from missing resource (parsoid-only)
18498 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18500 [[Media:Foobar.jpg|Bat!]]
18504 Media link from missing resource, localized (parsoid-only)
18509 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18511 [[Miðill:Foobar.jpg|Bat!]]
18514 # This is a sanity test to ensure we don't crash or choke when given
18515 # old cached 1.7.0 HTML for media links; we don't require that the
18516 # result be "valid" because wt2wt was completely broken in 1.7.0
18518 Media link from old 1.7.0 DOM spec (crash test, parsoid-only) T198511
18522 <p>This is what Parsoid would emit (and we still handle this HTML fine):</p>
18523 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18524 <p>But VisualEditor would mangle the rel attribute, and give us back this:</p>
18525 <p><a rel="mw:ExtLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18526 <p>But at least we don't crash when trying to handle the mangled HTML!</p>
18528 This is what Parsoid would emit (and we still handle this HTML fine):
18530 [[Media:Foobar.jpg|A neat file to look at]]
18532 But VisualEditor would mangle the rel attribute, and give us back this:
18534 [//example.com/images/3/3a/Foobar.jpg A neat file to look at]
18536 But at least we don't crash when trying to handle the mangled HTML!
18540 Media link to nonexistent file (T3702)
18542 [[Media:No such.jpg]]
18543 [[Media:No_such file.jpg]]
18545 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
18546 <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>
18549 <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>
18550 <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>
18554 Image link to nonexistent file (T3850 - good)
18556 [[File:No_such.jpg]]
18558 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
18561 <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>
18565 :Image link to nonexistent file (T3850 - bad)
18567 [[:Image:No such.jpg]]
18569 <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>
18572 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
18576 Character reference normalization in link text (T3938)
18578 [[Main Page|this&that]]
18580 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
18587 Test for unicode normalization
18589 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
18593 (T21451) Links should refer to the normalized form.
18601 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18602 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18603 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18604 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18605 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18610 Empty attribute crash test (T4067)
18612 <font color="">foo</font>
18614 <p><font color="">foo</font>
18619 Empty attribute crash test single-quotes (T4067)
18621 <font color=''>foo</font>
18623 <p><font color="">foo</font>
18628 Attribute test: equals, then nothing
18630 parsoid=wt2html,html2html
18632 <font color=>foo</font>
18634 <p><font color="">foo</font>
18637 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
18641 Attribute test: unquoted value
18643 parsoid=wt2html,html2html
18645 <font color=x>foo</font>
18647 <p><font color="x">foo</font>
18650 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
18654 Attribute test: unquoted but illegal value (hash)
18656 <font color=#x>foo</font>
18658 <p><font color="#x">foo</font>
18662 # Parsoid does not serialize to empty attribute syntax,
18663 # so wt2wt and html2wt cases are skipped
18665 Attribute test: no value (T54330)
18667 parsoid=wt2html,html2html
18669 <font color>foo</font>
18671 <p><font color="">foo</font>
18674 <p><font color="">foo</font></p>
18678 T4095: link with three closing brackets
18682 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
18685 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
18689 T4095: link with pipe and three closing brackets
18691 [[Main Page|link]]]
18693 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
18696 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
18700 T4095: link with pipe and three closing brackets, version 2
18702 [[Main Page|[http://example.com/]]]
18704 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
18707 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
18716 Template:Dangerous attribute
18718 " onmouseover="alert(document.cookie)
18722 Template:Dangerous style attribute
18724 border-size: expression(alert(document.cookie))
18730 <div style="float: right; {{{1}}}">Magic div</div>
18734 T4304: HTML attribute safety (safe template; regression T4309)
18736 <div title="{{test}}"></div>
18738 <div title="This is a test template"></div>
18740 <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>
18743 # Parsoid has enough context to handle this case
18745 T4304: HTML attribute safety (dangerous template; 2309)
18747 <div title="{{dangerous attribute}}"></div>
18749 <div title=""></div>
18751 <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>
18755 T4304: HTML attribute safety (dangerous style template; 2309)
18757 <div style="{{dangerous style attribute}}"></div>
18759 <div style="/* insecure input */"></div>
18761 <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>
18765 T4304: HTML attribute safety (safe parameter; 2309)
18767 {{div style|width: 200px}}
18769 <div style="float: right; width: 200px">Magic div</div>
18771 <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>
18775 T4304: HTML attribute safety (unsafe parameter; 2309)
18777 {{div style|width: expression(alert(document.cookie))}}
18779 <div style="/* insecure input */">Magic div</div>
18781 <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>
18784 ## Parsoid output here differs; needs investigation.
18786 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
18788 {{div style|"><script>alert(document.cookie)</script>}}
18790 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18793 ## Parsoid output here differs; needs investigation.
18795 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18797 {{div style|" ><script>alert(document.cookie)</script>}}
18799 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18803 T4304: HTML attribute safety (link)
18805 <div title="[[Main Page]]"></div>
18807 <div title="[[Main Page]]"></div>
18809 <div title="[[Main Page]]"></div>
18813 T4304: HTML attribute safety (italics)
18815 <div title="''foobar''"></div>
18817 <div title="''foobar''"></div>
18821 T4304: HTML attribute safety (bold)
18823 <div title="'''foobar'''"></div>
18825 <div title="'''foobar'''"></div>
18829 T4304: HTML attribute safety (ISBN)
18831 <div title="ISBN 1234567890"></div>
18833 <div title="ISBN 1234567890"></div>
18837 T4304: HTML attribute safety (RFC)
18839 <div title="RFC 1234"></div>
18841 <div title="RFC 1234"></div>
18845 T4304: HTML attribute safety (PMID)
18847 <div title="PMID 1234567890"></div>
18849 <div title="PMID 1234567890"></div>
18853 T4304: HTML attribute safety (web link)
18855 <div title="http://example.com/"></div>
18857 <div title="http://example.com/"></div>
18861 T4304: HTML attribute safety (named web link)
18863 <div title="[http://example.com/ link]"></div>
18865 <div title="[http://example.com/ link]"></div>
18867 <div title="[http://example.com/ link]"></div>
18871 T5244: HTML attribute safety (extension; safe)
18873 <div style="<nowiki>background:blue</nowiki>"></div>
18875 <div style="background:blue"></div>
18877 <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>
18881 T5244: HTML attribute safety (extension; unsafe)
18883 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18885 <div style="/* insecure input */"></div>
18887 <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>
18890 # More MSIE fun discovered by Tom Gilder
18893 MSIE CSS safety test: spurious slash
18895 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18897 <div style="/* insecure input */">evil</div>
18899 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18903 MSIE CSS safety test: hex code
18905 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18907 <div style="/* insecure input */">evil</div>
18909 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18913 MSIE CSS safety test: comment in url
18915 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18917 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18919 <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>
18923 MSIE CSS safety test: comment in expression
18925 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18927 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18929 <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>
18933 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18935 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18937 <p style="/* invalid control char */">A</p>
18939 <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>
18943 MSIE 6 CSS safety test: Fullwidth (T57332)
18945 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18946 <div style="top:EXPRESSION(alert())">B</div>
18948 <p style="/* insecure input */">A</p>
18949 <div style="/* insecure input */">B</div>
18951 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18952 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18956 MSIE 6 CSS safety test: IPA extensions (T57332)
18958 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18959 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18961 <div style="/* insecure input */">A</div>
18962 <p style="/* insecure input */">B</p>
18964 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18965 <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>
18969 MSIE 6 CSS safety test: sup/sub script (T57332)
18971 <div style="background-image:url⁽javascript:alert())">A</div>
18972 <div style="background-image:url₍javascript:alert())">B</div>
18973 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18975 <div style="/* insecure input */">A</div>
18976 <div style="/* insecure input */">B</div>
18977 <p style="/* insecure input */">C</p>
18979 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18980 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18981 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18987 parsoid=wt2html,html2html
18990 title="data:text/html,<img src=1 onerror=alert(1)>"
18991 style="-o-link:attr(title);-o-link-source:current">X</div>
18993 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18995 <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>
18999 MSIE 6 CSS safety test: Repetition markers (T57332)
19001 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
19002 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
19003 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
19004 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
19005 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
19006 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
19007 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
19009 <p style="/* insecure input */">A</p>
19010 <p style="/* insecure input */">B</p>
19011 <p style="/* insecure input */">C</p>
19012 <p style="/* insecure input */">D</p>
19013 <p style="/* insecure input */">E</p>
19014 <p style="/* insecure input */">F</p>
19015 <p style="/* insecure input */">G</p>
19017 <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>
19018 <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>
19019 <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>
19020 <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>
19021 <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>
19022 <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>
19023 <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>
19027 Table attribute legitimate extension
19030 !+ style="<nowiki>color:blue</nowiki>"|status
19035 <th style="color:blue">status
19040 Table attribute safety
19043 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
19048 <th style="/* insecure input */">status
19053 CSS line continuation 1
19055 <div style="background-image: u\ rl(test.jpg);"></div>
19057 <div style="/* insecure input */"></div>
19061 CSS line continuation 2
19063 <div style="background-image: u\ rl(test.jpg); "></div>
19065 <div style="/* invalid control char */"></div>
19075 Expansion of multi-line templates in attribute values (T8255)
19077 <div style="background: {{identity|#00FF00}}">-</div>
19079 <div style="background: #00FF00">-</div>
19083 Expansion of multi-line templates in attribute values (T8255 sanity check)
19085 <div style="background:
19088 <div style="background: #00FF00">-</div>
19090 <div style="background:
19095 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
19097 <div style="background: #00FF00">-</div>
19099 <div style="background: #00FF00">-</div>
19103 Tags which are hidden from tidiers cannot pass through the Sanitizer
19105 <mw:toc><script>alert();</script></mw:toc>
19107 <p><mw:toc><script>alert();</script></mw:toc>
19112 ### Parser hooks (see tests/parser/ParserTestParserHook.php for the <tag> extension)
19116 Parser hook: empty input
19126 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19129 ## Don't expect parsoid to rt this form.
19131 Parser hook: empty input using terminated empty elements
19133 parsoid=wt2html,html2html
19143 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
19147 Parser hook: empty input using terminated empty elements (space before)
19157 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
19161 Parser hook: basic input
19171 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19174 ## Don't expect parsoid to rt this form.
19176 Parser hook: case insensitive
19178 parsoid=wt2html,html2html
19188 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19191 ## Don't expect parsoid to rt this form.
19193 Parser hook: case insensitive, redux
19195 parsoid=wt2html,html2html
19205 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
19209 Parser hook: nested tags
19213 <tag><tag></tag></tag>
19224 </tag></pre><p></tag></p>
19226 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
19230 Parser hook: basic arguments
19232 <tag width="200" height="100" depth="50" square=""></tag>
19244 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19247 ## Don't expect parsoid to rt this form.
19249 Parser hook: basic arguments, variations
19251 parsoid=wt2html,html2html
19253 <tag width=200 height = "100" depth = '50' square></tag>
19265 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19269 Parser hook: argument containing a forward slash (T7344)
19271 <tag filename="/tmp/bla"></tag>
19276 'filename' => '/tmp/bla',
19280 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
19283 ## Don't expect parsoid to rt this form.
19285 Parser hook: empty input using terminated empty elements (T4374)
19287 parsoid=wt2html,html2html
19298 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"}}'></pre><p>text</p>
19301 ## </tag> should be output literally since there is no matching tag that begins it
19302 ## Don't expect parsoid to rt this form.
19304 Parser hook: basic arguments using terminated empty elements (T4374)
19308 <tag width=200 height = "100" depth = '50' square/>
19325 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""}}' about="#mwt2"></pre><p>other stuff
19329 ## Don't expect parsoid to rt this form.
19331 Parser hook: Don't allow unclosed extension tags
19337 this is a '''test'''
19339 <p>test <tag>123
19340 </p><p>this is a <b>test</b>
19343 <p>test <tag>123</p>
19345 <p>this is a <b>test</b></p>
19349 Parser hook: horizontal rule inside extension tag that outputs <pre>
19369 ### (see tests/parser/ParserTestParserHook.php for the <statictag> extension)
19373 Parser hook: static parser hook not inside a comment
19375 <statictag>hello, world</statictag>
19377 <statictag action="flush" />
19383 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' about="#mwt2"></span></p>
19384 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"}}' about="#mwt4">hello, world</span></p>
19388 Parser hook: static parser hook inside a comment
19390 <!-- <statictag>hello, world</statictag> -->
19391 <statictag action="flush" />
19396 <!-- <statictag>hello, world</statictag> -->
19397 <p><span typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about='#mwt2'></span></p>
19400 # Nested template calls; this case was broken by Parser.php rev 1.506,
19404 Template:One-parameter
19406 (My parameter is: {{{1}}})
19410 Template:Map-one-parameter
19412 {{{{{1}}}|{{{2}}}}}
19416 Nested template calls
19418 {{Map-one-parameter|One-parameter|param}}
19420 <p>(My parameter is: param)
19430 Sanitizer: Closing of open tags
19432 <s></s><table></table>
19434 <p><s></s></p><table></table>
19436 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
19440 Sanitizer: Closing of open but not closed tags
19449 Sanitizer: Closing of closed but not open tags
19455 <p class="mw-empty-elt">
19460 Sanitizer: Closing of closed but not open table tags
19464 Table not started</td></tr></table>
19466 <p>Table not started</p>
19470 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
19472 title=[[Main Page]]
19474 wgFragmentMode=[ 'html5', 'legacy' ]
19476 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19478 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
19481 <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>
19485 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
19487 wgFragmentMode=[ 'legacy' ]
19489 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19491 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
19495 # In HTML5, the restrictions are that id must contain at least one character,
19496 # and must not contain any space characters.
19498 Sanitizer: Validating the contents of the id attribute (T6515)
19502 <br id="" /><br id="a space" />
19507 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
19509 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
19513 <br id="foo" /><br id="foo" />
19515 Something need to be done. foo-2 ?
19519 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
19522 <meta itemprop="hello" content="world">
19523 <meta http-equiv="refresh" content="5">
19524 <meta itemprop="hello" http-equiv="refresh" content="5">
19525 <link itemprop="hello" href="{{SERVER}}">
19526 <link rel="stylesheet" href="{{SERVER}}">
19527 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
19531 <p> <meta itemprop="hello" content="world" />
19532 <meta http-equiv="refresh" content="5">
19533 <meta itemprop="hello" content="5" />
19534 <link itemprop="hello" href="http://example.org" />
19535 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
19536 <link itemprop="hello" href="http://example.org" />
19542 Sanitizer: Strip comments from CSS attributes
19544 parsoid=wt2html,wt2wt
19546 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
19548 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
19551 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
19555 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
19557 [[meatball:Soft"Security]]
19559 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
19562 <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>
19566 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
19568 [[meatball:Foo<Bar]]
19569 [[meatball:Foo>Bar]]
19570 [[meatball:Foo<bar]]
19571 [[meatball:Foo>bar]]
19573 <p>[[meatball:Foo<Bar]]
19574 [[meatball:Foo>Bar]]
19575 [[meatball:Foo<bar]]
19576 [[meatball:Foo>bar]]
19579 <p>[[meatball:Foo<Bar]]
19580 [[meatball:Foo>Bar]]
19581 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
19582 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
19586 Language converter: output gets cut off unexpectedly (T7757)
19590 this bit is safe: }-
19592 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
19594 then we get cut off here: }-
19596 all additional text is vanished
19598 <p>this bit is safe: }-
19599 </p><p>but if we add a conversion instance: xxx
19600 </p><p>then we get cut off here: }-
19601 </p><p>all additional text is vanished
19604 <p>this bit is safe: }-</p>
19605 <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>
19606 <p>then we get cut off here: }-</p>
19607 <p>all additional text is vanished</p>
19611 Language converter glossary rules inside attributes (T119158)
19613 language=sr variant=sr-el
19615 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
19617 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
19620 </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>
19623 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
19625 <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>
19629 Self closed html pairs (T7487)
19631 <center><font id="bug" />Centered text</center>
19632 <div><font id="bug2" />In div text</div>
19634 <center><font id="bug"></font>Centered text</center>
19635 <div><font id="bug2"></font>In div text</div>
19639 Punctuation: nbsp before exclamation
19643 <p>C'est grave !
19648 Punctuation: CSS !important (T13874)
19650 <div style="width:50% !important">important</div>
19652 <div style="width:50% !important">important</div>
19656 Punctuation: CSS ! important (T13874; with space after)
19658 <div style="width:50% ! important">important</div>
19660 <div style="width:50% ! important">important</div>
19664 HTML bullet list, closed tags (T7497)
19676 <ul data-parsoid='{"stx":"html"}'>
19677 <li data-parsoid='{"stx":"html"}'>One</li>
19678 <li data-parsoid='{"stx":"html"}'>Two</li>
19683 HTML bullet list, unclosed tags (T7497)
19695 <ul data-parsoid='{"stx":"html"}'>
19696 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19697 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19702 HTML ordered list, closed tags (T7497)
19714 <ol data-parsoid='{"stx":"html"}'>
19715 <li data-parsoid='{"stx":"html"}'>One</li>
19716 <li data-parsoid='{"stx":"html"}'>Two</li>
19721 HTML ordered list, unclosed tags (T7497)
19734 <ol data-parsoid='{"stx":"html"}'>
19735 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19736 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19741 HTML nested bullet list, closed tags (T7497)
19763 <ul data-parsoid='{"stx":"html"}'>
19764 <li data-parsoid='{"stx":"html"}'>One</li>
19765 <li data-parsoid='{"stx":"html"}'>Two:
19766 <ul data-parsoid='{"stx":"html"}'>
19767 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19768 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19775 HTML nested bullet list, open tags (T7497)
19797 HTML nested ordered list, closed tags (T7497)
19821 HTML nested ordered list, open tags (T7497)
19856 HTML ordered list item with parameters oddity
19858 <ol><li id="fragment">One</li>
19861 <ol><li id="fragment">One</li>
19865 # parsoid doesn't explicitly mark autonumbered links, see T55505
19867 T7918: autonumbering
19869 [http://first/] [http://second] [ftp://ftp]
19873 [mailto:enclosed@mail.tld With target]
19875 [mailto:enclosed@mail.tld]
19877 mailto:inline@mail.tld
19879 <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>
19880 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19881 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19882 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19883 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19886 <p><a rel="mw:ExtLink" href="http://first/" class="external autonumber"></a> <a rel="mw:ExtLink" href="http://second" class="external autonumber"></a> <a rel="mw:ExtLink" href="ftp://ftp" class="external autonumber"></a></p>
19887 <p><a rel="mw:ExtLink" href="ftp://inlineftp" class="external free">ftp://inlineftp</a></p>
19888 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld" class="external text">With target</a></p>
19889 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld" class="external autonumber"></a></p>
19890 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld" class="external free">mailto:inline@mail.tld</a></p>
19895 # Security and HTML correctness
19896 # From Nick Jenkins' fuzz testing
19900 Fuzz testing: Parser13
19913 # Note that Parsoid output differs from the PHP parser here: the PHP
19914 # parser breaks the URL for the magic word, while in Parsoid the URL
19915 # production takes precedence.
19917 Fuzz testing: Parser14
19922 <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>
19923 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>
19925 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19930 <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>
19931 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>
19933 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19937 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19938 <p><a rel="mw:ExtLink" href="http://__TOC__" class="external free" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19942 Fuzz testing: Parser14-table
19944 parsoid=wt2html,html2html
19949 <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>
19950 <table style="__TOC__">
19954 <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>
19955 <table style="__TOC__">
19956 <tbody><tr><td></td></tr>
19960 <table style="__TOC__"></table>
19963 # Known to produce bogus xml (extra </td>)
19964 # Don't add the html/php section since it generates broken HTML
19966 Fuzz testing: Parser16
19983 Fuzz testing: Parser21
19986 !irc://{{ftp://a" onmouseover="alert('hello world');"
19991 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
20000 Fuzz testing: Parser22
20002 http://===r:::https://b
20006 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
20012 <p><a rel="mw:ExtLink" href="http://===r:::https://b" class="external free" data-parsoid='{"stx":"url"}'>http://===r:::https://b</a></p>
20014 <table data-parsoid='{"autoInsertedEnd":true}'></table>
20017 # The above 'Parser24' fuzz test exposed a tokenizer bug (T221384);
20018 # this is a minimized version of the above test to catch regressions.
20020 Fuzz testing: Parser24 (minimized)
20029 <p>{{<u data-parsoid='{"stx":"html","a":{"{{{{[[Sx--":null},"sa":{"{{{{[[Sx--":""},"autoInsertedEnd":true}'>}}</u></p>
20032 ## Remex doesn't account for fostered content.
20033 ## Known to produce bad XML for now
20035 Fuzz testing: Parser24
20042 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
20043 <br style="onmouseover='alert(document.cookie);' " />
20045 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
20050 <u class="|">}}}} >
20051 <br style="onmouseover='alert(document.cookie);'" />
20053 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
20062 <u class="|">}}}} >
20063 <br style="onmouseover='alert(document.cookie);'" />
20065 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
20066 </u><table><tbody><tr>
20072 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
20074 <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>"}'/>}}}} >
20075 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
20077 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
20078 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
20081 # Note: the current result listed for this is not what the original one was,
20082 # but the original bug was JavaScript injection, which is fixed in any case.
20083 # It's not clear that the original result listed was any more correct than the
20084 # current one. Original result:
20087 # <li class="||">
20088 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
20090 Fuzz testing: Parser25 (T8055)
20096 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
20098 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
20101 <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"]}'>
20102 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
20106 Fuzz testing: URL adjacent extension (with space, clean)
20108 http://example.com <nowiki>junk</nowiki>
20110 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
20113 <p><a rel="mw:ExtLink" href="http://example.com" class="external free" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
20117 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
20119 http://example.com<nowiki>junk</nowiki>
20121 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
20124 <p><a rel="mw:ExtLink" href="http://example.com" class="external free" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
20128 Fuzz testing: URL adjacent extension (no space, dirty; pre)
20130 http://example.com<pre>junk</pre>
20132 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
20134 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
20136 <p><a rel="mw:ExtLink" href="http://example.com" class="external free" 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>
20140 Fuzz testing: image with bogus manual thumbnail
20142 [[Image:foobar.jpg|thumbnail= ]]
20144 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
20146 <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>
20149 # Parsoid will emit the newline literally in wt2wt; see next test case.
20151 Fuzz testing: encoded newline in generated HTML replacements (T8577)
20155 <pre dir=" "></pre>
20157 <pre dir=" "></pre>
20160 " typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"dir":""},"body":{"extsrc":""}}'></pre>
20164 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
20168 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
20169 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
20178 Templates in extension attributes are not expanded
20180 <pre dir="{{echo|ltr}}"></pre>
20182 <pre dir="{{echo|ltr}}"></pre>
20184 <pre dir="{{echo|ltr}}" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
20188 Parsing optional HTML elements (T8171)
20193 <td> Some tabular data</td>
20194 <td> More tabular data ...
20195 <td> And yet som tabular data</td>
20201 <td> Some tabular data</td>
20202 <td> More tabular data ...
20203 </td><td> And yet som tabular data</td>
20209 Correct handling of <td>, <tr> (T8171)
20214 <td> Some tabular data</td>
20215 <td> More tabular data ...</td>
20216 <td> And yet som tabular data</td>
20222 <td> Some tabular data</td>
20223 <td> More tabular data ...</td>
20224 <td> And yet som tabular data</td>
20231 Parsing crashing regression (fr:JavaScript)
20235 <p></body></x>
20240 Inline wiki vs wiki block nesting
20246 <p><b>Bold paragraph</b>
20247 </p><p>New wiki paragraph
20251 # FIXME: The current php output is documented
20252 # and desired output is the parsoid target.
20254 Inline HTML vs wiki block nesting
20260 <p><b>Bold paragraph
20261 </p><p>New wiki paragraph</b>
20264 <p><b>Bold paragraph
20265 </b></p><p><b>New wiki paragraph
20268 <p><b>Bold paragraph</b>
20269 </p><p>New wiki paragraph
20273 # Original result was this:
20274 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
20276 # While that might be marginally more intuitive, maybe, the six-apostrophe
20277 # construct is clearly pathological and the result stated here (which is what
20278 # the parser actually does) is about as reasonable as anything.
20280 Mixing markup for italics and bold
20283 '''bold''''''bold''bolditalics'''''
20285 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
20293 Article for special page transclusion test
20297 Special page transclusion
20300 {{Special:Prefixindex/Xyzzyx}}
20302 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20307 Special page transclusion twice (T7021)
20310 {{Special:Prefixindex/Xyzzyx}}
20311 {{Special:Prefixindex/Xyzzyx}}
20313 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20315 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
20320 Transclusion of default MediaWiki message
20322 {{MediaWiki:Mainpage}}
20329 Transclusion of nonexistent MediaWiki message
20331 {{MediaWiki:Mainpagexxx}}
20333 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
20338 Transclusion of MediaWiki message with underscore
20340 {{MediaWiki:history_short}}
20347 Transclusion of MediaWiki message with space
20349 {{MediaWiki:history short}}
20356 Invalid header with following text
20366 Section extraction test (section 0)
20386 Section extraction test (section 1)
20408 Section extraction test (section 2)
20429 Section extraction test (section 3)
20449 Section extraction test (section 4)
20473 Section extraction test (section 5)
20493 Section extraction test (section 6)
20514 Section extraction test (section 7)
20534 Section extraction test (section 8)
20554 Section extraction test (section 9)
20575 Section extraction test (section 10)
20595 Section extraction test (nonexistent section 11)
20614 Section extraction test with bogus heading (section 1)
20619 ==bogus== not a legal section
20623 ==bogus== not a legal section
20627 Section extraction test with bogus heading (section 2)
20632 ==bogus== not a legal section
20639 Section extraction test with comment after heading (section 1)
20651 Section extraction test with comment after heading (section 2)
20663 Section extraction test with bogus <nowiki> heading (section 1)
20668 ==bogus== <nowiki>not a legal section</nowiki>
20672 ==bogus== <nowiki>not a legal section</nowiki>
20676 Section extraction test with bogus <nowiki> heading (section 2)
20681 ==bogus== <nowiki>not a legal section</nowiki>
20687 # Formerly testing for T4587, now resolved by the use of unmarked sections
20688 # instead of respecting commented sections
20690 Section extraction prefixed by comment (section 1)
20701 Section extraction prefixed by comment (section 2)
20710 # Formerly testing for T4607, now resolved by the use of unmarked sections
20711 # instead of respecting HTML-style headings
20713 Section extraction, mixed wiki and html (section 1)
20729 Section extraction, mixed wiki and html (section 2)
20745 # Formerly testing for T5342
20747 Section extraction, heading surrounded by <noinclude>
20751 <noinclude>==unmarked==</noinclude>
20757 # Test behavior of T21910
20759 Sectiion with all-equals
20764 The line above must have a trailing space
20767 But just in case it doesn't...
20771 But just in case it doesn't...
20775 Section replacement test (section 0)
20806 Section replacement test (section 1)
20835 Section replacement test (section 2)
20865 Section replacement test (section 3)
20896 Section replacement test (section 4)
20923 Section replacement test (section 5)
20954 Section replacement test (section 6)
20984 Section replacement test (section 7)
21015 Section replacement test (section 8)
21046 Section replacement test (section 9)
21075 Section replacement test (section 10)
21105 Section replacement test with initial whitespace (T15728)
21109 Preformatted initial line
21113 Preformatted initial line
21120 Section extraction, heading followed by pre with 20 spaces (T8398)
21132 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
21145 Section extraction, <pre> around bogus header (T12309)
21162 Section replacement, <pre> around bogus header (T12309)
21183 Handling of 
 in URLs
21187 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21189 <ul><li><a rel="mw:ExtLink" href="irc://%0Aa" class="external free" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&#x0A;a"}}'>irc://%0Aa</a></li></ul>
21193 Handling of %0A in URLs
21197 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
21199 <ul><li><a rel="mw:ExtLink" href="irc://%0Aa" class="external free">irc://%0Aa</a></li></ul>
21202 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
21204 5 quotes, code coverage +1 line
21211 <p><b><i></i></b></p>
21214 # same html as previous, but wikitext adjusted to match parsoid html2wt
21215 # note that wt2html and html2html will put the <i> before the <b>
21217 5 quotes, code coverage +1 line w/ nowiki (1)
21219 parsoid=wt2wt,html2wt
21221 '''''<nowiki/>'''''
21226 <p><b><i></i></b></p>
21229 # same as previous, just swapping the <i> and <b>
21231 5 quotes, code coverage +1 line w/ nowiki (2)
21233 '''''<nowiki/>'''''
21238 <p><i><b></b></i></p>
21242 Special:Search page linking.
21246 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
21251 {{!}} is a magic word
21253 {{!}} is a magic word there and {{!}} is still a magic word here
21254 | is not a magic word here but {{!}} is still a magic word here
21256 <p>| is a magic word there and | is still a magic word here
21257 | is not a magic word here but | is still a magic word here
21260 <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
21261 | 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>
21267 title=[[Parser test]]
21281 *{{SUBJECTPAGENAME}}
21282 *{{SUBJECTPAGENAMEE}}
21285 *{{NAMESPACENUMBER}}
21290 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
21292 <ul><li>Parser test</li>
21293 <li>Parser_test</li>
21294 <li>Parser test</li>
21295 <li>Parser_test</li>
21296 <li>Parser test</li>
21297 <li>Parser_test</li>
21298 <li>Parser test</li>
21299 <li>Parser_test</li>
21300 <li>Parser test</li>
21301 <li>Parser_test</li>
21302 <li>Talk:Parser test</li>
21303 <li>Talk:Parser_test</li>
21304 <li>Parser test</li>
21305 <li>Parser_test</li>
21313 <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>
21315 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
21318 Gallery with valid attributes
21320 <gallery type="123" summary="345">
21321 File:File:Foobar.jpg
21324 <ul class="gallery mw-gallery-traditional" type="123">
21325 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21326 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
21327 <div class="gallerytext">
21332 <ul class="gallery mw-gallery-traditional" type="123" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"type":"123","summary":"345"},"body":{}}'>
21333 <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>
21337 ## Parsoid thinks the "centre" here is a property, not a caption.
21342 "modes": ["wt2html"]
21350 image4 |300px| centre
21351 image5.svg| http://///////
21356 <ul class="gallery mw-gallery-traditional">
21357 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21358 <div class="thumb" style="height: 150px;">Image1.png</div>
21359 <div class="gallerytext">
21362 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21363 <div class="thumb" style="height: 150px;">Image2.gif</div>
21364 <div class="gallerytext">
21367 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21368 <div class="thumb" style="height: 150px;">Image3</div>
21369 <div class="gallerytext">
21372 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21373 <div class="thumb" style="height: 150px;">Image4</div>
21374 <div class="gallerytext">
21379 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21380 <div class="thumb" style="height: 150px;">Image5.svg</div>
21381 <div class="gallerytext">
21382 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
21386 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21387 <div class="thumb" style="height: 150px;">* image6</div>
21388 <div class="gallerytext">
21393 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21394 <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>
21395 <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>
21396 <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>
21397 <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>
21398 <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" href="http://///////" class="external free">http://///////</a></div></li>
21399 <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>
21404 Gallery (with options, html)
21407 "modes": ["wt2html", "html2html"]
21410 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21411 File:Nonexistent.jpg|caption
21412 File:Nonexistent.jpg
21413 image:foobar.jpg|some '''caption''' [[Main Page]]
21415 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21418 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21419 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21420 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21421 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21422 <div class="gallerytext">
21427 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21428 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21429 <div class="gallerytext">
21432 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21433 <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>
21434 <div class="gallerytext">
21435 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21439 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21440 <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>
21441 <div class="gallerytext">
21444 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21445 <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>
21446 <div class="gallerytext">
21453 <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":{}}'>
21454 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21455 <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>
21456 <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>
21457 <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>
21458 <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>
21459 <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>
21463 ## FIXME: This test can be dropped when Parsoid content versions 2.0.0 / 1.8.0
21464 ## are no longer in storage.
21466 Gallery (with options, extsrc)
21470 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21471 File:Nonexistent.jpg|caption
21472 File:Nonexistent.jpg
21473 image:foobar.jpg|some '''caption''' [[Main Page]]
21475 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21478 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21479 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21480 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21481 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21482 <div class="gallerytext">
21487 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21488 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21489 <div class="gallerytext">
21492 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21493 <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>
21494 <div class="gallerytext">
21495 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21499 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21500 <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>
21501 <div class="gallerytext">
21504 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21505 <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>
21506 <div class="gallerytext">
21513 <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"}}'>
21514 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21515 <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>
21516 <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>
21517 <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>
21518 <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>
21519 <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>
21524 Gallery (without px units)
21526 <gallery widths="70" heights="40">
21530 <ul class="gallery mw-gallery-traditional">
21531 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21532 <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>
21533 <div class="gallerytext">
21538 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70","heights":"40"},"body":{}}'>
21539 <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>
21544 Gallery (with invalid units)
21546 <gallery widths="70em" heights="40em">
21550 <ul class="gallery mw-gallery-traditional">
21551 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21552 <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>
21553 <div class="gallerytext">
21558 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70em","heights":"40em"},"body":{}}'>
21559 <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>
21564 Gallery with link that has fragment
21567 "modes": ["wt2html", "html2html"]
21571 image:foobar.jpg|link=Main_Page
21572 image:foobar.jpg|link=Main_Page#section
21573 image:foobar.jpg|link=Main Page#section|caption
21576 <ul class="gallery mw-gallery-traditional">
21577 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21578 <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>
21579 <div class="gallerytext">
21582 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21583 <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>
21584 <div class="gallerytext">
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/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>
21589 <div class="gallerytext">
21596 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21597 <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>
21598 <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>
21599 <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>
21604 Gallery with template inside caption
21606 <gallery caption="{{echo|hi}}">
21607 File:Foobar.jpg|{{echo|ho}}
21610 <ul class="gallery mw-gallery-traditional">
21611 <li class='gallerycaption'>hi</li>
21612 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21613 <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>
21614 <div class="gallerytext">
21621 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21622 <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>
21623 <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>
21628 Gallery with wikitext inside gallery caption
21631 "modes": ["wt2html", "html2html"]
21634 <gallery caption="# This should not be a list item
21636 Text '''bold''' [[link]] {{ns:-1}}
21638 [[File:Foobar.jpg|thumb|File in gallery caption]]">
21639 File:Foobar.jpg|Image caption
21642 <ul class="gallery mw-gallery-traditional">
21643 <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>
21644 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21645 <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>
21646 <div class="gallerytext">
21653 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21654 <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>
21655 <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>
21660 Gallery with wikitext inside caption
21663 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
21664 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
21667 <ul class="gallery mw-gallery-traditional">
21668 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21669 <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>
21670 <div class="gallerytext">
21671 <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>
21675 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21676 <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>
21677 <div class="gallerytext">
21678 <p>This is a test template
21684 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21685 <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>
21686 <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>
21691 Gallery (with showfilename option)
21693 <gallery showfilename="">
21694 File:Nonexistent.jpg|caption
21695 File:Nonexistent.jpg
21696 File:Foobar.jpg|some '''caption''' [[Main Page]]
21700 <ul class="gallery mw-gallery-traditional">
21701 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21702 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21703 <div class="gallerytext">
21704 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21709 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21710 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21711 <div class="gallerytext">
21712 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21716 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21717 <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>
21718 <div class="gallerytext">
21719 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21720 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21724 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21725 <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>
21726 <div class="gallerytext">
21727 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21733 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
21734 <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>
21735 <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>
21736 <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>
21737 <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>
21741 ## Should Parsoid be preserving these variations? See T151367
21743 Gallery (with namespace-less filenames)
21746 "modes": ["wt2html", "html2html"]
21750 File:Nonexistent.jpg
21756 <ul class="gallery mw-gallery-traditional">
21757 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21758 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21759 <div class="gallerytext">
21762 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21763 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21764 <div class="gallerytext">
21767 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21768 <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>
21769 <div class="gallerytext">
21772 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21773 <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>
21774 <div class="gallerytext">
21779 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21780 <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>
21781 <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>
21782 <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>
21783 <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>
21788 Gallery override link with wikilink (T36852)
21791 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21794 <ul class="gallery mw-gallery-traditional">
21795 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21796 <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>
21797 <div class="gallerytext">
21802 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21803 <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>
21808 Gallery override link with absolute external link (T36852)
21811 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21814 <ul class="gallery mw-gallery-traditional">
21815 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21816 <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>
21817 <div class="gallerytext">
21822 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21823 <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>
21827 ## Putting the caption at the end here runs into T49646 on the php side
21828 ## so reducing the modes this runs in Parsoid
21830 Gallery override link with absolute external link with LanguageConverter
21833 parsoid=wt2html,html2html
21836 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21839 <ul class="gallery mw-gallery-traditional">
21840 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21841 <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>
21842 <div class="gallerytext">
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; 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>
21855 Gallery override link with malicious javascript (T36852)
21858 "modes": ["wt2html", "html2html"]
21862 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21865 <ul class="gallery mw-gallery-traditional">
21866 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21867 <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>
21868 <div class="gallerytext">
21873 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21874 <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>
21879 Gallery with invalid title as link (T45964)
21882 "modes": ["wt2html", "html2html"]
21886 File:Foobar.jpg|link=<
21889 <ul class="gallery mw-gallery-traditional">
21890 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21891 <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>
21892 <div class="gallerytext">
21897 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21898 <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>
21903 Serialize gallery without attrs in data-mw
21906 "modes": ["html2wt"]
21909 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21910 <li class="gallerycaption">123</li>
21911 <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>
21914 <gallery caption="123">
21920 Gallery with class and style attributes
21922 <gallery class="center" style="text-align: center;">
21926 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21927 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21928 <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>
21929 <div class="gallerytext">
21934 <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":{}}'>
21935 <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>
21940 Gallery in nolines mode
21942 <gallery mode="nolines" showfilenames="yes" caption="No Lines!">
21943 File:Foobar.jpg|foo
21946 <ul class="gallery mw-gallery-nolines">
21947 <li class='gallerycaption'>No Lines!</li>
21948 <li class="gallerybox" style="width: 125px"><div style="width: 125px">
21949 <div class="thumb" style="width: 120px;"><div style="margin:0px 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>
21950 <div class="gallerytext">
21957 <ul class="gallery mw-gallery-nolines" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"mode":"nolines","showfilenames":"yes"},"body":{}}'>
21958 <li class="gallerycaption">No Lines!</li>
21959 <li class="gallerybox" style="width: 125px;"><div class="thumb" style="width: 120px;"><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">foo</div></li>
21964 Gallery in slideshow mode
21966 <gallery mode="slideshow" showthumbnails="">
21970 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21971 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21972 <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>
21973 <div class="gallerytext">
21978 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21979 <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>
21984 Gallery in packed mode
21986 <gallery mode="packed">
21990 <ul class="gallery mw-gallery-packed">
21991 <li class="gallerybox" style="width: 1061.3333333333px"><div style="width: 1061.3333333333px">
21992 <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>
21993 <div class="gallerytext">
21998 <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":{}}'>
21999 <li class="gallerybox" style="width: 1061.3333333333333px;"><div class="thumb" style="width: 1059.3333333333333px;"><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="1060"/></a></figure-inline></div><div class="gallerytext"></div></li>
22004 Gallery in packed-overlay mode
22006 <gallery mode="packed-overlay" showfilenames="yes" caption="Packed Overlay!">
22007 File:Foobar.jpg|foo
22010 <ul class="gallery mw-gallery-packed-overlay">
22011 <li class='gallerycaption'>Packed Overlay!</li>
22012 <li class="gallerybox" style="width: 1061.3333333333px"><div style="width: 1061.3333333333px">
22013 <div class="thumb" style="width: 1059.3333333333px;"><div style="margin:0px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" 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>
22014 <div class="gallerytextwrapper" style="width: 1040px"><div class="gallerytext">
22021 <ul class="gallery mw-gallery-packed-overlay" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"mode":"packed-overlay","showfilenames":"yes"},"body":{}}'>
22022 <li class="gallerycaption">Packed Overlay!</li>
22023 <li class="gallerybox" style="width: 1061.3333333333333px;"><div class="thumb" style="width: 1059.3333333333333px;"><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="1060"/></a></figure-inline></div><div class="gallerytextwrapper" style="width: 1040px;"><div class="gallerytext">foo</div></div></li>
22028 Gallery in packed-hover mode
22030 <gallery mode="packed-hover" showfilenames="yes" caption="Packed Hover!">
22031 File:Foobar.jpg|foo
22034 <ul class="gallery mw-gallery-packed-hover">
22035 <li class='gallerycaption'>Packed Hover!</li>
22036 <li class="gallerybox" style="width: 1061.3333333333px"><div style="width: 1061.3333333333px">
22037 <div class="thumb" style="width: 1059.3333333333px;"><div style="margin:0px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" 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>
22038 <div class="gallerytextwrapper" style="width: 1040px"><div class="gallerytext">
22045 <ul class="gallery mw-gallery-packed-hover" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"mode":"packed-hover","showfilenames":"yes"},"body":{}}'>
22046 <li class="gallerycaption">Packed Hover!</li>
22047 <li class="gallerybox" style="width: 1061.3333333333333px;"><div class="thumb" style="width: 1059.3333333333333px;"><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="1060"/></a></figure-inline></div><div class="gallerytextwrapper" style="width: 1040px;"><div class="gallerytext">foo</div></div></li>
22052 Serialize gallery image captions on a line
22055 "modes": ["html2wt"]
22058 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
22059 <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>
22060 <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>
22064 File:Foobar.jpg| hi ho
22065 File:Foobar.jpg|hi<br />ho
22070 HTML Hex character encoding (spells the word "JavaScript")
22072 parsoid=wt2html,wt2wt,html2html
22074 JavaScript
22076 <p>JavaScript
22079 <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>
22083 HTML Hex character encoding bogus encoding (T28437 regression check)
22087 <p>&#xsee;&#XSEE;
22092 HTML Hex character encoding mixed case
22094 parsoid=wt2html,wt2wt,html2html
22101 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
22104 # See: https://www.w3.org/TR/html5/syntax.html#character-references
22105 # Note that U+000C (form feed) is not a valid XML character, so
22106 # it is banned even though allowed in HTML5.
22107 # Note there are also weird legacy numeric entities which are mapped
22108 # elsewhere; see T113194
22110 Illegal character references (T106578, T113194)
22112 parsoid={ "modes": ["wt2html","html2html"], "normalizePhp": true }
22117 ; Control (low): 
22118 ; Control (high):  Ÿ
22119 ; Unsupported legacy: € ‚ ƒ – Ÿ
22120 ; Surrogate: ��
22121 ; This is an okay astral character: 💩
22129 <dt>Control (low)</dt>
22131 <dt>Control (high)</dt>
22132 <dd>&#x7F; &#x9F;</dd>
22133 <dt>Unsupported legacy</dt>
22134 <dd>&#128; &#130; &#131; &#150; &#159;</dd>
22136 <dd>&#xD83D;&#xDCA9;</dd>
22137 <dt>This is an okay astral character</dt>
22138 <dd>💩</dd></dl>
22142 __FORCETOC__ override
22154 ISBN 978-0-1234-56 789
22156 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
22159 <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>
22163 ISBN followed by 5 spaces
22174 ISBN ISBN 1234567890
22176 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22179 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22182 # Uppercase X and lowercase x as well
22193 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
22194 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
22195 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
22196 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
22197 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
22198 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
22201 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
22202 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
22203 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
22204 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
22205 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
22206 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
22210 ISBN with empty prefix (parsoid test)
22214 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22217 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
22221 T24905: <abbr> followed by ISBN followed by </a>
22223 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
22225 <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>
22228 <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" href="http://www.example.com" class="external text">example.com</a></p>
22236 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
22239 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
22243 Double RFC with a wiki link
22247 <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>
22250 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
22258 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
22261 <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>
22265 Centre-aligned image
22267 [[Image:foobar.jpg|centre]]
22269 <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>
22271 <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>
22277 [[Image:foobar.jpg|none]]
22279 <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>
22281 <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>
22285 Width + Height sized image (using px) (height is ignored)
22287 [[Image:foobar.jpg|640x480px]]
22289 <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>
22292 <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>
22296 Width-sized image (using px, no following whitespace)
22298 [[Image:foobar.jpg|640px]]
22300 <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>
22303 <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>
22307 Width-sized image (using px, with following whitespace - test regression from r39467)
22309 [[Image:foobar.jpg|640px ]]
22311 <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>
22314 <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>
22318 Width-sized image (using px, with preceding whitespace - test regression from r39467)
22320 [[Image:foobar.jpg| 640px]]
22322 <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>
22325 <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>
22328 ## FIXME: Parsoid mocking should include the page in the url to catch regressions
22330 Image with page parameter
22334 [[File:LoremIpsum.djvu|page=2]]
22336 <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>
22339 <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>
22343 Another italics / bold test
22351 # FIXME: The php output seems broken. It's interleaving some open/close tags.
22357 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
22359 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
22362 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
22364 Images with the "|" character in the comment
22366 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
22368 <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>
22370 <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" href="http://test/?param1=%7Cleft%7C&param2=%7Cx" class="external text" data-parsoid='{"a":{"href":"http://test/?param1=%7Cleft%7C&param2=%7Cx"},"sa":{"href":"http://test/?param1=|left|&param2=|x"}}'>external</a> URL</figcaption></figure>
22374 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
22376 <html><script>alert(1);</script></html>
22378 <p><html><script>alert(1);</script></html>
22383 HTML with raw HTML ($wgRawHtml==true)
22387 <html><script>alert(1);</script></html>
22389 <p><script>alert(1);</script>
22392 <p><script typeof="mw:Extension/html" about="#mwt3" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script></p>
22396 Parents of subpages, one level up
22398 subpage title=[[Subpage test/L1/L2/L3]]
22402 <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>
22408 Parents of subpages, one level up, not named
22410 subpage title=[[Subpage test/L1/L2/L3]]
22414 <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>
22421 Parents of subpages, two levels up
22423 subpage title=[[Subpage test/L1/L2/L3]]
22429 <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
22430 </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>
22435 Parents of subpages, two levels up, without trailing slash or name.
22437 subpage title=[[Subpage test/L1/L2/L3]]
22446 Parents of subpages, two levels up, with lots of extra trailing slashes.
22448 subpage title=[[Subpage test/L1/L2/L3]]
22452 <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>
22457 Subpage test/L1/L2/L3Sibling
22463 Transclusion of a sibling page (one level up)
22465 subpage title=[[Subpage test/L1/L2/L3]]
22474 Transclusion of a child page
22476 subpage title=[[Subpage test/L1/L2]]
22484 # This is wt2html only in Parsoid because we add <nowiki>
22485 # because of {{..}} and we don't expect to fix that to
22486 # eliminate the nowikis selective for {{..}} markup.
22488 Non-transclusion because of too many up levels
22490 subpage title=[[Subpage test/L1/L2/L3]]
22493 {{../../../../More than parent}}
22495 <p>{{../../../../More than parent}}
22498 <p>{{../../../../More than parent}}</p>
22502 Definition list code coverage
22515 <dl><dt>title </dt><dd>def</dd>
22516 <dt>title </dt><dd>def</dd>
22517 <dt>title</dt><dd>def</dd></dl>
22521 Don't fall for the self-closing div
22523 <div>hello world</div/>
22525 <div>hello world</div>
22533 <p>[[:Template:Msg]]
22542 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
22546 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
22548 Always escape literal '>' in output, not just after '<'
22562 <p>This is a test template
22563 This is a test template
22575 Inclusion of !userCanEdit() content
22579 <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>
22584 Out-of-order TOC heading levels
22593 <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>
22595 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
22597 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
22598 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
22601 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
22603 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
22604 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
22610 <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>
22611 <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>
22612 <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>
22613 <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>
22614 <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>
22615 <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>
22620 ISBN with a dummy number
22630 ISBN with space-delimited number
22634 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
22637 <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>
22642 ISBN with multiple spaces, no number
22661 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22662 </p><p>ISBN 12345678901
22665 <p>ISBN 123456789</p>
22667 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22669 <p>ISBN 12345678901</p>
22674 ISBN with trailing year (T9110)
22676 ISBN 1-234-56789-0 - 2006
22678 ISBN 1 234 56789 0 - 2006
22680 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
22681 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
22684 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
22686 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
22693 wgFragmentMode=[ 'html5', 'legacy' ]
22695 {{anchorencode:foo bar©#%n}}
22700 <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>
22704 anchorencode (legacy)
22706 wgFragmentMode=[ 'legacy' ]
22708 {{anchorencode:foo bar©#%n}}
22710 <p>foo_bar.C2.A9.23.25n
22715 anchorencode trims spaces
22717 wgFragmentMode=[ 'html5', 'legacy' ]
22719 {{anchorencode: __pretty__please__}}
22724 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
22728 anchorencode deals with links
22730 wgFragmentMode=[ 'html5', 'legacy' ]
22732 {{anchorencode: [[hello|world]] [[hi]]}}
22737 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
22741 anchorencode deals with templates
22743 wgFragmentMode=[ 'html5', 'legacy' ]
22745 {{anchorencode: {{Foo}} x}}
22750 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
22754 anchorencode encodes like the TOC generator: (T20431)
22756 wgFragmentMode=[ 'html5', 'legacy' ]
22758 ===_ +:.3A%3A _ &&]] x===
22759 {{anchorencode: _ +:.3A%3A _ &&]] x}}
22762 <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>
22763 <p>+:.3A%3A_&&]]_x
22766 <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>
22767 <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>
22768 <meta property="mw:PageProp/noeditsection"/>
22772 anchorencode encodes like the TOC generator: (T20431) (legacy)
22774 wgFragmentMode=[ 'legacy' ]
22776 ===_ +:.3A%3A&&]]===
22777 {{anchorencode: _ +:.3A%3A&&]] }}
22780 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
22781 <p>.2B:.3A.253A.26.26.5D.5D
22786 T8200: blockquotes and paragraph formatting
22807 T10293: Use of center tag ruins paragraph formatting
22828 Parsing of overlapping (improperly nested) inline html tags
22830 <span><s>x</span></s>
22832 <p><span><s>x</span></s></span>
22835 <p><span><s>x</s></span>
22840 ### Language variants related tests
22843 # Parsoid does not mark self-links.
22844 # Parsoid does not convert links; PHP will do any necessary redirects.
22847 Self-link in language variants
22849 title=[[Dunav]] language=sr
22851 Both [[Dunav]] and [[Дунав]] are names for this river.
22853 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22856 <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>
22866 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22868 title=[[Duna]] language=sr
22870 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22872 <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.
22875 <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>
22879 Link to a section of a variant of this title shouldn't be parsed as self-link
22881 title=[[Duna]] language=sr
22883 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22885 <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.
22888 <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>
22892 Link to pages in language variants
22896 Main Page can be written as [[Маин Паге]]
22898 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22901 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22906 Multiple links to pages in language variants
22910 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22912 <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>.
22915 <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>
22920 Simple template in language variants
22926 <p>This is a test template
22932 Template with explicit namespace in language variants
22938 <p>This is a test template
22944 Basic test for template parameter in language variants
22948 {{парамтест|param=foo}}
22950 <p>This is a test template with parameter foo
22955 Simple category in language variants
22959 [[Category:МедиаWики Усер'с Гуиде]]
22961 cat=МедиаWики_Усер'с_Гуиде sort=
22963 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22978 ## We used to, but no longer wt2wt this test since the default serializer
22979 ## will normalize all categories to serialize on their own line.
22980 ## This wikitext usage is going to be fairly uncommon in production and
22981 ## selser will take care of preserving formatting in those scenarios.
22983 Don't convert blue categorylinks to another variant (T35210)
22989 [[A]][[Category:分类]]
22993 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22994 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22998 Stripping -{}- tags (language variants)
23002 Latin proverb: -{Ne nuntium necare}-
23004 <p>Latin proverb: Ne nuntium necare
23007 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
23012 Prevent conversion with -{}- tags (language variants)
23014 language=sr variant=sr-ec
23016 Latinski: -{Ne nuntium necare}-
23018 <p>Латински: Ne nuntium necare
23021 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
23026 Prevent conversion of text with -{}- tags (language variants)
23028 language=sr variant=sr-ec
23030 Latinski: -{Ne nuntium necare}-
23032 <p>Латински: Ne nuntium necare
23035 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
23040 Prevent conversion of links with -{}- tags (language variants)
23042 language=sr variant=sr-ec
23046 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23049 <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>
23054 -{}- tags within headlines (within html for parserConvert())
23056 wgFragmentMode=[ 'html5', 'legacy' ]
23058 language=sr variant=sr-ec
23062 Note that even an unprotected headline ID is not affected by language
23067 <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>
23068 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
23071 <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>
23073 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
23075 <p>Note that even an unprotected headline ID is not affected by language
23078 <h2 id="Latinski">Latinski</h2>
23082 Explicit definition of language variant alternatives
23084 language=zh variant=zh-tw
23086 -{zh:China;zh-tw:Taiwan}-, not China
23088 <p>Taiwan, not China
23091 <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>
23095 Explicit definition of language variant alternatives (BCP 47 codes)
23097 language=zh variant=zh-tw
23099 -{zh:China;zh-Hant-TW:Taiwan}-, not China
23101 <p>Taiwan, not China
23104 <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>
23108 Filter syntax for language variants
23110 language=zh variant=zh-tw
23112 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
23114 <p>fooblog, WEBJOURNAL, WEBLOGquux
23117 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
23120 # Note that Parsoid post-processing for language variants needs to
23121 # update the `title` attribute here, based on the mw:ExpandedAttrs property
23123 Conversion around HTML tags
23125 language=sr variant=sr-ec
23127 -{H|span=>sr-ec:script;title=>sr-ec:src}-
23128 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
23131 <span title="ЛаCтин">ски</span>
23134 <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"}]}'/>
23135 <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>
23139 Explicit session-wise two-way language variant mapping (A flag and - flag)
23141 language=zh variant=zh-tw
23143 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
23145 Taiwan is not China.
23147 But -{A|zh:China; zh-tw:Taiwan}- is China,
23149 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
23151 and -{China}- is China.
23153 <p>This is Taiwan, but we'll forget that now.
23154 </p><p>Taiwan is not China.
23155 </p><p>But Taiwan is Taiwan,
23156 </p><p>(This should be stripped!)
23157 </p><p>and China is China.
23160 <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>
23161 <p>Taiwan is not China.</p>
23162 <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>
23163 <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>
23164 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
23168 Explicit session-wise one-way language variant mapping (A flag and - flag)
23170 language=zh variant=zh-tw
23172 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
23174 COUNTRY is China or Taiwan.
23176 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
23178 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
23180 and -{COUNTRY}- is COUNTRY.
23182 <p>This is Taiwan, but we'll forget that now.
23183 </p><p>COUNTRY is China or Taiwan.
23184 </p><p>But Taiwan is Taiwan,
23185 </p><p>(This should be stripped!)
23186 </p><p>and COUNTRY is COUNTRY.
23189 <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>
23190 <p>COUNTRY is China or Taiwan.</p>
23191 <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>
23192 <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>
23193 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
23197 Explicit session-wise two-way language variant mapping (H flag for hide)
23199 language=zh variant=zh-tw
23201 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
23205 <p>(This should be stripped!)
23206 </p><p>Taiwan is Taiwan.
23209 <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>
23210 <p>Taiwan is China.</p>
23214 Explicit session-wise one-way language variant mapping (H flag for hide)
23216 language=zh variant=zh-tw
23218 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
23220 COUNTRY is Taiwan or China.
23222 <p>(This should be stripped!)
23223 </p><p>Taiwan is Taiwan or China.
23226 <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>
23227 <p>COUNTRY is Taiwan or China.</p>
23230 ## Note that parsoid test runner does not support 'showtitle' option.
23232 Adding explicit conversion rule for title (T flag)
23234 language=zh variant=zh-tw showtitle
23236 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
23241 <p>Should be stripped!
23242 </p><p>Taiwan is China.
23245 <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>
23246 <p>Taiwan is China.</p>
23250 Code coverage: T combined with H flag
23252 language=zh variant=zh-tw showtitle
23254 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
23259 <p>Should be stripped!
23260 </p><p>Taiwan is Taiwan.
23263 <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>
23264 <p>Taiwan is China.</p>
23268 Code coverage: T with no variants
23270 language=zh variant=zh-tw showtitle
23272 -{H|zh:China; zh-tw:Taiwan}-
23273 Taiwan is China.-{T|Taiwan is China}-
23280 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23281 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
23285 Code coverage: rules with no variants
23287 language=zh variant=zh-tw
23289 -{H|zh:China; zh-tw:Taiwan}-
23300 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
23302 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
23303 Taiwan is China.</p>
23308 Code coverage: D flag for conversion rule
23310 language=zh variant=zh-tw
23312 -{D|zh-cn:XA; zh-tw:YA}-
23313 -{A;D|zh-cn:XB; zh-tw:YB}-
23314 -{D;H|zh-cn:XC; zh-tw:YC}-
23316 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
23322 XA XB XC YA YB YC FOO BAR BAT 012345
23327 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
23331 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
23334 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
23335 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
23336 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
23337 <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>
23338 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
23339 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
23340 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
23341 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
23345 Code coverage: N flag for conversion rule
23347 language=zh variant=zh-cn
23357 </p><p>српски (ћирилица)
23360 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
23361 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
23362 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
23365 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
23367 Code coverage: N flag for conversion rule (wt2html only)
23369 language=zh variant=zh-cn
23370 parsoid=wt2html,html2html
23377 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
23381 Testing that changing the language variant here in the tests actually works
23383 language=zh variant=zh showtitle
23385 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23388 <p>Should be stripped!
23391 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
23395 Recursive conversion of alt and title attrs shouldn't clear converter state
23397 language=zh variant=zh-cn
23400 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
23401 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
23405 Should be stripped<span title="Exclamation">!</span>
23408 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
23409 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>
23413 T26072: more test on conversion rule for title
23415 language=zh variant=zh-tw showtitle
23417 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
23419 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
23422 <p>This should be stripped!
23423 </p><p>This won't take interferes with the title rule.
23426 <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>
23427 <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>
23431 Partly disable title conversion if variant == main language code
23433 language=zh variant=zh title=[[ZH]] showtitle
23435 -{T|zh-cn:CN;zh-tw:TW}-
23441 <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>
23445 Partly disable title conversion if variant == main language code, more
23447 language=zh variant=zh title=[[ZH]] showtitle
23455 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
23459 Raw output of variant escape tags (R flag)
23461 language=zh variant=zh-tw
23463 Raw: -{R|zh:China;zh-tw:Taiwan}-
23465 <p>Raw: zh:China;zh-tw:Taiwan
23468 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
23471 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
23473 Raw output of variant escape tags (R flag) (wt2html only)
23475 language=zh variant=zh-tw
23476 parsoid=wt2html,html2html
23478 -{Variant}- -{D|syntax}- -{D;R|options}-
23480 <p>Variant syntax options
23483 <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>
23487 Nested markup inside raw output of variant escape tags (R flag)
23489 language=zh variant=zh-tw
23491 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
23493 <p>Nested raw: nested Taiwan nested
23496 <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>
23500 Nested markup and spaces inside raw output of variant escape tags (R flag)
23502 language=zh variant=zh-tw
23504 X-{ outer -{ inner }- outer }-X
23506 <p>X outer inner outer X
23509 <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>
23513 Templates inside raw output of variant escape tags (R flag)
23515 language=zh variant=zh-tw
23517 Nested raw: -{R|nested {{echo|hi}} templates}-
23519 <p>Nested raw: nested hi templates
23522 <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>
23526 Strings evaluating false shouldn't be ignored by Language converter (T51072)
23528 language=zh variant=zh-cn
23530 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
23535 <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>
23539 Conversion rules from [numeric-only string] to [something else] (T48634)
23541 language=zh variant=zh-cn
23543 -{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
23548 <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>
23552 Two-way converter rule entries with an empty value should be ignored (T53551)
23554 language=zh variant=zh-cn
23556 -{H|zh-cn:foo;zh-tw:;}-foobar
23561 <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>
23565 One-way converter rule entries with an empty "from" string should be ignored (T53551)
23567 language=zh variant=zh-cn
23569 -{H|=>zh-cn:foo;}-foobar
23574 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
23578 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
23580 language=zh variant=zh-cn
23587 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
23591 Nested using of manual convert syntax
23593 language=zh variant=zh-hk
23595 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
23597 <p>Nested: Hello Hong Kong!
23600 <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,2,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,2,2]}&apos;>&lt;/span> K&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[99,103,2,2]}&apos;>&lt;/span>ong\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[7],\"dsr\":[68,109,2,2]}'></span>"}]}'></span>!</p>
23604 HTML markups with conversion syntax in attribs, nested in other conversion blocks
23606 language=zh variant=zh-cn
23608 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
23610 <p><span title="X">A</span>
23613 <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,2,2]}&apos;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
23617 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
23619 language=zh variant=zh-cn
23621 -{<span title="-{X}-">A</span>}-
23622 !! html/php+disabled
23623 <p><span title="X">A</span>
23626 <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,2,2]}&apos;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
23629 # Parsoid and PHP disagree on how to parse this example: Parsoid
23630 # insists that the content of a language converter element be a valid
23631 # DOM fragment or attribute string
23633 Language converter markup with block content
23635 language=zh variant=zh-cn
23637 <span>a-{b<div>c}-d
23639 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
23641 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
23645 <span>ad</span></div></span></div></span>
23647 <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
23649 <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
23651 <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>
23655 LanguageConverter selser (1)
23657 language=zh variant=zh-cn
23659 "modes": ["wt2wt", "selser"],
23661 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23671 LanguageConverter selser (2)
23673 language=zh variant=zh-cn
23675 "modes": ["wt2wt", "selser"],
23677 ["span[class='x']", "contents", "text", "-{foo}-"],
23678 ["a", "contents", "text", "-{"],
23679 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
23683 <span class="x">TEXT1</span>
23684 [http://example.com TEXT2]
23688 <span class="x"><nowiki>-{foo}-</nowiki></span>
23689 [http://example.com -{]
23690 [[Foo|<nowiki>-{</nowiki>]]
23691 {{1x|<nowiki>-{</nowiki>}}
23694 # Tests LanguageVariantText in ConstrainedText
23696 LanguageConverter selser (3)
23698 language=zh variant=zh-cn
23700 "modes": ["wt2wt", "selser"],
23702 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
23703 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23714 |<nowiki/>-{edited}-
23718 # Tests LanguageVariantText._fromSelSer
23720 LanguageConverter selser (4)
23722 language=zh variant=zh-cn
23724 "modes": ["wt2wt", "selser"],
23726 ["td > span.x", "remove"]
23732 |<span class="x">Foo</span>-{Bar}-
23733 ||<span class="x">Foo</span>-{Bar}-
23743 # Since Parsoid is starting to emit canonical wikitext for links,
23744 # [http://example.com http://example.com] will not RT back to that
23746 # Parsoid does not language-convert links (it is done in a
23747 # post-processing step)
23749 Proper conversion of text in external links
23751 language=sr variant=sr-ec
23754 http://www.google.com
23755 gopher://www.google.com
23756 [http://www.google.com http://www.google.com]
23757 [gopher://www.google.com gopher://www.google.com]
23758 [https://www.google.com irc://www.google.com]
23759 [ftp://www.google.com www.google.com/ftp://dir]
23760 [//www.google.com www.google.com]
23762 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
23763 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23764 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
23765 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23766 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
23767 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
23768 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
23771 <p><a rel="mw:ExtLink" href="http://www.google.com" class="external free">http://www.google.com</a>
23772 <a rel="mw:ExtLink" href="gopher://www.google.com" class="external free">gopher://www.google.com</a>
23773 <a rel="mw:ExtLink" href="http://www.google.com" class="external text">http://www.google.com</a>
23774 <a rel="mw:ExtLink" href="gopher://www.google.com" class="external text">gopher://www.google.com</a>
23775 <a rel="mw:ExtLink" href="https://www.google.com" class="external text">irc://www.google.com</a>
23776 <a rel="mw:ExtLink" href="ftp://www.google.com" class="external text">www.google.com/ftp://dir</a>
23777 <a rel="mw:ExtLink" href="//www.google.com" class="external text">www.google.com</a></p>
23781 Do not convert roman numbers to language variants
23783 language=sr variant=sr-ec
23787 <p>Фридрих IV је цар.
23790 <p>Fridrih IV je car.</p>
23794 Unclosed language converter markup "-{"
23805 Don't convert raw rule "-{R|=>}-" to "=>"
23814 <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>
23818 Don't break link parsing if language converter markup is in the caption.
23820 language=sr variant=sr-ec
23822 [[Main Page|-{R|main page}-]]
23824 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23827 <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>
23831 T146304: Don't break template parsing if language converter markup is in the parameter.
23833 language=sr variant=sr-ec
23840 <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>
23844 T146305: Don't break image parsing if language converter markup is in the caption.
23848 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23850 <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>
23852 <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>
23856 T146305: Don't break image parsing if nested language converter markup is in the caption.
23858 language=zh variant=zh-cn
23860 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23862 <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>
23864 <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>
23867 # XXX html2wt disabled because rich markup in alt is not preserved.
23869 Don't break gallery if language converter markup is inside.
23872 parsoid=wt2html,html2html
23875 File:Foobar.jpg|alt=-{R|bat}-|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]
23876 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=-{R|param}-}}
23879 <ul class="gallery mw-gallery-traditional">
23880 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23881 <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>
23882 <div class="gallerytext">
23883 <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>
23887 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23888 <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>
23889 <div class="gallerytext">
23890 <p>This is a test template
23896 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
23897 <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>
23898 <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>
23903 T153135: Don't break list handling if language converter markup is in the item.
23905 language=zh variant=zh-cn
23907 ;-{zh-cn:AAA;zh-tw:BBB}-
23911 <dt>foo:bar</dt></dl>
23913 <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>
23914 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23918 // Note that parsoid does not protect colons unless language converter
23919 // markup is properly nested, because it is a backtracking parser.
23921 T153135: Unclosed markup in definition list (code coverage)
23923 language=zh variant=zh-cn
23928 <dl><dt><b>foo:bar</b></dt><b>
23929 <dt>-{zh-cn:AAA</dt></b></dl>
23931 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23932 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23936 T153135: Nested language converter markup in definition list (code coverage)
23938 language=zh variant=zh-cn
23940 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23942 <dl><dt>AAA foo:bar bat:baz</dt>
23945 <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>
23946 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23950 # html2wt mode disabled due to <nowiki> insertion.
23952 T153140: Don't break table handling if language converter markup is in the cell.
23954 language=sr variant=sr-ec
23955 parsoid=wt2html,wt2wt,html2html
23971 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23978 Language converter tricky html2wt cases (1)
23981 parsoid=html2wt,wt2wt
23983 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23985 -{<nowiki>}-</nowiki>}-
23992 Language converter tricky html2wt cases (2)
23995 parsoid=html2wt,wt2wt
23999 <nowiki>-{foo}-</nowiki>
24001 <p>-{foo}-
24006 Language converter tricky html2wt cases (3)
24009 parsoid=html2wt,wt2wt
24011 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
24012 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
24013 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
24019 -{<nowiki>-{foo}-</nowiki>}-
24023 </p><p>-{foo}-
24028 Language converter tricky html2wt cases (4)
24031 parsoid=html2wt,wt2wt
24033 <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>
24041 # Note that the <nowiki> escaping added by parsoid for source text,
24042 # destination text, and language names only works on the PHP side
24043 # for *destination text*. (HTML entity escaping wouldn't work
24044 # any better.) This is probably a bug, at least for source texts.
24045 # (For language names PHP uses a precise regexp based on the languages
24046 # it currently knows have variants, which is fragile since this set
24047 # can grow/shrink over time.)
24049 Language converter tricky html2wt cases (5)
24051 language=zh variant=zh-cn
24053 <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>
24054 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
24055 <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>
24056 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
24059 -{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
24061 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
24063 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
24065 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
24068 !! html/php+disabled
24069 <p>foobat;xyz=>zh-cn:abc
24073 </p><p>a:b=>c 0;zh-tw:bar
24078 T179579: Nowiki and lc interaction
24085 -{123<nowiki>|</nowiki>456}-
24087 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
24089 <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>
24093 T2529: Uncovered bullet
24102 T2529: Uncovered bullet in a deeply nested list
24104 *******Foo {{bullet}}
24106 <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>
24111 T2529: Uncovered table already at line-start
24134 T2529: Uncovered bullet in parser function result
24136 *Foo {{lc:{{bullet}} }}
24143 T7678: Double-parsed template argument
24145 {{lc:{{{1}}}|hello}}
24152 T7678: Double-parsed template invocation
24154 {{lc:{{paramtest {{!}} param = hello }} }}
24156 <p>{{paramtest | param = hello }}
24161 Case insensitivity of parser functions for non-ASCII characters (T10143)
24164 title=[[Main Page]]
24166 {{PRVNÍVELKÉ:ěščř}}
24167 {{prvnívelké:ěščř}}
24187 Morwen/13: Unclosed link followed by heading
24194 <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>
24198 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
24205 <h1><span class="mw-headline" id="heading">heading</span></h1>
24209 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
24216 <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>
24230 Paragraphs inside divs (no extra line breaks)
24241 Paragraphs inside divs (extra line break on open)
24255 Paragraphs inside divs (extra line break on close)
24269 Paragraphs inside divs (extra line break on open and close)
24284 # doBlockLevels screws up this output and Remex cleans up as much as it can.
24286 Nesting tags, paragraphs on lines which begin with <div>
24288 <div></div><strong>A
24291 <div></div><p><strong>A
24292 </strong></p><strong></strong><p><strong>B</strong>
24295 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
24296 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
24299 # T8200: <blockquote> should behave like <div> with respect to line breaks
24301 T8200: paragraphs inside blockquotes (no extra line breaks)
24303 <blockquote>Line one
24305 Line two</blockquote>
24307 <blockquote>Line one
24308 Line two</blockquote>
24310 <blockquote><p>Line one
24311 Line two</p></blockquote>
24315 T8200: paragraphs inside blockquotes (extra line break on open)
24320 Line two</blockquote>
24325 Line two</blockquote>
24330 Line two</p></blockquote>
24334 T8200: paragraphs inside blockquotes (extra line break on close)
24336 <blockquote>Line one
24341 <blockquote>Line one
24346 <blockquote><p>Line one
24353 T8200: paragraphs inside blockquotes (extra line break on open and close)
24368 ## This is a corner case interaction between the paragraph wrapping in the
24369 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
24370 ## some tags which close paragraphs (and thus prevent wrapping on their line),
24371 ## of which "div" is one, but do p-wrapping inside them. These are referred
24372 ## to as "never suppressing". Remex, for its part, doesn't traverse into
24373 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
24375 Paragraphs inside blockquotes/divs (no extra line breaks)
24377 <blockquote><div>Line one
24379 Line two</div></blockquote>
24381 <blockquote><div>Line one
24382 Line two</div></blockquote>
24386 Paragraphs inside blockquotes/divs (extra line break on open)
24391 Line two</div></blockquote>
24396 Line two</div></blockquote>
24400 Paragraphs inside blockquotes/divs (extra line break on close)
24402 <blockquote><div>Line one
24405 </div></blockquote>
24407 <blockquote><div>Line one
24410 </div></blockquote>
24414 Paragraphs inside blockquotes/divs (extra line break on open and close)
24420 </div></blockquote>
24426 </div></blockquote>
24430 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
24432 wgLinkHolderBatchSize=0
24438 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
24439 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
24440 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
24445 Free external link invading image caption
24447 [[Image:Foobar.jpg|thumb|http://x|hello]]
24449 <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>
24451 <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>
24455 T17196: localised external link numbers
24459 [http://en.wikipedia.org/]
24461 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
24464 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/" class="external autonumber"></a></p>
24468 Multibyte character in padleft
24470 {{padleft:-Hello|7|Æ}}
24475 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
24479 Multibyte character in padright
24481 {{padright:Hello-|7|Æ}}
24486 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
24490 formatdate parser function
24492 {{#formatdate:2009-03-24}}
24494 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
24499 formatdate parser function, with default format
24501 {{#formatdate:2009-03-24|mdy}}
24503 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
24508 Spacing of numbers in formatted dates
24510 {{#formatdate:January 15}}
24512 <p><span class="mw-formatted-date" title="01-15">January 15</span>
24517 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
24519 language=nl title=[[MediaWiki:Common.css]]
24521 {{#formatdate:2009-03-24|dmy}}
24523 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
24528 formatdate with invalid month
24530 {{#formatdate:2019-22-22|dmy}}
24537 formatdate: dots in month name do not match any char (T220563)
24541 {{#formatdate:jun. 3|dmy}}
24542 {{#formatdate:junx 3|dmy}}
24544 <p><span class="mw-formatted-date" title="06-03">3 Juni</span>
24550 formatdate uses correct capitalisation in French
24554 {{#formatdate:Juin 3|dmy}}
24556 <p><span class="mw-formatted-date" title="06-03">3 juin</span>
24561 formatdate uses correct capitalisation in English
24563 {{#formatdate:june 3|dmy}}
24565 <p><span class="mw-formatted-date" title="06-03">3 June</span>
24579 Edit comment with link
24583 I like the [[Main Page]] a lot
24585 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
24589 Edit comment with link and link text
24593 I like the [[Main Page|best pages]] a lot
24595 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24599 Edit comment with link and link text with suffix
24603 I like the [[Main Page|best page]]s a lot
24605 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24609 Edit comment with section link (non-local, eg in history list)
24611 comment title=[[Main Page]]
24613 /* External links */ removed bogus entries
24615 <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→External links</a>: </span> removed bogus entries</span>
24619 Edit comment with section link and text before it (non-local, eg in history list)
24621 comment title=[[Main Page]]
24623 pre-comment text /* External links */ removed bogus entries
24625 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>
24629 Edit comment with section link (local, eg in diff view)
24631 comment local title=[[Main Page]]
24633 /* External links */ removed bogus entries
24635 <span dir="auto"><span class="autocomment"><a href="#External_links">→External links</a>: </span> removed bogus entries</span>
24639 Edit comment with section link that has a link in it
24641 comment local title=[[Main Page]]
24645 <span dir="auto"><span class="autocomment"><a href="#A_link">→[[A link]]</a></span></span>
24649 Edit comment with section link that has a template in it
24651 comment local title=[[Main Page]]
24653 /* {{foobar|param}} */
24655 <span dir="auto"><span class="autocomment"><a href="#.7B.7Bfoobar.7Cparam.7D.7D">→{{foobar|param}}</a></span></span>
24659 Edit comment with subpage link (T16080)
24663 title=[[Subpage test]]
24665 Poked at a [[/subpage]] here...
24667 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
24671 Edit comment with subpage link and link text (T16080)
24675 title=[[Subpage test]]
24677 Poked at a [[/subpage|neat little page]] here...
24679 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
24683 Edit comment with bogus subpage link in non-subpage NS (T16080)
24686 title=[[Subpage test]]
24688 Poked at a [[/subpage]] here...
24690 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
24694 Edit comment with bare anchor link (local, as on diff)
24698 title=[[Main Page]]
24702 <a href="#section">#section</a>
24706 Edit comment with bare anchor link (non-local, as on history)
24709 title=[[Main Page]]
24713 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
24717 Anchor starting with underscore
24723 <p><a href="#_ref">One</a>
24726 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
24730 Id starting with underscore
24732 <div id="_ref"></div>
24734 <div id="_ref"></div>
24738 Edit comment with link with more than one pipe (T99346)
24742 [[Main Page|Many|pipes]]
24744 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
24748 Complex edit comment with link with more than one pipe (T99346)
24752 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
24754 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..."
24758 Space normalisation on autocomment (T24784)
24761 title=[[Main Page]]
24763 /* __hello__world__ */
24765 <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#hello_world" title="Main Page">→__hello__world__</a></span></span>
24769 percent-encoding and + signs in comments (T28410)
24773 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
24775 <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>
24778 # Parsoid doesn't support this yet: see T75581
24779 # but it *should* omit the 'src' attribute if the image is bad.
24780 # PHP side of tests was disabled in
24781 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
24782 # because of issues in the PHP parserTests infrastructure
24783 # (but the output below is indeed what the PHP side emits)
24785 Bad images - basic functionality
24788 !! html/php+disabled
24790 <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>
24794 Bad images - T18039: text after bad image disappears
24799 !! html/php+disabled
24805 <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>
24810 Verify that displaytitle works (T24501) no displaytitle
24814 wgAllowDisplayTitle=true
24815 wgRestrictDisplayTitle=false
24817 this is not the the title
24820 <p>this is not the the title
24825 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
24830 wgAllowDisplayTitle=true
24831 wgRestrictDisplayTitle=false
24833 this is not the the title
24834 {{DISPLAYTITLE:whatever}}
24837 <p>this is not the the title
24842 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24847 wgAllowDisplayTitle=true
24848 wgRestrictDisplayTitle=true
24850 this is not the the title
24851 {{DISPLAYTITLE:whatever}}
24854 <p>this is not the the title
24859 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24864 wgAllowDisplayTitle=true
24865 wgRestrictDisplayTitle=true
24867 this is not the the title
24868 {{DISPLAYTITLE:screen}}
24871 <p>this is not the the title
24876 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24881 wgAllowDisplayTitle=false
24883 this is not the the title
24884 {{DISPLAYTITLE:screen}}
24887 <p>this is not the the title
24888 <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>
24893 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24898 wgAllowDisplayTitle=false
24900 this is not the the title
24903 <p>this is not the the title
24908 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24913 wgAllowDisplayTitle=true
24914 wgRestrictDisplayTitle=true
24916 this is not the the title
24917 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24919 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24920 <p>this is not the the title
24925 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24930 wgAllowDisplayTitle=true
24931 wgRestrictDisplayTitle=true
24933 this is not the the title
24934 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24936 <span style="color: red;">s</span>creen
24937 <p>this is not the the title
24942 Page status indicators: Empty name is invalid
24946 <indicator name=" "></indicator>
24947 <indicator></indicator>
24949 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24950 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24955 Page status indicators: Weird syntaxes that are okay
24959 <indicator name="empty" />
24960 <indicator name="name"></indicator>
24969 Page status indicators: Torture test
24973 <indicator name="01">hello world</indicator>
24974 <indicator name="02">[[Main Page]]</indicator>
24975 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24976 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24977 <indicator name="05">*foo
24979 <indicator name="06"><nowiki>foo</nowiki></indicator>
24980 <indicator name="07"> Preformatted</indicator>
24981 <indicator name="08"><div>Broken tag</indicator>
24982 <indicator name="09">{| class=wikitable
24985 <indicator name="10">Two
24987 paragraphs</indicator>
24990 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24991 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" />
24992 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>
24993 05=<ul><li>foo</li>
24996 07=<pre>Preformatted
24998 08=<div>Broken tag</div>
25000 09=<table class="wikitable">
25016 preload: check <noinclude> and <includeonly>
25020 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
25026 preload: check <onlyinclude>
25030 Goodbye <onlyinclude>Hello world</onlyinclude>
25036 preload: can pass tags through if we want to
25040 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
25042 <includeonly>Hello world</includeonly>
25046 preload: check that it doesn't try to do tricks
25050 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
25052 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
25056 Play a bit with r67090 and T5158
25058 <div style="width:50% !important"> </div>
25059 <div style="width:50% !important"> </div>
25060 <div style="width:50% !important"> </div>
25061 <div style="border : solid;"> </div>
25063 <div style="width:50% !important"> </div>
25064 <div style="width:50% !important"> </div>
25065 <div style="width:50% !important"> </div>
25066 <div style="border : solid;"> </div>
25068 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
25069 <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>
25070 <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>
25071 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
25075 French spaces in wikitext
25077 foo ! bar ? bat 50 % is less than 75 %.
25079 Hello : this ; is « something ‹ else › again »
25081 <p>foo ! bar ? bat 50 % is less than 75 %.
25082 </p><p>Hello : this ; is « something ‹ else › again »
25086 # It would be reasonable for Parsoid and PHP to differ here.
25087 # The PHP behavior is arguably a bug.
25089 Corner case: french spaces in definition list
25093 <dl><dt>foo </dt>
25098 T5158: Test for French spaces in attributes
25100 <br style=" clear : both ; " />
25102 <p><br style="clear : both ;" />
25107 HTML5 data attributes
25109 <span data-foo="bar">Baz</span>
25110 <p data-abc-def_hij="">Quuz</p>
25112 <p><span data-foo="bar">Baz</span>
25114 <p data-abc-def_hij="">Quuz</p>
25116 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
25117 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
25121 Strip reserved data attributes
25123 <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>
25125 <div data-ok="fred" data-object-id="123">d</div>
25127 <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>
25131 percent-encoding and + signs in internal links (T28410)
25133 [[User:+%]] [[Page+title%]]
25134 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
25135 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
25136 [[%33%45]] [[%33%45+]]
25138 <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>
25139 <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>
25140 <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>
25141 <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>
25144 <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>
25145 <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>
25146 <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>
25147 <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>
25151 Special characters in embedded file links (T29679)
25153 [[File:Contains & ampersand.jpg]]
25154 [[File:Does not exist.jpg|Title with & ampersand]]
25156 <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>
25157 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
25160 <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>
25161 <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>
25165 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
25167 Text's been normalized?
25169 <p>Text's been normalized?
25174 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
25176 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
25178 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
25183 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
25185 [http://www.example.org/ ideograms]
25187 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
25192 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
25194 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
25196 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
25220 T33098 Template which includes system messages which includes the template
25224 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
25225 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
25230 T33490 Turkish: ucfirst 'blah'
25241 T33490 Turkish: ucfirst 'ix'
25252 T33490 Turkish: lcfirst 'BLAH'
25263 T33490 Turkish: ucfırst (with a dotless i)
25269 <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>
25274 T33490 ucfırst (with a dotless i) with English language
25280 <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>
25284 # Note that Parsoid doesn't emit an explicit TOC.
25285 # Note also that the html2wt direction tends to emit an extra newline
25286 # between the __TOC__ magicword and the first heading unless *both*
25287 # the <meta> and the <h2> have a data-parsoid attribute set (even if
25291 T28375: TOC with italics
25293 title=[[Main Page]]
25296 ==''Lost'' episodes==
25298 <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>
25300 <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>
25304 <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>
25306 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25307 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
25311 T28375: TOC with bold
25313 title=[[Main Page]]
25316 =='''should be bold''' then normal text==
25318 <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>
25320 <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>
25324 <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>
25326 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25327 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
25331 T35845: Headings become cursive in TOC when they contain an image
25333 title=[[Main Page]]
25336 ==Image [[Image:foobar.jpg]]==
25338 <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>
25340 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
25344 <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>
25346 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25347 <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>
25351 T35845 (2): Headings become bold in TOC when they contain a blockquote
25353 title=[[Main Page]]
25356 ==<blockquote>Quote</blockquote>==
25358 <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>
25360 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25364 <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>
25366 <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>
25368 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
25372 <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>
25374 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25375 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
25379 Unclosed tags in TOC
25381 wgFragmentMode=[ 'html5', 'legacy' ]
25383 title=[[Main Page]]
25387 <small>Hanc marginis exiguitas non caperet.</small>
25390 <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>
25392 <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>
25396 <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>
25397 <p><small>Hanc marginis exiguitas non caperet.</small>
25401 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25402 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
25403 <p><small>Hanc marginis exiguitas non caperet.</small>
25408 Multiple tags in TOC
25411 ==<i>Foo</i> <b>Bar</b>==
25413 ==<i>Foo</i> <blockquote>Bar</blockquote>==
25415 <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>
25417 <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>
25418 <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>
25422 <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>
25423 <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>
25425 <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>
25427 <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>
25428 <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>
25432 <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>
25433 <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>
25435 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25436 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
25438 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
25441 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
25442 # html5 tag parsing.
25444 Tags with parameters in TOC
25449 ==<sup class="in-h2">Hello</sup>==
25451 ==<sup class="a > b">Evilbye</sup>==
25453 <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>
25455 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
25456 <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>
25460 <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>
25461 <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>
25463 <meta property="mw:PageProp/toc" />
25464 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
25466 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
25470 span tags with directionality in TOC
25473 ==<span dir="ltr">C++</span>==
25475 ==<span dir="rtl">זבנג!</span>==
25477 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
25479 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
25481 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
25483 <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>
25485 <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>
25486 <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>
25487 <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>
25488 <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>
25489 <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>
25493 <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>
25494 <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>
25495 <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>
25496 <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>
25497 <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>
25499 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25500 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
25501 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
25502 <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>
25503 <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>
25504 <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>
25508 T74884: bdi element in ToC
25511 ==<bdi>test</bdi>==
25513 <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>
25515 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
25519 <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>
25521 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25522 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
25526 T35715: s/strike element in ToC
25529 ==<s>test</s> test <strike>test</strike>==
25531 <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>
25533 <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>
25537 <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>
25539 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25540 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
25544 T198618: style element in ToC
25549 ==<style>.foo {}</style>Style<style>.bar {}</style>==
25551 <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>
25553 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
25557 <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>
25559 <meta property="mw:PageProp/toc" data-parsoid="{}"/>
25560 <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>
25564 T198618: script element in ToC
25569 ==<html><script>alert(1);</script></html>Script<html><script>alert(1);</script></html>==
25571 <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>
25573 <li class="toclevel-1 tocsection-1"><a href="#Script"><span class="tocnumber">1</span> <span class="toctext">Script</span></a></li>
25577 <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>
25579 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25580 <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>
25584 Empty <p> tag in TOC, removed by Sanitizer (T92892)
25589 <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>
25591 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
25595 <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>
25597 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25598 <h2 id="x" data-parsoid='{}'>x</h2>
25604 == {{int:headline_sample}} ==
25608 T34057: Title needed when expanding <h> nodes.
25610 title=[[Main Page]]
25614 <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>
25618 Strip marker in urlencode
25620 {{urlencode:x<nowiki/>y}}
25621 {{urlencode:x<nowiki/>y|wiki}}
25622 {{urlencode:x<nowiki/>y|path}}
25623 {{urlencode:x<pre id="one">two</pre>y}}
25651 Strip marker in formatNum
25653 {{formatnum:1<nowiki/>2}}
25654 {{formatnum:1<nowiki/>2|R}}
25662 Check noCommafy in formatNum
25666 {{formatnum:123456.78}}
25667 {{formatnum:123456.78|NOSEP}}
25675 Wrong option for formatNum (T58199)
25677 {{formatnum:1,234.56|Random}}
25678 {{formatnum:1,234.56|EVERYTHING}}
25679 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
25688 Strip marker in grammar
25692 {{grammar:elative|foo<nowiki/>bar}}
25699 Strip marker in padleft
25701 {{padleft:|2|x<nowiki/>y}}
25708 Strip marker in padright
25710 {{padright:|2|x<nowiki/>y}}
25717 Strip marker in anchorencode
25719 {{anchorencode:x<nowiki/>y}}
25724 <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>
25728 nowiki inside link inside heading (T20295)
25730 ==[[foo|x<nowiki>y</nowiki>z]]==
25732 <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>
25736 new support for bdi element (T33817)
25738 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25740 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25744 Ignore pipe between table row attributes
25748 |- id=foo | style='color: red'
25756 <tr id="foo" style="color: red">
25762 Language parser function
25771 Padleft and padright (default 0-padding)
25780 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
25781 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
25785 Padleft and padright (partial fill)
25787 {{padleft:xyz|6|ab}}
25788 {{padright:xyz|6|ab}}
25794 <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>
25795 <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>
25799 Padleft and padright as substr
25801 {{padleft:|3|abcde}}
25802 {{padright:|3|abcde}}
25808 <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>
25809 <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>
25813 Padleft and padright with non-numerical length (T180403)
25815 {{padleft:abcdef|junk}}
25816 {{padright:abcdef|junk}}
25824 Special parser function
25826 {{#special:RandomPage}}
25827 {{#special:BaDtItLe}}
25828 {{#special:Foobar}}
25837 T36939 - Case insensitive link parsing ([HttP://])
25839 [HttP://MediaWiki.Org/]
25841 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25844 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/" class="external autonumber"></a></p>
25848 T36939 - Case insensitive link parsing ([HttP:// title])
25850 [HttP://MediaWiki.Org/ MediaWiki]
25852 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25857 T36939 - Case insensitive link parsing (HttP://)
25859 HttP://MediaWiki.Org/
25861 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25864 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/" class="external free">HttP://MediaWiki.Org/</a></p>
25882 <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>
25883 <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>
25884 <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>
25885 <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>
25886 <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>
25891 ### Parsoid-specific tests
25892 ### Parsoid-PHP parser incompatibilities
25895 1. SOL-sensitive wikitext tokens as template-args
25897 parsoid=wt2html,wt2wt
25903 <ul><li>a</li></ul>
25904 <ol><li>a</li></ol>
25905 <dl><dd>a</dd></dl>
25907 <span about="#mwt1" typeof="mw:Transclusion">
25908 </span><ul about="#mwt1"><li>a</li>
25910 <span about="#mwt2" typeof="mw:Transclusion">
25911 </span><ol about="#mwt2"><li>a</li>
25913 <span about="#mwt3" typeof="mw:Transclusion">
25914 </span><dl about="#mwt3"><dd>a</dd>
25918 #### -----------------------------------------------------------------
25919 #### Parsoid-specific functionality tests
25920 #### -----------------------------------------------------------------
25922 # T65642/T68749: Formatting elt fixup around images.
25923 # We know wt2wt will fail, but we expect selser to pass.
25924 # Due to the nature of our testing, wt2wt and selser tests will enter the
25925 # blacklist and we'll catch selser regressions based on changes to the
25926 # blacklist entries for selser tests.
25928 1. Treebuilder fixup of formatting elt
25930 parsoid=wt2html,wt2wt
25935 [[Image:Foobar.jpg|right|Test]]
25943 </small></p><small>
25944 <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>
25945 </small><p><small></small>
25947 </td></tr></tbody></table>
25951 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25952 <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>
25953 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25958 2. Treebuilder fixup of formatting elt
25960 parsoid=wt2html,wt2wt
25962 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25964 <small>[[Image:Foobar.jpg|right|300px]]</small>
25966 <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>
25967 </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>
25969 <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>
25971 <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>
25975 3. Treebuilder fixup of formatting elt
25977 parsoid=wt2html,wt2wt
25979 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25981 <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>
25983 <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>
25987 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25989 parsoid=wt2html,wt2wt
25991 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25993 <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>
25995 <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>
25998 ## Just a regression test
26000 Wikilink with only closing tag in target
26006 <p><a rel="mw:WikiLink" href="./Test" title="Test"></a></p>
26009 #### ----------------------------------------------------------------
26010 #### Parsoid-only testing of Parsoid's impl of LST
26011 #### Not implemented yet, see
26012 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
26013 #### ----------------------------------------------------------------
26015 ## We still need to support serializing the older format while content is stored.
26017 LST Sections: Backwards compatibility
26020 "suppressErrors": true,
26021 "modes": ["html2wt"]
26024 <section begin="2011-05-16" />
26025 <section end="2014-04-10 (MW 1.23wmf22)" />
26027 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
26028 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
26032 LST Sections: Newfangled approach
26034 <section begin="2011-05-16" />
26035 <section end="2014-04-10 (MW 1.23wmf22)" />
26037 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"}}'>
26039 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"}}'>
26043 #--------- Test stripping of empty nodes in template content ----------
26046 Empty LI and TR nodes should be stripped from template content
26051 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
26055 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
26068 Empty LI and TR nodes should not be stripped from top-level content
26082 <li class='mw-empty-elt'></li>
26087 <tr class='mw-empty-elt'></tr>
26096 Empty TR nodes should not be stripped if they have any attributes set
26098 {{EmptyTRWithHTMLAttrTest}}
26100 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
26101 <tr align='center'></tr>
26102 <tr><td>foo</td></tr>
26103 <tr align='center'></tr>
26104 <tr><td>bar</td></tr>
26108 #### ----------------------------------------------------------------
26109 #### The following section of tests are primarily to test
26110 #### wikitext escaping capabilities of Parsoid. Given that
26111 #### escaping can be done any number of ways, the wikitext (input)
26112 #### is always adjusted to reflect how Parsoid adds nowiki
26115 #### We are marking several tests as parsoid-only since the
26116 #### HTML in the result section is different from what the
26117 #### PHP parser generates for it.
26118 #### ----------------------------------------------------------------
26121 #### --------------- Headings ---------------
26123 #### 1. Nested inside html <h1>=foo=</h1>
26124 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
26125 #### 3. Nested inside html with wikitext split by html tags
26126 #### 4. No escape needed
26127 #### 5. Empty headings <h1></h1>
26128 #### 6. Heading chars in SOL context
26129 #### ----------------------------------------
26131 Headings: 0. Unnested
26141 <p>=foo<i>a</i>=</p>
26143 <nowiki>=foo=</nowiki>
26145 <nowiki> </nowiki>=foo=
26147 <nowiki>=foo=</nowiki>
26149 =foo''a''<nowiki>=</nowiki>
26152 # New headings and existing headings are handled differently
26154 Headings: 1. Nested inside html
26162 <h1 data-parsoid='{}'>=foo=</h1>
26163 <h2 data-parsoid='{}'>=foo=</h2>
26164 <h3 data-parsoid='{}'>=foo=</h3>
26165 <h4 data-parsoid='{}'>=foo=</h4>
26166 <h5 data-parsoid='{}'>=foo=</h5>
26167 <h6 data-parsoid='{}'>=foo=</h6>
26175 =<nowiki>=foo=</nowiki>=
26176 ==<nowiki>=foo=</nowiki>==
26177 ===<nowiki>=foo=</nowiki>===
26178 ====<nowiki>=foo=</nowiki>====
26179 =====<nowiki>=foo=</nowiki>=====
26180 ======<nowiki>=foo=</nowiki>======
26184 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
26193 <nowiki>*</nowiki>bar
26199 <nowiki>=bar=</nowiki>
26203 Headings: 3. Nested inside html with wikitext split by html tags
26207 <h1>=<b>bold</b>foo=</h1>
26209 = ='''bold'''foo= =
26213 Headings: 4a. No escaping needed (testing just h1 and h2)
26224 <h1><i>=</i>foo=</h1>
26244 Headings: 4b. No escaping needed (inside p-tags)
26261 Headings: 4c. Short headings (1)
26268 <nowiki>===</nowiki>
26274 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
26276 Headings: 4d. Short headings (2)
26278 parsoid=wt2html,html2html
26289 <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>
26290 <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>
26291 <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>
26295 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
26296 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
26297 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
26301 Headings: 5. Empty headings
26305 <h1 data-parsoid='{}'></h1>
26307 <h2 data-parsoid='{}'></h2>
26309 <h3 data-parsoid='{}'></h3>
26311 <h4 data-parsoid='{}'></h4>
26313 <h5 data-parsoid='{}'></h5>
26315 <h6 data-parsoid='{}'></h6>
26325 =====<nowiki/>=====
26327 ======<nowiki/>======
26331 Headings: 6a. Heading chars in SOL context (with trailing spaces)
26341 <nowiki>=a=</nowiki>
26343 <nowiki>=a=</nowiki>
26345 <nowiki>=a=</nowiki>
26349 Headings: 6b. Heading chars in SOL context (with trailing newlines)
26362 <nowiki>=a=</nowiki>
26365 <nowiki>=a=</nowiki>
26368 <nowiki>=a=</nowiki>
26373 Headings: 6c. Heading chars in SOL context (leading newline break)
26381 <nowiki>=b=</nowiki>
26385 Headings: 6d. Heading chars in SOL context (with interspersed comments)
26389 <!--c0--><p>=a=</p>
26391 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
26393 <!--c0--><nowiki>=a=</nowiki>
26395 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
26399 Headings: 6d. Heading chars in SOL context (No escaping needed)
26409 Headings: 7. Insert a newline between new content and headings
26415 <h2 data-parsoid='{}'>A</h2>
26416 <p data-parsoid='{}'>a</p>
26426 Headings: Used as horizontal rule
26428 wgFragmentMode=[ 'html5', 'legacy' ]
26434 <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>
26436 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
26439 #### --------------- Lists ---------------
26440 #### 0. Outside nests (*foo, etc.)
26441 #### 1. Nested inside html <ul><li>*foo</li></ul>
26442 #### 2. Inside definition lists
26443 #### 3. Only bullets at start should be escaped
26444 #### 4. No escapes needed
26445 #### 5. No unnecessary escapes
26446 #### 6. Escape bullets in SOL position
26447 #### 7. Escape bullets in a multi-line context
26448 #### ----------------------------------------
26451 Lists: 0. Outside nests
26461 <nowiki>*</nowiki>foo
26463 <nowiki>#</nowiki>foo
26465 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
26468 ## Making these next 3 tests Parsoid-only since they are html2wt tests
26469 ## to test wikitext escaping, and insignificant whitespace diffs
26470 ## cause PHP parser tests to barf
26472 Lists: 1. Nested inside html (No unnecessary escapes)
26481 <li data-parsoid='{}'>*foo</li>
26482 <li data-parsoid='{}'>#foo</li>
26483 <li data-parsoid='{}'>:foo</li>
26484 <li data-parsoid='{}'>;foo</li>
26492 <li data-parsoid='{}'>*foo</li>
26493 <li data-parsoid='{}'>#foo</li>
26494 <li data-parsoid='{}'>:foo</li>
26495 <li data-parsoid='{}'>;foo</li>
26502 *<nowiki>*foo</nowiki>
26503 *<nowiki>#foo</nowiki>
26504 *<nowiki>:foo</nowiki>
26505 *<nowiki>;foo</nowiki>
26511 #<nowiki>*foo</nowiki>
26512 #<nowiki>#foo</nowiki>
26513 #<nowiki>:foo</nowiki>
26514 #<nowiki>;foo</nowiki>
26518 Lists: 2. Inside definition lists
26522 <dl><dt>;foo</dt></dl>
26523 <dl><dt>:foo</dt></dl>
26526 <dl><dd>:foo</dd></dl>
26530 ; <nowiki>:foo</nowiki>
26532 ; <nowiki>:foo</nowiki>
26539 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
26545 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
26549 *<nowiki>*foo</nowiki>''it''*bar
26553 Lists: 4. No escapes needed
26566 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
26570 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
26584 Lists: 5. No unnecessary escapes
26588 <ul><li> bar <span>[[foo]]</span></li></ul>
26589 <ul><li> =bar <span>[[foo]]</span></li></ul>
26590 <ul><li> [[bar <span>[[foo]]</span></li></ul>
26591 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
26592 <ul><li> =bar <span>foo]]</span>=</li></ul>
26593 <ul><li> <s></s>: a</li></ul>
26594 <ul><li> <i>* foo</i></li></ul>
26597 * bar <span><nowiki>[[foo]]</nowiki></span>
26599 * =bar <span><nowiki>[[foo]]</nowiki></span>
26601 * [[bar <span><nowiki>[[foo]]</nowiki></span>
26603 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
26605 * =bar <span>foo]]</span>=
26613 Lists: 6. Escape bullets in SOL position
26617 <p><!--cmt-->*foo</p>
26619 <!--cmt--><nowiki>*</nowiki>foo
26623 Lists: 7. Escape bullets in a multi-line context
26632 <nowiki>*</nowiki>b
26636 Lists: 8. Escape colons only if not present in tags
26640 <dl><dt>a:b<i>c:d</i></dt></dl>
26642 ; <nowiki>a:b</nowiki>''c:d''
26645 #### --------------- HRs ---------------
26646 #### 1. Single line
26647 #### -----------------------------------
26650 HRs: 1. Single line
26658 ----<nowiki>----</nowiki>
26663 #### --------------- Tables ---------------
26664 #### 1a. Simple example
26665 #### 1b. No escaping needed (!foo)
26666 #### 1c. No escaping needed (|foo)
26667 #### 1d. No escaping needed (|}foo)
26669 #### 2a. Nested in td (<td>foo|bar</td>)
26670 #### 2b. Nested in td (<td>foo||bar</td>)
26671 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
26673 #### 3a. Nested in th (<th>foo!bar</th>)
26674 #### 3b. Nested in th (<th>foo!!bar</th>)
26675 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
26679 #### 4c. No escaping needed
26680 #### --------------------------------------
26683 Tables: 1a. Simple example
26691 <nowiki>{|</nowiki>
26696 Tables: 1b. No escaping needed
26707 Tables: 1c. No escaping needed
26718 Tables: 1d. No escaping needed
26729 Tables: 2a. Nested in td
26734 <td>foo|bar</td></tr>
26735 <tr><td>x<div>a|b</div></td>
26739 |<nowiki>foo|bar</nowiki>
26741 |x<div><nowiki>a|b</nowiki></div>
26749 <td>x<div>a|b</div>
26750 </td></tr></tbody></table>
26754 Tables: 2b. Nested in td
26760 <td>a<i>b||c</i></td>
26761 <td>a<i><div>b||c</div></i></td>
26762 </tr></tbody></table>
26765 |<nowiki>foo||bar</nowiki>
26766 |a''<nowiki>b||c</nowiki>''
26767 |a''<div><nowiki>b||c</nowiki></div>''
26776 <td>a<i><div>b||c</div></i>
26781 Tables: 2c. Nested in td -- no escaping needed
26796 Tables: 3a. Nested in th
26811 Tables: 3b. Nested in th
26816 <tr><th>foo!!bar</th>
26817 <th><i>foo|bar</i></th>
26818 <th><i>foo!!bar</i></th>
26819 <th><i><span>foo!!bar</span></i></th>
26820 </tr></tbody></table>
26823 !<nowiki>foo!!bar</nowiki>
26824 !''<nowiki>foo|bar</nowiki>''
26825 !''<nowiki>foo!!bar</nowiki>''
26826 !''<span><nowiki>foo!!bar</nowiki></span>''
26835 <th><i>foo!!bar</i>
26837 <th><i><span>foo!!bar</span></i>
26842 Tables: 3c. Nested in th
26847 <tr><th>foo||bar</th>
26848 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26849 </tr></tbody></table>
26852 !<nowiki>foo||bar</nowiki>
26853 !<nowiki>foo||bar</nowiki>
26865 Tables: 4a. Escape -
26880 |<nowiki>-bar</nowiki>
26885 Tables: 4b. Escape +
26900 |<nowiki>+bar</nowiki>
26905 Tables: 4c. No escaping needed
26910 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26911 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26917 <div>a|b</div></td>
26961 Tables: 4d. No escaping needed
26966 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26967 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26968 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26979 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26988 Tables: 4e. Escape }
26993 <tr><td>}</td></tr>
26994 <tr><td>x</td><td data-parsoid='{"stx":"row"}'>}</td></tr></table>
26998 |<nowiki>}</nowiki>
27014 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
27018 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
27020 <table><tr><td></td><td align="center"></td><td></td></tr></table>
27022 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
27024 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
27027 | || align="center" | ||
27037 | {{!}}{{!}} align="center" | ||
27041 ! !! align="center" | !!
27047 <td align="center"></td>
27049 </td></tr></tbody></table>
27054 <td align="center">
27057 </td></tr></tbody></table>
27061 <td align="center"></td>
27063 </td></tr></tbody></table>
27067 <th align="center"></th>
27069 </th></tr></tbody></table>
27073 T97430: Don't emit empty nowiki pairs around marker meta tags
27077 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
27078 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
27080 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
27081 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
27085 Unclosed xmlish element in table line shouldn't eat end delimiters
27090 <tbody><tr><td> <foo</td>
27091 <td> bar></td></tr>
27107 #### --------------- Links ----------------
27108 #### 1. Quote marks in link text
27109 #### 2. Wikilinks: Escapes needed
27110 #### 3. Wikilinks: No escapes needed
27111 #### 4. Extlinks: Escapes needed
27112 #### 5. Extlinks: No escapes needed
27113 #### --------------------------------------
27115 Links 1. WikiLinks: No escapes needed
27119 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
27120 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
27121 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
27125 [[Foo|x [Foobar] x]]
27127 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
27128 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
27129 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
27134 Links 2. WikiLinks: Escapes needed
27138 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
27139 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
27140 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
27141 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
27142 <a href="Foo" rel="mw:WikiLink">|Bar</a>
27143 <a href="Foo" rel="mw:WikiLink">]]bar</a>
27144 <a href="Foo" rel="mw:WikiLink">[[bar</a>
27145 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
27146 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
27147 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
27149 [[Foo|<nowiki>Foobar]</nowiki>]]
27150 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
27151 [[Foo|<nowiki>[[Bar]]</nowiki>]]
27152 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
27154 [[Foo|<nowiki>]]bar</nowiki>]]
27155 [[Foo|<nowiki>[[bar</nowiki>]]
27156 [[Foo|<nowiki>x [[ y</nowiki>]]
27157 [[Foo|<nowiki>x ]] y</nowiki>]]
27158 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
27160 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
27161 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
27162 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
27163 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
27164 <a href="/wiki/Foo" title="Foo">|Bar</a>
27165 <a href="/wiki/Foo" title="Foo">]]bar</a>
27166 <a href="/wiki/Foo" title="Foo">[[bar</a>
27167 <a href="/wiki/Foo" title="Foo">x [[ y</a>
27168 <a href="/wiki/Foo" title="Foo">x ]] y</a>
27169 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
27174 Links 3. WikiLinks: No escapes needed
27178 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
27179 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
27184 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
27185 <a href="/wiki/Foo" title="Foo">foo|bar</a>
27190 Links 4. ExtLinks: Escapes needed
27194 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
27195 <a rel="mw:ExtLink" href="http://google.com">google]</a>
27196 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
27197 <p>[http://google.com]</p>
27198 <p>[http://google.com google]</p>
27199 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
27200 <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>
27202 [http://google.com <nowiki>[google]</nowiki>]
27203 [http://google.com <nowiki>google]</nowiki>]
27204 [http://google.com <nowiki>goog] le</nowiki>]
27206 <nowiki>[http://google.com]</nowiki>
27208 <nowiki>[http://google.com google]</nowiki>
27210 [http://google.com<nowiki>]</nowiki>
27212 [{{echo|http://google.com}}<nowiki>]</nowiki>
27214 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
27215 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
27216 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
27217 </p><p>[http://google.com]
27218 </p><p>[http://google.com google]
27219 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
27220 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
27225 Links 5. ExtLinks: No escapes needed
27229 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
27230 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
27232 [http://google.com [google]
27234 [[http://google.com]]
27236 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
27237 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
27242 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
27246 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
27247 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
27248 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
27249 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
27250 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
27251 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
27252 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
27253 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
27254 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
27255 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
27256 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
27257 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
27258 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
27261 x<nowiki/>http://example.com<nowiki/>y
27262 http://example.com<nowiki/>?x
27263 http://example.com<nowiki/>&x
27264 http://example.com<nowiki/>'x
27265 http://example.com<nowiki/>,x
27266 http://example.com<nowiki/>.x
27267 http://example.com<nowiki/>;x
27268 http://example.com<nowiki/>:x
27269 http://example.com<nowiki/>;x
27270 http://example.com<nowiki/>!x
27271 http://example.com<nowiki/>=x
27272 http://example.com<nowiki/>(x)
27273 http://example.com(x<nowiki/>)
27277 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
27282 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
27284 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
27285 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
27286 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
27287 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
27288 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
27294 "http://example.com"
27295 (http://example.com)
27296 (http://example.com) foo
27297 http://example.com,
27298 http://example.com, foo
27301 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
27303 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
27304 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
27305 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
27306 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
27307 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
27312 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
27316 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
27317 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
27319 http://example.com.,;:!?\
27320 -http://example.com:
27322 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
27323 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
27328 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
27332 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
27333 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
27334 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
27338 X<nowiki/>RFC 123<nowiki/>y
27342 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
27346 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
27347 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
27348 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
27355 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
27356 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
27357 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
27362 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
27366 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
27367 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27368 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
27372 X<nowiki/>PMID 123<nowiki/>y
27376 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
27380 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
27381 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
27382 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
27389 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
27390 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
27391 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
27396 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
27400 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
27401 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
27402 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
27405 ISBN 1234567890<nowiki/>1
27406 ISBN 1234567890<nowiki/>x
27407 a<nowiki/>ISBN 1234567890<nowiki/>b
27411 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
27415 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
27419 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
27424 Links 14. Protect link-like plain text. (Parsoid bug T78425)
27428 <p>this is not a link: http://example.com
27431 this is not a link: <nowiki>http://example.com</nowiki>
27435 Links 15. Link trails can't become link prefixes.
27440 <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>
27442 [[Söfnuður]]-[[00]]
27444 <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>
27448 #### --------------- Quotes ---------------
27449 #### 1. Quotes inside <b> and <i>
27450 #### 2. Link fragments separated by <i> and <b> tags
27451 #### 3. Link fragments inside <i> and <b>
27452 #### 4. No escaping needed
27453 #### --------------------------------------
27455 1a. Quotes inside <b> and <i>
27466 <b>foo'<i>bar'</i>baz</b>
27475 <i>fools'<span> errand</span></i>
27476 <i><span>fool</span>'s errand</i>
27477 '<i>foo</i> bar '<i>baz</i>
27478 a|!*#-:;+-~[]{}b'<i>x</i>
27482 ''<nowiki>''foo''</nowiki>''
27483 ''<nowiki>'''foo'''</nowiki>''
27485 '''<nowiki/>'foo''''
27486 '''<nowiki>''foo''</nowiki>'''
27487 '''<nowiki>'''foo'''</nowiki>'''
27488 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
27489 '''foo'''<nowiki/>'s
27495 '''foo'''<nowiki/>'
27496 ''''foo'''<nowiki/>'
27497 ''fools'<span> errand</span>''
27498 ''<span>fool</span>'s errand''
27499 '<nowiki/>''foo'' bar '''baz''
27500 a|!*#-:;+-~[]{}b'''x''
27504 1b. Quotes inside <b> and <i> with other tags on same line
27508 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27509 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27510 <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>
27511 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
27512 '<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>
27513 '<i>foo</i> <div title="name">test</div>
27514 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
27515 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
27516 <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>
27519 '''a'' foo ''[[bar]]''
27520 ''a''' foo ''[[bar]]''
27521 ''a''' foo '''{{echo|[[bar]]}}'''
27522 [[foo]] x'''[[bar]]''
27523 '''foo'' <ref>test</ref>
27524 '''foo'' <div title="name">test</div>
27525 '''foo'' and <br> bar
27530 2. Link fragments separated by <i> and <b> tags
27534 <p>[[<i>foo</i>hello]]</p>
27535 <p>[[<b>foo</b>hello]]</p>
27537 [[''foo''<nowiki>hello]]</nowiki>
27539 [['''foo'''<nowiki>hello]]</nowiki>
27542 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
27543 # this is one of the shortcomings of this format
27545 3. Link fragments inside <i> and <b>
27549 <p><i>[[foo</i>]]</p>
27550 <p><b>[[foo</b>]]</p>
27552 ''[[foo''<nowiki>]]</nowiki>
27554 '''[[foo'''<nowiki>]]</nowiki>
27558 4. No escaping needed
27562 <p>'<span><i>bar</i></span>'
27563 '<span><b>bar</b></span>'
27567 '<span>''bar''</span>'
27568 '<span>'''bar'''</span>'
27572 #### ----------- Paragraphs ---------------
27573 #### 1. No unnecessary escapes
27574 #### --------------------------------------
27577 1. No unnecessary escapes
27581 <p>bar <span>[[foo]]</span>
27582 </p><p>=bar <span>[[foo]]</span>
27583 </p><p>[[bar <span>[[foo]]</span>
27584 </p><p>]]bar <span>[[foo]]</span>
27585 </p><p>=bar <span>foo]]</span>=
27588 bar <span><nowiki>[[foo]]</nowiki></span>
27590 =bar <span><nowiki>[[foo]]</nowiki></span>
27592 [[bar <span><nowiki>[[foo]]</nowiki></span>
27594 ]]bar <span><nowiki>[[foo]]</nowiki></span>
27596 =bar <span>foo]]</span><nowiki>=</nowiki>
27599 #### ----------------------- PRE --------------------------
27601 1. Leading whitespace in SOL context should be escaped
27624 <nowiki> </nowiki>a
27626 <nowiki> </nowiki> a
27630 <nowiki> </nowiki> a
27632 <nowiki> </nowiki>a
27635 <nowiki> </nowiki>b
27658 2. Leading whitespace in non-indent-pre contexts should not be escaped
27662 <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>
27663 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
27664 <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>
27674 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
27693 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
27697 <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>
27699 [[File:Foobar.jpg|thumb|caption]]
27703 5. Nowiki escaping should account for indent-pres
27713 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
27727 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
27730 "modes": ["html2wt"],
27731 "scrubWikitext": true
27739 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
27740 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
27741 <p> <!--boo-->*foo</p>
27742 <p><!--boo--> *foo</p>
27743 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
27744 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
27760 <nowiki>*</nowiki>foo
27762 <nowiki/><!--boo-->*foo
27764 <!--boo--><nowiki/>*foo
27766 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
27768 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
27771 #### --------------- Behavior Switches --------------------
27774 1. Valid behavior switches should be escaped
27781 <nowiki>__TOC__</nowiki>
27782 ''<nowiki>__TOC__</nowiki>''
27786 2. Invalid behavior switches should not be escaped
27797 # We use indent-pre as an indirect way to test for sol-transparent behavior.
27799 Behavior switches should be SOL-transparent
27803 <meta property="mw:PageProp/toc" />
27805 <!-- this one's bogus -->
27808 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
27810 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
27814 <!-- this one's bogus -->
27823 #### --------------- HTML tags ---------------
27826 #### 3. multi-line html tag
27827 #### 4. extension tags
27828 #### -----------------------------------------
27834 <a href="http://google.com">google</a>
27836 <a href="http://google.com">google</a>
27844 <ul><li> <div>foo</div></li>
27845 <li> <div style="color:red">foo</div></li>
27846 <li> <td></li></ul>
27849 * <nowiki><div>foo</div></nowiki>
27850 * <nowiki><div style="color:red">foo</div></nowiki>
27851 * <nowiki><td></nowiki>
27855 3. multi-line html tag
27874 <p><ref>foo</ref>
27875 </p><p><ref>bar
27876 </p><p>baz</ref>
27879 <nowiki><ref>foo</ref></nowiki>
27881 <nowiki><ref>bar</nowiki>
27883 baz<nowiki></ref></nowiki>
27887 Parsoid: newline inducing block nodes don't suppress <nowiki>
27893 <nowiki> </nowiki>a
27898 #### --------------- Others ---------------
27904 <p><nowiki>foo</nowiki>
27907 <nowiki>foo</nowiki>
27910 ## The quote-char in the input is necessary for triggering the bug
27912 (T54035) Nowiki-escaping should not get tripped by " :" in text
27921 #----------- End of wikitext escaping tests --------------
27925 Tag-like HTML structures are passed through as text
27947 </p><p>1<d e>f
27952 HTML tag with necessary entities in attributes
27954 <span title="&amp;">foo</span>
27956 <p><span title="&amp;">foo</span>
27961 HTML tag with 'unnecessary' entity encoding in attributes
27963 <span title="&">foo</span>
27965 <p><span title="&">foo</span>
27970 HTML tag with broken attribute value quoting
27972 parsoid=wt2html,html2html
27974 <span title="Hello world>Foo</span>
27976 <p><span title="Hello world">Foo</span>
27979 <p><span title="Hello world">Foo</span></p>
27983 Self-closed tag with broken attribute value quoting
27985 parsoid=wt2html,html2html
27987 <div title="Hello world />Foo
27989 <div title="Hello world"></div><p>Foo</p>
27991 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27995 Table with broken attribute value quoting
27997 parsoid=wt2html,html2html
28000 | title="Hello world|Foo
28005 <td title="Hello world">Foo
28010 <td title="Hello world">Foo
28015 Table with broken attribute value quoting on consecutive lines
28017 parsoid=wt2html,html2html
28020 | title="Hello world|Foo
28021 | style="color:red|Bar
28026 <td title="Hello world">Foo
28028 <td style="color:red">Bar
28033 <td title="Hello world">Foo
28034 </td><td style="color: red">Bar
28035 </td></tr></tbody></table>
28039 Accept empty td cell attribute
28042 | align="center" |foo|| |
28047 <td align="center">foo</td>
28053 Non-empty attributes in th-cells
28056 !Foo!! style="color: red" |Bar
28062 <th style="color: red">Bar
28067 Accept empty attributes in th-cells
28081 Empty table rows go away
28101 ### Parsoid-centric tests for testing RTing of inter-element separators
28102 ### Edge cases not tested by existing parser tests and specific to
28103 ### Parsoid-specific serialization strategies.
28107 RT-ed inter-element separators should be valid separators
28118 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
28122 # Parsoid-only test of a DOM pass
28124 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
28136 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
28137 <p>bar</p></small></td></tr>
28141 <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>
28145 # Note that the "style" attribute is really a template parameter here.
28146 # The = would have to be {{=}} if you wanted the literal.
28148 Empty TD followed by TD with tpl-generated attribute
28153 |{{echo|style='color:red'}}|foo
28166 Indented table with an empty td
28184 Indented table with blank lines in between (T85627)
28202 <br /></p></td></tr>
28207 Indented block & table
28220 <div data-parsoid='{"stx":"html"}'>foo</div>
28222 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
28227 Indent and comment before table row
28241 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
28242 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
28246 # PHP parser omits empty TR
28248 Empty TR followed by a template-generated TR
28252 {{echo|<tr><td>foo</td></tr>}}
28257 <tbody><tr><td>foo</td></tr>
28262 <tr class='mw-empty-elt'></tr>
28263 <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}}]}'>
28268 ## PHP and parsoid output differ for this; as usual PHP omits empty
28269 ## elements, and since it strips the comments the TR is empty.
28271 Empty TR followed by mixed-ws-comment line should RT correctly
28287 <tr class='mw-empty-elt'></tr>
28290 <!--c--> </tr><!--d-->
28295 Multi-line image caption generated by templates with/without trailing newlines
28297 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
28298 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
28300 <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>
28301 <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>
28305 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
28309 <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>
28311 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
28313 <includeonly>foo</includeonly>
28321 ## PHP emits broken html for this, and since this is primarily
28322 ## a Parsoid serializer test, marking this Parsoid only
28324 Improperly nested inline or quotes tags with whitespace in between
28326 <span> <s>x</span> </s>
28329 <p><span> <s>x</s></span><s> </s>
28330 <b> <i>x</i></b><i> </i>
28335 Encapsulate protected attributes from wt
28337 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
28339 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
28343 <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>
28345 <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">
28346 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
28350 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
28351 ## Having nested or stray pre tags results in the attempt to add duplicates,
28352 ## causing an assertion fail. This test tries to prevent that situation.
28354 Ensure ParagraphWrapper can deal with stray closing pre tags
28363 ## Remex doesn't account for fostered content.
28365 1. Ensure fostered text content is wrapped in element nodes
28369 <table>hi</table><table>ho</table>
28371 hi<table></table>ho<table></table>
28373 <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>
28376 ## Remex doesn't account for fostered content.
28378 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
28380 parsoid=wt2html,wt2wt
28390 </td></tr></tbody></table>
28392 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
28393 <table data-parsoid='{"stx":"html"}'>
28394 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
28395 </td></tr></tbody></table>
28398 ## Remex doesn't account for fostered content.
28400 Encapsulation properly handles null DSR information from foster box
28402 parsoid=wt2html,wt2wt
28404 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
28406 <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>
28409 ## Remex doesn't account for fostered content.
28411 1. Encapsulate foster-parented transclusion content
28413 parsoid=wt2wt,wt2html
28415 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
28417 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
28419 <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>
28423 2. Encapsulate foster-parented transclusion content
28425 parsoid=wt2wt,wt2html
28427 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
28429 <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>
28440 3. Encapsulate foster-parented transclusion content
28442 parsoid=wt2wt,wt2html
28444 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28446 <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>"]}">
28459 4. Encapsulate foster-parented transclusion content
28461 parsoid=wt2wt,wt2html
28463 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
28465 <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>"]}">
28477 ## Remex doesn't account for fostered content.
28479 5. Encapsulate foster-parented transclusion content
28481 parsoid=wt2wt,wt2html
28483 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
28485 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
28487 <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>
28490 ## Remex doesn't account for fostered content.
28492 6. Encapsulate foster-parented transclusion content
28494 parsoid=wt2wt,wt2html
28496 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
28498 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
28500 <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>
28504 7. Encapsulate foster-parented transclusion content
28506 parsoid=wt2wt,wt2html
28508 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
28510 <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>
28520 ## Remex doesn't account for fostered content.
28521 # Note that the wt is broken on purpose: the = should be {{=}} if you
28522 # don't want it to be a template parameter key.
28524 8. Encapsulate foster-parented transclusion content
28526 parsoid=wt2wt,wt2html
28529 }}{|{{echo|style='color:red'}}
28540 </td></tr></tbody></table>
28542 <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">
28543 </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">
28546 </td></tr></tbody></table>
28549 ## Remex doesn't account for fostered content.
28551 9. Encapsulate foster-parented transclusion content
28553 parsoid=wt2wt,wt2html
28555 <table>{{echo|hi</table>hello}}
28557 hi<table></table><p>hello</p>
28559 <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>
28563 Table in fosterable position
28574 <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">
28576 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
28582 # Parsoid only for T66747
28583 # (Also core doesn't define {{#if}} in default install)
28585 Properly encapsulate empty-content transclusions in fosterable positions
28593 <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"}]]}'>
28598 ## No longer captures its original intention
28600 Always encapsulate foster box when template range is expanded to table
28613 T115289: Unclosed table
28615 {{echo|<table>}}<!--c-->[[Category:Two]]
28617 <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>
28621 T115289: Don't migrate newlines out of tables with fostered content
28623 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
28625 <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>
28629 T73074: More fostering fun
28631 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
28633 <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>
28637 Support <object> element with .data attribute
28641 <object data="test.swf"></object>
28643 <object data="test.swf"></object>
28647 T72867: Don't block XML namespace declaration
28649 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28651 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28654 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
28657 # -----------------------------------------------------------------
28658 # The following section of tests are primarily to spec requirements
28659 # around Parsoid's serialization (old, new, edited content)
28661 # All these tests are marked Parsoid html2wt and html2html only
28662 # ----------------------------------------------------------------
28665 Ignore rel attribute in a-tags during serialization to url-links
28669 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
28670 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
28671 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
28673 http://en.wikipedia.org/wiki/Foobar
28674 http://en.wikipedia.org/wiki/Foobar
28675 http://en.wikipedia.org/wiki/Foobar
28678 # 'mi' is a localinterwiki prefix as well as a language
28680 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
28684 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
28690 Parsoid should accept interwiki shortcuts
28694 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
28695 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
28696 <a href='./fr:Foo'>Foo</a></p>
28697 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
28698 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
28699 <a href='fr%3AFoo'>Foo</a></p>
28700 <p><a href='FR%3AFoo'>Foo</a>
28701 <a href='./FR:Foo'>Foo</a></p>
28716 Parsoid should not accept invalid interwiki shortcuts
28720 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
28721 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
28722 <a href='news:Foo'>Foo</a></p>
28731 New wikilinks should be serialized properly
28735 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
28736 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
28737 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
28738 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
28739 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
28743 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
28744 http://en.wikipedia.org/wiki/Foo
28745 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
28749 New wiki links (href variations)
28753 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28754 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
28755 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
28756 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
28761 [[Toxine bactérienne]]
28765 New wiki links (content string variations)
28769 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28770 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
28771 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
28775 [[Foo_bar|./Foo_bar]]
28779 New category links (href variations)
28783 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
28784 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
28785 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
28787 [[Category:Toxine bactérienne]]
28788 [[Category:Toxine bactérienne]]
28789 [[Category:Toxine bactérienne]]
28793 New sol transparent links don't need indent-pre nowiki protection
28798 <link rel="mw:PageProp/redirect" href="./Main_Page">
28799 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
28800 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
28802 #WEITERLEITUNG [[Main Page]]
28803 <!-- this is good --> [[Category:Good]]
28804 <!-- this is great --> [[Kategorie:Great]]
28808 New interlanguage links (href variations)
28812 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
28813 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
28814 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
28816 [[es:Toxine bactérienne]]
28817 [[es:Toxine_bactérienne]]
28818 [[es:Toxine_bactérienne]]
28821 # Regression test for T219023
28823 Emit simple non-piped link where possible
28827 <a rel='mw:WikiLink' href='./VisualEditor'>VisualEditor</a>
28828 <a rel='mw:WikiLink' href='./VisualEditor'>visualEditor</a>
28829 <a rel='mw:WikiLink' href='./VisualEditor link'>VisualEditor link</a>
28830 <a rel='mw:WikiLink' href='./VisualEditor link'>visualEditor link</a>
28834 [[VisualEditor link]]
28835 [[visualEditor link]]
28839 Image: Modifying size of an image (1)
28842 "modes": ["wt2wt"],
28844 ["img[height]", "attr", "height", "22"],
28845 ["img[width]", "attr", "width", "200"]
28849 [[Image:Foobar.jpg|230x230px]]
28851 [[Image:Foobar.jpg|200x200px]]
28855 Image: Modifying size of an image (2)
28858 "modes": ["wt2wt"],
28860 ["img[height]", "attr", "height", "100"],
28861 ["img[width]", "attr", "width", "500"]
28865 [[Image:Foobar.jpg|230x230px]]
28867 [[Image:Foobar.jpg|500x500px]]
28870 # Change in size is ignored so long as class='mw-default-size'
28872 Image: Modifying size of an image (3)
28875 "modes": ["wt2wt"],
28877 ["figure[class]", "removeClass", "mw-default-size"],
28878 ["figure img", "attr", "height", "19"],
28879 ["figure img", "attr", "width", "170"]
28883 [[Image:Foobar.jpg|thumb]]
28885 [[Image:Foobar.jpg|thumb|170x170px]]
28889 Image: Modifying alignment of an image (T50665)
28892 "modes": ["wt2wt"],
28894 ["figure[class]", "removeClass", "mw-halign-right"],
28895 ["figure[class]", "addClass", "mw-halign-left"]
28899 [[Image:Foobar.jpg|thumb|caption|right]]
28901 [[Image:Foobar.jpg|thumb|caption|left]]
28905 Image: Modifying mw-default-size of an frameless image (T64805)
28908 "modes": ["wt2wt"],
28910 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28914 [[Image:Foobar.jpg|frameless|right]]
28916 [[Image:Foobar.jpg|frameless|right|220x220px]]
28920 Image: Modifying valign of an image (T51221)
28923 "modes": ["wt2wt"],
28925 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28926 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28930 [[File:Foobar.jpg|20px|middle]]
28932 [[File:Foobar.jpg|20px|text-top]]
28936 Image: Modifying alt attribute of an image (T58400)
28940 "modes": ["wt2wt"],
28942 ["img[alt]", "attr", "alt", "some alternate edited text"]
28946 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28948 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28952 Image: Modifying caption of an image
28955 "modes": ["wt2wt"],
28957 ["figcaption", "text", "new caption"]
28961 [[Image:Foobar.jpg|thumb|original caption]]
28963 [[Image:Foobar.jpg|thumb|new caption]]
28967 Image: empty alt attribute (T50924)
28969 [[File:Foobar.jpg|thumb|alt=|bar]]
28971 <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>
28973 <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>
28977 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28983 <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>
28985 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28989 Image: Block level image should have \n before and after
28992 [[File:Foobar.jpg|right|thumb|150x150px]]
28996 <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>
29001 Image: New block level image should have \n before and after (existing content)
29004 [[File:Foobar.jpg|right|thumb|150x150px]]
29008 <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>
29013 Image: upright option (parsoid)
29015 [[File:Foobar.jpg|thumb|upright|caption]]
29016 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
29017 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
29019 <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>
29020 <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>
29021 <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>
29025 Image: upright option is ignored on inline and frame images (parsoid)
29027 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
29029 <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>
29033 Image: in template parameter with empty parameter
29035 {{echo|[[File:Foobar.jpg|link=]]}}
29037 <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>
29041 Image: from basic HTML (1)
29045 <span typeof="mw:Image">
29046 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
29049 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
29053 Image: from basic HTML (2)
29057 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
29059 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
29063 Image: from basic HTML (3)
29067 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
29069 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
29073 Image: from basic HTML (4)
29077 <img src="./File:Foobar.jpg">
29079 [[File:Foobar.jpg|link=]]
29083 Image: Invalid title as link
29085 [[File:Foobar.jpg|link=<]]
29087 <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>
29090 <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>
29094 Various link types in alt and link options
29096 [[File:Foobar.jpg|link=[[Main Page]]|alt=[[Main Page]]|caption]]
29098 [[File:Foobar.jpg|link=[[Media:Thumb.png]]|alt=[[Media:Thumb.png]]|caption]]
29100 [[File:Foobar.jpg|link=[[wikipedia:Foo]]|alt=[[wikipedia:Foo]]|caption]]
29102 <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>
29103 </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>
29104 </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>
29107 <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>
29109 <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>
29111 <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>
29115 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
29120 <li><p>foo</p></li>
29127 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
29131 <ul> <li>foo</li></ul>
29137 Don't strip leading whitespace when handling indent-pre suppressing tags
29142 <tr><td> indented row</td></tr>
29145 <b>This is very bold of you!</b>
29148 indented cell (no pre-wrapping!)
29158 '''This is very bold of you!'''
29162 indented cell (no pre-wrapping!)
29170 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
29192 <nowiki> </nowiki></span>bar2
29195 <nowiki> </nowiki><span>bar</span>
29198 <nowiki> </nowiki><span>foo</span>
29203 Lists: Dont insert newlines in a serialized list item.
29207 <ul><li>a<br>b</li><li>c</li></ul>
29214 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
29217 "modes": ["html2wt"],
29218 "scrubWikitext": false
29221 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
29222 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
29224 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
29225 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
29227 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
29229 <h2><meta property="mw:PageProp/toc" /> ok</h2>
29231 == hello there [[Category:A1]] ==
29233 == [[Category:A2]] hi pal ==
29235 == <!--foo--> [[Category:A3]] how goes it ==
29237 == it goes well [[Category:A4]] <!--bar--> ==
29239 ==howdy [[Category:A5]]==
29245 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
29248 "modes": ["html2wt"],
29249 "scrubWikitext": true
29252 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
29253 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
29255 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
29256 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
29258 <h2><meta property="mw:PageProp/toc" /> ok</h2>
29266 <!--foo-->[[Category:A3]]
29271 [[Category:A4]] <!--bar-->
29279 Headings: Don't hoist metas that come from templates
29282 "modes": ["html2wt"],
29283 "scrubWikitext": true
29286 <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>
29288 == {{echo|foo [[Category:Foo]]}} ==
29292 Headings: Category in ref isn't hoisted
29295 "modes": ["html2wt"],
29296 "scrubWikitext": true
29299 <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>
29301 <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>
29304 [[Category:Baz]] </ref> ==
29310 Parsoid: Serialize positional parameters with = in them as named parameter
29314 <p about="#mwt1" typeof="mw:Transclusion"
29315 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
29317 <p about="#mwt1" typeof="mw:Transclusion"
29318 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
29320 <!--Orig params with data-parsoid has heuristics for handling = chars-->
29321 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
29322 <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>
29326 {{echo|1=f=oo|2=bar}}
29328 <!--Orig params with data-parsoid has heuristics for handling = chars-->
29329 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
29330 {{echo|<nowiki>f=oo</nowiki>|bar}}
29334 Parsoid: Serialize positional parameters with = in extlink as named parameter
29338 <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>
29340 {{echo|1=http://stuff?is=ok}}
29344 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
29348 <div>a<p>b</p></div>
29369 Substrings resembling wikitext in hrefs should not get nowiki escapes
29373 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
29379 Enforce single-line context in the serializer
29386 <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">
29387 </span><span about="#mwt1">you</span> </h2>
29389 <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>
29391 <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
29392 there</span></li></ol>
29404 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
29411 </tbody></table></dd></dl>
29415 == hi {{bogus|there
29426 * foo '''bar''' baz
29438 Serialize new placeholder space without spans
29442 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
29444 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
29446 <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>
29452 <ref>foo : bar</ref>ok
29456 #-----------------------
29457 # Tag minimization tests
29458 #-----------------------
29461 1. I/B quote minimization: wikitext-only tags should be combined
29465 <p><i>A</i><i>B</i></p>
29466 <p><b>A</b><b>B</b></p>
29467 <p><i>A</i><b><i>B</i></b></p>
29468 <p><b>A</b><i><b>B</b></i></p>
29469 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
29470 <p><i><b>A</b></i><i><b>B</b></i></p>
29471 <p><i><b>A</b></i><b><i>B</i></b></p>
29472 <p><b><i>A</i></b><i><b>B</b></i></p>
29492 2. I/B quote minimization: wikitext and html tags should not be combined
29496 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
29497 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
29501 ''A''<nowiki/>'''<i>B</i>'''
29505 3. I/B quote minimization: templated content stops minimization
29509 <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>
29510 <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>
29512 ''A''{{echo|''B''}}
29514 ''A''{{echo|'''''B'''''}}
29518 4. I/B quote minimization: new content should be mimimized with adjacent old content
29522 <p><i>A</i><i>B</i></p>
29523 <p><b>A</b><b>B</b></p>
29524 <p><i>A</i><b><i>B</i></b></p>
29534 5a. Merge adjacent quote nodes if they've been edited
29537 "modes": ["wt2wt", "selser"],
29539 ["p", "contents", "remove", ":contains('b')"]
29549 5b. Merge adjacent quote nodes if they've been edited
29552 "modes": ["wt2wt", "selser"],
29558 ''a''<span id="x">b</span>''c''
29564 1. Merge adjacent link nodes as long as at least one element is new
29567 "modes": ["html2wt"],
29568 "scrubWikitext": true
29571 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29572 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29573 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
29577 [[Football|Foot]][[Football|ball]]
29581 2. Merge adjacent link nodes and enable additional normalizations
29584 "modes": ["html2wt"],
29585 "scrubWikitext": true
29588 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
29594 3. Don't merge adjacent link nodes if scrubWikitext is false
29597 "modes": ["html2wt"],
29598 "scrubWikitext": false
29601 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29603 [[Football|Foot]][[Football|ball]]
29607 1. Move format tags outside of WikiLink
29610 "modes": ["html2wt"],
29611 "scrubWikitext": true
29614 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
29615 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
29616 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
29619 '''''[[Football]]'''''
29620 <u>'''''[[Football]]'''''</u>
29624 2. Move format tags outside of WikiLink with mergable A tags
29627 "modes": ["html2wt"],
29628 "scrubWikitext": true
29631 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
29633 '''''[[Football]]'''''
29637 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
29640 "modes": ["html2wt"],
29641 "scrubWikitext": true
29644 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
29646 <font color="red"><u>'''[[Foo]]'''</u></font>
29650 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
29653 "modes": ["html2wt"],
29654 "scrubWikitext": true
29657 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
29658 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
29659 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
29661 [[Foo|<font color="red">Foo</font>]]
29662 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
29663 [[Foo|<span class="Bar">Foo</span>]]
29667 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
29670 "modes": ["selser"],
29671 "scrubWikitext": true,
29673 ["a", "html", "<i>Foo</i>"]
29683 6. Regression test: Manual edit test to ensure diff markers are not lost
29686 "modes": ["selser"],
29687 "scrubWikitext": true,
29689 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
29699 7. T194083 Regression test: Manual edit test to ensure nested diff markers aren't inserted
29702 "modes": ["selser"],
29703 "scrubWikitext": true,
29705 ["div", "after", "\n<p><a href='./Foo' rel='mw:WikiLink'>Foo </a>, placeholder</p>"]
29709 <div>placeholder</div>
29711 <div>placeholder</div>
29712 [[Foo]] , placeholder
29715 #------------------------------
29716 # End of tag minimization tests
29717 #------------------------------
29720 T56262: New entities
29724 <span typeof="mw:Entity"> </span>
29729 ## Note that there is no wikitext output for 'unknownproperty' ##
29730 ## Unknown magic words are silently dropped ##
29737 <meta property='mw:PageProp/toc' />
29738 <meta property='mw:PageProp/notoc' />
29739 <meta property='mw:PageProp/forcetoc' />
29740 <meta property='mw:PageProp/index' />
29741 <meta property='mw:PageProp/noindex' />
29742 <meta property='mw:PageProp/nogallery' />
29743 <meta property='mw:PageProp/noeditsection' />
29744 <meta property='mw:PageProp/notitleconvert' />
29745 <meta property='mw:PageProp/nocontentconvert' />
29746 <meta property='mw:PageProp/unknownproperty' />
29756 __NOCONTENTCONVERT__
29760 Consecutive <pre>s should not get merged
29762 parsoid=html2wt,html2html
29764 <pre>a</pre><pre>b</pre>
29792 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
29796 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
29798 [[Special:BookSources/1234567890|ISBN 1234567895]]
29802 Edited RFC links not serializable as RFC links should serialize as extlinks
29806 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
29808 [https://tools.ietf.org/html/rfc123 New RFC]
29812 Edited PMID links not serializable as PMID links should serialize as extlinks
29816 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
29818 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
29822 WTS of autolinks with trailing/surrounding context
29826 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
29827 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
29828 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
29829 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
29830 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
29831 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
29833 http://cscott.net'''foo'''
29835 http://cscott.net<b>foo</b>
29837 '''http://cscott.net'''
29839 '''http://cscott.net '''
29841 '''http://cscott.net<nowiki/>x'''
29843 http://cscott.net<nowiki/>x
29847 WTS of autolinks with nowikis (round-trip)
29849 x<nowiki/>http://cscott.net<nowiki/>x
29851 <p>x<a rel="mw:ExtLink" href="http://cscott.net" class="external free">http://cscott.net</a>x</p>
29854 # this is the "easy" test because it leaves in place all the
29855 # data-parsoid information indicating this is an autolink
29857 WTS of autolinks with escapes (editing)
29860 "modes": ["wt2wt"],
29862 [ "span", "remove" ]
29866 x<nowiki/>http://cscott.net<nowiki/>x
29868 x<nowiki/>http://cscott.net<nowiki/>x
29872 WTS of edited autolink-like text (T103364)
29875 "modes": ["wt2wt"],
29877 [ "span[typeof]", "removeAttr", "typeof" ]
29881 Not a link: <nowiki>http://example.com</nowiki>.
29883 Not a link: <span><nowiki>http://example.com</nowiki></span>.
29887 WTS of newly-authored autolink-like text (T103364)
29891 <p>http://example.com is not a link.</p>
29893 <nowiki>http://example.com</nowiki> is not a link.
29897 WTS of autolink-like text after an autolink (T108563)
29901 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
29903 http://example.com <nowiki>http://example.com</nowiki> is not a link.
29907 WTS of an autolink surrounded by square brackets (T220018)
29911 <p>[<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]</p>
29913 <nowiki>[</nowiki>http://example.com]
29917 WTS of edited autolink surrounded by square brackets (T220018)
29920 "modes": ["wt2wt"],
29922 [ "a", "before", "[" ],
29923 [ "a", "after", "]" ]
29929 <nowiki>[</nowiki>http://example.com]
29933 WTS of an external link surrounded by square brackets (T220018)
29937 <p>[<a rel="mw:ExtLink" href="http://example.com">foo</a>]</p>
29939 <nowiki>[</nowiki>[http://example.com foo]]
29943 WTS of edited external link surrounded by square brackets (T220018)
29946 "modes": ["wt2wt"],
29948 [ "a", "before", "[" ],
29949 [ "a", "after", "]" ]
29953 [http://example.com foo]
29955 <nowiki>[</nowiki>[http://example.com foo]]
29959 Magic links inside links (not autolinked)
29961 [[Foo|http://example.com]]
29964 [[Foo|ISBN 123456789x]]
29966 [http://foo.com http://example.com]
29967 [http://foo.com RFC 1234]
29968 [http://foo.com PMID 1234]
29969 [http://foo.com ISBN 123456789x]
29971 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29972 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29973 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29974 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29975 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29976 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29977 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29978 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29981 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29982 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29983 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29984 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29986 <p><a rel="mw:ExtLink" href="http://foo.com" class="external text">http://example.com</a>
29987 <a rel="mw:ExtLink" href="http://foo.com" class="external text">RFC 1234</a>
29988 <a rel="mw:ExtLink" href="http://foo.com" class="external text">PMID 1234</a>
29989 <a rel="mw:ExtLink" href="http://foo.com" class="external text">ISBN 123456789x</a></p>
29993 Magic links inside image captions (autolinked)
29995 [[File:Foobar.jpg|thumb|http://example.com]]
29996 [[File:Foobar.jpg|thumb|RFC 1234]]
29997 [[File:Foobar.jpg|thumb|PMID 1234]]
29998 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
30000 <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>
30001 <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>
30002 <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>
30003 <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>
30005 <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" href="http://example.com" class="external free">http://example.com</a></figcaption></figure>
30006 <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>
30007 <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>
30008 <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>
30012 WTS of magic word text (T109371)
30017 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
30018 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
30020 <nowiki>RFC 1234</nowiki>
30022 [http://foo.com RFC 1234]
30028 Edited Redirect link should emit a non-piped wikitext link
30032 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
30038 T75121: Infer extension name from typeOf if data-mw is not present
30040 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30042 <div typeOf="mw:Extension/foo"></div>
30047 # Note that the <p> wrapping isn't present in PHP parser output
30048 # The important thing for this test is that P-wrapping doesn't
30049 # interfere with the <nowiki> protection for leading - in <td>
30050 # (which isn't necessary for <th>).
30052 T88318: p-wrapped dash in table.
30054 parsoid=html2wt,wt2wt
30057 <tr><th><p>-</p></th><th><p>- </p></th></tr>
30058 <tr><td><p>-</p></td><td><p>- </p></td></tr>
30059 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
30066 |<nowiki>-</nowiki>
30067 |<nowiki>- </nowiki>
30087 <td><small>-</small>
30094 </td></tr></tbody></table>
30098 T149209: WTS: Handle newlines in table cells properly
30106 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
30108 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
30114 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
30116 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
30138 T149209: Selser: Handle newlines in table cells properly
30141 "modes": ["selser"],
30143 [ "#h1", "html", "a\nb\n" ],
30144 [ "#h2", "html", "a\nb\n" ],
30145 [ "#c1", "html", "a\nb\n" ],
30146 [ "#c2", "html", "<p>a</p>" ],
30147 [ "#c3", "html", "<p>a</p>" ],
30148 [ "#c4", "html", "edit-me<p>a</p>" ]
30153 ! id="h1" |edit-me!!1
30155 ! id="h2" |edit-me||2
30157 | id="c1" |edit-me||3
30159 | id="c2" |edit-me||4
30161 | id="c3" |edit-me||p||q||r
30163 | id="c4" |edit-me||p||q||r
30192 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
30197 <td id='mwAc'>foo</td>
30198 <td id='serialize-this'>bar</td>
30203 | id="serialize-this" |bar
30208 Parsoid-like element ids should not be serialized to wikitext unless shadowed
30212 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
30214 <div id="hello">ok</div>
30218 Testing serialization after deletion in references
30221 "modes": ["wt2wt"],
30227 hi <ref><div id="x">ho</div></ref>
30237 Testing serialization after deletion of table cells
30240 "modes": ["wt2wt", "selser"],
30248 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
30258 Testing selser after addition of new row before first row (T125419)
30261 "modes": ["wt2wt", "selser"],
30263 [ "tr", "before", "<tr><td>X</td></tr>" ]
30279 Serialize new table rows in a HTML table using HTML tags
30282 "modes": ["wt2wt", "selser"],
30284 [ "tr", "before", "<tr><td>X</td></tr>" ]
30288 <table><tr><td>a</td></tr></table>
30290 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
30294 Serialize new table cells in a HTML row using HTML tags
30297 "modes": ["wt2wt", "selser"],
30299 [ "td", "before", "<td>X</td>" ]
30303 <table><tr><td>a</td></tr></table>
30305 <table><tr><td>X</td><td>a</td></tr></table>
30309 Serialize wikitext list items as HTML list items when embedded in a HTML list
30313 <ul data-parsoid='{"stx": "html"}'>
30314 <li data-parsoid='{}'>a</li>
30329 # Nested list should be inside <li>, that is
30330 # <ul><li>foo<ul>..</ul></li></ul> instead of
30331 # <ul><li>foo</li><ul>..</ul></ul>
30332 # See https://stackoverflow.com/questions/5899337/proper-way-to-make-html-nested-list
30334 Wikitext lists can be nested inside HTML lists
30338 <ul data-parsoid='{"stx": "html"}'>
30339 <li data-parsoid='{"stx": "html"}'>a
30340 <ul><li>b</li></ul>
30344 <ul data-parsoid='{"stx": "html"}'>
30346 <ul><li>y</li></ul>
30364 <ul><li>b</li></ul>
30369 <ul><li>y</li></ul>
30378 "modes": ["wt2wt"],
30380 [ "#xyz", "before", "<b>before</b> stuff " ],
30381 [ "#xyz", "after", " stuff <i>after</i>" ],
30382 [ "#xyz", "html", "x <b>y</b> z" ]
30386 <span id="xyz">hello</span>
30388 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
30392 Never serialize a-tag as html, regardless of what data-parsoid has to say
30394 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30396 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
30401 ## SSS FIXME: This is broken output nevertheless.
30402 ## What might be a reasonable non-broken output for this?
30403 ## This is an edge case unlikely to be seen in production
30404 ## that I am not wasting more time on this right now.
30406 Never serialize a-tag as html, no matter what attributes it has
30408 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30410 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
30412 [http://boo.org http://boohoo.org]
30415 # Misnested is an indication that selser can reuse the source but these have
30416 # shown to sneak through on occasion. See T101768.
30417 # The original wikitext here is: [http://test.com [[one]] two three]
30419 Strip span tags added to mark misnested links
30423 <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>
30425 [http://test.com][[one]] two three
30429 Catch regression when unpacking misnested links
30433 {{echo|hi}}[http://example.com [[ho]]]
30435 <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" href="http://example.com" class="external autonumber"></a><a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"misnested":true}'>ho</a></p>
30439 Catch regression when unpacking with trailing content
30441 {{echo|Foo <references/> bar}}
30443 <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>
30447 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
30451 <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|}"]}'>
30463 ## This test verifies the presence and computation of this attribute indirectly
30464 ## by making an edit and ensuring that the serialization is correct (which it would be
30465 ## only if firstWikitextNode is properly set).
30467 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
30470 "modes": ["wt2wt"],
30472 [ "div#x", "remove" ],
30473 [ "div", "before", "<div>new</div>" ]
30477 <div id="x">foo</div>
30479 {{echo|<div>boo</div>
30487 {{echo|<div>boo</div>
30493 ## Don't necessarily expect this to roundtrip, but run serialization to catch crashers
30495 File in link scenarios
30498 "modes": ["wt2html","html2wt"],
30499 "suppressErrors": true
30502 [http://www.google.com [[File:Foobar.jpg|123]]]
30504 [http://www.google.com [[File:Foobar.jpg|thumb|123]]]
30506 <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>
30508 <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>
30510 <p><a rel="mw:ExtLink" href="http://www.google.com" class="external text" 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>
30512 <a rel="mw:ExtLink" href="http://www.google.com" class="external autonumber" 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" href="http://www.google.com" class="external autonumber" 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>
30515 # --------------------------------------------
30516 # Tests spec'ing wikitext serialization norms |
30517 # --------------------------------------------
30520 Serialize multi-line indent-pre starting with wikitext syntax
30534 1. Categories should always be serialized on their own line
30538 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
30546 2. Categories that are part of templates should not introduce a line break
30548 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
30550 <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>
30553 # Careful while editing these next 2 tests. There are \u200f characters
30554 # before and after the <link> tags in the HTML and following some
30555 # of the categories in wikitext
30556 # Do not remove these characters in edits.
30558 # As part of the serialization, these bidi characters will get stripped.
30560 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
30563 "modes": ["html2wt"],
30564 "scrubWikitext": true
30567 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
30568 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
30571 [[קטגוריה: שיטות משפט]]
30575 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
30578 "modes": ["html2wt"],
30579 "scrubWikitext": true
30582 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
30589 Lists: Add space after bullets
30596 <li><span> baz</span></li>
30601 * <span> baz</span>
30605 1. Headings: Add space before/after == (T53744)
30612 <h2><span> baz</span></h2>
30620 == <span> baz</span> ==
30624 2. Headings: Add space before/after == even after hoisted content
30627 "modes": ["html2wt"],
30628 "scrubWikitext": true
30631 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
30639 1. Headings: suppress newly created empty headings
30642 "modes": ["html2wt"],
30643 "scrubWikitext": true
30651 2. Headings: don't suppress empty headings if scrubWikitext is false
30661 3. Headings: suppress empty headings on edits
30664 "modes": ["selser"],
30665 "scrubWikitext": true,
30671 ==<span id="x">foo</span>==
30676 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
30679 "modes": ["html2wt"],
30680 "scrubWikitext": true
30683 <h2>foo<br/>bar</h2>
30684 <h2>foo <span><br/>bar</span> baz</h2>
30688 == foo <span> bar</span> baz ==
30692 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
30695 "modes": ["html2wt"],
30696 "scrubWikitext": false
30699 <h2>foo<br/>bar</h2>
30705 1. WT Quote Tags: suppress newly created empty style tags
30708 "modes": ["html2wt"],
30709 "scrubWikitext": true
30717 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
30723 ''<nowiki/>'''''<nowiki/>'''
30727 3. WT Quote Tags: suppress empty style tags on edits
30730 "modes": ["selser"],
30731 "scrubWikitext": true,
30737 '''<span id="x">foo</span>'''
30742 1. Anchors: suppress newly created empty anchors
30745 "modes": ["html2wt"],
30746 "scrubWikitext": true
30749 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30754 2. Anchors: don't suppress empty anchors if scrubWikitext is false
30757 "modes": ["html2wt"],
30758 "scrubWikitext": false
30761 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30767 3. Anchors: suppress empty anchors on edits
30770 "modes": ["selser"],
30771 "scrubWikitext": true,
30777 [[Test|<span id="x">foo</span>]]
30782 3a. Anchors: do not suppress numbered extlinks
30785 "modes": ["wt2wt"],
30786 "scrubWikitext": true
30791 <a rel="mw:ExtLink" href="http://foo.com"></a>
30795 3b. Anchors: do not suppress numbered extlinks
30798 "modes": ["wt2wt"],
30799 "scrubWikitext": true,
30805 [http://foo.com <span id="x">foo</span>]
30811 Normalizations should be restricted to edited content
30814 "modes": ["selser"],
30815 "scrubWikitext": true,
30817 [ "h1", "before", "<i></i>"]
30831 1. Multiple normalizations (html2wt)
30834 "modes": ["html2wt"],
30835 "scrubWikitext": true
30839 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
30840 </a><b><i></i></b>x</p>
30848 2. Multiple normalizations (selser)
30851 "modes": ["selser"],
30852 "scrubWikitext": true,
30854 [ "#x", "after", "<h1><i></i></h1>\n<p> bar<b></b></p>"]
30858 <div id="x">foo</div>
30860 <div id="x">foo</div>
30865 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
30868 "modes": ["html2wt"],
30869 "scrubWikitext": true
30881 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
30888 <nowiki> </nowiki>hi
30890 <nowiki> </nowiki> hello
30894 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
30897 "modes": ["html2wt"],
30898 "scrubWikitext": true
30907 baz bang</td></tr></table>
30913 bar<span>boo</span></p>
30929 bar<span>boo</span>
30933 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
30936 "modes": ["selser"],
30937 "scrubWikitext": true,
30939 [ "p", "html", " a\n b" ]
30950 1. New links that end in spaces
30953 "modes": ["html2wt"],
30954 "scrubWikitext": false
30957 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30958 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30959 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30961 [[Berlin ]]<nowiki/>is the capital of Germany.
30965 [[Boston ]] is a city.
30969 2. New links that end in spaces
30972 "modes": ["html2wt"],
30973 "scrubWikitext": true
30976 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30977 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30978 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30980 [[Berlin]] is the capital of Germany.
30984 [[Boston]] is a city.
30988 1. Table cells with escapable prefixes
30991 "modes": ["html2wt"],
30992 "scrubWikitext": false
30996 <tr><td>a</td></tr>
30997 <tr><td>-</td></tr>
30998 <tr><td>+</td></tr>
30999 <tr><td>}</td></tr>
31005 |<nowiki>-</nowiki>
31007 |<nowiki>+</nowiki>
31009 |<nowiki>}</nowiki>
31014 2. Table cells with escapable prefixes
31017 "modes": ["html2wt"],
31018 "scrubWikitext": true
31022 <tr><td>a</td></tr>
31023 <tr><td>-</td></tr>
31024 <tr><td>+</td></tr>
31025 <tr><td>}</td></tr>
31040 3a. Table cells with escapable prefixes after edits
31043 "modes": ["selser"],
31044 "scrubWikitext": true,
31046 [ "table tbody tr:first-child td:first-child", "remove"]
31060 3b. Table cells with escapable prefixes after edits
31063 "modes": ["selser"],
31064 "scrubWikitext": true,
31066 [ "table tbody tr:first-child td:first-child", "html", "-" ],
31073 |<span id="x">foo</span>+
31082 # FIXME: This test will fail because
31083 # normalization doesn't realize that the id attribute
31084 # will eliminate the escapable scenario
31086 4a. Table cells without escapable prefixes after edits
31089 "modes": ["selser"],
31090 "scrubWikitext": true,
31092 [ "#x", "html", "-" ]
31105 ## This tests normalizer's ability to discriminate between
31106 ## cells having identical content.
31108 4b. Table cells without escapable prefixes after edits
31111 "modes": ["selser"],
31112 "scrubWikitext": true,
31114 [ "td", "html", "-" ]
31127 ## This tests normalizer's ability to not be tripped by
31128 ## comments (and whitespace)
31130 4c. Table cells without escapable prefixes after edits
31133 "modes": ["selser"],
31134 "scrubWikitext": true,
31136 [ "table tbody tr td:first-child", "remove" ]
31151 ## This tests normalizer's ability to handle HTML cells
31153 4d. Table cells without escapable prefixes after edits
31156 "modes": ["selser"],
31157 "scrubWikitext": true,
31159 [ "td", "html", "-" ]
31164 <tr><td>a</td></tr>
31168 <tr><td>-</td></tr>
31172 ## T111151 Remove font elements without attributes
31174 5a. font tags without attributes should be dropped in scrubWikitext mode
31177 "modes": ["html2wt"],
31178 "scrubWikitext": true
31182 <font><font>bar</font></font>
31183 <font class="x">boo</font>
31187 <font class="x">boo</font>
31191 5b. font tags should not be dropped without scrubWikitext being enabled
31194 "modes": ["html2wt"],
31195 "scrubWikitext": false
31204 Ignore empty <p></p> when scrubWikitext is false
31207 "modes": ["html2wt"],
31208 "scrubWikitext": false
31212 <p>a</p><p></p><p>b</p>
31253 Normalize empty paragraphs to HTML form that html2wt expects
31256 "modes": ["html2wt"],
31257 "scrubWikitext": true
31261 <p>a</p><p></p><p>b</p>
31326 Empty paragraphs (marked with mw-empty-elt) found in source should not be normalized away
31329 "modes": ["html2wt"],
31330 "scrubWikitext": true
31338 <p class="mw-empty-elt"></p>
31342 <caption></caption>
31353 Templated content should be skipped over by normalization
31356 "modes": ["html2wt"],
31357 "scrubWikitext": true
31360 <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">
31361 </span><p about="#mwt2"></p><span about="#mwt2">
31364 {{SomeTemplate1|boo}}{{SomeTemplate2|booboo}}
31368 Escape nowiki DOM elements
31372 <nowiki><i>foo</i></nowiki>
31374 <nowiki>''foo''</nowiki>
31377 # This is meant to be an interim fix while we go about figuring out
31378 # how to not introduce these trailing <nowiki/>s in the first place.
31380 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
31384 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
31386 <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>
31387 <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>
31401 New list is serialized on newlines
31405 <p>The quick brown fox jumps over the lazy dog.</p><ul>
31409 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
31411 The quick brown fox jumps over the lazy dog.
31417 The quick onyx goblin jumps over the lazy dwarf.
31421 New lists in formatting elements serialized w/o newlines
31433 <small><ul><li>hi</li></ul></small>
31445 New list in table doesn't need newlines
31449 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
31458 # ---------------------------------------------------
31459 # End of tests spec'ing wikitext serialization norms |
31460 # ---------------------------------------------------
31464 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
31472 <td><b>c</b><p>d</p></td>
31491 Anchor without href scenarios
31493 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
31496 <a class="no">dice</a>
31501 <span name="foo"></span>
31505 New transclusion added after a list should be serialized after the list
31509 <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>
31516 Only html p-tag is strong indent pre suppressing
31525 <nowiki> </nowiki>test3
31529 # -----------------------------------------------------------------
31530 # End of section for Parsoid-only html2wt tests for serialization
31532 # -----------------------------------------------------------------
31534 # -----------------------------------------------------------------
31535 # The following section of tests are primarily to spec behavior of
31536 # the selective serializer. All these tests have manual selser
31537 # changes. The automated selser changes for all tests handle the
31538 # wide variation of changes, but these tests here capture specs
31539 # deterministically.
31540 # ----------------------------------------------------------------
31544 Selser: New comments should not be lost
31547 "modes": ["selser"],
31549 [ "#a", "after", "<!--c1-->" ],
31550 [ "#b", "before", "<!--c2-->" ]
31554 <span id="a">a</span>
31556 <span id="b">b</span>
31558 <span id="a">a</span><!--c1-->
31560 <!--c2--><span id="b">b</span>
31565 Selser: Check for validity of DSR before using it
31568 "modes": ["selser"],
31570 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
31574 <span id="a">a</span>
31576 {{DISPLAYTITLE:foo}}
31577 <span id="a">a</span>
31581 1. DOMDiff: Changes to <ref> content should be looked up using id
31584 "modes": ["selser"],
31586 ["#X", "after", "bar"],
31587 ["#Y", "after", "baz"]
31591 X <ref><span id="X">foo</span></ref>
31594 <ref name="a"><span id="Y">foo</span></ref>
31597 X <ref><span id="X">foo</span>bar</ref>
31600 <ref name="a"><span id="Y">foo</span>baz</ref>
31605 2. DOMDiff: Changes to <ref> content should be looked up using id
31608 "modes": ["selser"],
31610 ["#Z", "after", "bar"]
31614 A <ref>foo bar for a</ref>
31615 B <ref group="X" name="b" />
31619 <references group="X">
31620 <ref name="b"><span id="Z">foo</span></ref>
31623 A <ref>foo bar for a</ref>
31624 B <ref group="X" name="b" />
31628 <references group="X">
31629 <ref name="b"><span id="Z">foo</span>bar</ref>
31634 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
31637 "modes": ["selser"],
31639 [ "div:first-child", "text", "bar" ]
31643 <div style="{{1x|color:red;}}%">foo</div>
31645 <div style="{{1x|color:red;}}%">bar</div>
31657 <li class="mw-empty-elt"></li>
31658 <li class="mw-empty-elt"></li>
31665 [[File:Thumb.png|thumb]]
31667 <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>
31669 <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>
31673 unclosed internal link XSS (T137264)
31675 [[#%3Cscript%3Ealert(1)%3C/script%3E|
31677 <p>[[#<script>alert(1)</script>|
31680 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
31684 Validating that <style> isn't eaten by tidy (T167349)
31689 <style>.foo::before { content: "<foo>"; }</style>
31690 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31694 <style>.foo::before { content: "<foo>"; }</style>
31695 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31699 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31700 <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>
31704 ## Right now, Parsoid doesn't de-duplicate style tags.
31705 ## So, we shouldn't see link tags that need to bypass the sanitizer.
31706 ## In a followup patch, when we de-duplicate style tags and
31707 ## introduce link tags, we'll add a hook for link tags in
31708 ## the parser test runner script.
31710 Validating that <style> isn't wrapped in a paragraph (T186965)
31714 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31716 <style>.foo::before { content: "<foo>"; }</style>
31718 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31720 But if it's on a line with other content, let it be wrapped.
31722 <style>.foo::before { content: "<foo>"; }</style> bar
31724 foo <style>.foo::before { content: "<foo>"; }</style>
31726 foo <style>.foo::before { content: "<foo>"; }</style> bar
31728 And the same if we have non-paragraph-breaking whitespace
31731 <style>.foo::before { content: "<foo>"; }</style>
31734 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31736 <style>.foo::before { content: "<foo>"; }</style>
31737 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31738 <p>But if it's on a line with other content, let it be wrapped.
31739 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
31740 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
31741 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
31742 </p><p>And the same if we have non-paragraph-breaking whitespace
31744 <style>.foo::before { content: "<foo>"; }</style>
31748 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph</p>
31750 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31752 <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>
31754 <p>But if it's on a line with other content, let it be wrapped.</p>
31756 <p><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> bar</p>
31758 <p>foo <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style></p>
31760 <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>
31762 <p>And the same if we have non-paragraph-breaking whitespace</p>
31765 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31770 Validating that <link> isn't wrapped in a paragraph (T186965)
31774 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31776 <link rel="foo" href="bar"/>
31778 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31780 But if it's on a line with other content, let it be wrapped.
31782 <link rel="foo" href="bar"/> bar
31784 foo <link rel="foo" href="bar"/>
31786 foo <link rel="foo" href="bar"/> bar
31788 And the same if we have non-paragraph-breaking whitespace
31791 <link rel="foo" href="bar"/>
31794 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31796 <link rel="foo" href="bar"/>
31797 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31798 <p>But if it's on a line with other content, let it be wrapped.
31799 </p><p><link rel="foo" href="bar"/> bar
31800 </p><p>foo <link rel="foo" href="bar"/>
31801 </p><p>foo <link rel="foo" href="bar"/> bar
31802 </p><p>And the same if we have non-paragraph-breaking whitespace
31804 <link rel="foo" href="bar"/>
31810 Extension returning multiple nodes starting with a style tag roundtrips
31815 {{echo|<html><style>.hi { color: red; }</style>
31817 <tr><td class="hi">ho</td></tr>
31820 <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">
31821 </span></p><table about="#mwt5" data-parsoid='{"stx":"html"}'>
31823 <tbody><tr><td class="hi">ho</td></tr>
31828 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
31830 wgFragmentMode=[ 'html5', 'legacy' ]
31832 ==A&B&C&amp;D&amp;amp;E==
31833 [[#A&B&C&amp;D&amp;amp;E]]
31835 <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>
31836 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
31839 <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>
31840 <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>
31844 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
31846 wgFragmentMode=[ 'legacy' ]
31848 ==A&B&C&amp;D&amp;amp;E==
31849 [[#A&B&C&amp;D&amp;amp;E]]
31851 <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>
31852 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
31857 Decoding of HTML entities in embedded HTML tags
31859 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31861 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31863 <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>
31867 Decoding of HTML entities in indicator names for IDs (T104196)
31869 parsoid=wt2html,html2html
31872 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31874 1&2&3&4&amp;5=Indicator
31877 <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>
31880 # this version of the test strips out the ambiguity so Parsoid rts cleanly
31882 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
31886 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31888 1&2&3&4&amp;5=Indicator
31891 <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>
31894 # This fragment mode is what Parsoid supports.
31896 HTML5 ids: fallback to legacy
31898 wgFragmentMode=[ 'html5', 'legacy' ]
31910 ==Hey < # " > % : '==
31911 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31913 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31915 <!-- These two links should produce identical HTML -->
31916 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31919 <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>
31921 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31922 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31923 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31924 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31925 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31926 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31930 <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>
31931 <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>
31932 <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>
31933 <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>
31934 <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>
31935 <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>
31936 <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>
31937 </p><p>💩 <span id="💩"></span>
31938 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31941 <h2 id="Foo_bar">Foo bar</h2>
31943 <h2 id="foo_Bar_2">foo Bar</h2>
31945 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
31947 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
31949 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
31951 <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>
31952 <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>
31954 <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>
31956 <!-- These two links should produce identical HTML -->
31957 <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>
31960 # Parsoid doesn't support this mode
31962 HTML5 ids: legacy with a fallback to modern
31964 wgFragmentMode=[ 'legacy', 'html5' ]
31976 ==Hey < # " > % : '==
31977 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31979 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31981 <!-- These two links should produce identical HTML -->
31982 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31985 <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>
31987 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31988 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31989 <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>
31990 <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>
31991 <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>
31992 <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>
31996 <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>
31997 <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>
31998 <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>
31999 <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>
32000 <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>
32001 <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>
32002 <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>
32003 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
32004 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
32008 # Parsoid doesn't support this mode.
32010 HTML5 ids: no legacy
32012 wgFragmentMode=[ 'html5' ]
32024 ==Hey < # " > % : '==
32025 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
32027 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
32029 <!-- These two links should produce identical HTML -->
32030 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
32033 <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>
32035 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
32036 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
32037 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
32038 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
32039 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
32040 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
32044 <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>
32045 <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>
32046 <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>
32047 <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>
32048 <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>
32049 <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>
32050 <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>
32051 </p><p>💩 <span id="💩"></span>
32052 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
32057 T90902: Normalize weird characters in section IDs
32059 wgFragmentMode=[ 'html5', 'legacy' ]
32065 <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>
32066 <p><a href="#Foo_bar">#Foo bar</a>
32069 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
32070 <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>
32074 T51672: Test for brackets in attributes of elements in external link texts
32076 [http://example.com/ link <span title="title with [brackets]">span</span>]
32077 [http://example.com/ link <span title="title with [brackets]">span</span>]
32080 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
32081 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
32084 <p><a rel="mw:ExtLink" href="http://example.com/" class="external text">link <span title="title with [brackets]">span</span></a>
32085 <a rel="mw:ExtLink" href="http://example.com/" class="external text">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>
32089 T72875: Test for brackets in attributes of elements in internal link texts
32091 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
32092 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
32095 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
32096 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
32099 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
32100 <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>
32104 T199926: html arrow wt: Parsoid sometimes trips up on verticalbar chars in hrefs
32107 "modes": ["html2wt"]
32110 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total">9</a>
32111 <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>
32113 [https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total 9]
32114 [[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|10]]
32117 ## FIXME: "gerrit" isn't in PHP's setupInterwikis
32119 T199926: Hash only interwiki link
32121 [[meatball:Test#1/2]]
32122 [[gerrit:#/q/project:mediawiki/services/parsoid|Gerrit]]
32124 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Test#1.2F2" class="extiw" title="meatball:Test">meatball:Test#1/2</a>
32125 <a href="/index.php?title=Gerrit:&action=edit&redlink=1" class="new" title="Gerrit: (page does not exist)">Gerrit</a>
32128 <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>
32129 <a rel="mw:WikiLink/Interwiki" href="https://gerrit.wikimedia.org/#/q/project:mediawiki/services/parsoid">Gerrit</a></p>
32133 T179544: {{anchorencode:}} output should be always usable in links
32135 wgFragmentMode=[ 'html5' ]
32137 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
32139 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
32142 <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>
32145 ## ------------------------------
32146 ## Parsoid section-wrapping tests
32147 ## ------------------------------
32149 Section wrapping for well-nested sections (no leading content)
32153 "wrapSections": true
32175 <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>
32178 <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>
32181 <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>
32184 <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>
32187 <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>
32190 <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>
32194 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1" data-parsoid="{}">1</h1>
32197 </section><section data-mw-section-id="2"><h1 id="2" data-parsoid="{}">2</h1>
32200 <section data-mw-section-id="3"><h2 id="2.1" data-parsoid="{}">2.1</h2>
32203 </section><section data-mw-section-id="4"><h2 id="2.2" data-parsoid="{}">2.2</h2>
32206 <section data-mw-section-id="5"><h3 id="2.2.1" data-parsoid="{}">2.2.1</h3>
32209 </section></section></section><section data-mw-section-id="6"><h1 id="3" data-parsoid="{}">3</h1>
32216 Section wrapping for well-nested sections (with leading content)
32220 "wrapSections": true
32225 Para 2 with a <div>nested in it</div>
32240 Para 2 with a </p><div>nested in it</div>
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 <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>
32249 <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>
32253 <section data-mw-section-id="0"><p>Para 1.</p>
32255 <p>Para 2 with a </p><div>nested in it</div>
32259 </section><section data-mw-section-id="1"><h1 id="1" data-parsoid="{}">1</h1>
32262 </section><section data-mw-section-id="2"><h1 id="2" data-parsoid="{}">2</h1>
32265 <section data-mw-section-id="3"><h2 id="2.1" data-parsoid="{}">2.1</h2>
32268 </section></section>
32272 Section wrapping with template-generated sections (good nesting 1)
32276 "wrapSections": true
32293 <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>
32296 <h2><span class="mw-headline" id="1.1">1.1</span></h2>
32299 <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>
32302 <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>
32306 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1" data-parsoid="{}">1</h1>
32309 <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">
32310 </span><p about="#mwt1">b</p>
32311 </section><section data-mw-section-id="3"><h2 id="1.2" data-parsoid="{}">1.2</h2>
32314 </section></section><section data-mw-section-id="4"><h1 id="2" data-parsoid="{}">2</h1>
32318 # In this example, the template scope is mildly expanded to incorporate the
32319 # trailing newline after the transclusion since that is part of section 1.1.1
32321 Section wrapping with template-generated sections (good nesting 2)
32325 "wrapSections": true,
32326 "modes": ["wt2html", "wt2wt"]
32342 <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>
32345 <h2><span class="mw-headline" id="1.1">1.1</span></h2>
32348 <h3><span class="mw-headline" id="1.1.1">1.1.1</span></h3>
32351 <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>
32355 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
32358 <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">
32359 </span><p about="#mwt1">b</p><span about="#mwt1">
32360 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
32361 </span><p about="#mwt1">d</p><span about="#mwt1">
32362 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
32366 # In this example, the template scope is mildly expanded to incorporate the
32367 # trailing newline after the transclusion since that is part of section 1.2.1
32369 Section wrapping with template-generated sections (good nesting 3)
32373 "wrapSections": true,
32374 "modes": ["wt2html", "wt2wt"]
32393 <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>
32397 <h2><span class="mw-headline" id="1.1">1.1</span></h2>
32400 <h2><span class="mw-headline" id="1.2">1.2</span></h2>
32403 <h3><span class="mw-headline" id="1.2.1">1.2.1</span></h3>
32406 <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>
32410 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
32413 <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">
32414 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
32415 </span><p about="#mwt1">b</p><span about="#mwt1">
32416 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
32417 </span><p about="#mwt1">c</p><span about="#mwt1">
32418 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
32419 </span><p about="#mwt1">d</p><span about="#mwt1">
32420 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
32424 # Because of section-wrapping and template-wrapping interactions,
32425 # the scope of the template is expanded so that the template markup
32426 # is valid in the presence of <section> tags.
32427 # This exercises the s1 is null scenario in the wrapSections code
32429 Section wrapping with template-generated sections (bad nesting 1)
32433 "wrapSections": true
32450 <h1><span class="mw-headline" id="1">1</span></h1>
32456 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
32459 <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">
32460 </span><p about="#mwt1">b</p>
32463 </section></div></section>
32466 # Because of section-wrapping and template-wrapping interactions,
32467 # the scope of the template is expanded so that the template markup
32468 # is valid in the presence of <section> tags.
32469 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
32471 Section wrapping with template-generated sections (bad nesting 2)
32475 "wrapSections": true
32494 <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>
32497 <h1><span class="mw-headline" id="2">2</span></h1>
32500 <h2><span class="mw-headline" id="2.1">2.1</span></h2>
32504 <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>
32508 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1" data-parsoid="{}">1</h1>
32511 </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">
32512 </span><p about="#mwt1">b</p><span about="#mwt1">
32513 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
32514 </span><p about="#mwt1">c</p><span about="#mwt1">
32516 </span><p about="#mwt1">d</p><span about="#mwt1">
32518 </span></section></section><section data-mw-section-id="4"><h1 id="3" data-parsoid="{}">3</h1>
32522 # Because of section-wrapping and template-wrapping interactions,
32523 # additional template wrappers are added to <section> tags
32524 # so that template wrapping semantics are valid whether section
32525 # tags are retained or stripped. But, the template scope can expand
32526 # greatly when accounting for section tags.
32527 # This exercises the s1 and s2 are in different subtrees scenario
32529 Section wrapping with template-generated sections (bad nesting 3)
32533 "wrapSections": true,
32534 "modes": ["wt2html", "wt2wt"]
32553 <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>
32556 <h2><span class="mw-headline" id="1.2">1.2</span></h2>
32559 <h1><span class="mw-headline" id="2">2</span></h1>
32563 <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>
32567 <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>
32570 <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">
32571 </span><p about="#mwt1">b</p><span about="#mwt1">
32572 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
32573 </span><p about="#mwt1">c</p>
32576 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
32581 Section wrapping with uneditable lead section + div wrapping multiple sections
32585 "wrapSections": true
32590 <div style="border:1px solid red;">
32609 <div style="border:1px solid red;">
32611 <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>
32614 <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>
32617 <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>
32621 <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>
32624 <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>
32628 <section data-mw-section-id="-1"><p>foo</p>
32630 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
32631 <section data-mw-section-id="1"><h1 id="1" data-parsoid="{}">1</h1>
32634 <section data-mw-section-id="2"><h2 id="1.1" data-parsoid="{}">1.1</h2>
32637 </section></section><section data-mw-section-id="-1"><h1 id="2" data-parsoid="{}">2</h1>
32641 </section><section data-mw-section-id="4"><h1 id="3" data-parsoid="{}">3</h1>
32644 <section data-mw-section-id="5"><h2 id="3.1" data-parsoid="{}">3.1</h2>
32646 </section></section>
32650 Section wrapping with editable lead section + div overlapping multiple sections
32654 "wrapSections": true
32661 <div style="border:1px solid red;">
32681 <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>
32684 <div style="border:1px solid red;">
32687 <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>
32690 <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>
32696 <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>
32699 <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>
32703 <section data-mw-section-id="0"><p>foo</p>
32705 </section><section data-mw-section-id="-1"><h1 id="1" data-parsoid="{}">1</h1>
32707 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
32710 <section data-mw-section-id="2"><h2 id="1.1" data-parsoid="{}">1.1</h2>
32713 </section><section data-mw-section-id="-1"><h1 id="2" data-parsoid="{}">2</h1>
32718 </section><section data-mw-section-id="4"><h1 id="3" data-parsoid="{}">3</h1>
32721 <section data-mw-section-id="5"><h2 id="3.1" data-parsoid="{}">3.1</h2>
32723 </section></section>
32727 HTML header tags should not be wrapped in section tags
32731 "wrapSections": true
32747 <h1><span class="mw-headline" id="a">a</span></h1>
32748 <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>
32749 <h1><span class="mw-headline" id="c">c</span></h1>
32750 <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>
32752 <section data-mw-section-id="0"><p>foo</p>
32754 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
32756 </section><section data-mw-section-id="1"><h1 id="b" data-parsoid="{}">b</h1>
32758 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
32760 </section><section data-mw-section-id="2"><h1 id="d" data-parsoid="{}">d</h1></section>
32764 Lead section containing only whitespace and comments.
32768 "wrapSections": true
32772 <!-- this is a comment, presumably significant to editors -->
32779 <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>
32782 <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>
32786 <section data-mw-section-id="0" data-parsoid="{}">
32787 <!-- this is a comment, presumably significant to editors -->
32788 </section><section data-mw-section-id="1"><h1 id="1" data-parsoid="{}">1</h1>
32791 </section><section data-mw-section-id="2"><h1 id="2" data-parsoid="{}">2</h1>
32797 Pseudo-sections emitted by templates should have id -2
32801 "wrapSections": true
32814 <h2><span class="mw-headline" id="a">a</span></h2>
32815 <h2><span class="mw-headline" id="b">b</span></h2>
32818 <section data-mw-section-id="-1"><p>foo</p>
32819 </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}}]}'>
32820 <section data-mw-section-id="-1"><h2 id="a">a</h2>
32821 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
32822 </section></div><span about="#mwt1">
32827 T213468: Transcluded sections don't get PHP section numbers
32831 "wrapSections": true
32836 == This is counted as if it were section 2 ==
32840 <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>
32841 <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>
32842 <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>
32844 <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>
32845 </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>
32846 </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>
32850 T213468: Corner cases in edit section ID assignment in tokenizer
32854 "wrapSections": true
32858 {{echo|Not a section|
32859 == This is counted as if it were section 2 ==
32863 == This is counted as if it were section 4 ==
32866 {{#tag:p|Not a section|data-ignored=
32867 == This is counted as if it were section 6 ==
32870 {{echo|1=Not a ==heading==}}
32872 [[File:Foobar.jpg|thumb|
32873 ==This is section 9, even though it's in a caption==
32878 <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>
32881 <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>
32882 <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>
32883 <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>
32884 <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>
32885 <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>
32886 <p data-ignored="== This is counted as if it were section 6 ==">Not a section</p>
32887 <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>
32888 <p>Not a ==heading==
32890 <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>
32891 <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>
32892 <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>
32894 <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>
32895 <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>
32896 </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>
32897 </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">
32898 </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">
32899 </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>
32900 </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>
32901 <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>
32902 </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>
32903 <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>
32904 </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>
32905 <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>
32906 <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>
32907 </section></figcaption></figure>
32908 </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>
32912 T215628: Section numbering and <includeonly> and <noinclude> on a page
32916 "wrapSections": true
32925 ==This is not counted as section 4==
32930 <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>
32931 <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>
32932 <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>
32933 <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>
32935 PARSOID HAS A BUG HERE: T215628
32938 ##########################################################################
32939 Tests demonstrating white-space insensitivity in input wikitext
32940 for wikitext headings, wikitext list items, and wikitext table captions,
32941 headings, and cells. HTML versions of the same should preserve whitespace.
32942 ##########################################################################
32944 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
32947 "modes": ["wt2html"],
32948 "preserveIEW": true
32952 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
32953 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
32954 == <!--Headings with fallback ids--> Личная жизнь ==
32955 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
32956 ; <!--term to define--> term : <!--term's definition--> definition
32958 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
32960 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
32962 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32964 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
32966 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
32969 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32972 <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>
32973 <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>
32974 <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>
32975 <ul><li>List item</li></ul>
32976 <dl><dt>term </dt>
32977 <dd>definition</dd></dl>
32979 <caption>Table Caption
32982 <th>Table Heading 1</th>
32983 <th>Table Heading 2
32986 <td>Table Cell 1</td>
32990 <td>class="foo"</td>
32994 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
32995 </td></tr></tbody></table>
32998 <td>Table Cell 1</td>
33000 </td></tr></tbody></table> foo</dd></dl>
33002 <meta property="mw:PageProp/notoc">
33003 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
33004 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
33005 <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>
33006 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
33007 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
33009 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
33011 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
33013 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
33015 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
33017 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
33020 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
33021 </tbody></table> foo<!--c1--></dd></dl>
33024 # Looks like <caption> is not accepted in HTML
33026 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
33029 "modes": ["wt2html"],
33030 "preserveIEW": true
33034 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
33035 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
33037 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
33038 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
33041 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
33042 <ul><li> List item </li></ul>
33044 <tbody><tr><th> Table Heading </th><th></th></tr>
33045 <tr><td> Table Cell </td><th></th></tr>
33048 <meta property="mw:PageProp/notoc"/>
33049 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
33050 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
33052 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
33053 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
33058 Do not trim whitespace in links and quotes
33061 "modes": ["wt2html"],
33062 "preserveIEW": true
33065 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
33066 [[Foo| some text ]]
33068 <p>foo <i> italic </i> and <b> bold </b>
33069 <a href="/wiki/Foo" title="Foo"> some text </a>
33072 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
33073 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
33077 Remove p tags surrounding a single element in a figcaption
33081 [[File:Foobar.jpg|right|200x200px|Caption]]
33083 <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>
33087 Selser preserves lack of newline before list and allows newline after the list
33090 "modes": ["selser"],
33091 "scrubWikitext": true,
33093 [ "ul", "after", "<p>footer</p>" ]
33110 Selser does not introduce newlines between unedited paragraph preceding the list
33113 "modes": ["selser"],
33115 [ "table tbody tr td p:last-child", "empty" ]
33137 Selser does not introduce newlines between unedited paragraph following the list
33140 "modes": ["selser"],
33142 [ "table tbody tr td p:first-child", "empty" ]
33164 Remove a list item but do not insert newline above list
33167 "modes": ["selser"],
33169 [ "ul li:last-child", "remove" ]
33184 Ensure disambiguation links are marked properly
33190 <p><a rel="mw:WikiLink" href="./Disambiguation" title="Disambiguation" class="mw-disambig">Disambiguation</a></p>