1 # MediaWiki Parser test cases
2 # Some taken from https://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
62 Article titles can contain single quotes!
72 Template:redirect to foo
74 #REDIRECT [[Template:Foo]]
95 MediaWiki:bad image list
97 * [[File:Bad.jpg]] except [[Nasty page]]
132 // For Serbian; localize Template namespace
140 Template:echo_with_span
146 Template:echo_with_div
152 Template:echo with depth
165 Template:table_attribs
168 |</noinclude>style="color:red;"|Foo
172 Template:table_attribs_2
175 |</noinclude>style="color:red;"|Foo
180 Template:table_attribs_3
183 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
187 Template:table_attribs_4
189 | style="background-color:#DC241f;" width="10px" |
193 Template:table_attribs_5
196 |</noinclude>style="color:red;"||Bar
200 Template:table_attribs_6
202 style="background: <nowiki>
209 Template:table_attribs_7
212 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
216 Template:table_header_cells
218 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
224 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
228 Template:PartialTable
235 Template:image_attribs
238 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
241 ## See T48811 for details
243 Template:mixed_attr_content_template
245 style="color:red;" title="T48811"
251 Template:definition_list
298 Template:EmptyTRWithHTMLAttrTest
301 <tr align="center"></tr>
302 <tr><td>foo</td></tr>
303 <tr align="center"></tr>
304 <tr><td>bar</td></tr>
327 This is a simple paragraph.
329 <p>This is a simple paragraph.
334 Paragraphs with extra newline spacing
365 Paragraphs with newline spacing with comment lines in between
373 <!--foo--><!--More than 1 comment, still stripped-->
377 <!--foo--> <!----> <!-- bar -->
437 Paragraphs with newline spacing with non-empty white-space lines in between
463 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
471 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
509 Extra newlines: More paragraphs with indented comment
524 Extra newlines followed by heading
538 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
539 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
542 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
546 Extra newlines between heading and content are swallowed (Parsoid does not)
554 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
555 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
562 <p><a rel="mw:WikiLink" href="./A" title="A">a</a></p>
566 Extra new lines before and after lists are preserved
593 # Parsoid regression test
595 Multiple newlines after tables are converted to p-br-p tags
597 parsoid=wt2html,wt2wt
611 </td></tr></tbody></table>
615 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
630 Heading with line break in nowiki
634 wgFragmentMode=[ 'html5', 'legacy' ]
639 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
641 C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
644 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
651 http://fr.wikipedia.org/wiki/🍺
652 <!-- EasterEgg we love beer, better be able be able to link to it -->
654 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
672 *plain''italic''plain
673 *plain''italic''plain''italic''plain
674 *plain'''bold'''plain
675 *plain'''bold'''plain'''bold'''plain
676 *plain''italic''plain'''bold'''plain
677 *plain'''bold'''plain''italic''plain
678 *plain''italic'''bold-italic'''italic''plain
679 *plain'''bold''bold-italic''bold'''plain
680 *plain'''''bold-italic'''italic''plain
681 *plain'''''bold-italic''bold'''plain
682 *plain''italic'''bold-italic'''''plain
683 *plain'''bold''bold-italic'''''plain
684 *plain l'''italic''plain
685 *plain l''''bold''' plain
688 <li>plain<i>italic</i>plain</li>
689 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
690 <li>plain<b>bold</b>plain</li>
691 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
692 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
693 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
694 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
695 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
696 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
697 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
698 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
699 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
700 <li>plain l'<i>italic</i>plain</li>
701 <li>plain l'<b>bold</b> plain</li></ul>
704 # this example taken from the [[simple:Moon]] article (T49326)
706 Italics and possessives (1)
708 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
710 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
714 # this example taken from [[en:Flaming Pie]] (T51926)
716 Italics and possessives (2)
718 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
720 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
724 # this example taken from [[en:Dictionary]] (T51926)
726 Italics and possessives (3)
728 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
730 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
736 ### 2-quote opening sequence tests
739 Italics and bold: 2-quote opening sequence: (2,2)
748 Italics and bold: 2-quote opening sequence: (2,3)
757 Italics and bold: 2-quote opening sequence: (2,4)
767 # same html as previous, but wikitext adjusted to match parsoid html2wt
769 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
771 ''foo<nowiki>''</nowiki>''
777 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
779 Italics and bold: 2-quote opening sequence: (2,5)
792 # same html as previous, but wikitext adjusted to match parsoid html2wt
794 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
796 ''foo'''''<nowiki/>'''
807 ### 3-quote opening sequence tests
811 Italics and bold: 3-quote opening sequence: (3,2)
820 Italics and bold: 3-quote opening sequence: (3,3)
829 Italics and bold: 3-quote opening sequence: (3,4)
837 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
839 Italics and bold: 3-quote opening sequence: (3,5)
852 # same html as previous, but wikitext adjusted to match parsoid html2wt
854 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
856 '''foo'''''<nowiki/>''
867 ### 4-quote opening sequence tests
871 Italics and bold: 4-quote opening sequence: (4,2)
881 # same html as previous, but wikitext adjusted to match parsoid html2wt
883 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
885 <nowiki>''</nowiki>''foo''
892 Italics and bold: 4-quote opening sequence: (4,3)
901 Italics and bold: 4-quote opening sequence: (4,4)
911 # same html as previous, but wikitext adjusted to match parsoid html2wt
913 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
921 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
923 Italics and bold: 4-quote opening sequence: (4,5)
932 <p>'<b>foo</b><i></i>
936 # same html as previous, but wikitext adjusted to match parsoid html2wt
938 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
940 '<nowiki/>'''foo'''''<nowiki/>''
945 <p>'<b>foo</b><i></i>
951 ### 5-quote opening sequence tests
955 Italics and bold: 5-quote opening sequence: (5,2)
965 # same html as previous, but wikitext adjusted to match parsoid html2wt
967 Italics and bold: 5-quote opening sequence: (5,2+3)
976 Italics and bold: 5-quote opening sequence: (5,3)
986 # same html as previous, but wikitext adjusted to match parsoid html2wt
988 Italics and bold: 5-quote opening sequence: (5,3+2)
997 Italics and bold: 5-quote opening sequence: (5,4)
1003 <p><i><b>foo'</b></i>
1008 Italics and bold: 5-quote opening sequence: (5,5)
1012 <p><i><b>foo</b></i>
1017 Italics and bold: 5-quote opening sequence: (5,6)
1021 <p><i><b>foo'</b></i>
1026 ### multiple quote sequences in a line
1030 Italics and bold: multiple quote sequences: (2,4,2)
1036 <p><i>foo'<b>bar</b></i>
1040 # same html as previous, but wikitext adjusted to match parsoid html2wt
1042 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
1044 ''foo'<nowiki/>'''bar'''''
1046 <p><i>foo'<b>bar</b></i>
1051 Italics and bold: multiple quote sequences: (2,4,3)
1057 <p><i>foo'<b>bar</b></i>
1061 # same html as previous, but wikitext adjusted to match parsoid html2wt
1063 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
1065 ''foo'<nowiki/>'''bar'''''
1067 <p><i>foo'<b>bar</b></i>
1072 Italics and bold: multiple quote sequences: (2,4,4)
1078 <p><i>foo'<b>bar'</b></i>
1082 # same html as previous, but wikitext adjusted to match parsoid html2wt
1084 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1086 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1088 <p><i>foo'<b>bar'</b></i>
1092 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1094 Italics and bold: multiple quote sequences: (3,4,2)
1103 <p><b>foo'</b>bar<i></i>
1107 # same html as previous, but wikitext adjusted to match parsoid html2wt
1109 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1111 '''foo''''bar''<nowiki/>''
1116 <p><b>foo'</b>bar<i></i>
1120 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1122 Italics and bold: multiple quote sequences: (3,4,3)
1131 <p><b>foo'</b>bar<b></b>
1135 # same html as previous, but wikitext adjusted to match parsoid html2wt
1137 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1139 '''foo''''bar'''<nowiki/>'''
1144 <p><b>foo'</b>bar<b></b>
1149 ### other quote tests
1152 Italics and bold: other quote tests: (2,3,5)
1154 ''this is about '''foo's family'''''
1156 <p><i>this is about <b>foo's family</b></i>
1162 Italics and bold: other quote tests: (2,(3,3),2)
1164 ''this is about '''foo's''' family''
1166 <p><i>this is about <b>foo's</b> family</i>
1172 Italics and bold: other quote tests: (3,2,3,2)
1176 '''this is about ''foo'''s family''
1178 <p><b>this is about <i>foo</i></b><i>s family</i>
1183 # same html as previous, but wikitext adjusted to match parsoid html2wt
1185 Italics and bold: other quote tests: (3,2,3+2+2,2)
1187 '''this is about ''foo'''''<nowiki/>''s family''
1189 <p><b>this is about <i>foo</i></b><i>s family</i>
1195 Italics and bold: other quote tests: (3,2,3,3)
1197 '''this is about ''foo'''s family'''
1199 <p>'<i>this is about </i>foo<b>s family</b>
1205 Italics and bold: other quote tests: (3,(2,2),3)
1207 '''this is about ''foo's'' family'''
1209 <p><b>this is about <i>foo's</i> family</b>
1215 Italicized possessive
1217 The ''[[Main Page]]'''s talk page.
1219 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1222 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1226 Quote balancing context should be restricted to td/th cells on the same wikitext line
1228 parsoid=wt2html,wt2wt
1242 </td></tr></tbody></table>
1246 Bold conversion test
1248 a b'''c ''d e'''f'' g h'''i ''j
1252 <p>a b'<i>c </i>d e<b>f<i> g h</i></b><i>i </i>j
1261 Non-html5 tags should be accepted
1263 <center>''foo''</center>
1265 <font>''foo''</font>
1266 <strike>''foo''</strike>
1269 <center><i>foo</i></center>
1270 <p><big><i>foo</i></big>
1271 <font><i>foo</i></font>
1272 <strike><i>foo</i></strike>
1278 <wbr> is valid wikitext (T54468)
1286 # <strike> is HTML4, <s> is HTML4/5.
1288 <s> or <strike> for strikethrough
1290 <strike>strike</strike>
1294 <p><strike>strike</strike>
1302 Text-level semantic html elements in wikitext
1305 <strong>text</strong>
1321 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1328 <strong>text</strong>
1344 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1352 # test cases taken from
1353 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1355 Ruby markup (W3C-style)
1357 ;Mono-ruby for individual base characters
1358 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1360 :<ruby>今日<rt>きょう</rt></ruby>
1362 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1364 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1366 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1369 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1370 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1371 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1374 <dl><dt>Mono-ruby for individual base characters</dt>
1375 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1377 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1378 <dt>Jukugo ruby</dt>
1379 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1380 <dt>Inline ruby</dt>
1381 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1382 <dt>Double-sided ruby</dt>
1383 <dd><ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1385 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1386 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1387 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1392 # The next two test different paths in the sanitizer.
1394 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1396 <blockquote|>a</blockquote>
1398 <b→> doesn't terminate </b→>
1400 <bä> doesn't terminate </bä>
1402 <boo> doesn't terminate </boo>
1404 <s.foo> doesn't terminate </s.foo>
1408 <p><blockquote|>a</blockquote>
1409 </p><p><b→> doesn't terminate </b→>
1410 </p><p><bä> doesn't terminate </bä>
1411 </p><p><boo> doesn't terminate </boo>
1412 </p><p><s.foo> doesn't terminate </s.foo>
1413 </p><p><sub-ID#1>
1418 Non-word characters don't terminate tag names
1420 <blockquote|>a</blockquote>
1422 <b→> doesn't terminate </b→>
1424 <bä> doesn't terminate </bä>
1426 <boo> doesn't terminate </boo>
1428 <s.foo> doesn't terminate </s.foo>
1432 <p><blockquote|>a
1433 </p><p><b→> doesn't terminate </b→>
1434 </p><p><bä> doesn't terminate </bä>
1435 </p><p><boo> doesn't terminate </boo>
1436 </p><p><s.foo> doesn't terminate </s.foo>
1437 </p><p><sub-ID#1>
1442 ### See tests/parser/ParserTestParserHook.php for the <tåg> extension)
1443 ### This checks that HTML5 tags (with non-word characters in the tag
1444 ### name) make it safely through the parser -- the Sanitizer will
1445 ### munge them later, as it should.
1448 Non-word characters are valid in extension tags (T19663)
1458 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1462 Isolated close tags should be treated as literal text (T54760)
1470 <p class="mw-empty-elt">
1471 </p><p><s.foo>s
1476 ### Special characters
1480 Bare pipe character (T54363)
1489 Bare pipe character from a template (T54363)
1498 ### <nowiki> test cases
1502 <nowiki> unordered list
1504 <nowiki>* This is not an unordered list item.</nowiki>
1506 <p>* This is not an unordered list item.
1509 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1515 <nowiki>Lorem ipsum dolor
1523 <p>Lorem ipsum dolor
1532 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1542 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1544 <nowiki><span class="error"></nowiki>
1546 <p><span class="error">
1549 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1555 :There is not nowiki.
1556 :There is <nowiki>nowiki</nowiki>.
1558 #There is not nowiki.
1559 #There is <nowiki>nowiki</nowiki>.
1561 *There is not nowiki.
1562 *There is <nowiki>nowiki</nowiki>.
1564 <dl><dd>There is not nowiki.</dd>
1565 <dd>There is nowiki.</dd></dl>
1566 <ol><li>There is not nowiki.</li>
1567 <li>There is nowiki.</li></ol>
1568 <ul><li>There is not nowiki.</li>
1569 <li>There is nowiki.</li></ul>
1571 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1572 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1574 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1575 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1577 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1578 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1582 Entities inside <nowiki>
1584 <nowiki><</nowiki>
1589 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1593 Entities inside template parameters
1600 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1604 Properly escape nowiki when combined with other wiki markup
1608 <p>* </nowiki> tag</p>
1610 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1614 T93824: Put escaped HTML tags inside nowiki
1618 <p><h2>foo</h2></p>
1620 <nowiki><h2>foo</h2></nowiki>
1624 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1628 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1629 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1630 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1632 This text: L'[[Foo]]
1633 This text: L<nowiki>''</nowiki>[[Foo]]
1634 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1637 # This test fails because wikitext whitespace is not normalized before comparing.
1639 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1643 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1646 This text : L<nowiki>''</nowiki>[[Foo]]
1649 # This test and the next one are html2wt only as they test that incorrect wikitext
1650 # passed in template arguments gets escaped or wrapped in nowikis where required.
1652 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1656 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1657 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1659 {{echo|foo{{!}}bar}}
1660 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1664 T53961: Output correct nowikis in template arguments
1668 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1669 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1670 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1671 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1672 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1675 {{echo|<nowiki>a }} b</nowiki>}}
1676 {{echo|<nowiki>a [[ b</nowiki>}}
1677 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1678 {{echo|a <nowiki>}</nowiki>}}
1682 Cases where "!!" needs nowiki protection
1687 <tr><th>this needs protection !! here</th></tr>
1691 <tr><th>this does not need
1692 protection !! here</th></tr>
1696 !<nowiki>this needs protection !! here</nowiki>
1709 Comments and Indent-Pre
1711 <!-- comment 1 --> asdf
1713 <!-- comment 1 --> asdf
1716 <!-- comment 1 --> asdf
1717 <!-- comment 2 -->xyz
1719 <!-- comment 1 --> asdf
1720 <!-- comment 2 --> xyz
1776 asdf<!-- comment 1 -->jkl
1786 <!-- foo --> b <!-- bar -->
1800 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1805 Comment semantics and delimiters
1807 <!-- --><!----><!-----><!------>
1810 <!-- --><!----><!-----><!------>
1814 Comment semantics and delimiters, redux
1816 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1817 -- foo -- funky huh? ... -->
1820 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1821 -- foo -- funky huh? ... -->
1825 Comment semantics and delimiters: directors cut
1827 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1828 everything starting with < followed by !-- until the first -- and > we see,
1829 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1835 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1836 everything starting with < followed by !-- until the first -- and > we see,
1837 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1842 Comment semantics: nesting
1844 <!--<!-- no, we're not going to do anything fancy here -->-->
1849 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1852 # Parsoid closes the unclosed comment, even if it means a slight
1855 Comment semantics: unclosed comment at end
1857 parsoid=wt2html,html2html
1859 <!--This comment will run out to the end of the document
1862 <!--This comment will run out to the end of the document-->
1866 Comment semantics: normalize comments to play nice with XML and browsers
1868 <!-- Browsers --!> think this is closed -->
1869 <!--> This would normally be text -->
1870 <!---> As would this -->
1871 <!-- XML doesn't like trailing dashes -------->
1872 <!-- Nor doubled hyphens -- anywhere in the data -->
1873 But this is not a comment.
1875 <p>But this is not a comment.
1878 <!-- Browsers --!> think this is closed -->
1879 <!--> This would normally be text -->
1880 <!---> As would this -->
1881 <!-- XML doesn't like trailing dashes -------->
1882 <!-- Nor doubled hyphens -- anywhere in the data -->
1883 <p>But this is not a comment.</p>
1887 Comment semantics: round-trip even text which contains encoded -->
1889 <!-- hello & goodbye - > --> --&gt; --&xx -->
1891 <!-- hello & goodbye - > --> --&gt; --&xx -->
1895 Comment in template title
1904 Comment on its own line post-expand
1916 Comment on its own line post-expand with non-significant whitespace
1928 post-expand include size being exceeded
1932 {{echo3|1234567890}}
1934 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1939 max template depth being reached
1943 {{echo with depth|too deep!}}
1945 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1950 multiple templates that are redirects
1961 Multiple comments should still parse as SOL-transparent
1963 parsoid=wt2html,wt2wt
1966 <!--c2--><!--c3--><!--c4-->*b
1974 <!--c2--><!--c3--><!--c4-->
1980 ## Make sure ">" gets escaped in comments to avoid XSS
1982 IE conditional comments
1985 <script>alert('hi');</script>
1988 <!--[if lt IE 9]>
1989 <script>alert('hi');</script>
1994 ### paragraph wrapping tests
2010 Block tag on one line (<div>)
2020 <p>a </p><div>foo</div>
2026 No p-wrappable content
2028 parsoid=wt2html,html2html
2030 <span><div>x</div></span>
2031 <span><s><div>x</div></s></span>
2032 <small><em></em></small><span><s><div>x</div></s></span>
2034 <span><div>x</div></span>
2035 <span><s><div>x</div></s></span>
2036 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2039 # T177612: Parsoid-only test
2041 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2043 {{echo|<span><div>x</div></span>}}
2046 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
2051 Block tag on one line (<blockquote>)
2053 a <blockquote>foo</blockquote>
2057 a <blockquote>foo</blockquote>
2061 <p>a </p><blockquote><p>foo</p></blockquote>
2067 Block tag on both lines (<div>)
2076 <p>a </p><div>foo</div><p>
2077 b </p><div>foo</div>
2081 Block tag on both lines (<blockquote>)
2083 a <blockquote>foo</blockquote>
2085 b <blockquote>foo</blockquote>
2087 a <blockquote>foo</blockquote>
2088 b <blockquote>foo</blockquote>
2090 <p>a </p><blockquote><p>foo</p></blockquote><p>
2091 b </p><blockquote><p>foo</p></blockquote>
2095 Multiple lines without block tags
2115 x </p><div>foo</div><p> z</p>
2119 Empty lines between lines with block tags
2153 </p><div>b</div><p>d
2158 <div data-parsoid='{"stx":"html"}'></div>
2161 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2164 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2166 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2169 <div data-parsoid='{"stx":"html"}'>e</div>
2173 Unclosed HTML p-tags should be handled properly
2180 <div><p>foo</p></div>
2185 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2190 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2191 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2194 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2198 a [[Category:A1]] [[Category:A2]]
2203 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2207 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2213 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2217 No paragraph necessary for SOL transparent template
2219 <span><div>foo</div></span>
2222 <span><div>foo</div></span>
2223 {{echo|[[Category:Foo]]}}
2225 <span><div>foo</div></span>
2226 <span><div>foo</div></span>
2228 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2229 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2231 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2232 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]"}},"i":0}}]}'/>
2236 Avoid expanding multiline sol transparent template ranges unnecessarily
2254 <br about="#mwt1" typeof="mw:Transclusion" data-parsoid='{}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<br/>\n"}},"i":0}}]}'/><span about="#mwt1">
2257 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2261 Paragraph wrapping following unclosed table
2263 parsoid=wt2html,html2html
2284 </td></tr></tbody></table>
2290 <table data-parsoid='{"autoInsertedEnd":true}'>
2291 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2293 </tbody></table><table>
2294 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2305 Paragraph wrapping suppressed in html p
2307 parsoid=wt2html,html2html
2327 <p data-parsoid='{"stx":"html"}'>
2338 Dangling table row doesn't prevent p-wrapping
2340 parsoid=wt2html,html2html
2348 <tbody><tr><td>hi</td></tr>
2349 <tr class="mw-empty-elt"></tr>
2350 </tbody></table><p> ho</p>
2354 P-wrapping non-breaking spaces
2365 ### Preformatted text
2375 And a [[Main Page|link]]
2381 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2386 Tabs don't trigger preformatted text
2390 This is preformatted text.
2396 <pre>This is preformatted text.
2401 preformatted text.</p>
2402 <pre>This is preformatted text.
2407 Space before tab needs nowiki pre protection
2413 <nowiki> </nowiki> a
2417 Ident preformatting with inline content
2428 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2444 Regression with preformatted in <center>
2457 T54763: Preformatted in <blockquote>
2463 indented cell (no pre-wrapping!)
2473 <p> indented cell (no pre-wrapping!)
2480 T53086: Double newlines in blockquotes should be turned into paragraphs
2496 T17491: <ins>/<del> in blockquote
2499 Foo <del>bar</del> <ins>baz</ins> quux
2503 <p>Foo <del>bar</del> <ins>baz</ins> quux
2508 <p>Foo <del>bar</del> <ins>baz</ins> quux
2514 T17491: <ins>/<del> in blockquote (2)
2516 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2519 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2522 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2527 <pre> with attributes (T5202)
2529 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2531 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2535 <pre> with width attribute (T5202)
2537 <pre width="8">Narrow screen goodies</pre>
2539 <pre width="8">Narrow screen goodies</pre>
2543 <pre> with forbidden attribute (T5202)
2545 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2547 <pre width="8">Narrow screen goodies</pre>
2551 Entities inside <pre>
2559 <pre> with forbidden attribute values (T5202)
2561 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2563 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2567 <nowiki> inside <pre> (T15238)
2575 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2583 <pre><nowiki>Foo</nowiki></pre>
2587 <nowiki> inside of #tag:pre
2589 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2591 <pre>Foo →bar</pre>
2593 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2596 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2597 ## aren't enclosed in nowikis.
2599 <nowiki> and <pre> preference (first one wins)
2630 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2635 <p><span typeof="mw:Nowiki">
2643 </pre> inside nowiki
2645 <nowiki></pre></nowiki>
2652 Empty pre; pre inside other HTML tags (T56946)
2669 <div data-parsoid='{"stx":"html"}'><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
2671 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2675 HTML pre followed by indent-pre
2688 <p><pre>foo</pre></p>
2690 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2692 <p class='mw-empty-elt' data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2696 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2703 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2713 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2725 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2746 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2750 {{echo| foo}}{{echo| bar}}
2755 {{echo|<!--cmt--> foo}}
2757 <!--cmt-->{{echo| foo}}
2759 {{echo|{{echo| }}bar}}
2777 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2813 ## Hmm, should Parsoid rt this?
2815 Pres with newline attributes
2817 parsoid=wt2html,html2html
2822 <pre class="one two">hi</pre>
2824 <pre class="one two" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2828 Things that look like <pre> tags aren't treated as such
2830 Barack Obama <President> of the United States
2831 <President></President>
2833 <p>Barack Obama <President> of the United States
2834 <President></President>
2838 ## Remex doesn't account for fostered content.
2839 ## The difference between Parsoid and the PHP parser can be attributed to core
2840 ## commit 674e8388cba and 710618f89af in Parsoid's repo. Parsoid doesn't
2841 ## tokenize unmatched extension tags that shadow html tags as strings to ease
2842 ## an escaping mechanism. See the comment in `maybeExtensionTag`.
2844 Handle broken pre-like tags (T66025)
2848 {{echo|<pre <pre>x</pre>}}
2850 <table><pre </table>
2853 <table><pre </table>
2856 <pre <table></table>
2858 <pre typeof="mw:Extension/pre mw:Transclusion" about="#mwt2" data-parsoid='{"stx":"html","a":{"<pre":null},"sa":{"<pre":""},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2860 <pre data-parsoid='{"stx":"html","src":"<pre </table>","tagWidths":[13,0],"a":{"<":null,"table":null},"sa":{"<":"","table":""},"fostered":true,"autoInsertedEnd":true}'></pre><table data-parsoid='{"stx":"html","autoInsertedEnd":true}'></table>
2863 ## Similar to the above, but shows the difference between extension and html tags
2865 Less than in attribute position
2872 <div </p><div>123</div>
2874 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"<pre":""},"body":{"extsrc":"123"}}'>123</pre><p>
2876 <div </p><div>123</div>
2880 Parsoid: handle pre with space after attribute
2884 <pre style="width:50%;" >{{echo|foo}}</pre>
2886 <pre style="width:50%;">{{echo|foo}}</pre>
2888 <pre typeof="mw:Extension/pre" about="#mwt2" style="width:50%;" data-mw='{"name":"pre","attrs":{"style":"width:50%;"},"body":{"extsrc":"{{echo|foo}}"}}'>{{echo|foo}}</pre>
2898 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{}}'></pre>
2902 Newline before table-close generates empty table row: T208619
2910 <tbody><tr><td></td></tr></tbody></table>
2912 <table data-parsoid='{}'>
2917 # PHP has one more row in the output than Parsoid does: T208619
2919 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2939 </tr><tr><td></td></tr></tbody></table>
2956 #--------------------------------------------------------------------
2957 # Transclusion parameter whitespace stripping tests
2958 # Behavior is different for positional and named parameters
2959 #--------------------------------------------------------------------
2961 Templates: Strip leading and trailing whitespace from named-param values
2965 {{echo|1= {{echo|b}} }}
2982 Templates: Don't strip whitespace from positional-param values
2986 {{echo|{{echo|b}} }}
3026 Templates: Don't recognize targets split by newlines
3042 Templates: Recognize targets when newlines and comments don't split the target
3047 <!--X--> ech<!--X-->o<!--X-->
3055 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech<!--X-->o<!--X--> \n <!--X--> <!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3059 Templates: Handle empty comment-and-ws-only lines correctly
3062 <!--should be ignored-->
3063 <!--should be ignored as well-->
3070 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n<!--should be ignored-->\n <!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
3074 Templates: Handle comments in the target
3077 <!-- should be ignored -->
3081 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3084 {{echo<!-- should be ignored -->
3087 {{echo<!-- should be ignored -->|foo}}
3089 {{<!-- should be ignored -->echo|foo}}
3098 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3100 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3102 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3104 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3106 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3110 Templates: Handle comments in parameter names (T69657)
3113 <!-- should be ignored -->
3117 <!-- should be ignored -->
3120 {{echo|1<!-- should be ignored -->=foo}}
3122 {{echo|<!-- should be ignored -->1=foo}}
3130 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3132 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
3134 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3136 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
3140 Templates: Other wikitext in parameter names (T69657)
3147 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3151 Templates: With colons
3155 <p>Template with colon
3158 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"With: Colon","href":"./Template:With:_Colon"},"params":{},"i":0}}]}'>Template with colon</p>
3161 #--------------------------------------------------------------------
3162 # Transclusion parameter escaping tests
3163 #--------------------------------------------------------------------
3166 Templates: Parsoid parameter escaping test 1
3168 {{echo|[foo]|{{echo|[bar]}}}}
3173 <p about="#mwt1" typeof="mw:Transclusion"
3174 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3178 Parsoid: Pipes in external links in template parameter
3180 {{echo|[{{echo|http://example.com}} link]}}
3182 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3185 <p><a rel="mw:ExtLink" class="external text" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
3189 Parsoid: pipe in transclusion parameter
3191 {{echo|http://foo.com/a|b}}
3193 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3196 <p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
3200 Parsoid: Pipe in external link target and content in template parameter
3202 parsoid=html2wt,wt2wt
3204 {{echo|[http://foo.com/a|b a|b]}}
3206 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3209 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3210 typeof="mw:Transclusion"
3211 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3212 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3216 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3218 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3220 <p><a rel="nofollow" class="external text" href="http://example.org/index.php?title=Parser_test&action=edit">bar</a>
3223 <p><a rel="mw:ExtLink" class="external text" href="http://example.org/index.php?title=Parser_test&action=edit" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>bar</a></p>
3227 Templates: Don't escape already nowiki-escaped text in template parameters
3229 parsoid=html2wt,wt2wt
3231 {{echo|foo<nowiki>|</nowiki>bar}}
3232 {{echo|<nowiki><div></nowiki>}}
3233 {{echo|<nowiki></nowiki>}}
3240 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
3241 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
3242 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
3248 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3250 parsoid=html2wt,wt2wt
3252 {{echo|{{echo|1=bar}}}}
3257 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
3262 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3269 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
3274 Templates: Preserve blank parameter names
3281 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3285 Templates: Preserve blank parameter names in other positions
3287 {{blank_param|bar|=foo}}
3293 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
3298 ### Parsoid-centric tests for testing RT edge cases for pre
3302 1a. Indent-Pre and Comments
3315 1b. Indent-Pre and Comments
3328 1c. Indent-Pre and Comments
3341 1d. Indent-Pre and Comments
3342 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3355 2a. Indent-Pre and tables
3375 2b. Indent-Pre and tables
3390 2c. Indent-Pre and tables (T44252)
3406 2d. Indent-Pre and tables
3422 <tbody><tr><td> b</td></tr>
3427 2e. Indent-Pre and table-line syntax
3440 2f. Indent-pre started by table-line syntax
3459 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3464 Text that should be rendered preformatted
3472 <pre>Text that should be rendered preformatted
3480 2h. Indent pre in tables
3482 parsoid=wt2html,html2html
3524 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3526 </td></tr></tbody></table>
3530 3a. Indent-Pre and block tags (single-line html)
3534 c <blockquote> foo </blockquote>
3539 c <blockquote> foo </blockquote>
3540 <pre><span> foo </span>
3543 <p> a </p><p> foo </p><p>
3544 b </p><div> foo </div><p>
3545 c </p><blockquote><p> foo </p></blockquote>
3546 <pre><span> foo </span>
3549 <p> a </p><p data-parsoid='{"stx":"html"}'> foo </p><p>
3550 b </p><div data-parsoid='{"stx":"html"}'> foo </div><p>
3551 c </p><blockquote data-parsoid='{"stx":"html"}'><p> foo </p></blockquote>
3552 <pre><span data-parsoid='{"stx":"html"}'> foo </span></pre>
3556 3b. Indent-Pre and block tags (multi-line html)
3559 <!-- comment --> b <div> foo </div>
3561 <pre>a <span>foo</span>
3565 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3566 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3568 <pre>a <span>foo</span>
3570 b </p><div> foo </div>
3574 3c. Indent-Pre and block tags (pre-content on separate line)
3636 <p data-parsoid='{"stx":"html"}'>
3653 <pre typeof="mw:Extension/pre" about="#mwt3" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3657 <table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>
3659 </td></tr></tbody></table>
3661 <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>
3667 4. Indent-Pre and extension tags
3669 parsoid=wt2html,html2html
3678 <p> a </p><pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{}}'></pre>
3682 5. Indent-Pre and html pre
3684 <pre class="123">hi</pre>
3686 <pre class="123">hi</pre>
3688 <pre class="123" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3692 Render paragraphs when indent-pre is suppressed in blocklevels
3708 4. Multiple spaces at start-of-line
3725 ## NOTE: the leading white-space chars on empty line are significant
3727 5a. White-space in indent-pre
3739 ## NOTE: the leading white-space chars on empty line are significant
3741 5b. White-space in indent-pre
3760 5c. White-space in indent-pre
3773 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3796 7a. Indent-pre and category links
3798 parsoid=wt2html,wt2wt
3800 [[Category:foo]] <!-- No pre-wrapping -->
3801 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3804 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3805 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3808 ## We used to, but no longer wt2wt this test since the default serializer
3809 ## will normalize all categories to serialize on their own line.
3810 ## This wikitext usage is going to be fairly uncommon in production and
3811 ## selser will take care of preserving formatting in those scenarios.
3813 7b. Indent-pre and category links
3818 [[Category:foo]] {{echo|b}}
3820 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3821 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
3825 Indent-Pre: Newlines in comments shouldn't affect sol state
3840 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3844 HTML-pre: 1. embedded newlines
3876 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3878 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3881 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3886 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3894 HTML-pre: big spaces
3930 <pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n"}}'>
3949 HTML-pre: 2: indented text
3961 HTML-pre: 3: other wikitext
3979 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n* foo\n# bar\n= no-h =\n'' no-italic ''\n[[ NoLink ]]\n"}}'>* foo
3988 ### Definition lists
3996 <dd>Definition</dd></dl>
4000 Definition list for indentation only
4004 <dl><dd>Indented text</dd></dl>
4008 Definition list with no space
4013 <dd>Definition</dd></dl>
4017 Definition list with URL link
4019 ;http://example.com/ :definition
4021 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
4022 <dd>definition</dd></dl>
4026 Definition list with bracketed URL link
4028 ;[http://www.example.com/ Example]:Something about it
4030 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4031 <dd>Something about it</dd></dl>
4035 Definition list with wikilink containing colon
4037 ;[[Help:FAQ]]:The least-read page on Wikipedia
4039 <dl><dt><a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
4040 <dd>The least-read page on Wikipedia</dd></dl>
4043 # At Brion's and JeLuF's insistence... :)
4045 Definition list with news link containing colon
4047 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4049 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
4050 <dd>This isn't even a real newsgroup!</dd></dl>
4052 <dl><dt><a rel="mw:ExtLink" class="external free" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'>This isn't even a real newsgroup!</dd></dl>
4056 Malformed definition list with colon
4058 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4060 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
4064 Definition lists: colon in external link text
4066 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4068 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
4069 <dd>OK, I made that up</dd></dl>
4073 Definition lists: colon in HTML attribute
4075 ;<b style="display: inline">bold</b>
4077 <dl><dt><b style="display: inline">bold</b></dt></dl>
4081 Definition lists: self-closed tag
4083 ;one<br/>two :two-line fun
4085 <dl><dt>one<br />two</dt>
4086 <dd>two-line fun</dd></dl>
4090 Definition lists: ignore colons inside tags
4092 ;one <b>two : tag <i>fun:</i>:</b>:def
4094 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4099 Definition lists: excess closed tags
4101 ;one</b>two :bad tag fun
4104 <dd>bad tag fun</dd></dl>
4108 <dd>bad tag fun</dd>
4113 T13748: Literal closing tags
4117 <dd>test test test test test</dd>
4119 <dd>test test test test test</dd>
4124 <dd>test test test test test</dd>
4126 <dd>test test test test test</dd>
4131 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4140 <dd>description</dd></dl>
4141 <ul><li>unordered</li></ul>
4146 Definition list with empty definition and following paragraph
4159 Nested definition lists using html syntax
4171 Definition Lists: No nesting: Multiple dd's
4183 Definition Lists: Indentation: Regular
4191 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4195 Definition Lists: Indentation: Missing 1st level
4201 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4205 Definition Lists: Indentation: Multi-level indent
4209 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4213 Definition Lists: Hacky use to indent tables
4220 should be left alone
4222 <dl><dd><dl><dd><table>
4227 </td></tr></table></dd></dl></dd></dl>
4229 should be left alone
4234 Definition Lists: Hacky use to indent tables (with content following table)
4239 |} <!--c1--> this text should be part of the dl
4246 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4253 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4257 Definition Lists: Hacky use to indent tables, with comments (T65979)
4265 should be left alone
4268 <dl><dd><dl><dd><table><tr>
4271 </tr></table><!-- bar --></dd></dl></dd></dl>
4273 should be left alone</p>
4277 Definition Lists: Hacky use to indent tables, with comment before table
4285 <dl><dd><dl><dd><!-- foo --><table><tr>
4287 </tr></table></dd></dl></dd></dl>
4290 # The trailing whitespace in this test is to catch a regression in
4291 # Parsoid after T54473.
4293 Definition Lists: Hacky use to indent tables (WS-insensitive)
4302 </td></tr></table></dd></dl>
4305 <tbody><tr><td>a</td></tr>
4306 </tbody></table></dd></dl>
4309 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4310 ## as an empty dt item. It also ignores all but the last ";" when followed
4311 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4312 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4315 ## Ex: ";;t2 ::d2" is transformed into:
4327 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4328 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4339 ## All Parsoid only definition list tests have this difference.
4341 ## See also: https://phabricator.wikimedia.org/T8569
4342 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4345 Table / list interaction: indented table with lists in table contents
4367 </td></tr></table></dd></dl>
4371 Table / list interaction: lists nested in tables nested in indented lists
4394 </td></tr></table></dd></dl>
4400 Definition Lists: Nesting: Multi-level (Parsoid only)
4426 Definition Lists: Nesting: Test 2
4433 <dl><dd>d2</dd></dl></dd></dl>
4438 Definition Lists: Nesting: Test 3
4443 <dl><dd><dl><dt>t1</dt>
4445 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4450 Definition Lists: Nesting: Test 4
4455 <dl><dd><dl><dd><dl><dt>t3</dt>
4456 <dd>d3</dd></dl></dd></dl></dd></dl>
4460 ## The Parsoid team believes the following three test exposes a
4461 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4462 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4463 ## It also exposes a "misfeature" in tidy, which doesn't like
4464 ## <dl> tags with a single <dt> child; it converts the <dt> into
4465 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4467 Definition Lists: Mixed Lists: Test 1
4473 <dl><dd><dl><dt><ul><li>foo</li>
4474 <li>bar</li></ul></dt></dl>
4475 <dl><dt>baz</dt></dl></dd></dl>
4477 <dl><dd><dl><dt><ul><li>foo</li>
4478 <li>bar</li></ul></dt></dl>
4479 <dl><dt>baz</dt></dl></dd></dl>
4497 Definition Lists: Mixed Lists: Test 2
4502 <ul><li><dl><dd>d1</dd>
4503 <dd>d2</dd></dl></li></ul>
4508 Definition Lists: Mixed Lists: Test 3
4513 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4514 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4519 Definition Lists: Mixed Lists: Test 4
4524 <ul><li><dl><dt>d1</dt>
4527 <dd>d4</dd></dl></li></ul>
4532 Definition Lists: Mixed Lists: Test 5
4538 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4543 Definition Lists: Mixed Lists: Test 6
4548 <ol><li><ul><li><dl><dd>d1
4549 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4554 Definition Lists: Mixed Lists: Test 7
4559 <dl><dd><ul><li>d1</li>
4560 <li>d2</li></ul></dd></dl>
4565 Definition Lists: Mixed Lists: Test 8
4570 <dl><dd><ul><li>d1</li></ul>
4571 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4576 Definition Lists: Mixed Lists: Test 9
4580 <ul><li><dl><dt>foo</dt>
4581 <dd>bar</dd></dl></li></ul>
4586 Definition Lists: Mixed Lists: Test 10
4590 <ul><li><ol><li><dl><dt>foo</dt>
4591 <dd>bar</dd></dl></li></ol></li></ul>
4594 # The Parsoid team disagrees with the PHP parser's seemingly-random
4595 # rules regarding dd/dt on the next few tests. Parsoid is more
4596 # consistent, and recognizes the shared nesting and keeps the
4597 # still-open tags around until the nesting is complete.
4599 # This is a regression test for T175099
4601 Definition Lists: Mixed Lists: Test 11
4608 <ul><li>b</li></ul></dd></dl>
4611 <dd><ul><li>b</li></ul></dd></dl>
4614 # FIXME: Maybe get rid of this test?
4616 Definition Lists: Mixed Lists: Test 12
4621 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4622 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4624 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4626 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4627 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4629 <dd>baz</dd></dl></li></ol></li></ul>
4647 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4652 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4661 Definition Lists: Mixed Lists: Test 13
4666 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4667 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4668 <dl><dt>boo </dt>
4669 <dd>baz</dd></dl></li></ol></li></ul>
4672 # FIXME: Maybe get rid of this test?
4674 # * The test is wrong, there are two colons where there should be :;
4675 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4677 Definition Lists: Weird Ones: Test 1
4679 *#;*::;;foo :bar (who uses this?)
4681 <ul><li><ol><li><dl><dt>foo</dt>
4682 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt>bar (who uses this?)</dt></dl></dt></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
4700 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4712 Definition Lists: colons occurring in tags
4729 <dt><span>a:b</span></dt>
4730 <dt><div>a:b</div></dt>
4731 <dt><div>a</div></dt>
4735 <dt><i>a:b</i></dt></dl>
4736 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4738 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4740 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4741 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4742 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4743 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4745 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4746 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4747 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4750 # Parsoid's output differs here again because it shares
4751 # nesting between the two lists unlike the PHP parser.
4752 # Unsure which is more desirable.
4754 Definition Lists: colons and tables 1
4766 </td></tr></table></dd></dl>
4770 </td></tr></table></dd></dl>
4775 </td></tr></table></dd>
4779 </td></tr></table></dd></dl>
4782 # FIXME: Does this need a html/php section?
4784 Definition Lists: template interaction
4786 ::{{definition_list}}
4789 ::{{definition_list}}
4794 <dl><dd><dl data-parsoid='{}'><dd about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[":",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}}]}'>one</dd><span about="#mwt1">
4795 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4797 <dl><dd data-parsoid='{}'>one
4798 <dl><dd about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":["::",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}},"\n:::two\n:::three"]}'>one</dd><span about="#mwt2">
4799 </span><dd about="#mwt2">two
4801 <dd>three</dd></dl></dd>
4802 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4810 External links: non-bracketed
4812 Non-bracketed: http://example.com
4814 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4818 # parsoid doesn't explicitly mark autonumbered links, see T55505
4820 External links: numbered
4822 Numbered: [http://example.com]
4823 Numbered: [http://example.net]
4824 Numbered: [http://example.com]
4826 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4827 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4828 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4831 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4832 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4833 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4837 External links: specified text
4839 Specified text: [http://example.com link]
4841 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4846 External links: trail
4848 Linktrails should not work for external links: [http://example.com link]s
4850 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4855 External links: dollar sign in URL
4857 http://example.com/1$2345
4859 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4863 # parsoid doesn't explicitly mark autonumbered links, see T55505
4865 External links: dollar sign in URL (autonumber)
4867 [http://example.com/1$2345]
4869 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4872 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4876 External links: open square bracket forbidden in URL (T6377)
4878 parsoid=wt2html,wt2wt,html2html
4880 http://example.com/1[2345
4882 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4885 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4889 External links: open square bracket forbidden in URL (named) (T6377)
4891 parsoid=wt2html,html2html
4893 [http://example.com/1[2345]
4895 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4898 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4901 # parsoid adds a space before the link name
4903 External links: open square bracket forbidden in URL (named) (T6377)
4906 [http://example.com/1 [2345]
4908 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4913 External links: nowiki in URL link text (T8230)
4915 [http://example.com/ <nowiki>''example site''</nowiki>]
4917 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4922 External links: newline forbidden in text (T8230 regression check)
4924 [http://example.com/ first
4927 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4933 External links: Pipe char between url and text
4935 [http://example.com | link]
4937 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4942 External links: protocol-relative URL in brackets
4944 [//example.com/ Test]
4946 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4950 # parsoid doesn't explicitly mark autonumbered links, see T55505
4952 External links: protocol-relative URL in brackets without text
4956 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4959 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4963 External links: protocol-relative URL in free text is left alone
4967 <p>//example.com/Foo
4972 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4974 foo//example.com/Foo
4976 <p>foo//example.com/Foo
4980 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4982 External links: with no contents
4984 parsoid=wt2html,wt2wt
4986 [http://en.wikipedia.org/wiki/Foo]
4988 [[wikipedia:Foo|Bar]]
4990 [[wikipedia:Foo|<span>Bar</span>]]
4992 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4993 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4994 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4997 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4998 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4999 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
5003 External links: Free with trailing punctuation
5013 http://example.com/url_with_(brackets)
5014 (http://example.com/url_without_brackets)
5015 http://example.com/url_with_entity&
5016 http://example.com/url_with_entity&
5017 http://example.com/url_with_entity&
5018 http://example.com/url_with_entity
5019 http://example.com/url_with_entity 
5020 http://example.com/url_with_entity 
5021 http://example.com/url_with_entity<
5022 http://example.com/url_with_entity<
5023 http://example.com/url_with_entity<
5025 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5026 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5027 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5028 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5029 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5030 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5031 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5032 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5033 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5034 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5035 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5036 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5037 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5038 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5039 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5040 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5041 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5042 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5043 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5046 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5047 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5048 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5049 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5050 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5051 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5052 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5053 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5054 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5055 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5056 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5057 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5058 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5059 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
5060 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
5061 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
5062 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
5063 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
5064 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
5068 External links: tricky Parsoid html2html case
5070 parsoid=wt2html,wt2wt,html2html
5072 http://example.com/url_with_entity&amp;
5074 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5077 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
5081 External links: Free with trailing quotes (T113666)
5083 '''News:''' Stuff here
5087 <p><b>News:</b> Stuff here
5088 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5091 <p><b>News:</b> Stuff here</p>
5092 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5096 External links: with entity
5098 [http:// www.librarieswithoutborders.org Libraries without borders]
5100 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5103 <p><a rel="mw:ExtLink" class="external text" href="http://+www.librarieswithoutborders.org" data-parsoid='{"a":{"href":"http://+www.librarieswithoutborders.org"},"sa":{"href":"http://&#x20;www.librarieswithoutborders.org"}}'>Libraries without borders</a></p>
5107 External links: Lone protocols are never linked (T105697)
5126 External links: No preceding word characters allowed (T67278)
5128 NOPEhttp://example.com
5129 N0http://example.com
5130 ok:http://example.com
5131 ok-http://example.com
5133 <p>NOPEhttp://example.com
5134 N0http://example.com
5135 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5136 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5141 External links: nofollow domain exception
5143 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5145 <p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>.
5152 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5154 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5159 External image from https
5161 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5163 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5168 External image (when not allowed)
5170 wgAllowExternalImages=0
5172 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5174 <p>External image: <a rel="nofollow" class="external free" href="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png">http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png</a>
5179 Link to non-http image, no img tag
5181 Link to non-http image, no img tag: ftp://example.com/test.jpg
5183 <p>Link to non-http image, no img tag: <a rel="nofollow" class="external free" href="ftp://example.com/test.jpg">ftp://example.com/test.jpg</a>
5188 External links: terminating separator
5190 Terminating separator: http://example.com/thing,
5192 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5197 External links: intervening separator
5199 Intervening separator: http://example.com/1,2,3
5201 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5206 External links: old bug with URL in query
5208 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5210 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5215 External links: old URL-in-URL bug, mixed protocols
5217 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5219 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5223 # Since Parsoid is starting to emit canonical wikitext for links,
5224 # [http://example.com http://example.com] will not RT back to that
5227 External links: URL in text
5231 URL in text: [http://example.com http://example.com]
5233 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5236 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5240 External links: Clickable images
5242 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5244 <p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/></a>
5247 <p>ja-style clickable images: <a rel="mw:ExtLink" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
5251 External links: raw ampersand
5253 Old & use: http://x&y
5255 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5260 External links: encoded ampersand
5262 Old & use: http://x&y
5264 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5267 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5271 External links: encoded equals (T8102)
5273 http://example.com/?foo=bar
5275 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5278 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5282 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5283 ## does it number them. As discussed in T55505, we can identify
5284 ## autonumbered links via CSS.
5288 External links: [raw ampersand]
5290 Old & use: [http://x&y]
5292 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5295 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5298 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5299 # mode will return the [raw ampersand] wikitext
5301 External links: [encoded ampersand]
5303 parsoid=wt2html,wt2wt,html2html
5305 Old & use: [http://x&y]
5307 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5310 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5314 External links: [raw equals]
5316 [http://example.com/?foo=bar]
5318 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5321 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5324 # note that parsoid html is identical to [raw equals] case; so html2wt
5325 # mode will return the [raw equals] wikitext
5327 External links: [encoded equals] (T8102)
5329 parsoid=wt2html,wt2wt,html2html
5331 [http://example.com/?foo=bar]
5333 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5336 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5339 # xxx parsoid strips the IDN character, so the round-trip tests will
5340 # obviously fail and are disabled. --cscott
5342 External links: [IDN ignored character reference in hostname; strip it right off]
5344 parsoid=wt2html,wt2wt,html2html
5346 [http://e‌xample.com/]
5348 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5351 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5354 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5355 # Where an external link could easily circumvent the sanitization of the text of
5356 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5357 # test demands a higher standard. That's a bit strange.
5361 # http://example.com -> [http://example.com|http://example.com]
5362 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5364 # The first example is sanitized, but the second is not. Any security benefits
5365 # from this production are trivial to circumvent. Either remove this test and
5366 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5367 # the test accordingly.
5371 # xxx parsoid strips the IDN character, so the round-trip tests will
5372 # obviously fail and are disabled. --cscott
5374 External links: IDN ignored character reference in hostname; strip it right off
5376 parsoid=wt2html,html2html
5378 http://e‌xample.com/
5380 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5383 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5387 External links: www.jpeg.org (T2554)
5391 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5395 # parsoid doesn't explicitly mark autonumbered links, see T55505
5397 External links: URL within URL (T2002)
5399 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5401 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5404 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5408 T2361: URL inside bracketed URL
5410 [http://www.example.com/foo http://www.example.com/bar]
5412 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5417 T2361: URL within URL, not bracketed
5419 http://www.example.com/foo?=http://www.example.com/bar
5421 <p><a rel="nofollow" class="external free" href="http://www.example.com/foo?=http://www.example.com/bar">http://www.example.com/foo?=http://www.example.com/bar</a>
5426 T2289: ">"-token in URL-tail
5428 http://www.example.com/<hello>
5430 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5435 T2289: literal ">"-token in URL-tail
5437 http://www.example.com/<b>html</b>
5439 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5442 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
5446 T2289: ">"-token in bracketed URL
5448 [http://www.example.com/<hello> stuff]
5450 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5455 T2289: literal ">"-token in bracketed URL
5457 [http://www.example.com/<b>html</b> stuff]
5459 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5464 T2289: literal double quote at end of URL
5466 http://www.example.com/"hello"
5468 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5473 T2289: literal double quote in bracketed URL
5475 [http://www.example.com/"hello" stuff]
5477 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5482 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5484 [http://www.example.com test]
5486 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5491 External links: link text with spaces
5493 [http://www.example.com a b c]
5494 [http://www.example.com ''a'' ''b'']
5496 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5497 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5501 # Note edge case difference between PHP and Parsoid here.
5503 External links: wiki links within external link (T5695)
5505 parsoid=wt2html,html2html
5507 [http://example.com [[wikilink]] embedded in ext link]
5509 [http://example.com test [[wikilink]] embedded in ext link]
5511 <p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5512 </p><p><a rel="nofollow" class="external text" href="http://example.com">test </a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5515 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5516 <p><a rel="mw:ExtLink" class="external text" href="http://example.com">test </a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5520 T2787: Links with one slash after the url protocol are invalid
5524 [http:/example.com title]
5526 <p>http:/example.com
5527 </p><p>[http:/example.com title]
5532 Bracketed external links with template-generated invalid target
5534 [{{echo|http:/example.com}} title]
5536 <p>[http:/example.com title]
5540 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5542 Broken wikilinks (but not external links) prevent templates from closing
5546 [http://example.com x
5548 {{echo|[http://example.com x}}
5554 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5555 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5557 </p><p>{{echo|[[Foo}}
5560 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5561 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://example.com x"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5563 <p>{{echo|[[Foo}}</p>
5567 Wikilinks with embedded newlines are not broken
5578 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[ Foo\nB\nC]]"}},"i":0}}]}'>[[ Foo B C]]</p>
5590 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5594 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5595 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5599 T4702: Mismatched <i>, <b> and <a> tags are invalid
5601 ''[http://example.com text'']
5602 [http://example.com '''text]'''
5603 ''Something [http://example.com in italic'']
5604 ''Something [http://example.com mixed''''', even bold]'''
5605 '''''Now [http://example.com both''''']
5607 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5608 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5609 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5610 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5611 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5619 http://www.example.com/?title=AT%26T
5621 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5624 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5627 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5628 # % is actually legal in HTML5. Any change in output would need testing though.
5630 T6781, T7267: %25 in URL
5632 http://www.example.com/?title=100%25_Bran
5634 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a>
5637 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5641 T6781, T7267: %28, %29 in URL
5643 http://www.example.com/?title=Ben-Hur_%281959_film%29
5645 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
5648 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
5653 T6781: %26 in autonumber URL
5655 [http://www.example.com/?title=AT%26T]
5657 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5660 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5664 T6781, T7267: %26 in autonumber URL
5666 [http://www.example.com/?title=100%25_Bran]
5668 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5671 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5675 T6781, T7267: %28, %29 in autonumber URL
5677 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5679 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5682 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5687 T6781: %26 in bracketed URL
5689 [http://www.example.com/?title=AT%26T link]
5691 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5694 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5698 T6781, T7267: %25 in bracketed URL
5700 [http://www.example.com/?title=100%25_Bran link]
5702 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5707 T6781, T7267: %28, %29 in bracketed URL
5709 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5711 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5714 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5718 External link containing a period in the anchor. (T65947)
5720 [//foo.org/bar#baz. bang]
5722 [//foo.org/bar. bang]
5724 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5725 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5728 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5729 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5733 External link containing a single quote. (T65947)
5737 [//foo.org/bar'baz bang]
5739 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5740 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5743 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5744 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5748 External link containing double-single-quotes in text '' (T6598 sanity check)
5750 Some [http://example.com/ pretty ''italics'' and stuff]!
5752 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5757 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5759 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5761 <p><i>Some </i><a rel="nofollow" class="external text" href="http://example.com/"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
5765 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5767 External link containing double-single-quotes with no space separating the url from text in italics
5769 [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
5771 <p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.
5774 <p><a rel="mw:ExtLink" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
5778 External link with comments in link text
5780 [http://www.google.com Google <!-- comment -->]
5782 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5785 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5789 External link to bare IPv4 address
5791 [http://192.168.0.1 Link]
5793 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5796 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5800 URL-encoding in URL functions (single parameter)
5802 {{localurl:Some page|amp=&}}
5804 <p>/index.php?title=Some_page&amp=&
5809 URL-encoding in URL functions (multiple parameters)
5811 {{localurl:Some page|q=?&=&}}
5813 <p>/index.php?title=Some_page&q=?&amp=&
5820 http://example.com/index.php?foozoid%5B%5D=bar
5822 http://example.com/index.php?foozoid[]=bar
5824 <p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5825 </p><p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5828 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5830 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar" data-parsoid='{"stx":"url","a":{"href":"http://example.com/index.php?foozoid%5B%5D=bar"},"sa":{"href":"http://example.com/index.php?foozoid&#x5B;&#x5D;=bar"}}'>http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5834 IPv6 urls, autolink format (T23261)
5836 http://[2404:130:0:1000::187:2]/index.php
5838 Examples from RFC 2373, section 2.2:
5840 *http://[1080::8:800:200C:417A]/unicast
5841 *http://[FF01::101]/multicast
5842 *http://[::1]/loopback
5843 *http://[::]/unspecified
5844 *http://[::13.1.68.3]/ipv4compat
5845 *http://[::FFFF:129.144.52.38]/ipv4compat
5847 Examples from RFC 2732, section 2:
5849 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5850 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5851 *http://[3ffe:2a00:100:7031::1]
5852 *http://[1080::8:800:200C:417A]/foo
5853 *http://[::192.9.5.5]/ipng
5854 *http://[::FFFF:129.144.52.38]:80/index.html
5855 *http://[2010:836B:4179::836B:4179]
5857 <p><a rel="nofollow" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a>
5858 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5860 <ul><li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5861 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5862 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5863 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5864 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5865 <li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5866 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5868 <ul><li><a rel="nofollow" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5869 <li><a rel="nofollow" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5870 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5871 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5872 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5873 <li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5874 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5876 <p><a rel="mw:ExtLink" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5878 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external mw-magiclink">RFC 2373</a>, section 2.2:</p>
5879 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5880 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5881 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5882 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5883 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5884 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5886 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5887 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5888 <li><a rel="mw:ExtLink" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5889 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5890 <li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5891 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5892 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5893 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5897 IPv6 urls, bracketed format (T23261)
5899 [http://[2404:130:0:1000::187:2]/index.php test]
5901 Examples from RFC 2373, section 2.2:
5903 *[http://[1080::8:800:200C:417A] unicast]
5904 *[http://[FF01::101] multicast]
5905 *[http://[::1]/ loopback]
5906 *[http://[::] unspecified]
5907 *[http://[::13.1.68.3] ipv4compat]
5908 *[http://[::FFFF:129.144.52.38] ipv4compat]
5910 Examples from RFC 2732, section 2:
5912 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5913 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5914 *[http://[3ffe:2a00:100:7031::1] 3]
5915 *[http://[1080::8:800:200C:417A]/foo 4]
5916 *[http://[::192.9.5.5]/ipng 5]
5917 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5918 *[http://[2010:836B:4179::836B:4179] 7]
5920 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5921 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5923 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5924 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5925 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5926 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5927 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5928 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5929 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5931 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5932 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5933 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5934 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5935 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5936 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5937 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5939 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5941 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external mw-magiclink">RFC 2373</a>, section 2.2:</p>
5942 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5943 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5944 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5945 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5946 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5947 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5949 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5950 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5951 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5952 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5953 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5954 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5955 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5956 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5960 Non-extlinks in brackets
5969 [{{echo|foo}} ''bar'']
5970 [{{echo|foo}}l's] errand
5971 [{{echo|foo}}l's errand]
5973 [url=http://example.com]
5974 [http:// bare protocols don't count]
5987 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5988 [http:// bare protocols don't count]
5996 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5997 [<span about="#mwt20" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> bar]
5998 [<span about="#mwt21" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> <i>bar</i>]
5999 [<span about="#mwt22" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's] errand
6000 [<span about="#mwt23" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's errand]
6001 [url=<span about="#mwt24" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6002 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6003 [http:// bare protocols don't count]</p>
6007 Percent encoding in external links
6009 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6011 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6014 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6018 Use url link syntax for links where the content is equal the link target
6022 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6025 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6029 Parenthesis in external links, especially URL links
6033 http://example.com/test)
6035 http://example.com/(test)
6037 http://example.com/((test)
6039 (http://example.com/(test))
6041 (http://example.com/(test)))))
6043 http://example.com/a)b
6045 [http://example.com) foo]
6047 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6048 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6049 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6050 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6051 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6052 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6053 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6054 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6057 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6058 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6059 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6060 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6061 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6062 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6063 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6064 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6068 Parenthesis in external links, w/ transclusion or comment
6070 (http://example.com/{{echo|hi}})
6072 (http://example.com<!-- hi -->)
6074 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6075 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6078 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" class="external free" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span>"}]]}'>http://example.com/hi</a>)</p>
6080 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
6084 Serialize <a> tags with invalid link targets as plain text
6086 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6088 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6089 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6090 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6091 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6094 <nowiki>*</nowiki>text
6095 <nowiki>[[foo]]</nowiki>
6096 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6100 mw:ExtLink -vs- mw:WikiLink (T94723)
6104 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6105 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6106 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6107 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6109 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6110 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6118 [[:en:European_Robin|European Robin]]
6119 [[:en:European_Robin|European Robin]]
6123 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6127 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6129 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6140 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6142 Normal text. '''''Bold italic text.''''' Normal text.
6144 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6145 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6150 Quotes wrapping HTML table
6152 '''<table><tr><td>hi</td></tr></table>'''
6154 <b><table><tbody><tr><td>hi</td></tr></tbody></table></b>
6156 <b><table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>hi</td></tr></tbody></table></b>
6159 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6160 # parser strips. The wikitext contains just the first half of the bold
6163 Unclosed and unmatched quotes
6165 '''''Bold italic text '''with bold deactivated''' in between.'''''
6167 '''''Bold italic text ''with italic deactivated'' in between.'''''
6171 ..spanning two paragraphs (should not work).'''
6173 '''Bold tag left open
6175 ''Italic tag left open
6179 <!-- Unmatching number of opening, closing tags: -->
6180 '''This year''''s election ''should'' beat '''last year''''s.
6182 ''Tom'''s car is bigger than ''Susan'''s.
6184 Plain ''italic'''s plain
6186 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6187 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6188 </p><p><b>Bold text..</b>
6189 </p><p>..spanning two paragraphs (should not work).
6190 </p><p><b>Bold tag left open</b>
6191 </p><p><i>Italic tag left open</i>
6193 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6194 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6195 </p><p>Plain <i>italic'</i>s plain
6198 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6199 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6200 </p><p><b>Bold text..</b>
6201 </p><p>..spanning two paragraphs (should not work).<b></b>
6202 </p><p><b>Bold tag left open</b>
6203 </p><p><i>Italic tag left open</i>
6206 <!-- Unmatching number of opening, closing tags: -->
6207 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6208 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6209 </p><p>Plain <i>italic'</i>s plain
6216 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6219 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6220 # is the bare minimum required by the spec, see:
6221 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6222 # Parsoid team replies: empty table tags are legal in HTML5
6224 A table with no data.
6235 A table with stray table end tags on start tag line (wt2html)
6239 {|style="color: red;"|}
6241 {|style="color: red;" |}
6245 {|style="color: red;"|} id="foo"
6249 {|style="color: red;" |} id="foo"
6253 <table style="color: red;">
6255 </table><table style="color: red;">
6258 </td></tr></tbody></table>
6259 <table style="color: red;" id="foo">
6262 </td></tr></tbody></table>
6263 <table style="color: red;" id="foo">
6266 </td></tr></tbody></table>
6268 <table style="color: red;"></table>
6270 <table style="color: red;">
6276 <table style="color: red;" id="foo">
6282 <table style="color: red;" id="foo">
6290 A table with no data (take 2)
6298 # A table with nothing but a caption is invalid XHTML, we might want to render
6299 # this as <p>caption</p>
6300 # Parsoid team replies: table with only a caption is legal in HTML5
6302 A table with nothing but a caption
6310 </caption><tr><td></td></tr></table>
6312 <table><caption>caption</caption></table>
6316 A table with caption with default-spaced attributes and a table row
6319 |+ style="color: red;" |caption1
6325 <caption style="color: red;">caption1
6333 A table with captions with non-default spaced attributes and a table row
6336 |+style="color: red;"|caption2
6337 |+ style="color: red;"|caption3
6343 <caption style="color: red;">caption2
6345 <caption style="color: red;">caption3
6353 Table td-cell syntax variations
6358 |style='color:red;'|baz
6359 |style='color:red;'||baz
6366 <td>foo bar foo</td>
6369 <td style="color:red;">baz
6371 <td>style='color:red;'</td>
6397 Simple table but with multiple dashes for row wikitext
6415 Multiplication table
6417 {| border="1" cellpadding="2"
6418 |+Multiplication table
6438 <table border="1" cellpadding="2">
6439 <caption>Multiplication table
6485 Accept "||" in table headings
6499 Accept "!!" in table data
6512 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6517 Accept "||" in indented table headings
6527 </th></tr></table></dd></dl>
6531 Accept "!!" in templates
6544 <tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["!a ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b!!c"}},"i":0}}]}'>a b</th><th about="#mwt1">c</th></tr>
6548 Accept "!!" in table headings after newline
6564 <p>b!!c</p></th></tr>
6569 Accept "!!" in table data of mixed wikitext / html syntax
6573 <tr><td>b!!c</td></tr>
6579 </th></tr><tr><td>b!!c</td></tr>
6583 <tbody><tr><th>a</th></tr>
6584 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6589 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6605 Accept "| !" at start of line in tables (ignore !-attribute)
6609 |!style="color:red"|bar
6620 Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present, or in 1st cell when there is a space between "|" and +/-
6624 |style='color:red;'|+1
6625 |style='color:blue;'|-1
6637 <td style="color:red;">+1
6639 <td style="color:blue;">-1
6662 |rowspan=2|Cell 2, row 1 (and 2)
6673 <td rowspan="2">Cell 2, row 1 (and 2)
6690 {| bgcolor=#ABCDEF border=2
6695 |the original table again
6703 <table bgcolor="#ABCDEF" border="2">
6711 <td>the original table again
6716 Invalid attributes in table cell (T3830)
6729 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6733 |title="foo<nowiki>|</nowiki>" |bar
6734 |title="foo<nowiki>|</nowiki>" bar
6741 <td title="foo|">bar
6743 <td>title="foo|" bar
6747 <tbody><tr><td title="foo">bar</td>
6748 <td title="foo|" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"foo<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[32,50,8,9]}'>|</span>"}]]}'>bar</td>
6749 <td>title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6753 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6754 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6755 # *2wt modes will fail.
6757 Table security: embedded pipes
6759 parsoid=wt2html,html2html
6762 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6766 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6767 <td>]" onmouseover="alert(document.cookie)">test
6774 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" class="external free" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6778 Element attributes with double ! should not be broken up by <th>
6781 !hi <div class="!!">ha</div> ho
6786 <th>hi <div class="!!">ha</div> ho
6790 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6795 ! and || in element attributes should not be parsed as <th>/<td>
6798 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6803 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6807 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6811 # FIXME: The output seems broken. Filed as T110268.
6813 ! and || in td attributes should not be parsed as <th>/<td>
6818 |style="color: red !important;" data-contrived="put this here ||"|foo
6823 <td>style="color: red !important;" data-contrived="put this here</td>
6828 <tbody><tr><td>style="color: red !important;" data-contrived="put this here</td><td data-parsoid='{"stx":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'>foo</td></tr>
6833 Break on | in element attribute in template
6835 parsoid=wt2html,html2html
6837 {{echo|1=<div class="hi|ho">ha</div>}}
6839 <p>ho">ha</div>
6842 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</p>
6846 Break on | in element attribute name in template
6848 {{echo|<div cla|ss="hiho">ha</div>}}
6850 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"ss","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div cla"},"ss":{"wt":"\"hiho\">ha</div>"}},"i":0}}]}'><div cla</p>
6854 Don't break on | in extension attribute in template
6856 {{echo|<ref name="hi|ho">ha</ref>}}
6860 <p><sup about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Parser_test#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
6862 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Parser_test#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
6865 ## We don't support roundtripping of these attributes in Parsoid.
6866 ## Selective serialization takes care of preventing dirty diffs.
6867 ## But, on edits, we dirty-diff the invalid attribute text.
6869 Invalid text in table attributes should be discarded
6873 {| <span>boo</span> style='border:1px solid black'
6874 | <span>boo</span> style='color:blue' |1
6875 |<span>boo</span> style='color:blue'|2
6878 <table style="border:1px solid black">
6880 <td style="color:blue">1
6882 <td style="color:blue">2
6885 <table style="border:1px solid black">
6887 <td style="color:blue">1</td>
6888 <td style="color:blue">2</td>
6894 Invalid text in table attributes should be preserved by selective serializer
6897 "modes": ["selser"],
6899 ["td:first-child", "text", "abc"],
6900 ["td + td", "text", "xyz"]
6904 {| <span>boo</span> style='border:1px solid black'
6905 | <span>boo</span> style='color:blue' | 1
6906 |<span>boo</span> style='color:blue'| 2
6909 {| <span>boo</span> style='border:1px solid black'
6910 | <span>boo</span> style='color:blue' | abc
6911 |<span>boo</span> style='color:blue'| xyz
6916 1. Template-generated table cell attributes and cell content
6921 || {{table_attribs_5}}
6922 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6923 |align=center {{table_attribs}}
6924 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6929 <td style="color:red;">Foo
6931 <td style="color:red;">Foo
6933 <td>style="color:red;"</td>
6936 <td style="color:red;">Foo
6938 <td align="center" style="color:red;">Foo
6940 <td align="center" style="color:red;">Foo
6945 2. Template-generated table cell attributes and cell content
6948 |{{table_attribs_2}}
6953 <td style="color:red;">Foo
6960 <tbody><tr><td about="#mwt1" typeof="mw:Transclusion" style="color:red;" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_2","href":"./Template:Table_attribs_2"},"params":{},"i":0}}]}'>Foo</td>
6961 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6966 3. Template-generated table cell attributes and cell content
6969 !align=center {{table_header_cells}}
6971 |align=center {{table_cells}}
6976 <th align="center" style="color:red;">Foo</th>
6977 <th style="color:red;"><i>Bar</i></th>
6978 <th style="color:brown;"><i>Foo</i> and Baz
6981 <td align="center" style="color:red;">Foo</td>
6982 <td style="color:red;"><i>Bar</i></td>
6983 <td style="color:brown;"><i>Foo</i> and Baz
6987 <tbody><tr><th align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":0}}]}'>Foo</th><th about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></th><th about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</th></tr><tr>
6988 <td align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":0}}]}'>Foo</td><td about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></td><td about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</td></tr>
6993 4. Template-generated table cell attributes and cell content inside a templated table
6996 !align=center {{table_header_cells}}
6998 |align=center {{table_cells}}
7003 <th align="center" style="color:red;">Foo</th>
7004 <th style="color:red;"><i>Bar</i></th>
7005 <th style="color:brown;"><i>Foo</i> and Baz
7008 <td align="center" style="color:red;">Foo</td>
7009 <td style="color:red;"><i>Bar</i></td>
7010 <td style="color:brown;"><i>Foo</i> and Baz
7013 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":1}},"\n|-\n|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":2}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":3}}]}'>
7014 <tbody><tr><th align="center" style="color:red;">Foo</th><th style="color:red;"><i>Bar</i></th><th style="color:brown;"><i>Foo</i> and Baz</th></tr>
7016 <td align="center" style="color:red;">Foo</td><td style="color:red;"><i>Bar</i></td><td style="color:brown;"><i>Foo</i> and Baz</td></tr>
7020 ## Edge case fix to prevent future regressions
7022 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7025 |{{table_attribs_7}}
7030 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Parser_test#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
7032 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Parser_test#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
7036 Table with row followed by newlines and table heading
7038 parsoid=wt2html,html2html
7055 Table with empty line following the start tag
7057 parsoid=wt2html,html2html
7074 Table attributes with empty value
7076 parsoid=wt2html,html2html
7088 <tbody><tr><td style="">hello</td></tr>
7093 Wikitext table with a lot of comments
7115 Wikitext table comments represented in parsoid dom
7117 {|<!--c1--><!--c2-->
7126 </td></tr></tbody></table>
7128 <table><!--c1--><!--c2-->
7129 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7130 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7135 Wikitext table with double-line table cell
7151 Table cell with a single comment
7167 Table-cell after a comment-only-empty-line
7183 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7185 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7190 Build table with {{!}}
7192 {{{!}} class="wikitable"
7195 {{!}}- style="color:red;"
7196 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7199 <table class="wikitable">
7205 <tr style="color:red;">
7207 <td style="color:red;">second data
7212 Build table with pipe as data
7214 {| class="wikitable"
7217 |- style="color:red;"
7218 |data|| style="color:red;" |second data
7220 | style="color:red;" |data with | || style="color:red;" | second data with |
7222 ||data with | |||second data with |
7225 <table class="wikitable">
7231 <tr style="color:red;">
7233 <td style="color:red;">second data
7236 <td style="color:red;">data with |</td>
7237 <td style="color:red;">second data with |
7240 <td>data with |</td>
7241 <td>second data with |
7246 Build table with wikilink
7248 {| class="wikitable"
7249 !header||second header
7250 |- style="color:red;"
7251 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7253 |data||second data [[Main Page|link|text with pipe]]
7256 <table class="wikitable">
7261 <tr style="color:red;">
7262 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7263 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7267 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7271 # The expected HTML structure in this test is debatable. The PHP parser does
7272 # not parse this kind of table at all. The main focus for Parsoid is on
7273 # round-tripping, so this output is ok for now. TODO: revisit!
7275 Wikitext table with html-syntax row
7285 <td>foo</td></tr></tbody></table>
7288 ## Remex doesn't account for fostered content.
7290 Fostered content in tables: Plain text
7309 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7312 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7316 Fostered content in tables: Lists
7318 parsoid=wt2html,html2html
7330 <ul><li>a</li></ul><table>
7335 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7336 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7338 </tr></tbody></table>
7342 Template generated table cell with attributes
7346 {{table_attribs_4}} ||a||b
7352 <td style="background-color:#DC241f;" width="10px"></td>
7355 </td></tr></tbody></table>
7358 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7359 <td style="background-color:#DC241f;" width="10px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"table_attribs_4","href":"./Template:Table_attribs_4"},"params":{},"i":0}}," ||a||b"]}'></td><td about="#mwt1">a</td><td about="#mwt1">b</td></tr>
7363 Parsoid: Round-trip tables directly followed by content (T53219)
7365 parsoid=wt2html,wt2wt
7378 </td></tr></tbody></table><p> bar
7382 </td></tr></tbody></table><p><b>quux</b></p>
7386 Parsoid: Default to a newline after tables in new content (T53219)
7391 <tr><td>foo</td></tr></tbody></table> bar
7393 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7398 <nowiki> </nowiki>bar
7406 Parsoid: Row-syntax table headings followed by comment & table cells
7408 parsoid=wt2html,wt2wt
7412 <!-- foo --> ||baz||quux
7425 <tbody><tr><th>foo</th><th>bar
7426 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7431 Parsoid: Recover better from broken table attributes
7445 </td></tr></tbody></table>
7450 <p>foo</p></td></tr>
7454 # Note: PHP parser omits empty rows
7456 Tables: Digest broken attributes on table and tr tag
7472 <tr class='mw-empty-elt'></tr>
7473 <tr class='mw-empty-elt'></tr>
7478 Table with missing opening <tr> tag
7480 parsoid=wt2html,wt2wt
7488 <tbody><tr><td>foo</td>
7493 # T137406: Whitespace in the HTML
7495 1. Generate correct wikitext for tables with thead/tbody/tfoot
7500 <caption>Test</caption>
7562 </td></tr></tbody></table>
7565 # T137406: No whitespace in the HTML
7567 2. Generate correct wikitext for tables with thead/tbody/tfoot
7571 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7581 Wikitext tables can be nested inside HTML tables
7585 <table data-parsoid='{"stx":"html"}'>
7588 <tr><td>foo</td></tr>
7606 </td></tr></tbody></table>
7615 Plain link, capitalized
7619 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7624 Plain link, uncapitalized
7628 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7635 [[Main Page|The Main Page]]
7637 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7642 Piped link with comment in link text
7644 [[Main Page|The Main<!--front--> Page]]
7646 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7651 Piped link with multiple pipe characters in link text
7653 [[Main Page||The|Main|Page|]]
7655 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7658 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7662 Piped link with no link text
7664 [[Thomas Bek (bishop of St David's)|]]
7666 <p>[[Thomas Bek (bishop of St David's)|]]
7669 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7673 Piped link with empty link text
7675 [[Main Page|<nowiki/>]] - empty nowiki
7676 [[Main Page| ]] - empty space
7677 [[Main Page| ]] - empty non breaking space
7679 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7680 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7681 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7684 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7685 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7686 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></a> - empty non breaking space</p>
7694 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7699 Broken link with fragment
7701 [[Zigzagzogzagzig#zug]]
7703 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7708 Special page link with fragment
7710 [[Special:Version#anchor]]
7712 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7717 Nonexistent special page link with fragment
7719 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7721 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7728 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7730 <p>xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a>, xxx<a href="/wiki/Main_Page" title="Main Page">Main Page</a>, Xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a> XXX<a href="/wiki/Main_Page" title="Main Page">main Page</a>, XXX<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7737 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7739 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>!!!
7750 T45661: Piped links with identical prefixes
7752 [[prefixed article|prefixed articles with spaces]]
7754 [[prefixed article|prefixed articlesaoeu]]
7756 [[Main Page|Main Page test]]
7758 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7759 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7760 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7766 Link with HTML entity in suffix / tail
7768 [[Main Page]]", [[Main Page]]a
7770 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7773 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&quot;","srcContent":"\""}'>"</span>, <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&#97;","srcContent":"a"}'>a</span></p>
7777 Link with 3 brackets
7788 Link with 4 brackets
7792 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7797 Piped link with 3 brackets
7799 [[[main page|the main page]]]
7801 <p>[[[main page|the main page]]]
7806 Piped link with extlink-like text
7809 [[Main Page|This is a [bar]]]
7812 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7813 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7814 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7817 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7818 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7819 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7823 Link with multiple pipes
7825 [[Main Page|The|Main|Page]]
7827 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7832 Anchor containing a #. (T65430)
7834 wgFragmentMode=[ 'html5', 'legacy' ]
7836 [[Main Page#And#Link]]
7838 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7841 <p><a rel="mw:WikiLink" href="./Main_Page#And#Link" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#And#Link"},"sa":{"href":"Main Page#And#Link"}}'>Main Page#And#Link</a></p>
7847 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7849 <p><a href="/index.php?title=Talk:Parser_testing&action=edit&redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a>
7854 Link with space in namespace
7856 [[User talk:Foo bar]]
7858 <p><a href="/index.php?title=User_talk:Foo_bar&action=edit&redlink=1" class="new" title="User talk:Foo bar (page does not exist)">User talk:Foo bar</a>
7863 MemoryAlpha:AlphaTest
7865 This is an article in the MemoryAlpha namespace
7866 (which shadows the memoryalpha interwiki link).
7870 Namespace takes precedence over interwiki link (T53680)
7872 [[MemoryAlpha:AlphaTest]]
7874 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7878 # The previous test doesn't work correctly in html2*, due to not recognizing the
7879 # link as an internal one. This one checks for the correct behavior.
7881 Link to namespace preferred over interwiki with correct rel attribute
7883 parsoid=html2wt,html2html
7885 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7887 [[MemoryAlpha:AlphaTest]]
7891 Piped link to namespace
7893 [[Meta:Disclaimers|The disclaimers]]
7895 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7902 [[Usually caused by a typo (oops}]]
7904 <p>[[Usually caused by a typo (oops}]]
7911 Just a test of an article title containing a percent.
7915 Link containing % (not as a hex sequence)
7918 [[7% Solution|7%25 Solution]]
7920 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7921 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7924 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7925 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7928 # note that the parsoid HTML is identical to the previous test output,
7929 # so the previous test ensures that the html2wt mode will generate the
7930 # "not as a hex sequence" wikitext.
7932 Link containing % as a single hex sequence interpreted to char
7934 parsoid=wt2wt,wt2html,html2html
7937 [[7%25 Solution|7%25 Solution]]
7939 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7940 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7943 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7944 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7948 Link containing % as a double hex sequence interpreted to hex sequence
7952 <p>[[7%2525 Solution]]
7956 ## Example for such a section: == < ==
7958 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7962 wgFragmentMode=[ 'html5', 'legacy' ]
7964 [[%23%3c]][[%23%3e]]
7966 <p><a href="#<">#<</a><a href="#>">#></a>
7969 <p><a rel="mw:WikiLink" href="./Main_Page#<" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#<"},"sa":{"href":"%23%3c"}}'>#<</a><a rel="mw:WikiLink" href="./Main_Page#>" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#>"},"sa":{"href":"%23%3e"}}'>#></a></p>
7972 ## Example for such a section: == < ==
7974 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7976 wgFragmentMode=[ 'legacy' ]
7978 [[%23%3c]][[%23%3e]]
7980 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7985 Link containing "<#" and ">#" as a hex sequences
7987 [[%3c%23]][[%3e%23]]
7989 <p>[[%3c%23]][[%3e%23]]
7994 Link containing an equals sign
7996 [[Special:BookSources/isbn=4-00-026157-6]]
7998 <p><a href="/wiki/Special:BookSources/isbn%3D4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a>
8001 <p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
8007 Just a test of an article title containing an ampersand
8011 Link containing an ampersand
8017 [[Foo &amp; bar]]
8019 <p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8020 </p><p><a href="/wiki/Foo_%26_bar" title="Foo & bar">Foo & bar</a>
8021 </p><p>[[Foo &amp; bar]]
8024 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar">Foo & bar</a></p>
8025 <p><a rel="mw:WikiLink" href="./Foo_&_bar" title="Foo & bar" data-parsoid='{"stx":"simple","a":{"href":"./Foo_&_bar"},"sa":{"href":"Foo &amp; bar"}}'>Foo & bar</a></p>
8026 <p>[[Foo <span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp; bar]]</p>
8032 Just a test of an article title containing a tilde.
8035 # note that links containing signatures, like [[Foo~~~~]], are
8036 # massaged by the pre-save transform (PST) and so the tildes are never
8037 # seen by the parser.
8039 Link containing a tilde
8043 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8046 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8050 Link containing double-single-quotes '' (T6598)
8052 [[Lista d''e paise d''o munno]]
8054 <p><a href="/index.php?title=Lista_d%27%27e_paise_d%27%27o_munno&action=edit&redlink=1" class="new" title="Lista d''e paise d''o munno (page does not exist)">Lista d''e paise d''o munno</a>
8057 <p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno" title="Lista d''e paise d''o munno">Lista d''e paise d''o munno</a></p>
8061 Link containing double quotes and spaces
8065 <p><a href="/index.php?title=Cool_%22Gator%22&action=edit&redlink=1" class="new" title="Cool "Gator" (page does not exist)">Cool "Gator"</a>
8068 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8072 File containing double quotes and spaces
8074 [[File:Cool "Gator".png]]
8076 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Cool_%22Gator%22.png" data-parsoid='{"a":{"href":"./File:Cool_%22Gator%22.png"},"sa":{"href":"File:Cool \"Gator\".png"}}'><img resource='./File:Cool_"Gator".png' src="./Special:FilePath/Cool_%22Gator%22.png" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Cool_\"Gator\".png","height":"220","width":"220","src":"./Special:FilePath/Cool_%22Gator%22.png"},"sa":{"resource":"File:Cool \"Gator\".png","src":"./Special:FilePath/Cool_\"Gator\".png"}}'/></a></figure-inline></p>
8080 Redirect containing double quotes and spaces
8082 #REDIRECT [[Cool "Gator"]]
8084 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8088 Link containing double-single-quotes '' in text (T6598 sanity check)
8090 Some [[Link|pretty ''italics'' and stuff]]!
8092 <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>!
8095 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8099 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8101 ''Some [[Link|pretty ''italics'' and stuff]]!''
8103 <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>
8108 Link with double quotes in title part (literal) and alternate part (interpreted)
8110 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8114 [[''Pentecoste''|Pentecoste]]
8116 [[''Pentecoste''|''Pentecoste'']]
8118 <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>
8119 </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>
8120 </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>
8121 </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>
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="./File:Denys_Savchenko_''Pentecoste''.jpg"><img resource="./File:Denys_Savchenko_''Pentecoste''.jpg" src="./Special:FilePath/Denys_Savchenko_''Pentecoste''.jpg" height="220" width="220"/></a></figure-inline></p>
8125 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8126 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8127 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8131 Broken image links with HTML captions (T41700)
8133 [[File:Nonexistent|<script></script>]]
8134 [[File:Nonexistent|100x100px|<script></script>]]
8135 [[File:Nonexistent|<]]
8136 [[File:Nonexistent|a<i>b</i>c]]
8138 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8139 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8140 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8141 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8144 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8145 <figure-inline typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"100","width":"100"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8146 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[107,111,null,null]}'>&lt;</span>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8147 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"a<i data-parsoid='{\"stx\":\"html\",\"dsr\":[134,142,3,4]}'>b</i>c"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline></p>
8153 [[http://www.example.com]]
8155 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8158 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8162 Plain link to URL with link text
8164 [[http://www.example.com Link text]]
8166 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8171 Plain link to protocol-relative URL
8173 [[//www.example.com]]
8175 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8178 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8182 Plain link to protocol-relative URL with link text
8184 [[//www.example.com Link text]]
8186 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8191 Plain link to page with question mark in title
8197 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8198 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8202 # I'm fairly sure the expected result here is wrong.
8203 # We want these to be URL links, not pseudo-pages with URLs for titles....
8204 # However the current output is also pretty screwy.
8207 # I'm changing it to match the current output--it arguably makes more
8208 # sense in the light of the test above. Old expected result was:
8209 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8211 # But I think this test is bordering on "garbage in, garbage out" anyway.
8216 Piped link to URL: [[http://www.example.com|an example URL]]
8218 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8221 <p>Piped link to URL: [<a rel="mw:ExtLink" class="external text" href="http://www.example.com%7Can" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
8225 Plain link in template argument
8229 {{echo|[http://www.example.com |123]}}
8231 {{echo|[[http://www.example.com |123]]}}
8233 {{echo|[[http://www.example.com |123]}}
8235 {{echo|[http://www.example.com |123]]}}
8237 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8238 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8239 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8240 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8243 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8245 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[http://www.example.com |123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external text" href="http://www.example.com">|123</a>]</p>
8247 <p>{{echo|[<a rel="mw:ExtLink" class="external text" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
8249 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8253 T2002: [[page|http://url/]] should link to page, not http://url/
8255 [[Main Page|http://url/]]
8257 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8260 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8263 # Parsoid does not mark self-links, by design.
8265 T2337: Escaped self-links should be bold
8269 [[Bug462]] [[Bug462]]
8271 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8274 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8278 Self-link to section should not be bold
8282 [[Main Page#section]]
8284 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8295 Self-link to numeric title
8301 <p><a class="mw-selflink selflink">0</a>
8306 Link to numeric-equivalent title
8312 <p><a href="/wiki/00" title="00">00</a>
8317 <nowiki> inside a link
8319 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8321 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8324 <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>
8327 ## Parsoid doesn't get this right and even fails wt2html because, when doing the
8328 ## normalization for comparison, the html serialization / re-parse doesn't
8329 ## roundtrip. This is T49963
8333 [[Main<pre> Page</pre>]] [[Main Page|the main page <pre>[it's not very good]</pre>]]
8335 <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>
8337 <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>
8341 Non-breaking spaces in title
8343 [[ Main Page ]]
8345 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8349 # Add new article for the test below so that it doesn't red-link
8357 Multiple spaces in titles should normalize to a single underscore
8359 parsoid=wt2html,wt2wt
8365 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8366 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8367 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8370 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8371 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8372 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8377 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8383 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8388 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8394 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8399 Internal link with en linktrail: no apostrophes (T29473)
8405 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8410 Internal link with ca linktrail with apostrophes (T29473)
8416 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8421 Internal link with kaa linktrail with apostrophes (T29473)
8427 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8432 Link with multiple ":" in a subpage-supporting namespace (T65636)
8434 [[User:Foo/Test/63636:Bar|Test]]
8436 <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>
8439 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8442 ## Mainly a sanity check for Parsoid
8444 Handle title parsing for subpages
8464 Link to a subpage from a namespace other than main
8471 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8474 <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>
8478 Ensure that transclusion titles are not url-decoded
8480 subpage title=[[Test]]
8483 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8485 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8488 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8492 Purely hash wikilink
8494 title=[[User:Test/123]]
8499 <p><a href="#a">b</a>
8502 <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>
8506 Serialization of purely hash wikilink
8508 title=[[User:Test/123]]
8512 <p><a href="#a">[[</a></p>
8514 [[#a|<nowiki>[[</nowiki>]]
8516 <p><a href="#a">[[</a>
8521 1. Interaction of linktrail and template encapsulation
8525 <p><a href="/wiki/Foo" title="Foo">Fool</a>
8528 <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>
8532 2. Interaction of linktrail and template encapsulation
8534 {{echo|Some [[Fool]]}}s
8536 <p>Some <a href="/index.php?title=Fool&action=edit&redlink=1" class="new" title="Fool (page does not exist)">Fools</a>
8539 <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>
8543 3. Interaction of linktrail and template encapsulation
8545 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8547 <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>
8550 <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>
8560 Internal link with is link prefix
8564 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8566 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8577 Internal link with is link trail and link prefix
8581 [[mótmælendatrú|xxx]]ar
8583 mótmælenda[[söfnuður]]
8584 mótmælenda[[söfnuður|söfnuðir]]
8585 mótmælenda[[söfnuður|söfnuðir]]xxx
8587 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8588 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8589 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8590 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8591 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8596 Parsoid link trail escaping
8598 parsoid=html2wt,html2html
8600 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8606 Parsoid link prefix escaping
8609 parsoid=html2wt,html2html
8611 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8613 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8617 Parsoid link bracket escaping
8619 parsoid=html2wt,html2html
8621 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8622 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8623 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8624 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8625 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8626 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8634 [[[<nowiki/>[[Test]]]]]
8638 [[[[[<nowiki/>[[Test]]]]]]]
8642 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8650 [http://wp.org ''foo'']
8652 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8653 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8654 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8655 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8660 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8662 [[Foo|{{echo|a}} b {{echo|c}}]]
8664 <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>
8668 Link with angle bracket after anchor
8670 wgFragmentMode=[ 'html5', 'legacy' ]
8674 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8677 <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>
8681 Link with angle bracket after anchor (legacy)
8683 wgFragmentMode=[ 'legacy' ]
8687 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8692 ### Interwiki links (see maintenance/interwiki.sql)
8696 Inline interwiki link
8698 parsoid=wt2html,wt2wt,html2html
8700 [[MeatBall:SoftSecurity]]
8702 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8705 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8709 Inline interwiki link with empty title (T4372)
8711 parsoid=wt2html,wt2wt,html2html
8715 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8718 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8721 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8723 Interwiki link encoding conversion (T3636)
8725 parsoid=wt2html,wt2wt
8727 *[[Wikipedia:ro:Olteniţa]]
8728 *[[Wikipedia:ro:Olteniţa]]
8730 <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>
8731 <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>
8733 <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>
8734 <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>
8737 <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>
8738 <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>
8743 Interwiki link with fragment (T4130)
8745 [[MeatBall:SoftSecurity#foo]]
8747 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8751 ## The interwiki case here continued to be legacy escaped because of the
8752 ## default setting of $wgExternalInterwikiFragmentMode
8754 Link scenarios with escaped fragments
8758 wgFragmentMode=[ 'html5', 'legacy' ]
8761 [[Foo#Is this great?]]
8762 [[meatball:Foo#Is this great?]]
8764 <p><a href="#Is_this_great?">#Is this great?</a>
8765 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8766 <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>
8769 <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>
8770 <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>
8771 <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>
8775 Link scenarios with escaped fragments (legacy)
8777 wgFragmentMode=[ 'legacy' ]
8780 [[Foo#Is this great?]]
8781 [[meatball:Foo#Is this great?]]
8783 <p><a href="#Is_this_great.3F">#Is this great?</a>
8784 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8785 <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>
8789 # Ideally the wikipedia: prefix here should be proto-relative too
8790 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8791 # define the 'en' prefix, and originally the test used 'wikipedia',
8792 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8795 Different interwiki prefixes mapping to the same URL
8803 [[:wikipedia:Foo|Foo]]
8805 [[wikipedia:en:Foo]]
8807 [[:wikipedia:en:Foo]]
8811 <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>
8813 <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>
8815 <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>
8817 <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>
8819 <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>
8821 <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>
8823 <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>
8827 Interwiki links that cannot be represented in wiki syntax
8830 [[meatball:ok#foo|ok with fragment]]
8831 [[meatball:ok_as_well?|ok ending with ? mark]]
8832 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8833 [http://de.wikipedia.org/wiki/#foo is just fragment]
8836 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8837 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8838 <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>
8839 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8840 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8843 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8844 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8845 <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>
8846 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8847 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8851 Interwiki links: trail
8853 [[wikipedia:Foo|Ba]]r
8855 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8858 <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>
8862 Local interwiki link
8864 parsoid=wt2html,wt2wt,html2html
8866 [[local:Template:Foo]]
8868 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8871 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8874 # Parsoid does not mark self-links, by design.
8876 Local interwiki link: self-link to current page
8879 parsoid=wt2html,wt2wt,html2html
8883 <p><a class="mw-selflink selflink">local:Main Page</a>
8886 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8890 Local interwiki link: prefix only (T66167)
8892 parsoid=wt2html,wt2wt,html2html
8896 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8899 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8903 Local interwiki link: with additional interwiki prefix (T63357)
8905 parsoid=wt2html,wt2wt,html2html
8907 [[local:meatball:Hello]]
8909 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8912 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8916 Multiple local interwiki link prefixes
8918 [[local:local:local:local:mi:local:Foo]]
8920 parsoid=wt2html,wt2wt,html2html
8922 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8925 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8929 Interwiki link with percent encoded target
8931 [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]]
8933 <p><a href="http://es.wikipedia.org/wiki/Nueva_Guip%C3%BAzcoa" class="extiw" title="es:Nueva Guipúzcoa">Nueva Guipúzcoa</a>
8936 <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>
8940 ### Interlanguage links
8941 ### Language links (so that searching for '### language' matches..)
8953 <p>Blah blah blah</p>
8954 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8957 ## parsoid html2wt will lose the space variations
8959 Interlanguage link with spacing
8961 parsoid=wt2html,wt2wt,html2html
8969 <p>Blah blah blah</p>
8970 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8974 Double interlanguage link
8983 <p>Blah blah blah</p>
8984 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8985 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8988 ## parsoid html2wt will lose the space variations
8990 Interlanguage link variations
8992 parsoid=wt2html,wt2wt,html2html
9002 <p>Blah blah blah</p>
9003 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
9004 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
9005 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
9009 Escaping of interlanguage links (T129218, T156308)
9013 [[ : zh : Chinese ]]
9016 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9017 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
9021 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9022 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
9026 Multiple colons escaping interlanguage links
9034 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9039 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9041 [[:::es:Spanish]]</p>
9044 ## parsoid html2wt will normalize the space to _
9046 Space and question mark encoding in interlanguage links (T95473)
9048 parsoid=wt2html,wt2wt,html2html
9056 <p>Blah blah blah</p>
9057 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9061 Interlanguage link, with prefix links
9071 <p>Blah blah blah</p>
9072 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9076 Double interlanguage link, with prefix links (T10897)
9087 <p>Blah blah blah</p>
9088 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9089 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9093 "Extra" interlanguage links (T34189 / gerrit 111390)
9101 <p>Blah blah blah</p>
9102 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9105 ## PHP parser tests script needs an update
9106 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9108 Language links render as inline links if $wgInterwikiMagic=false
9110 wgInterwikiMagic=false
9111 parsoid=wt2html,wt2wt,html2html
9116 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9119 ## PHP parser tests script needs an update
9120 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9122 Language links render as inline links in the Talk namespace
9125 parsoid=wt2html,wt2wt,html2html
9130 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9134 Parsoid-specific test: Wikilinks with should RT properly
9140 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9145 Parsoid T55221: Wikilinks should be properly entity-escaped
9147 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9149 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9150 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9152 He&nbsp;llo [[Foo|He&nbsp;llo]]
9154 He&nbsp;llo He&nbsp;llo
9156 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9157 </p><p>He&nbsp;llo He&nbsp;llo
9161 # html2wt will fail because of title normalization without data-parsoid
9163 Parsoid: handle constructor well
9165 parsoid=wt2html,wt2wt
9171 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9172 </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>
9175 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9177 <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>
9181 Template parameter named "constructor"
9183 {{echo| constructor = |hi}}
9185 <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>
9194 # Note that `ko` isn't a known interlanguage prefix
9196 Parsoid: recognize interlanguage links without a target page
9206 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9208 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9211 # Note that `ko` isn't a known interwiki prefix
9213 Parsoid: recognize interwiki links without a target page
9215 parsoid=wt2html,wt2wt,html2html
9221 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9222 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9225 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9226 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9230 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9234 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9237 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9241 Interlanguage link with preceding local interwiki link (T70085)
9243 parsoid=wt2html,wt2wt,html2html
9246 [[local:es:Spanish]]
9249 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9253 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9257 Looks like an interlanguage link, but is actually a local interwiki
9259 parsoid=wt2html,wt2wt,html2html
9265 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9269 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9273 ### Redirects, Parsoid-only
9277 1. Simple redirect to page
9279 #REDIRECT [[Main Page]]
9281 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9285 2. Other redirect variants
9287 #REDIRECT [[Main_Page]]
9289 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9292 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9293 # This tests the Parsoid bail-out code.
9295 3. Other redirect variants
9299 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9301 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9305 4. Redirect to a templated destination
9307 #REDIRECT [[{{echo|Foo}}bar]]
9309 <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"}]]}'/>
9315 parsoid=wt2html,wt2wt
9320 <li>REDIRECT [[]]</li></ol>
9324 Optional colon in #REDIRECT
9326 # the colon is archaic syntax. we support it for wt2html, but we
9327 # don't care that it roundtrips back to the modern syntax.
9328 parsoid=wt2html,html2html
9330 #REDIRECT:[[Main Page]]
9332 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9336 Whitespace in #REDIRECT with optional colon
9338 # the colon and gratuitous whitespace is archaic syntax. we support
9339 # it for wt2html, but we don't care that it roundtrips back to the
9340 # modern syntax (without extra whitespace)
9341 parsoid=wt2html,html2html
9348 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9352 Piped link in #REDIRECT
9354 # content after piped link is ignored. we support this syntax,
9355 # but don't care that the piped link is lost when we roundtrip this.
9358 #REDIRECT [[Main Page|bar]]
9360 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9364 Redirect to category (T104502)
9366 parsoid=wt2html,wt2wt
9368 #REDIRECT [[Category:Foo]]
9370 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9374 Redirect to category with URL encoding (T104502)
9378 #REDIRECT [[Category%3AFoo]]
9380 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9384 Redirect to category page
9386 #REDIRECT [[:Category:Foo]]
9388 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9392 Redirect to image page (1)
9394 #REDIRECT [[File:Wiki.png]]
9396 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9400 Redirect to image page (2)
9402 #REDIRECT [[Image:Wiki.png]]
9404 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9407 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9408 # Next test confirms this.
9410 Redirect to language (1) (T104918)
9412 parsoid=wt2html,wt2wt,html2html
9414 #REDIRECT [[en:File:Wiki.png]]
9416 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9420 Redirect to language (2) (T104918)
9422 #REDIRECT [[:en:File:Wiki.png]]
9424 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9428 Redirect to interwiki (T104918)
9430 #REDIRECT [[meatball:File:Wiki.png]]
9432 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9436 Non-English #REDIRECT
9440 #TILVÍSUN [[Main Page]]
9442 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9446 Redirect syntax under text isn't considered a redirect
9450 #redirect [[Main Page]]
9453 <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>
9461 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9468 Redirect followed by block on the same line
9472 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9474 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9478 Redirect followed by a newline
9480 #REDIRECT [[Main Page]]
9483 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9488 Redirect followed by multiple newlines
9490 #REDIRECT [[Main Page]]
9495 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9502 Drop duplicate redirects
9506 <link rel="mw:PageProp/redirect" href="./Foo"/>
9507 <link rel="mw:PageProp/redirect" href="./Bar"/>
9508 <link rel="mw:PageProp/redirect" href="./Baz"/>
9527 Broken br tag sanitization
9535 # TODO: Fix html2html mode (T53055)!
9537 Parsoid: Broken br tag recognition
9551 Incorrecly removing closing slashes from correctly formed XHTML
9553 <br style="clear:both;" />
9555 <p><br style="clear:both;" />
9560 Failing to transform badly formed HTML into correct XHTML
9562 <br style="clear: left;">
9563 <br style="clear: right;">
9564 <br style="clear: both;">
9566 <p><br style="clear: left;" />
9567 <br style="clear: right;" />
9568 <br style="clear: both;" />
9572 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9573 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9575 Handling html with a div self-closing tag
9584 <div title=""></div>
9585 <div title=""></div>
9587 <div title="bar"></div>
9588 <div title="bar"></div>
9589 <div title="bar/"></div></div>
9591 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9592 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9593 <div title="" data-parsoid='{"stx":"html","autoInsertedEnd":true}'>
9594 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9595 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9596 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div></div>
9600 Elements with solidus in various attribute positions
9602 parsoid=wt2html,html2html
9604 <div cla/ss="123">ha</div>
9606 <div / class="123">ha</div>
9608 <div class= / "123">ha</div>
9611 <div class="123">ha</div>
9612 <div class="/">ha</div>
9614 <div data-parsoid='{"stx":"html","a":{"cla":null,"ss":null},"sa":{"cla":"","ss":"123"}}'>ha</div>
9616 <div class="123" data-parsoid='{"stx":"html"}'>ha</div>
9618 <div class="/" data-parsoid='{"stx":"html","a":{"\"123\"":null},"sa":{"\"123\"":""}}'>ha</div>
9622 Handling html with a br self-closing tag
9649 Quoted attributes without spaces
9653 <div class="foo"style="color:red">red</div>
9655 <div class="foo" style="color:red">red</div>
9657 <div class="foo" style="color:red">red</div>
9661 Horizontal ruler (should it add that extra space?)
9670 foo </p><hr /><p> bar</p>
9674 Horizontal ruler -- 4+ dashes render hr
9682 Horizontal ruler -- eats additional dashes on the same line
9690 Horizontal ruler -- does not collapse dashes on consecutive lines
9700 Horizontal ruler -- <4 dashes render as plain text
9709 Horizontal ruler -- Supports content following dashes on same line
9719 ### Block-level elements
9728 <ul><li>Common list</li>
9730 <li>item 3</li></ul>
9740 <ol><li>Numbered list</li>
9742 <li>item 3</li></ol>
9745 # the switch from level 3 to ordered should not introduce a newline between
9756 ***#Number on level 4
9758 **#Number on level 3
9759 **#Number on level 3
9763 #**Level 3, but ordered
9766 <ol><li>with numbers</li></ol>
9767 <ul><li>and bullets</li></ul>
9768 <ol><li>and numbers</li></ol></li>
9770 <ul><li>bullet level 2
9771 <ul><li>bullet level 3
9772 <ol><li>Number on level 4</li></ol></li></ul></li>
9774 <ol><li>Number on level 3</li>
9775 <li>Number on level 3</li></ol></li></ul>
9776 <ol><li>number level 2</li></ol></li>
9778 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9779 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9783 1. Nested mixed wikitext and html list
9786 *<ul><li>ho</li></ul>
9791 <li><ul><li>ho</li></ul></li>
9793 <ul><li>ho</li></ul></li></ul>
9796 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9798 <ul><li>ho</li></ul></li></ul>
9802 2. Nested mixed wikitext and html list (incompatible)
9805 :{{echo|<li>ho</li>}}
9808 <dd><li>ho</li></dd></dl>
9811 <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>
9821 <ul><li>bar</li></ul></li></ul>
9830 <ul><li><ul><li>foo</li></ul></li>
9835 Nested lists 3 (first element empty)
9841 <ul><li>bar</li></ul></li></ul>
9845 Nested lists 4 (first element empty)
9850 <ul><li><ul><li></li></ul></li>
9855 Nested lists 5 (both elements empty)
9860 <ul><li><ul><li></li></ul></li>
9865 Nested lists 6 (both elements empty)
9871 <ul><li></li></ul></li></ul>
9875 Nested lists 7 (skip initial nesting levels)
9879 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9883 Nested lists 8 (multiple nesting transitions)
9891 <ul><li><ul><li>bar</li></ul></li>
9892 <li>baz</li></ul></li>
9896 # XXX this test should be moved to citeParserTests, since it depends
9897 # on the Cite extension, which is "built in" to Parsoid.
9899 Nested lists 9 (extension interaction)
9902 !! html/php+tidy-DISABLED
9903 <ul><li class="mw-empty-elt"></li></ul>
9905 <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>
9909 1. Lists with start-of-line-transparent tokens before bullets: Comments
9921 Nested lists 10 (list and span siblings: wt2wt regression)
9926 <ul><li>a <span>x</span>
9927 <ul><li>b <span>y</span></li></ul></li></ul>
9931 2. Lists with start-of-line-transparent tokens before bullets: Template close
9936 <ul><li>foo bar</li>
9941 List items are not parsed correctly following a <pre> block (T2785)
9947 <ul><li><pre>foo</pre></li>
9948 <li><pre>bar</pre></li>
9951 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9952 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9956 # FIXME: Might benefit from a html/parsoid since this has a template
9958 List items from template
9969 *notSOL{{inner list}}
9973 <li>item 2</li></ul>
9976 <li>item 2</li></ul>
9980 <li>item 2</li></ul>
9984 List interrupted by empty line or heading
9992 <ul><li>foo</li></ul>
9993 <ul><li><ul><li>bar</li></ul></li></ul>
9994 <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>
9995 <ul><li>Another list item</li></ul>
9999 Multiple list tags generated by templates
10016 <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>
10017 <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>
10018 <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>
10022 Multiple newlines in between HTML list items don't induce paragraph wrapping
10035 <dd>ho<div>123</div>
10051 <dd>ho<div>123</div>
10059 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10062 <!--This line will NOT split the list-->
10064 <!--This line will NOT split the list either-->
10066 <!--foo--> <!----> <!--This line NOT split the list either-->
10076 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10079 <!--This line will NOT split the list-->
10081 <!--This line will NOT split the list either-->
10083 <!--foo--> <!----> <!--This line NOT split the list
10093 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10094 # That pass could possibly be removed.
10096 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10098 parsoid=wt2html,wt2wt
10102 *{{echo|<li>templated li-hack}}
10103 *<!--foo--><li> unsupported li-hack with preceding comments
10106 <li><li>not a li-hack
10111 <li class="mw-empty-elt"></li><li>li-hack</li>
10112 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10113 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10115 <li class="mw-empty-elt"></li><li>not a li-hack
10120 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10121 <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>
10122 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10124 <ul data-parsoid='{"stx":"html"}'>
10125 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10131 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10143 <ol><li>bar</li></ol></li></ol>
10145 <ul><li>bar</li></ul></li></ul>
10147 <dl><dd>bar</dd></dl></dd></dl>
10165 Parsoid: Test of whitespace serialization with Templated bullets
10172 <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>
10176 # ------------------------------------------------------------------------
10177 # The next set of tests are about Parsoid's ability to handle badly nested
10178 # tags (parse, minimize scope of fixup, and roundtrip back)
10179 # ------------------------------------------------------------------------
10181 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10182 # Parsoid's list handling is more aware of block structure.
10184 Unbalanced closing block tags break a list
10191 <ul><li>a</li></ul></div><div>
10203 Unbalanced closing non-block tags don't break a list
10205 parsoid=wt2html,html2html
10213 <ul><li>a<span></span></li>
10216 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></p>
10217 <ul><li>a<span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></li>
10221 # Parsoid does some post-dom-building cleanup
10222 # which is why its output differs from Remex.
10224 Unclosed formatting tags that straddle lists are closed and reopened
10226 parsoid=wt2html,wt2wt,html2html
10231 <ol><li><s> a</s></li><s>
10232 </s><li><s>b </s></li></ol>
10234 <ol><li><s> a</s></li>
10235 <li><s>b </s></li></ol>
10238 # Output is ugly because of all the misnested tag fixups.
10240 1. List embedded in a formatting tag
10247 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10250 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
10251 <ul><li data-parsoid='{}'>foo</li></ul></small>
10252 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p>
10255 # Output is ugly because of all the misnested tag fixups.
10257 2. List embedded in a formatting tag in a misnested way
10264 </small></p><small></small><ul><small><li>a</li>
10265 </small><li><small>b</small></li></ul>
10267 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10268 <ul><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'><li>a</li></small>
10269 <li><small data-parsoid='{"stx":"html","autoInsertedStart":true}'>b</small></li></ul>
10272 # Output is ugly because of all the misnested tag fixups.
10274 3. List embedded in a formatting tag in a misnested way
10281 </small></p><small></small><ul><small></small><li><small></small><ul><small></small><li><small>123</small></li></ul></li></ul>
10283 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10285 <ul><li><ul><li data-parsoid='{}'><small data-parsoid='{"stx":"html","autoInsertedStart":true}'> 123</small></li></ul></li></ul>
10292 # Note that the current date is hard-coded as
10293 # 1970-01-01T00:02:03Z (a Thursday)
10294 # when running parser tests. The timezone is also fixed to GMT, so
10295 # local date will be identical to current date.
10298 Magic Word: {{CURRENTDAY}}
10307 Magic Word: {{CURRENTDAY2}}
10316 Magic Word: {{CURRENTDAYNAME}}
10325 Magic Word: {{CURRENTDOW}}
10334 Magic Word: {{CURRENTMONTH}}
10343 Magic Word: {{CURRENTMONTH1}}
10352 Magic Word: {{CURRENTMONTHABBREV}}
10354 {{CURRENTMONTHABBREV}}
10361 Magic Word: {{CURRENTMONTHNAME}}
10363 {{CURRENTMONTHNAME}}
10370 Magic Word: {{CURRENTMONTHNAMEGEN}}
10372 {{CURRENTMONTHNAMEGEN}}
10379 Magic Word: {{CURRENTTIME}}
10388 Magic Word: {{CURRENTHOUR}}
10397 Magic Word: {{CURRENTWEEK}} (T6594)
10406 Magic Word: {{CURRENTYEAR}}
10415 Magic Word: {{CURRENTTIMESTAMP}}
10417 {{CURRENTTIMESTAMP}}
10424 Magic Words LOCAL (UTC)
10428 *{{LOCALMONTHNAME}}
10429 *{{LOCALMONTHNAMEGEN}}
10430 *{{LOCALMONTHABBREV}}
10439 *{{LOCALTIMESTAMP}}
10454 <li>19700101000203</li></ul>
10458 Magic Word: {{FULLPAGENAME}}
10460 title=[[User:Ævar Arnfjörð Bjarmason]]
10461 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10465 <p>User:Ævar Arnfjörð Bjarmason
10470 Magic Word: {{FULLPAGENAMEE}}
10472 title=[[User:Ævar Arnfjörð Bjarmason]]
10473 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10477 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10482 Magic Word: {{TALKSPACE}}
10484 title=[[User:Ævar Arnfjörð Bjarmason]]
10485 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10494 Magic Word: {{TALKSPACE}}, same namespace
10496 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10497 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10506 Magic Word: {{TALKSPACE}}, main namespace
10508 title=[[Parser Test]]
10509 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10518 Magic Word: {{TALKSPACEE}}
10520 title=[[User:Ævar Arnfjörð Bjarmason]]
10521 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10530 Magic Word: {{SUBJECTSPACE}}
10532 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10533 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10542 Magic Word: {{SUBJECTSPACE}}, same namespace
10544 title=[[User:Ævar Arnfjörð Bjarmason]]
10545 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10554 Magic Word: {{SUBJECTSPACE}}, main namespace
10556 title=[[Parser Test]]
10557 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10564 Magic Word: {{SUBJECTSPACEE}}
10566 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10567 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10576 Magic Word: {{NAMESPACE}}
10578 title=[[User:Ævar Arnfjörð Bjarmason]]
10579 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10588 Magic Word: {{NAMESPACEE}}
10590 title=[[User:Ævar Arnfjörð Bjarmason]]
10591 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10600 Magic Word: {{NAMESPACENUMBER}}
10602 title=[[User:Ævar Arnfjörð Bjarmason]]
10603 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10605 {{NAMESPACENUMBER}}
10612 Magic Word: {{SUBPAGENAME}}
10614 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10615 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10624 Magic Word: {{SUBPAGENAMEE}}
10626 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10627 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10636 Magic Word: {{ROOTPAGENAME}}
10638 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10639 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10643 <p>Ævar Arnfjörð Bjarmason
10648 Magic Word: {{ROOTPAGENAMEE}}
10650 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10651 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10655 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10660 Magic Word: {{BASEPAGENAME}}
10662 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10663 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10667 <p>Ævar Arnfjörð Bjarmason
10672 Magic Word: {{BASEPAGENAMEE}}
10674 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10675 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10679 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10684 Magic Word: {{TALKPAGENAME}}
10686 title=[[User:Ævar Arnfjörð Bjarmason]]
10687 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10691 <p>User talk:Ævar Arnfjörð Bjarmason
10696 Magic Word: {{TALKPAGENAMEE}}
10698 title=[[User:Ævar Arnfjörð Bjarmason]]
10699 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10703 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10708 Magic Word: {{SUBJECTPAGENAME}}
10710 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10711 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10713 {{SUBJECTPAGENAME}}
10715 <p>User:Ævar Arnfjörð Bjarmason
10720 Magic Word: {{SUBJECTPAGENAMEE}}
10722 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10723 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10725 {{SUBJECTPAGENAMEE}}
10727 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10732 Magic Word: {{NUMBEROFFILES}}
10734 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10743 Magic Word: {{PAGENAME}}
10745 title=[[User:Ævar Arnfjörð Bjarmason]]
10746 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10750 <p>Ævar Arnfjörð Bjarmason
10755 Magic Word: {{PAGENAME}} with metacharacters
10757 title=[['foo & bar = baz']]
10758 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10762 <p><i>'foo & bar = baz'</i>
10767 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10769 title=[[*RFC 1234 http://example.com/]]
10770 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10774 <p>*RFC 1234 http://example.com/
10779 Magic Word: {{PAGENAMEE}}
10781 title=[[User:Ævar Arnfjörð Bjarmason]]
10782 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10786 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10791 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10793 title=[[*RFC 1234 http://example.com/]]
10794 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10798 <p>*RFC_1234_http://example.com/
10803 Magic Word: {{REVISIONID}}
10805 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10812 flags=vary-revision-id
10816 Magic Word: {{SCRIPTPATH}}
10818 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10825 Magic Word: {{STYLEPATH}}
10827 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10836 Magic Word: {{SERVER}}
10838 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10842 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10847 Magic Word: {{SERVERNAME}}
10849 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10858 Magic Word: {{SITENAME}}
10860 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10869 Magic Word: {{PAGELANGUAGE}}
10872 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10881 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10883 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10892 Case-sensitive magic words, when cased differently, should just be template transclusions
10899 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10900 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10901 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10902 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10907 Case-insensitive magic words should still work with weird casing.
10917 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10921 # From plwiki:PLOS_ONE
10923 Parsoid: Page property magic word with magic word contents
10927 wgAllowDisplayTitle=true
10928 wgRestrictDisplayTitle=false
10930 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10935 <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>"}]]}'/>
10938 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10939 # But, this is a limitation of our representation and is documented in
10940 # TemplateHandler.js in processSpecialMagicWord
10942 Parsoid: Template-generated DISPLAYTITLE
10944 {{{{echo|DISPLAYTITLE}}:Foo}}
10948 wgAllowDisplayTitle=true
10949 wgRestrictDisplayTitle=false
10954 <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"}]]}'/>
10958 Namespace 1 {{ns:1}}
10967 Namespace 1 {{ns:01}}
10976 Namespace 0 {{ns:0}} (T6783)
10983 Namespace 0 {{ns:00}} (T6783)
10990 Namespace -1 {{ns:-1}}
10999 Namespace User {{ns:User}}
11008 Namespace User talk {{ns:User_talk}}
11017 Namespace User talk {{ns:uSeR tAlK}}
11026 Namespace File {{ns:File}}
11035 Namespace File {{ns:Image}}
11044 Namespace (lang=de) Benutzer {{ns:User}}
11055 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11061 <p>Benutzer Diskussion
11068 {{urlencode:hi world?!}}
11069 {{urlencode:hi world?!|WIKI}}
11070 {{urlencode:hi world?!|PATH}}
11071 {{urlencode:hi world?!|QUERY}}
11081 Magic Word: prioritize type info over data-parsoid
11085 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11091 Magic Word: serialize on separate line (parsoid)
11093 parsoid=wt2wt,html2wt
11099 foo<meta property="mw:PageProp/notoc"/>bar
11103 Magic Word: rt non-english wikis
11110 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11114 __proto__ is treated as normal wikitext (T105997)
11126 Magic links: internal link to RFC (T2479)
11130 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11133 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11137 Magic links: RFC (T2479)
11141 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11144 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11148 Magic links: RFC (T67278)
11150 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11152 <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.
11155 <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>
11159 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11161 RFC      822
11165 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11170 <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>
11176 Magic links: ISBN (T3937)
11180 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11183 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11187 Magic links: ISBN (T67278)
11189 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11191 <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.
11194 <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>
11198 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11200 ISBN      978 0 316 09811 3
11206 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11213 <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>
11221 Magic links: PMID incorrectly converts space to underscore
11225 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11228 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11232 Magic links: PMID (T67278)
11234 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11236 <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.
11239 <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>
11243 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11245 PMID      1234
11249 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11254 <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>
11259 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11260 # since these are ExtLinkText, not MagicLinkText
11262 Magic links: use appropriate serialization for "almost" magic links.
11264 X[[Special:BookSources/0978739256|foo]]
11266 X[https://tools.ietf.org/html/rfc1234 foo]
11268 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11269 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11272 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11273 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11277 Magic links: All disabled (T47942)
11279 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11285 <p>ISBN 0-306-40615-2
11296 Nonexistent template
11298 {{thistemplatedoesnotexist}}
11300 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11305 Template with invalid target containing tags
11307 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11309 <p>{{a<b>b</b>|foo|a=b|a = b}}
11314 Template with invalid target containing unclosed tag
11316 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11318 <p>{{a<b>|foo|a=b|a = b}}</b>
11323 Template with invalid target containing wikilink
11327 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11330 <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>
11334 Template with just whitespace in it, T70421
11338 <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>
11344 This is a test template
11352 <p>This is a test template
11357 Template with explicit namespace
11361 <p>This is a test template
11369 This is a test template with parameter {{{param}}}
11375 {{paramtest|param=foo}}
11377 <p>This is a test template with parameter foo
11382 Template:paramtestnum
11384 [[{{{1}}}|{{{2}}}]]
11388 Template unnamed parameter
11390 {{paramtestnum|Main Page|the main page}}
11392 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11397 Template:templatesimple
11403 Template:templateredirect
11405 #redirect [[Template:templatesimple]]
11409 Template:templateasargtestnum
11415 Template:templateasargtest
11417 {{template{{{templ}}}}}
11421 Template:templateasargtest2
11427 Template with template name as unnamed argument
11429 {{templateasargtestnum|templatesimple}}
11436 Template with template name as argument
11438 {{templateasargtest|templ=simple}}
11445 Template with template name as argument (2)
11447 {{templateasargtest2|templ=templatesimple}}
11454 Template:templateasargtestdefault
11456 {{{{{templ|templatesimple}}}}}
11466 Template with default value
11468 {{templateasargtestdefault}}
11475 Template with default value (value set)
11477 {{templateasargtestdefault|templ=templa}}
11486 {{templateredirect}}
11491 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11495 Template with argument in separate line
11497 {{ templateasargtest |
11505 Template with complex template as argument
11508 param ={{ templateasargtest |
11509 templ = simple }}}}
11511 <p>This is a test template with parameter (test)
11516 Templates with templated name
11518 {{{{echo|echo}}|foo}}
11519 {{{{echo|inner list}} }}
11523 <ul><li>item 1</li></ul>
11525 <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>
11526 <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>
11529 ## Regression test; the output here isn't really that interesting.
11531 Templates with templated name and top level template args
11533 {{1{{2{{{3}}}|4=5}}}}
11535 <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>
11538 # Parsoid markup is deliberate "broken". This is an edge case.
11539 # See long comment in TemplateHandler.js:convertAttribsToString.
11541 Templates with invalid templated targets
11552 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11557 Template with thumb image (with link in description)
11559 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11561 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>
11563 <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>
11565 <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="./File:Noimage.png" ><img resource="./File:Noimage.png" src="./Special:FilePath/Noimage.png" height="220" width="220"/></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>
11569 Template:complextemplate
11571 {{{1}}} {{paramtest|
11572 param ={{{param}}}}}
11576 Template with complex arguments
11579 param ={{ templateasargtest |
11580 templ = simple }}|[[Template:complextemplate|link]]}}
11582 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11587 T2553: link with two variables in a piped link
11590 |[[{{{1}}}|{{{2}}}]]
11595 <td>[[{{{1}}}|{{{2}}}]]
11599 <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>
11605 Abort table cell attribute parsing on wikilink
11608 |testing [[one|two]] |three||four
11609 |testing one two |three||four
11610 |testing="[[one|two]]" |three||four
11615 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11621 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11626 <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>
11627 <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>
11628 <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>
11633 Don't abort table cell attribute parsing if wikilink is found in template arg
11636 |Test {{#tag:ref|One two "[[three]]" four}}
11640 <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>
11645 Magic variable as template parameter
11647 {{paramtest|param={{SITENAME}}}}
11649 <p>This is a test template with parameter MediaWiki
11656 [[{{{param}}}|link]]
11660 Template parameter as link source
11662 {{linktest|param=Main Page}}
11664 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11669 Template:paramtest2
11671 including another template, {{paramtest|param={{{arg}}}}}
11675 Template passing argument to another template
11677 {{paramtest2|arg='hmm'}}
11679 <p>including another template, This is a test template with parameter 'hmm'
11690 Template as link source
11694 [[{{linktest2}}|Main Page]]
11696 [[{{linktest2}}]]Page
11698 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11699 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11700 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11718 Template infinite loop
11722 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11727 Template from main namespace
11736 Template from non-includable namespace
11738 wgNonincludableNamespaces=10
11742 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11757 T2529: Template with table, not included at beginning of line
11775 T2523: Template shouldn't eat newline (or add an extra one before table)
11794 T2041: Template parameters shown as broken links
11803 Template with targets containing wikilinks
11809 {{[[{{echo|foo}}]]}}
11811 {{{{echo|[[foo}}]]}}
11813 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11814 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11818 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11819 <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>
11820 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11830 Templates: Double quotes as template target
11837 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11841 ## This test is about making sure Parsoid's data-mw is well formed in the
11842 ## face of multiple templates with intersecting and overlapping ranges. The
11843 ## wikitext itself is wretched.
11845 Templates with intersecting and overlapping ranges
11856 </table><p>ho</p><table>
11860 </td></tr></tbody></table>
11862 <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":""}]]}'>
11864 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11866 <tbody><tr><td>hi</td></tr>
11871 Template:MSGNW test
11873 ''None'' of '''this''' should be
11875 but rather passed unmodified
11883 # hmm, fix this or just deprecate msgnw and document its behavior?
11887 {{msgnw:MSGNW test}}
11889 <p>''None'' of '''this''' should be
11891  but rather passed unmodified
11892 {{test}}
11896 <!-- comment -->
11903 {{int:youhavenewmessages|lots of money|not!}}
11905 <p>You have lots of money (not!).
11910 int keyword - non-existing message
11921 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11925 <includeonly> and <noinclude> being included
11936 <onlyinclude>Foo</onlyinclude>bar
11940 <onlyinclude> being included
11952 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11956 <onlyinclude> and <includeonly> being included
11965 <includeonly> and <noinclude> on a page
11967 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11974 Un-closed <noinclude>
11981 <onlyinclude> on a page
11983 <onlyinclude>Foo</onlyinclude>bar
11990 Un-closed <onlyinclude>
11997 Self-closed noinclude, includeonly, onlyinclude tags
12008 Unbalanced includeonly and noinclude tags
12012 |b</noinclude></noinclude>
12013 |c</noinclude></includeonly>
12014 |d</includeonly></includeonly>
12023 <td>c</includeonly>
12025 <td>d</includeonly></includeonly>
12030 Template:Includeonly section
12033 ==Includeonly section==
12039 T8563: Edit link generation for section shown by <includeonly>
12041 {{includeonly section}}
12043 <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>
12044 <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>
12047 # Uses same input as the contents of [[Template:Includeonly section]]
12049 T8563: Section extraction for section shown by <includeonly>
12054 ==Includeonly section==
12062 T8563: Edit link generation for section suppressed by <includeonly>
12065 ==Includeonly section==
12069 <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>
12073 T8563: Section extraction for section suppressed by <includeonly>
12078 ==Includeonly section==
12086 Un-closed <includeonly>
12091 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}' data-mw='{"src":"<includeonly>"}'/>
12094 ## We used to, but no longer wt2wt this test since the default serializer
12095 ## will normalize the include directives to serialize on their own line.
12096 ## Selser will take care of preserving formatting in scenarios where they
12097 ## intermingled with other wikitext.
12099 Includes and comments at SOL
12101 parsoid=wt2html,html2html
12103 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12111 some</noinclude>* stuff
12114 <includeonly>can have stuff</includeonly>===here===
12117 <h2><span class="mw-headline" id="hu">hu</span></h2>
12125 <ul><li>here</li></ul>
12126 <h3><span class="mw-headline" id="here">here</span></h3>
12128 <!-- 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>
12130 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12132 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12135 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12136 <p>some<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>* stuff</p>
12137 <ul><li>here</li></ul>
12139 <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>
12142 # TODO: test with DOM fragment reuse!
12144 Parsoid: DOM fragment reuse
12146 parsoid=wt2wt,wt2html
12148 a{{echo|b<table></table>c}}d
12160 <p>ab</p><table></table><p>cd
12171 <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>
12173 <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">
12174 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12175 </span><p about="#mwt2">cd</p>
12177 <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">
12179 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12181 </span><p about="#mwt3">b</p>
12185 Parsoid: Merge double tds (T52603)
12188 |{{echo|{{!}} foo}}
12194 </td></tr></tbody></table>
12197 <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>
12202 Parsoid: Merge double tds in nested transclusion content (T52603)
12206 |{{echo|{{!}} foo}}
12214 </td></tr></tbody></table>
12217 <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}}]}'>
12219 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12225 ### <includeonly> and <noinclude> in attributes
12228 0. includeonly around the entire attribute
12230 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12232 <p><span id="v2">bar</span>
12237 1. includeonly in html attr key
12239 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12241 <p><span id="foo">bar</span>
12246 2. includeonly in html attr value
12248 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12249 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12251 <p><span id="v1">bar</span>
12252 <span id="v1">bar</span>
12257 3. includeonly in part of an attr value
12259 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12261 <p><span style="color:red;">bar</span>
12266 4. includeonly in table attributes
12289 ### Preprocessor precedence tests
12290 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12292 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12294 Preprocessor precedence 1: link is rightmost opening
12300 But close-brace is not a valid character in a link title:
12303 However, we can still tell this was handled as a link in the preprocessor:
12304 {{echo|[[Foo}}|bar]]|bat}}
12306 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12307 </p><p>But close-brace is not a valid character in a link title:
12309 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12313 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12314 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12315 <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>
12319 Preprocessor precedence 2: template is rightmost opening
12328 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12332 Preprocessor precedence 3: language converter is rightmost opening
12348 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12349 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12350 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12354 Preprocessor precedence 4: left-most angle bracket
12365 Template:Precedence5
12371 Preprocessor precedence 5: tplarg takes precedence over template
12373 {{Precedence5|Bullet}}
12375 <ul><li>Bar</li></ul>
12377 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12381 Preprocessor precedence 6: broken link is rightmost opening
12387 {{echo|[[Foo|bar|bat=baz}}
12390 </p><p>{{echo|[[Foo|bar|bat=baz}}
12393 <p>{{echo|[[Foo}}</p>
12394 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12397 # This next test exposes a difference between PHP and Parsoid:
12398 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12399 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12400 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12401 # outer `[[Foo` extends until the `y]]`
12402 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12403 # intermediate result (after template expansion), and link processing
12404 # happens on this intermediate result, which moves the wikilink
12405 # boundary leftward to `[[Foo|Bar]]`
12406 # 2b) Parsoid works in a single step, so it's going to keep the
12407 # wikilink as extending to the `y]]`
12408 # 3a) Then PHP does linktrail processing which slurps up the trailing
12409 # `xy` inside the link.
12410 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12411 # `z` inside the link.
12412 # This is "correct" behavior. Parsoid's basic worldview is that the
12413 # `]]` inside the template shouldn't be allowed to leak out to affect
12414 # the surrounding wikilink. PHP may match Parsoid (in the future)
12415 # if you use {{#balance}} (T114445).
12418 Preprocessor precedence 7: broken template is rightmost opening
12424 [[Foo|{{echo|Bar]]-x}}-y]]-z
12426 Careful: linktrails can move the end of the wikilink:
12427 [[Foo|{{echo|y']]a}}l]]l
12429 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12430 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12431 </p><p>Careful: linktrails can move the end of the wikilink:
12432 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12435 <p>[[Foo|{{echo|Bar]]</p>
12436 <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>
12437 <p>Careful: linktrails can move the end of the wikilink:
12438 <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>
12442 Preprocessor precedence 8: broken language converter is rightmost opening
12453 Template:Preprocessor_precedence_9
12458 ;7: {{{{{{{4}}}}}}}
12462 Preprocessor precedence 9: groups of braces
12464 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12470 <ul><li>Bar</li></ul>
12474 <dd>{Bullet}</dd></dl>
12476 <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}}]}'>
12481 </dl><ul about="#mwt1">
12483 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12492 Template:Preprocessor_precedence_10
12499 ;6: -{{{{{{4}}}}}}-
12500 ;7: -{{{{{{{5}}}}}}}-
12504 Preprocessor precedence 10: groups of braces with leading dash
12508 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12514 <ul><li>Bar-</li></ul>
12521 <ul><li>Bar-</li></ul>
12527 <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}}]}'>
12529 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12532 </dl><ul about="#mwt1">
12534 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12538 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12541 </dl><ul about="#mwt1">
12543 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12547 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12552 Preprocessor precedence 11: found during visual diff testing
12554 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12556 {{echo|-{{echo|-{{echo|x}}}}}}
12558 {{echo|-{{echo|x}}}}
12560 <p><span>-<span>-x</span></span>
12565 <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>
12567 <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>
12569 <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>
12573 Preprocessor precedence 12: broken language converter closed by brace.
12577 This form breaks the template, which is unfortunate:
12578 *{{echo|foo-{bar}bat}}
12580 But if the broken language converter markup is inside an extension
12581 tag, nothing bad happens:
12582 *<nowiki>foo-{bar}bat</nowiki>
12583 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12584 *<pre>foo-{bar}bat</pre>
12585 *{{echo|<pre>foo-{bar}bat</pre>}}
12587 <tag>foo-{bar}bat</tag>
12588 {{echo|<tag>foo-{bar}bat</tag>}}
12591 <p>This form breaks the template, which is unfortunate:
12593 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12594 <p>But if the broken language converter markup is inside an extension
12595 tag, nothing bad happens:
12597 <ul><li>foo-{bar}bat</li>
12598 <li>foo-{bar}bat</li>
12599 <li><pre>foo-{bar}bat</pre></li>
12600 <li><pre>foo-{bar}bat</pre></li></ul>
12601 <pre>'foo-{bar}bat'
12605 <pre>'foo-{bar}bat'
12610 <p>This form breaks the template, which is unfortunate:</p>
12612 <li>{{echo|foo-{bar}bat}}</li>
12614 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12616 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12617 <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>
12618 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12619 <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>
12621 <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>
12625 Preprocessor precedence 13: broken language converter in external link
12629 *[http://example.com/-{foo Example in URL]
12630 *[http://example.com Example in -{link} description]
12631 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12633 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12634 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12635 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12638 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12639 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12640 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12645 Preprocessor precedence 14: broken language converter in comment
12647 *<!--{{foo}}-->...should be ok
12648 *<!---{{foo}}-->...extra dashes
12649 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12651 <ul><li>...should be ok</li>
12652 <li>...extra dashes</li>
12653 <li>foobat...should be ok</li></ul>
12656 <li><!--{{foo}}-->...should be ok</li>
12657 <li><!---{{foo}}-->...extra dashes</li>
12658 <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>
12663 Preprocessor precedence 15: broken brace markup in headings
12665 wgFragmentMode=[ 'html5', 'legacy' ]
12669 __NOTOC__ __NOEDITSECTION__
12678 ===5 foo{{{bar 5===
12683 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12686 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12689 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12692 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12695 <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>
12698 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12702 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12703 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12705 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12707 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12709 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12711 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12713 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12718 Preprocessor precedence 16: matching closing braces to opening braces
12723 -{{{echo|foo}}bar}-
12728 <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>
12732 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12741 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12744 # Ensure we're using a language without variants for this test; even
12745 # if $wgUsePigLatinVariant is true. We've picked `de` arbitrarily.
12747 Preprocessor precedence 18: another rightmost wins scenario
12752 {{ -{{{{1|tplarg}}} }} }-
12754 <p>{{ -{tplarg }} }-
12757 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12761 Preprocessor precedence 19: break syntax
12774 ### Token Stream Patcher tests
12776 ### These tests won't always pass wt2wt and other modes because
12777 ### on serialization, the table will be output on a new line.
12778 ### For now, we are blacklisting them, and using this to test selser.
12782 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12784 parsoid=wt2html,wt2wt
12786 {{echo|}}{| width = '100%'
12790 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12791 <tbody><tr><td>foo</td></tr>
12795 ## We used to, but no longer wt2wt this test since the default serializer
12796 ## will normalize the include directives to serialize on their own line.
12797 ## Selser will take care of preserving formatting in scenarios where they
12798 ## intermingled with other wikitext.
12800 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12804 <includeonly>a</includeonly>{| {{{b}}}
12808 <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":""}]]}'>
12809 <tbody><tr><td>c</td></tr>
12814 Table wikitext syntax outside wiki-tables
12818 ! not a table heading
12821 | class="foo bar" | baz
12829 ! not a table heading
12832 | class="foo bar" | baz
12841 ### Testing parsing of templates where a template arg
12842 ### has the same name as the template itself.
12848 {{{quote|{{{1}}}}}}
12852 Templates: Template Name/Arg clash: 1. Use of positional param
12861 Templates: Template Name/Arg clash: 2. Use of named param
12863 {{quote|quote=foo}}
12870 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12879 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12883 Templates: 1. Simple use
12892 Templates: 2. Inside a block tag
12894 <div>{{echo|Foo}}</div>
12895 <blockquote>{{echo|Foo}}</blockquote>
12898 <blockquote>Foo</blockquote>
12901 <blockquote><p>Foo</p></blockquote>
12905 Templates: P-wrapping: 1a. Templates on consecutive lines
12916 Templates: P-wrapping: 1b. Templates on consecutive lines
12930 Templates: P-wrapping: 1c. Templates on consecutive lines
12933 {{echo|bar}} <div>baz</div>
12941 bar </p><div>baz</div>
12945 Templates: P-wrapping: 1d. Template preceded by comment-only line
12955 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12959 Templates: Scopes should not be expanded unnecessarily
12961 parsoid=wt2html,wt2wt
12963 {{echo|<div>a</div>}}b{{echo|
12969 <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}}]}'>
12970 </span><div about="#mwt2">c</div>
12974 Templates: Inline Text: 1. Multiple template uses
12976 {{echo|Foo}}bar{{echo|baz}}
12983 Templates: Inline Text: 2. Back-to-back template uses
12985 {{echo|Foo}}{{echo|bar}}
12992 Templates: Block Tags: 1. Multiple template uses
12994 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12996 <div>Foo</div><div>bar</div><div>baz</div>
13000 Templates: Block Tags: 2. Back-to-back template uses
13002 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
13004 <div>Foo</div><div>bar</div>
13007 ## Parsoid drops empty elements in templates.
13009 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
13016 b</p><p class="mw-empty-elt"></p>
13018 <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">
13019 </span><p about="#mwt1">b</p>
13023 Templates: Links: 1. Simple example
13025 {{echo|[[Foo|bar]]}}
13027 <p><a href="/wiki/Foo" title="Foo">bar</a>
13032 Templates: Links: 2. Generation of link href
13034 [[{{echo|Foo}}|bar]]
13036 <p><a href="/wiki/Foo" title="Foo">bar</a>
13041 Templates: Links: 3. Generation of part of a link href
13043 [[Fo{{echo|o}}|bar]]
13045 [[Foo{{echo|bar}}]]
13047 [[Foo{{echo|bar}}baz]]
13049 [[Foo{{echo|bar}}|bar]]
13051 [[:Foo{{echo|bar}}]]
13053 [[:Foo{{echo|bar}}|bar]]
13055 <p><a href="/wiki/Foo" title="Foo">bar</a>
13056 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13057 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
13058 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13059 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13060 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13065 Templates: Links: 4. Multiple templates generating link href
13067 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
13069 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13074 Templates: Links: 5. Generation of link text
13076 [[Foo|{{echo|bar}}]]
13078 <p><a href="/wiki/Foo" title="Foo">bar</a>
13083 Templates: Links: 5. Nested templates (only outermost template should be marked)
13085 {{echo|[[{{echo|Foo}}|bar]]}}
13087 <p><a href="/wiki/Foo" title="Foo">bar</a>
13092 Templates: HTML Tag: 1. Generation of HTML attr. key
13094 <div {{echo|style}}="color:red;">foo</div>
13096 <div style="color:red;">foo</div>
13100 Templates: HTML Tag: 2. Generation of HTML attr. value
13102 <div style={{echo|'color:red;'}}>foo</div>
13104 <div style="color:red;">foo</div>
13108 Templates: HTML Tag: 3. Generation of HTML attr key and value
13110 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13112 <div style="color:red;">foo</div>
13116 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13118 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13120 <div title="This is a long title with just one piece templated">foo</div>
13124 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13126 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13128 <div title="This is a long title with just one piece templated">foo</div>
13132 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13134 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13136 <div title="This is a long title with just one piece templated">foo</div>
13139 # SSS FIXME: While it is great we added support for all this,
13140 # do we want to make this part of the spec? Maybe we want to
13141 # deprecate this kind of usage in the future?
13143 Templates: HTML Tag: 7. Generation of partial attribute key string
13145 <div st{{echo|yle}}="color:red;">foo</div>
13147 <div style="color:red;">foo</div>
13151 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13153 <div {{echo|1=id="v1"}}>bar</div>
13155 <div id="v1">bar</div>
13159 Templates: HTML Tag: 9. Multiple template-generated attributes
13161 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13163 <div id="v1" title="foo">bar</div>
13167 Templates: Support for templates generating attributes and content
13169 {| {{mixed_attr_content_template}}
13174 <table style="color:red;" title="T48811">
13183 <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|}"]}'>
13192 Template:attribute_from_template
13198 Table cell with attribute before expanded attribute
13201 | align="center" {{attribute_from_template}} |456
13205 <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>
13210 1. Entities and nowikis inside templated attributes should be handled correctly
13212 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13214 <div style="background:#f9f9f9;">foo</div>
13216 <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>
13220 2. Entities and nowikis inside templated attributes should be handled correctly
13223 |{{table_attribs_3}}
13228 <td style="background:#f9f9f9;">Foo
13232 <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>
13237 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13240 |{{table_attribs_3}}
13245 <td style="background:#f9f9f9;">Foo
13248 <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}}]}'>
13249 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13255 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13258 |{{table_attribs_6}} hi
13263 <td style="background: red;">hi
13267 <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>
13272 Templates: HTML Tables: 1. Generating start of a HTML table
13274 {{echo|<table><tr><td>foo</td>}}</tr></table>
13276 <table><tr><td>foo</td></tr></table>
13280 Templates: HTML Tables: 2a. Generating middle of a HTML table
13282 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13284 <table><tr><td>foo</td></tr></table>
13288 Templates: HTML Tables: 2b. Generating middle of a HTML table
13290 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13292 <table><tr><td>foo</td></tr></table>
13296 Templates: HTML Tables: 3. Generating end of a HTML table
13298 <table><tr>{{echo|<td>foo</td></tr></table>}}
13300 <table><tr><td>foo</td></tr></table>
13304 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13306 {{echo|<table>}}<tr><td>foo</td></tr></table>
13308 <table><tr><td>foo</td></tr></table>
13312 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13314 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13316 <table><tr><td>foo</td></tr></table>
13320 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13322 <table><tr>{{echo|<td>}}foo</td></tr></table>
13324 <table><tr><td>foo</td></tr></table>
13328 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13330 <table><tr><td>foo{{echo|</td>}}</tr></table>
13332 <table><tr><td>foo</td></tr></table>
13336 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13338 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13340 <table><tr><td>foo</td></tr></table>
13344 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13346 <table><tr><td>foo</td></tr>{{echo|</table>}}
13348 <table><tr><td>foo</td></tr></table>
13352 Templates: HTML Tables: 5. Proper fostering of categories from inside
13354 parsoid=wt2html,wt2wt
13356 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13357 <!--Two categories (T52330)-->
13358 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13360 <table><tbody><tr><td>foo</td></tr></tbody></table>
13361 <table><tbody><tr><td>foo</td></tr></tbody></table>
13363 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13364 <!--Two categories (T52330)-->
13365 <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>
13368 ## Remex doesn't account for fostered content.
13370 Templates: Wiki Tables: 1a. Fostering of entire template content
13378 <tr><td></td></tr></table>
13382 <table><tbody><tr><td></td></tr></tbody></table>
13384 <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">
13390 Templates: Wiki Tables: 1b. Fostering of entire template content
13403 <tr><td></td></tr></table>
13410 <tbody><tr><td></td></tr></tbody></table>
13412 <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|}"]}'>
13414 </div><table about="#mwt3">
13419 ## Remex doesn't account for fostered content.
13421 Templates: Wiki Tables: 2. Fostering of partial template content
13431 <tr><td></td></tr></table>
13435 <div>b</div><table>
13436 <tbody><tr><td></td></tr></tbody></table>
13438 <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">
13445 Templates: Wiki Tables: 3. td-content via multiple templates
13448 {{echo|{{pipe}}a}}{{echo|b}}
13458 Templates: Wiki Tables: 4. Templated tags, no content
13464 <tr><td></td></tr></table>
13468 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13481 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13493 ## This test case is very specific to Parsoid's internals
13494 ## and is hence only tested for Parsoid's code. Parsoid uses
13495 ## a <meta> marker tag for <ref> tags and they are expanded
13496 ## much later. We are verifying that this <meta> tag usage
13497 ## doesn't prevent foster parenting.
13499 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13501 {{PartialTable}}<ref>foo</ref>
13506 <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">
13510 <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>
13514 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13524 <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{{!}}}"]}'>
13525 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13529 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13534 Templates: Lists: Multi-line list-items via templates
13536 *{{echo|a {{nonexistent|
13538 *{{echo|b {{nonexistent|
13541 <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>
13542 <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>
13546 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13548 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13550 <p><i>ab</i>c<i>d</i>e
13555 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13556 (PHP parser generates misnested html)
13558 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13560 <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>
13564 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13565 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13567 parsoid=wt2html,wt2wt
13569 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13571 <div><i>a</i></div><div><i>b</i>c<i>d</i></div><div>e</div>
13573 <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>
13574 <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>
13575 <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>
13579 Templates: Ugly nesting: 4. Divs opened/closed across templates
13581 a<div>b{{echo|c</div>d}}e
13585 <p>a</p><div>bc</div><p>de</p>
13589 Templates: Ugly templates: 3. newline-only template parameter
13598 # This looks like a bug: a single newline triggers p/br for some reason.
13600 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13609 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13610 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13612 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13618 <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">
13619 </span><table about="#mwt1">
13623 # T66017 -- ugly wikitext with fostered content generates two template ranges
13624 # that are "identical" and generate nesting cycles in the algorithm
13626 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13628 {{echo|<table><tr><td><table>}}
13632 <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"}'>
13633 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13634 </table></td></tr></tbody></table>
13638 Templates: Parameters substituted at the top-level
13640 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13644 <p><i>who</i> me? <b>never!</b>
13648 <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>
13650 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13654 Templates: Param with empty arg in the final position
13658 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13662 Parser Functions: 1. Simple example
13671 Parser Functions: 2. Nested use (only outermost should be marked up)
13679 ## Note that the templates inside the references are not wrapped
13681 Template nested in extension tag in template
13683 title=[[Main Page]]
13686 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13687 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13688 {{echo|hi<ref>-{ho|{{echo|hi}}}-</ref>}}
13691 <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>
13692 <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>
13693 <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>
13694 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt17" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><a rel="mw:WikiLink" href="./Ho" title="Ho">hi</a></span></li><li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"><a rel="mw:ExtLink" class="external autonumber" href="http://test.com?q=ho"></a></span></li><li about="#cite_note-3" id="cite_note-3"><a href="./Main_Page#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text"><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["ho"],"t":"hi"}}'></span></span></li></ol>
13698 ### Pre-save transform tests
13702 pre-save transform: subst:
13708 This is a test template
13712 pre-save transform: normal template
13722 pre-save transform: nonexistent template
13726 {{thistemplatedoesnotexist}}
13728 {{thistemplatedoesnotexist}}
13732 pre-save transform: subst magic variables
13741 # This is T2089, which I fixed. -- wtm
13743 pre-save transform: subst: templates with parameters
13747 {{subst:paramtest|param="something else"}}
13749 This is a test template with parameter "something else"
13753 Template:nowikitest
13755 <nowiki>'''not wiki'''</nowiki>
13759 pre-save transform: nowiki in subst (T3188)
13763 {{subst:nowikitest}}
13765 <nowiki>'''not wiki'''</nowiki>
13769 Template:commenttest
13771 This template has <!-- a comment --> in it.
13775 pre-save transform: comment in subst (T3936)
13779 {{subst:commenttest}}
13781 This template has <!-- a comment --> in it.
13785 pre-save transform: unclosed tag
13789 <nowiki>'''not wiki'''
13791 <nowiki>'''not wiki'''
13795 pre-save transform: mixed tag case
13799 <NOwiki>'''not wiki'''</noWIKI>
13801 <NOwiki>'''not wiki'''</noWIKI>
13805 pre-save transform: unclosed comment in <nowiki>
13809 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13811 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13814 # Leading @ in this template definition works around a limitation
13815 # in parsoid's parserTests which otherwise strips the <span> from the
13816 # result (confusing it for a template wrapper)
13820 @<span onmouseover="alert('crap')">Oh no</span>
13824 (confirming safety of fix for subst T3936)
13826 {{Template:dangerous}}
13828 <p>@<span>Oh no</span>
13833 pre-save transform: comment containing gallery (T7024)
13837 <!-- <gallery>data</gallery> -->
13839 <!-- <gallery>data</gallery> -->
13843 pre-save transform: comment containing extension
13847 <!-- <tag>data</tag> -->
13849 <!-- <tag>data</tag> -->
13853 pre-save transform: comment containing nowiki
13857 <!-- <nowiki>data</nowiki> -->
13859 <!-- <nowiki>data</nowiki> -->
13863 pre-save transform: <noinclude> in subst (T5298)
13873 pre-save transform: <onlyinclude> in subst (T5298)
13877 {{subst:Includes2}}
13885 {{<includeonly>subst:</includeonly>Includes}}
13889 Template:SafeSubstTest
13891 {{<includeonly>safesubst:</includeonly>Includes}}
13895 T24297: safesubst: works during PST
13899 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13905 T24297: safesubst: works during normal parse
13914 subst: does not work during normal parse
13918 <p>{{subst:Includes}}
13923 pre-save transform: context links ("pipe trick")
13927 [[Article (context)|]]
13930 [[Bar:Article (context)|]]
13931 [[:Bar:Article (context)|]]
13933 [[|Article (context)]]
13937 [[Article (context)|Article]]
13938 [[Bar:Article|Article]]
13939 [[:Bar:Article|Article]]
13940 [[Bar:Article (context)|Article]]
13941 [[:Bar:Article (context)|Article]]
13943 [[Article (context)]]
13944 [[Bar:X (Y) Z|X (Y) Z]]
13945 [[:Bar:X (Y) Z|X (Y) Z]]
13949 pre-save transform: context links ("pipe trick") with interwiki prefix
13953 [[interwiki:Article|]]
13954 [[:interwiki:Article|]]
13955 [[interwiki:Bar:Article|]]
13956 [[:interwiki:Bar:Article|]]
13958 [[interwiki:Article|Article]]
13959 [[:interwiki:Article|Article]]
13960 [[interwiki:Bar:Article|Bar:Article]]
13961 [[:interwiki:Bar:Article|Bar:Article]]
13965 pre-save transform: context links ("pipe trick") with parens in title
13967 pst title=[[Somearticle (context)]]
13971 [[Article (context)|Article]]
13975 pre-save transform: context links ("pipe trick") with comma in title
13977 pst title=[[Someplace, Somewhere]]
13980 [[Otherplace, Elsewhere|]]
13981 [[Otherplace, Elsewhere, Anywhere|]]
13983 [[Otherplace, Somewhere|Otherplace]]
13984 [[Otherplace, Elsewhere|Otherplace]]
13985 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13989 pre-save transform: context links ("pipe trick") with parens and comma
13991 pst title=[[Someplace (IGNORED), Somewhere]]
13994 [[Otherplace (place), Elsewhere|]]
13996 [[Otherplace, Somewhere|Otherplace]]
13997 [[Otherplace (place), Elsewhere|Otherplace]]
14001 pre-save transform: context links ("pipe trick") with comma and parens
14003 pst title=[[Who, me? (context)]]
14006 [[Me, Myself, and I (1937 song)|]]
14008 [[Yes, you. (context)|Yes, you.]]
14009 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
14013 pre-save transform: context links ("pipe trick") with namespace
14015 pst title=[[Ns:Somearticle]]
14019 [[Ns:Article|Article]]
14023 pre-save transform: context links ("pipe trick") with namespace and parens
14025 pst title=[[Ns:Somearticle (context)]]
14029 [[Ns:Article (context)|Article]]
14033 pre-save transform: context links ("pipe trick") with namespace and comma
14035 pst title=[[Ns:Somearticle, Context, Whatever]]
14039 [[Ns:Article, Context, Whatever|Article]]
14043 pre-save transform: context links ("pipe trick") with namespace, comma and parens
14045 pst title=[[Ns:Somearticle, Context (context)]]
14049 [[Ns:Article (context)|Article]]
14053 pre-save transform: context links ("pipe trick") with namespace, parens and comma
14055 pst title=[[Ns:Somearticle (IGNORED), Context]]
14059 [[Ns:Article, Context|Article]]
14063 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14067 [[Article(context)|]]
14068 [[Bar:Article(context)|]]
14069 [[:Bar:Article(context)|]]
14070 [[|Article(context)]]
14074 [[Article(context)|Article]]
14075 [[Bar:Article(context)|Article]]
14076 [[:Bar:Article(context)|Article]]
14077 [[Article(context)]]
14078 [[Bar:X(Y)Z|X(Y)Z]]
14079 [[:Bar:X(Y)Z|X(Y)Z]]
14083 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14087 [[Article (context)|]]
14088 [[Bar:Article (context)|]]
14089 [[:Bar:Article (context)|]]
14090 [[|Article (context)]]
14094 [[Article (context)|Article]]
14095 [[Bar:Article (context)|Article]]
14096 [[:Bar:Article (context)|Article]]
14097 [[Article (context)]]
14098 [[Bar:X (Y) Z|X (Y) Z]]
14099 [[:Bar:X (Y) Z|X (Y) Z]]
14103 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14107 [[Article(context)|]]
14108 [[Bar:Article(context)|]]
14109 [[:Bar:Article(context)|]]
14110 [[|Article(context)]]
14114 [[Article(context)|Article]]
14115 [[Bar:Article(context)|Article]]
14116 [[:Bar:Article(context)|Article]]
14117 [[Article(context)]]
14118 [[Bar:X(Y)Z|X(Y)Z]]
14119 [[:Bar:X(Y)Z|X(Y)Z]]
14123 pre-save transform: context links ("pipe trick") with commas (T23660)
14127 [[Article (context), context|]]
14128 [[Article (context),context|]]
14129 [[Bar:Article (context), context|]]
14130 [[Bar:Article (context),context|]]
14131 [[:Bar:Article (context), context|]]
14132 [[:Bar:Article (context),context|]]
14134 [[Article (context), context|Article]]
14135 [[Article (context),context|Article]]
14136 [[Bar:Article (context), context|Article]]
14137 [[Bar:Article (context),context|Article]]
14138 [[:Bar:Article (context), context|Article]]
14139 [[:Bar:Article (context),context|Article]]
14143 Parsoid: backwards pipe trick
14150 <p>[[|<b>bar</b>]]</p>
14154 pre-save transform: trim trailing empty lines
14158 Empty lines are trimmed
14164 Empty lines are trimmed
14168 pre-save transform: Signature expansion
14175 * <noinclude>~~~</noinclude>
14176 * <includeonly>~~~</includeonly>
14177 * <onlyinclude>~~~</onlyinclude>
14179 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14180 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14181 * 00:02, 1 January 1970 (UTC)
14182 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14183 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14184 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14189 ParserOutput flags from signature expansion (T84843)
14196 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14197 flags=user-signature
14202 pre-save transform: Signature expansion in nowiki tags (T2093)
14208 <nowiki>~~~~</nowiki>
14210 <includeonly><nowiki>~~~~</nowiki></includeonly>
14212 <noinclude><nowiki>~~~~</nowiki></noinclude>
14214 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14216 {{subst:Foo}} shall be converted to FOO
14218 As well as inside noinclude/onlyinclude
14219 <noinclude>{{subst:Foo}}</noinclude>
14220 <onlyinclude>{{subst:Foo}}</onlyinclude>
14222 But not inside includeonly
14223 <includeonly>{{subst:Foo}}</includeonly>
14227 <nowiki>~~~~</nowiki>
14229 <includeonly><nowiki>~~~~</nowiki></includeonly>
14231 <noinclude><nowiki>~~~~</nowiki></noinclude>
14233 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14235 FOO shall be converted to FOO
14237 As well as inside noinclude/onlyinclude
14238 <noinclude>FOO</noinclude>
14239 <onlyinclude>FOO</onlyinclude>
14241 But not inside includeonly
14242 <includeonly>{{subst:Foo}}</includeonly>
14246 Parsoid: Recognize nowiki with trailing space in tags
14250 <nowiki ><div>[[foo]]</nowiki >
14258 <p><div>[[foo]]
14259 </p><p>a<nowiki / >b
14261 </p><p>e<nowiki/ >f
14264 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14266 <p>a<nowiki / >b</p>
14268 <p>c<span typeof="mw:Nowiki"></span>d</p>
14270 <p>e<nowiki/ >f</p>
14274 Parsoid: Recognize nowiki with odd capitalization
14278 <noWikI ><div>[[foo]]</Nowiki >
14280 <p><div>[[foo]]
14283 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14288 Parsoid: Escape nowiki with trailing space in tags
14292 <p><nowiki > foo </nowiki ></p>
14293 <p>a<nowiki />b</p>
14294 <p>c<nowiki/ >d</p>
14296 <nowiki > foo </nowiki >
14304 Parsoid: Escape weird noWikI capitalizations
14308 <p><noWikI > foo </NoWikI ></p>
14310 <noWikI > foo </NoWikI >
14314 ### Message transform tests
14317 message transform: magic variables
14327 message transform: should not transform wiki markup
14337 message transform: <noinclude> in transcluded template (T6926)
14347 message transform: <onlyinclude> in transcluded template (T6926)
14357 {{#special:}} page name, known
14361 {{#special:Recentchanges}}
14363 Special:RecentChanges
14367 {{#special:}} page name with subpage, known
14371 {{#special:Recentchanges/param}}
14373 Special:RecentChanges/param
14377 {{#special:}} page name, unknown
14381 {{#special:foobar nonexistent}}
14383 Special:Foobar nonexistent
14387 {{#speciale:}} page name, known
14391 {{#speciale:Recentchanges}}
14393 Special:RecentChanges
14397 {{#speciale:}} page name with subpage, known
14401 {{#speciale:Recentchanges/param}}
14403 Special:RecentChanges/param
14407 {{#speciale:}} page name, unknown
14411 {{#speciale:foobar nonexistent}}
14413 Special:Foobar_nonexistent
14419 ### For Parsoid-specific tests, see
14420 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14425 parsoid=wt2html,wt2wt,html2html
14427 [[Image:foobar.jpg]]
14429 <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>
14432 <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>
14436 Serialize simple image with span wrapper
14440 <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>
14442 [[File:Foobar.jpg]]
14446 Simple image (using File: namespace, now canonical)
14448 [[File:Foobar.jpg]]
14450 <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>
14453 <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>
14457 Right-aligned image
14459 [[File:Foobar.jpg|right]]
14461 <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>
14463 <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></figure>
14469 [[File:Foobar.jpg|right|Caption text]]
14471 <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>
14473 <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>
14477 Image with caption, T55312 #1
14479 [[File:Foobar.jpg|right|Caption page stuff]]
14481 <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>
14483 <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>
14487 Image with caption, T55312 #2
14489 [[File:Foobar.jpg|right|Caption page=]]
14491 <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>
14493 <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>
14497 Image with caption, T55312 #3
14499 [[File:Foobar.jpg|right|Caption page=stuff]]
14501 <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>
14503 <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>
14507 Image caption with pipe entity
14509 [[File:Foobar.jpg|thumb|one | two]]
14510 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14512 <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>
14513 <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>
14515 <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>
14516 <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>
14520 Allow empty links in image captions (T62753)
14524 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14529 <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>
14531 <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>
14533 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14534 </figcaption></figure>
14538 Titles in unlinked images (T23454)
14540 [[File:Foobar.jpg|link=|stuff]]
14542 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" title="stuff" width="1941" height="220" />
14545 <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>
14549 Link with empty target
14558 Image with link trail
14560 Linktrails should not work for images: [[File:Foobar.jpg]]s
14562 <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
14565 <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>
14569 Image with empty attribute
14571 parsoid=wt2html,wt2wt,html2html
14573 [[File:Foobar.jpg|right||Caption text]]
14575 <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>
14577 <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>
14581 1. Block image with individual attributes from templates
14583 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14585 <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>
14587 <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":[["thumbnail",{"html":"thumb"}],["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>
14591 2. Block Image with individual attributes from templates
14593 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14595 <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>
14597 <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>
14601 3. Inline image with individual attributes from templates
14603 [[File:Foobar.jpg|{{echo|50px}}]]
14605 <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>
14608 <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>
14611 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14612 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14614 Image with multiple attributes from the same template
14616 [[File:Foobar.jpg|{{image_attribs}}]]
14618 <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>
14620 <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>
14624 Image with link tails
14628 123[[File:Foobar.jpg]]456
14629 123[[File:Foobar.jpg|right]]456
14630 123[[File:Foobar.jpg|thumb]]456
14632 <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
14634 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
14635 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
14637 <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
14639 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
14640 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>
14642 <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>
14643 <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></figure><p>456
14644 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></figure><p>456</p>
14648 Image with multiple captions -- only last one is accepted
14650 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14652 <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>
14654 <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>
14658 Image with multiple widths -- use last
14660 [[File:Foobar.jpg|200px|300px|caption]]
14662 <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>
14665 <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>
14669 Image with multiple alignments -- use first (T50664)
14673 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14675 [[File:Foobar.jpg|middle|text-top|caption]]
14677 <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>
14678 <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>
14681 <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>
14682 <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>
14686 Image with width attribute at different positions
14688 [[File:Foobar.jpg|200px|right|Caption]]
14689 [[File:Foobar.jpg|right|200px|Caption]]
14690 [[File:Foobar.jpg|right|Caption|200px]]
14692 <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>
14693 <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>
14694 <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>
14696 <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>
14697 <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>
14698 <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>
14701 # a sad bit of backward-compatibility
14703 Image with size specified with pxpx (T15500, T53628)
14705 parsoid=wt2html,wt2wt,html2html
14707 [[File:Foobar.jpg|20pxpx]]
14708 [[File:Foobar.jpg|200x20pxpx]]
14710 <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>
14711 <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>
14714 <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>
14718 Image with link parameter, wiki target
14720 [[File:Foobar.jpg|link=Main Page]]
14722 <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>
14725 <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>
14728 # parsoid T51293 (part 1)
14730 Image with link parameter, URL target
14732 [[File:Foobar.jpg|link=http://example.com/]]
14734 <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>
14737 <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>
14740 # parsoid T51293 (part 2)
14742 Image with link parameter, protocol-less URL target
14744 [[File:Foobar.jpg|link=//example.com/]]
14746 <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>
14749 <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>
14753 Escaping non-block captions (T107435)
14756 "modes": ["wt2wt"],
14758 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14762 [[Image:Foobar.jpg|caption]]
14764 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14767 # wgExternalLinkTarget not supported by Parsoid
14769 Image with link parameter, wgExternalLinkTarget
14771 [[Image:foobar.jpg|link=http://example.com/]]
14773 wgExternalLinkTarget='foobar'
14775 <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>
14780 Image with link parameter, wgNoFollowLinks set to false
14782 [[Image:foobar.jpg|link=http://example.com/]]
14784 wgNoFollowLinks=false
14786 <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>
14791 Image with link parameter, wgNoFollowDomainExceptions
14793 [[Image:foobar.jpg|link=http://example.com/]]
14795 wgNoFollowDomainExceptions='example.com'
14797 <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>
14801 # wgExternalLinkTarget not supported by Parsoid
14803 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14805 [[Image:foobar.jpg|link=http://example.com/|Title]]
14807 wgExternalLinkTarget='foobar'
14809 <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>
14814 Image with empty link parameter
14816 [[File:Foobar.jpg|link=]]
14818 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" decoding="async" width="1941" height="220" />
14821 <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>
14825 Image with link parameter (wiki target) and unnamed parameter
14827 [[File:Foobar.jpg|link=Main_Page|Title]]
14829 <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>
14832 <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>
14836 Image with link parameter (URL target) and unnamed parameter
14838 [[File:Foobar.jpg|link=http://example.com/|Title]]
14840 <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>
14843 <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>
14847 Thumbnail image with link parameter
14850 parsoid=wt2html,wt2wt,html2html
14852 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14854 <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>
14856 <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>
14860 Manually-specified thumbnail image
14864 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14866 <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>
14868 <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>
14872 Manually-specified thumbnail image with explicit link to wiki page
14875 parsoid=wt2html,wt2wt,html2html
14877 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14879 <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>
14881 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"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>
14885 Manually-specified thumbnail image with explicit link to url
14888 parsoid=wt2html,wt2wt,html2html
14890 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14892 <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>
14894 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"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>
14898 Manually-specified thumbnail image with explicit no link
14901 parsoid=wt2html,wt2wt,html2html
14903 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14905 <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>
14907 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"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>
14911 Manually-specified thumbnail image with explicit link and alt text
14914 parsoid=wt2html,wt2wt,html2html
14916 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14918 <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>
14920 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"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>
14924 Image with frame and link
14926 parsoid=wt2html,wt2wt,html2html
14928 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14930 <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>
14932 <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>
14936 Image with frame and link and explicit alt
14938 parsoid=wt2html,wt2wt,html2html
14940 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14942 <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>
14944 <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>
14948 Image with wiki markup in implicit alt
14950 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14952 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14954 <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>
14955 </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>
14958 <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>
14960 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=testing '''bold''' in alt"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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":{"alt":"testing bold in alt","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=testing '''bold''' in alt","resource":"Image:Foobar.jpg"}}'/></a></figure-inline></p>
14964 Alt image option should handle most kinds of wikitext without barfing
14966 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14968 <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>
14970 <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":[["thumbnail",{"html":"thumb"}],["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>."}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><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":{"alt":"This is a link and a bold template.","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=This is a [[link]] and a {{echo|''bold template''}}.","resource":"Image:Foobar.jpg"}}'/></a><figcaption>This is the image caption</figcaption></figure>
14974 Ampersand in alt attribute (T206940)
14977 "nativeGallery": true
14980 [[File:Foobar.jpg|alt=&amp;]]
14982 <!-- consistency with gallery extension -->
14984 File:Foobar.jpg|alt=&amp;
14987 <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>
14989 <ul class="gallery mw-gallery-traditional">
14990 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
14991 <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>
14992 <div class="gallerytext">
14997 <p><figure-inline class="mw-default-size" typeof="mw:Image"><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>
14999 <!-- consistency with gallery extension -->
15000 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15001 <li class="gallerybox">
15002 <div class="thumb"><figure-inline typeof="mw:Image"><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>
15003 <div class="gallerytext"></div>
15009 Italics markup in alt attribute (T206940)
15011 [[File:Foobar.jpg|alt=''x''|caption]]
15013 <!-- consistency with gallery extension -->
15015 File:Foobar.jpg|alt=''x''|caption
15018 <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>
15020 <ul class="gallery mw-gallery-traditional">
15021 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15022 <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>
15023 <div class="gallerytext">
15030 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=''x''"},{"ck":"caption","ak":"caption"}]}' data-mw='{"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" data-parsoid='{"a":{"alt":"x","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=''x''","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15032 <!-- consistency with gallery extension -->
15033 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|alt=''x''|caption\n"}}'>
15034 <li class="gallerybox">
15035 <div class="thumb"><figure-inline typeof="mw:Image"><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>
15036 <div class="gallerytext">caption</div>
15042 Nowiki markup in alt attribute (T206940)
15044 [[File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption]]
15046 <!-- consistency with gallery extension -->
15048 File:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption
15051 <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>
15053 <ul class="gallery mw-gallery-traditional">
15054 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15055 <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>
15056 <div class="gallerytext">
15063 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>"},{"ck":"caption","ak":"caption"}],"dsr":[0,71,null,null]}' data-mw='{"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" data-parsoid='{"a":{"alt":"''x''","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15065 <!-- consistency with gallery extension -->
15066 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|alt=<nowiki>''</nowiki>x<nowiki>''</nowiki>|caption\n"}}'>
15067 <li class="gallerybox">
15068 <div class="thumb"><figure-inline typeof="mw:Image"><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>
15069 <div class="gallerytext">caption</div>
15075 Nowiki markup in alt attribute (edited html, no data-parsoid) (T206940)
15078 "nativeGallery": true
15081 [[File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption]]
15083 <!-- consistency with gallery extension -->
15085 File:Foobar.jpg|alt=<nowiki>''x''</nowiki>|caption
15088 <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>
15090 <ul class="gallery mw-gallery-traditional">
15091 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15092 <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>
15093 <div class="gallerytext">
15100 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"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>
15102 <!-- consistency with gallery extension -->
15103 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15104 <li class="gallerybox">
15105 <div class="thumb"><figure-inline typeof="mw:Image"><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>
15106 <div class="gallerytext">caption</div>
15112 Ampersand in link attribute (T206940)
15114 [[File:Foobar.jpg|link=Foo & bar]]
15116 <!-- consistency with gallery extension -->
15118 File:Foobar.jpg|link=Foo & bar
15121 <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>
15123 <ul class="gallery mw-gallery-traditional">
15124 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15125 <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>
15126 <div class="gallerytext">
15131 <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>
15133 <!-- consistency with gallery extension -->
15134 <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"}}'>
15135 <li class="gallerybox">
15136 <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>
15137 <div class="gallerytext"></div>
15143 Ampersand in link attribute (edited html, no data-parsoid) (T206940)
15146 "nativeGallery": true
15149 [[File:Foobar.jpg|link=Foo_&_bar]]
15151 <!-- consistency with gallery extension -->
15153 File:Foobar.jpg|link=Foo_&_bar
15156 <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>
15158 <ul class="gallery mw-gallery-traditional">
15159 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15160 <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>
15161 <div class="gallerytext">
15166 <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>
15168 <!-- consistency with gallery extension -->
15169 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15170 <li class="gallerybox">
15171 <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>
15172 <div class="gallerytext"></div>
15178 Italics markup in link attribute (T206940)
15182 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15183 [[File:Foobar.jpg|link=Foo''s bar''s|caption1]]
15185 [[File:Foobar.jpg|link=''Main Page''|caption2]]
15187 <!-- consistency with gallery extension -->
15189 File:Foobar.jpg|link=Foo''s bar''s|caption1
15190 File:Foobar.jpg|link=''Main Page''|caption2
15193 <p><a href="/wiki/Foo%27%27s_bar%27%27s" title="Foo''s bar''s">Foo''s bar''s</a>
15194 </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>
15195 </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>
15197 <ul class="gallery mw-gallery-traditional">
15198 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15199 <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>
15200 <div class="gallerytext">
15205 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15206 <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>
15207 <div class="gallerytext">
15214 <p><a rel="mw:WikiLink" href="./Foo''s_bar''s" title="Foo''s bar''s">Foo''s bar''s</a></p>
15216 <!-- Note that "italics" are stripped, even though this is a valid page title -->
15217 <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>
15219 <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>
15221 <!-- consistency with gallery extension -->
15222 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=Foo''s bar''s|caption1\nFile:Foobar.jpg|link=''Main Page''|caption2\n"}}'>
15223 <li class="gallerybox">
15224 <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>
15225 <div class="gallerytext">caption1</div>
15227 <li class="gallerybox">
15228 <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>
15229 <div class="gallerytext">caption2</div>
15235 Nowiki markup in link attribute (T206940)
15237 [[File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption]]
15239 <!-- consistency with gallery extension -->
15241 File:Foobar.jpg|link=Foo<nowiki>''</nowiki>s_bar<nowiki>''</nowiki>s|caption
15244 <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>
15246 <ul class="gallery mw-gallery-traditional">
15247 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15248 <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>
15249 <div class="gallerytext">
15256 <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>
15258 <!-- consistency with gallery extension -->
15259 <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"}}'>
15260 <li class="gallerybox">
15261 <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>
15262 <div class="gallerytext">caption</div>
15268 Nowiki markup in link attribute (edited html, no data-parsoid) (T206940)
15271 "nativeGallery": true
15274 [[File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption]]
15276 <!-- consistency with gallery extension -->
15278 File:Foobar.jpg|link=Foo<nowiki>''s_bar''</nowiki>s|caption
15281 <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>
15283 <ul class="gallery mw-gallery-traditional">
15284 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15285 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
15286 <div class="gallerytext">
15293 <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>
15295 <!-- consistency with gallery extension -->
15296 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
15297 <li class="gallerybox">
15298 <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>
15299 <div class="gallerytext">caption</div>
15305 HTML entity prefix in link markup (T209236)
15307 [[File:Foobar.jpg|link=https://example.com?foo¶ms=bar]]
15309 <!-- consistency with gallery extension -->
15311 File:Foobar.jpg|link=https://example.com?foo¶ms=bar
15314 <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>
15316 <ul class="gallery mw-gallery-traditional">
15317 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
15318 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="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>
15319 <div class="gallerytext">
15324 <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>
15326 <!-- consistency with gallery extension -->
15327 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:Foobar.jpg|link=https://example.com?foo&params=bar\n"}}'>
15328 <li class="gallerybox">
15329 <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>
15330 <div class="gallerytext"></div>
15336 Image with table with attributes in caption
15338 parsoid=wt2html,html2html
15340 [[File:Foobar.jpg|thumb|
15347 <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>
15348 <table class="123">
15349 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
15352 </figcaption></figure>
15356 Image with table with rows from templates in caption
15358 [[File:Foobar.jpg|thumb|
15364 <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>
15366 <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>
15368 </figcaption></figure>
15372 Image with nested tables in caption
15374 [[File:Foobar.jpg|thumb|Foo<br />
15383 <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}'/>
15387 <tbody><tr><td>z</td></tr>
15388 </tbody></table></td></tr>
15390 </figcaption></figure>
15394 Image with heading and horizontal rule in caption
15396 [[File:Foobar.jpg|thumb|
15402 <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>
15404 <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>
15405 <h3 id="Testing">Testing</h3>
15407 <hr data-parsoid='{"extra_dashes":10}'/>
15408 </figcaption></figure>
15411 ###################
15412 # Conflicting image format options.
15413 # First option specified should 'win'.
15414 # All three cases in each test should be identical.
15417 Image with 'frameless' first.
15419 parsoid=wt2html,wt2wt,html2html
15421 [[File:Foobar.jpg|frameless|caption]]
15423 [[File:Foobar.jpg|frameless|frame|caption]]
15425 [[File:Foobar.jpg|frameless|thumb|caption]]
15427 <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>
15428 </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>
15429 </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>
15432 <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>
15433 <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>
15434 <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>
15438 Image with 'frame' first.
15440 parsoid=wt2html,wt2wt,html2html
15442 [[File:Foobar.jpg|frame|caption]]
15443 [[File:Foobar.jpg|frame|frameless|caption]]
15444 [[File:Foobar.jpg|frame|thumb|caption]]
15446 <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>
15447 <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>
15448 <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>
15450 <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>
15451 <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>
15452 <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>
15456 Image with 'thumb' first.
15458 parsoid=wt2html,wt2wt,html2html
15460 [[File:Foobar.jpg|thumb|caption]]
15461 [[File:Foobar.jpg|thumb|frameless|caption]]
15462 [[File:Foobar.jpg|thumb|frame|caption]]
15464 <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>
15465 <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>
15466 <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>
15468 <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>
15469 <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>
15470 <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>
15473 ###################
15475 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15476 # and https://phabricator.wikimedia.org/T64258
15477 # Foobar has actual size of 1941x220
15478 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15479 # a scalable format.
15480 # 2. Framed images always ignore size options; always render at default size.
15481 # 3. "Unspecified format" and border are the only types which can be
15485 Image: unspecified format and border enlarge
15487 parsoid=wt2html,wt2wt,html2html
15489 [[File:Foobar.jpg|2000px]]
15491 [[File:Foobar.jpg|border|2000px]]
15493 <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>
15494 </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>
15497 <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>
15498 <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>
15502 Image: "unspecified format" and border reduce
15504 parsoid=wt2html,wt2wt,html2html
15506 [[File:Foobar.jpg|1000px]]
15508 [[File:Foobar.jpg|border|1000px]]
15510 <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>
15511 </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>
15514 <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>
15515 <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>
15519 Image: thumbs reduce
15521 parsoid=wt2html,wt2wt,html2html
15523 [[File:Foobar.jpg|thumb|50px]]
15525 <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>
15527 <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></figure>
15531 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15533 parsoid=wt2html,wt2wt,html2html
15535 [[File:Foobar.jpg|thumb|2000px]]
15537 [[File:Foobar.svg|thumb|2000px]]
15539 <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>
15540 <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>
15542 <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></figure>
15543 <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></figure>
15547 Image: frameless can reduce in size
15549 parsoid=wt2html,wt2wt,html2html
15551 [[File:Foobar.jpg|frameless|50px]]
15553 <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>
15556 <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>
15560 Image: bitmap frameless can't be enlarged past original size, but vector can
15562 parsoid=wt2html,wt2wt,html2html
15564 [[File:Foobar.jpg|frameless|2000px]]
15566 [[File:Foobar.svg|frameless|2000px]]
15568 <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>
15569 </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>
15572 <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>
15573 <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>
15577 Image: framed images are always unscaled.
15579 parsoid=wt2html,wt2wt,html2html
15581 [[File:Foobar.jpg|frame]]
15583 [[File:Foobar.jpg|frame|50px]]
15585 [[File:Foobar.jpg|frame|50x50px]]
15587 [[File:Foobar.jpg|frame|2000px]]
15589 <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>
15590 <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>
15591 <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>
15592 <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>
15594 <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></figure>
15595 <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></figure>
15596 <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></figure>
15597 <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></figure>
15600 ###################
15603 Link to image page- image page normally doesn't exists, hence edit link
15604 Add test with existing image page
15605 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15609 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15614 T20784 Link to non-existent image page with caption should use caption as link text
15616 [[:Image:test|caption]]
15618 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15623 Frameless image caption with a free URL
15625 [[File:Foobar.jpg|http://example.com]]
15627 <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>
15630 <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>
15634 Thumbnail image caption with a free URL
15638 [[File:Foobar.jpg|thumb|http://example.com]]
15640 <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>
15642 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
15646 Thumbnail image caption with a free URL and explicit alt
15649 parsoid=wt2html,wt2wt,html2html
15651 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15653 <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>
15655 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img alt="Alteration" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
15659 SVG thumbnails with no language set
15662 [[File:Foobar.svg|thumb|caption]]
15664 <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>
15666 <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>
15670 SVG thumbnails with language de
15672 parsoid=wt2html,wt2wt,html2html
15674 [[File:Foobar.svg|thumb|caption|lang=de]]
15676 <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>
15678 <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>
15682 SVG thumbnails with invalid language code
15684 parsoid=wt2html,wt2wt,html2html
15686 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15688 <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>
15690 <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>
15694 SVG thumbnails in page language
15698 [[File:Foobar.svg]] [[File:Foobar.svg|lang=en]]
15700 <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>
15705 SVG thumbnails in page language not present in the file
15709 [[File:Foobar.svg]] [[File:Foobar.svg|lang=ru]]
15711 <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>
15716 T3887: A ISBN with a thumbnail
15718 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15720 <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>
15722 <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>
15726 T3887: A RFC with a thumbnail
15728 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15730 <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>
15732 <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>
15736 T3887: A mailto link with a thumbnail
15738 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15740 <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>
15742 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Please <a rel="mw:ExtLink" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
15745 # Pending resolution to T2368
15747 T2648: Frameless image caption with a link
15749 [[File:Foobar.jpg|text with a [[link]] in it]]
15751 <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>
15754 <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>
15758 T2648: Frameless image caption with a link (suffix)
15760 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15762 <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>
15765 <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>
15769 T2648: Frameless image caption with an interwiki link
15771 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15773 <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>
15776 <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>
15780 T2648: Frameless image caption with a piped interwiki link
15782 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15784 <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>
15787 <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>
15791 T107474: Frameless image caption with <nowiki>
15793 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15795 <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>
15799 Escape HTML special chars in image alt text
15801 [[File:Foobar.jpg|& < > "]]
15803 <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>
15806 <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>
15810 Escape HTML special chars in image alt text with LanguageConverter
15814 [[File:Foobar.jpg|& < > "]]
15816 <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>
15819 <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>
15823 Entities in file name and attributes
15825 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15827 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15830 <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='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"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>"}'><a href="./7%25_solution" data-parsoid='{"a":{"href":"./7%25_solution"},"sa":{"href":"link=7%25 solution"}}'><img resource="./File:7%25_solution.gif" src="./Special:FilePath/7%25_solution.gif" height="220" width="220" data-parsoid='{"a":{"resource":"./File:7%25_solution.gif","height":"220","width":"220"},"sa":{"resource":"File:7%25 solution.gif"}}'/></a></figure-inline></p>
15834 T2499: Alt text should have Ӓ, not &1234;
15836 [[File:Foobar.jpg|♀]]
15838 <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>
15841 <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>
15845 Broken image caption with link
15847 parsoid=wt2html,wt2wt,html2html
15849 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15851 <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.
15854 <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>
15858 Image caption containing another image
15860 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15862 <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>
15864 <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>
15868 Image: caption containing a newline
15870 [[File:Foobar.jpg|This
15873 <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>
15876 <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>
15880 Image: caption containing leading space
15881 (The leading space should not trigger nowiki escaping in wt2wt mode)
15883 [[File:Foobar.jpg|thumb| bar]]
15885 <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>
15887 <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>
15890 # html/php output not have newlines after table, td, th, etc. because
15891 # Linker::makeThumbLink2() replaces the newlines with spaces since
15892 # the table is inside a caption.
15893 # FIXME: Verify if that circa 2004 fix is still required.
15895 Image: caption containing a table
15897 parsoid=wt2html,wt2wt,html2html
15899 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15905 and some more text.]]
15907 <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>
15909 <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
15912 <tr><th>Foo</th><th>Bar</th></tr>
15915 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15919 T5090: External links other than http: in image captions
15921 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15923 <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>
15925 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has <a rel="mw:ExtLink" class="external text" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" class="external text" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
15931 parsoid=wt2html,wt2wt,html2html
15933 [[Image:foobar.jpg|a|class=b]]
15935 <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>
15938 <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>
15942 Localized image handling (1).
15944 parsoid=wt2html,wt2wt,html2html
15947 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15949 <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>
15951 <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>
15955 Localized image handling (2).
15958 parsoid=wt2html,wt2wt,html2html
15961 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15963 <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>
15965 <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>
15969 Localized image handling (3).
15974 <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>
15976 [[File:Foobar.jpg|بندانگشتی]]
15980 "border", "frameless" and "class" attributes on an image.
15983 parsoid=wt2html,wt2wt,html2html
15985 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15987 <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>
15990 <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>
15993 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15995 Invalid image attributes (T64500)
15998 parsoid=wt2html,wt2wt,html2html
16000 [[File:Foobar.jpg|thumb|float|left|caption]]
16002 [[File:Foobar.jpg|thumb|righ|caption]]
16004 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
16006 <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>
16007 <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>
16008 <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>
16010 <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>
16011 <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>
16012 <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>
16018 #REDIRECT [[File:Barfoo.jpg]]
16021 # FIXME: Parsoid should run this test -- but we'd need to teach the
16022 # mockAPI about the redirected Barfoo.jpg image.
16026 [[Image:Barfoo.jpg]]
16028 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
16033 Missing image with uploads disabled
16037 [[File:Foobaz.jpg]]
16039 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
16042 <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="./File:Foobaz.jpg"><img resource="./File:Foobaz.jpg" src="./Special:FilePath/Foobaz.jpg" height="220" width="220"/></a></figure-inline></p>
16045 # Parsoid-specific testing for images
16046 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
16047 # Currently imperfect due to a flaw in the Parsoid testrunner
16049 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
16053 Parsoid-specific image handling - simple image with size and middle alignment
16055 [[File:Foobar.jpg|middle|50px]]
16057 <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>
16061 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
16063 parsoid=wt2wt,wt2html,html2html
16065 [[Image:Foobar.jpg|middle|50px]]
16067 <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>
16071 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
16073 [[File:Foobar.jpg|50px|middle]]
16075 <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>
16079 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
16081 parsoid=wt2html,wt2wt,html2html
16083 [[Image:Foobar.jpg|50px|middle]]
16085 <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>
16089 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
16091 [[File:Foobar.jpg|500x10px|baseline|caption]]
16093 <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>
16097 Parsoid-specific image handling - simple image with border and size spec
16099 [[File:Foobar.jpg|50px|border|caption]]
16101 <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>
16105 Parsoid-specific image handling - thumbnail with halign, valign, and caption
16107 parsoid=wt2html,html2html
16109 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
16111 <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>
16115 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
16117 parsoid=wt2html,html2html
16119 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
16121 <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>
16125 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
16127 parsoid=wt2html,html2html
16129 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
16131 <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>
16135 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
16137 parsoid=wt2html,html2html
16139 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
16141 <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>
16145 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
16147 parsoid=wt2html,wt2wt,html2html
16149 [[File:Foobar.jpg|frame|500x50px|caption]]
16151 <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>
16155 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
16157 parsoid=wt2html,html2html
16159 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
16161 <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>
16165 Parsoid-specific image handling - frameless image with specific size, border, and caption
16167 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
16169 <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>
16173 Parsoid-specific image handling - simple image with a formatted caption
16175 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
16177 <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>
16181 Parsoid-specific image handling - caption with a template in it
16183 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
16185 <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>
16189 Parsoid-specific image handling - caption with unbalanced tags in it
16191 parsoid=wt2html,wt2wt,html2html
16194 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
16198 <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>
16203 Parsoid-specific image handling - empty caption (1)
16205 parsoid=wt2html,wt2wt
16207 [[File:Foobar.jpg|thumb|]]
16209 <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>
16212 # empty captions don't get serialized unless we're in the "round trip" case
16214 Parsoid-specific image handling - empty caption (2)
16218 <figure class="mw-default-size" typeof="mw:Image/Thumb">
16219 <a href="./File:Foobar.jpg">
16220 <img resource="./File:Foobar.jpg"
16221 src="//example.com/images/3/3a/Foobar.jpg"
16222 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
16223 height="25" width="220"/>
16225 <figcaption></figcaption>
16228 [[File:Foobar.jpg|thumb]]
16232 Parsoid-specific image handling - whitespace caption
16234 [[File:Foobar.jpg|thumb| ]]
16236 <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>
16240 Parsoid-specific image handling - lang option
16243 [[File:Foobar.svg|lang=de|caption]]
16247 <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>
16251 ## Edge case bugs in Parsoid from T93580
16253 T93580: 1. Templated <ref> inside block images
16255 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
16259 <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>
16261 <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>
16265 T93580: 2. <ref> inside inline images
16267 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
16271 <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>
16273 <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>
16277 T93580: 3. Templated <ref> inside inline images
16279 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
16283 <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>
16285 <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>
16292 Subpage test/subpage
16300 subpage title=[[Subpage test]]
16304 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
16309 Subpage noslash link
16311 subpage title=[[Subpage test]]
16315 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
16320 Subpage test/1/2/subpage
16326 Relative subpage noslash link
16328 parsoid=wt2wt,wt2html,html2html
16329 subpage title=[[Subpage test/1/2/3/4]]
16335 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
16336 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
16339 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
16340 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
16344 Parsoid: dot-slash prefixed wikilinks
16354 </p><p>[[././baz/]]
16359 </p><p>[[././baz/]]
16364 Render invalid page names as plain text (T53090)
16376 [[foo[http://example.com]xyz]]
16378 [[{{echo|./../foo}}|bar]]
16379 [[{{echo|foo/.}}|bar]]
16380 [[{{echo|foo/..}}|bar]]
16381 [[{{echo|foo~~~~bar}}]]
16382 [[{{echo|foo>bar}}]]
16383 [[{{echo|foo././bar}}]]
16384 [[{{echo|foo{bar}}]]
16385 [[{{echo|foo}bar}}]]
16386 [[{{echo|foo[bar}}]]
16387 [[{{echo|foo]bar}}]]
16388 [[{{echo|foo<bar}}]]
16390 <p>[[./../foo|bar]]
16400 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
16401 </p><p>[[./../foo|bar]]
16414 <p>[[./../foo|bar]]
16424 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16426 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16427 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16428 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16429 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16430 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16431 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16432 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16433 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16434 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16435 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16436 [[<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>
16444 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16449 T2561: {{/Subpage}}
16451 subpage title=[[Page]]
16455 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16463 Category:MediaWiki User's Guide
16471 [[:Category:MediaWiki User's Guide]]
16473 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16482 [[Category:MediaWiki User's Guide]]
16484 cat=MediaWiki_User's_Guide sort=
16486 <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"}}'/>
16490 PAGESINCATEGORY invalid title fatal (r33546 fix)
16492 {{PAGESINCATEGORY:<bogus>}}
16499 Category with different sort key
16503 [[Category:MediaWiki User's Guide|Foo]]
16505 cat=MediaWiki_User's_Guide sort=Foo
16507 <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"}}'/>
16511 Category with identical sort key
16515 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16517 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16519 <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"}}'/>
16523 Category with empty sort key
16528 [[Category:MediaWiki User's Guide|]]
16530 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16534 Category with empty sort key and parentheses
16539 [[Category:Foo (bar)|]]
16541 [[Category:Foo (bar)|Foo]]
16545 Category with link tail
16550 123[[Category:Foo]]456
16552 123[[Category:Foo]]456
16556 Category with template
16561 [[Category:{{echo|Foo}}]]
16563 [[Category:{{echo|Foo}}]]
16567 Category with template in sort key
16572 [[Category:Foo|{{echo|Bar}}]]
16574 [[Category:Foo|{{echo|Bar}}]]
16578 Category with template in sort key and title
16583 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16585 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16588 ## We used to, but no longer wt2wt this test since the default serializer
16589 ## will normalize all categories to serialize on their own line.
16590 ## This wikitext usage is going to be fairly uncommon in production and
16591 ## selser will take care of preserving formatting in those scenarios.
16593 Category / paragraph interactions
16597 Foo [[Category:Baz]] Bar
16599 Foo [[Category:Baz]]
16607 [[Category:Baz]] Bar
16620 {{echo|[[Category:Baz]]}}
16633 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16634 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16635 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16636 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16637 <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>
16638 <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}}]}'/>
16639 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16642 ## We used to, but no longer wt2wt this test since the default serializer
16643 ## will normalize all categories to serialize on their own line.
16644 ## This wikitext usage is going to be fairly uncommon in production and
16645 ## selser will take care of preserving formatting in those scenarios.
16647 ## The whitespace on the empty line is part of the test. Please do not delete
16649 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16655 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16657 {{echo|[[Category:Foo]] and so should this!}}
16659 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16664 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16666 <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>
16669 ## Parsoid will not try to wt2wt this while preserving newlines because
16670 ## it suppresses excess newlines within list items -- and we don't want to
16671 ## introduce a special case just for categories, which is, in reality somewhat
16672 ## odd behavior -- categories are unlikely to be used in list items like this
16673 ## in top-level pages and are only likely to show up in template-generated
16674 ## list items where this RT-ing is a non-issue.
16676 ## The whitespace on the empty line is part of the test. Please do not delete
16678 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16684 [[Category:Foo]] and this should be part of the same list item
16687 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16689 <ul><li>This and this should be part of the same list item</li>
16690 <li>So should this and this should be part of the same list item</li></ul>
16693 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16694 <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>
16698 ## Newlines and categories that follow the last item of a list
16699 ## are treated differently because this (list followed by categories)
16700 ## is an extremely common pattern on wikis.
16702 3. Categories and newlines: newline suppression for last list item should RT properly
16723 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16725 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16726 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16728 <dl><dd>c</dd></dl>
16730 <link rel="mw:PageProp/Category" href="./Category:C"/>
16732 <dl><dt>d</dt></dl>
16734 <link rel="mw:PageProp/Category" href="./Category:D"/>
16738 4. Categories and newlines: newline suppression for last list item should RT properly
16746 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16748 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16751 ## only wt2html for this to make sure the algo only applies to the rightmost path
16753 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16766 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16768 <ul><li>d</li></ul></li></ul>
16769 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16772 ## We used to, but no longer wt2wt this test since the default serializer
16773 ## will normalize all categories to serialize on their own line.
16774 ## This wikitext usage is going to be fairly uncommon in production and
16775 ## selser will take care of preserving formatting in those scenarios.
16777 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16781 *a [[Category:Foo]]
16783 <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>
16786 # This test also demonstrates because of newline+category tunneling
16787 # through the list hander, template wrapping doesn't expand to the
16788 # containing list when the list item swallows the category.
16790 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16795 <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
16796 </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>
16800 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16804 {{echo|[[Category:Foo]]
16808 <ul><li>a</li></ul>
16810 <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">
16811 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16812 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16816 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16820 [[Category:Bar]]<!--boo1--> <!--boo2-->
16821 [[Category:Baz]]<!--boo3--> <!--boo4-->
16823 <ul><li>a</li></ul>
16825 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16826 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16830 Categories and newlines: should behave properly with linkprefix (T87753)
16845 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16846 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16850 No regressions on internal links following category (T174639)
16852 parsoid=wt2html,html2html
16854 [[Category:Foo]]<div>a
16859 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16861 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16863 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16866 # Note that Parsoid differs slightly from PHP due to T175421
16868 11. Special case where only newlines separate links (T175416)
16870 parsoid=wt2html,html2html
16874 [[Foo]][[es:Alimento]]
16879 <a href="/wiki/Foo" title="Foo">Foo</a>
16880 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16883 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16885 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16887 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16891 Category links with multiple namespaces
16893 [[Category:Project:Foo]]
16895 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16899 Parsoid: Serialize link to category page with colon escape
16903 [[:Category:Foo|Bar]]
16905 <p><a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Category:Foo</a>
16906 <a href="/index.php?title=Category:Foo&action=edit&redlink=1" class="new" title="Category:Foo (page does not exist)">Bar</a>
16910 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16911 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16915 # We used to, but no longer wt2wt this test since the default serializer
16916 # will normalize all categories to serialize on their own line.
16917 # This wikitext usage is going to be fairly uncommon in production and
16918 # selser will take care of preventing whitespace insertion if this
16919 # occurs in an article.
16921 # html2html disabled for the same reason (whitespace insertion between
16924 # html2wt disabled because it localizes the "Category" namespace.
16926 Link prefix/suffixes aren't applied to category links
16936 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16940 Link prefix/suffixes aren't applied to language links
16950 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16954 Parsoid: Serialize link to file page with colon escape
16958 [[:File:Foo.png|Bar]]
16960 <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>
16961 <a href="/index.php?title=File:Foo.png&action=edit&redlink=1" class="new" title="File:Foo.png (page does not exist)">Bar</a>
16965 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16966 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16971 Parsoid: Serialize a genuine category link without colon escape
16974 [[Category:Foo|Bar]]
16977 <link rel="mw:PageProp/Category" href="./Category:Foo">
16978 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16982 Normalize hrefs properly before testing for invalid link targets (T72894)
16986 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16988 [[Category:Toxine bactérienne]]
16992 Parsoid: Defaultsort
16994 {{DEFAULTSORT:Foo}}
16996 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16999 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
17000 # But, this is a limitation of our representation and is documented in
17001 # TemplateHandler.js in processSpecialMagicWord
17003 Parsoid: Defaultsort (template-generated)
17005 {{{{echo|DEFAULTSORT}}:Foo}}
17007 <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"}]]}'/>
17011 ### Inter-language links
17014 Interlanguage links
17022 es:Alimento fr:Nourriture zh:食品
17024 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
17025 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
17026 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
17030 Duplicate interlanguage links (T26502)
17041 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
17042 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
17043 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
17044 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
17051 Basic section headings
17058 ===Smaller headline===
17061 <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>
17064 <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>
17067 <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>
17073 Section headings with TOC
17076 ===Subheadline 1===
17077 =====Skipping a level=====
17078 ======Skipping a level======
17082 ===Another headline===
17084 <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>
17086 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
17088 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
17090 <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>
17092 <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>
17099 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
17101 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
17107 <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>
17108 <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>
17109 <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>
17110 <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>
17111 <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>
17114 <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>
17118 TOC anchors don't collide
17126 <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>
17128 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
17129 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
17130 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
17131 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
17135 <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>
17136 <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>
17137 <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>
17138 <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>
17141 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
17142 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
17144 Handling of sections up to level 6 and beyond
17149 ==Level 2 Heading==
17150 ===Level 3 Heading===
17151 ====Level 4 Heading====
17152 =====Level 5 Heading=====
17153 ======Level 6 Heading======
17154 =======Level 7 Heading=======
17155 ========Level 8 Heading========
17156 =========Level 9 Heading=========
17157 ==========Level 10 Heading==========
17159 <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>
17161 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
17163 <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>
17165 <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>
17167 <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>
17169 <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>
17171 <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>
17172 <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>
17173 <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>
17174 <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>
17175 <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>
17189 <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>
17190 <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>
17191 <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>
17192 <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>
17193 <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>
17194 <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>
17195 <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>
17196 <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>
17197 <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>
17198 <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>
17200 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
17201 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
17202 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
17203 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
17204 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
17205 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
17206 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
17207 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
17208 <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>
17209 <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>
17213 TOC regression (T11764)
17217 ====title 1.1.1====
17222 <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>
17224 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17226 <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>
17228 <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>
17231 <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>
17234 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17236 <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>
17242 <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>
17243 <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>
17244 <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>
17245 <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>
17246 <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>
17247 <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>
17251 TOC for heading containing <span id="..."></span> (T96153)
17254 ==<span id="old-anchor"></span>New title==
17256 <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>
17258 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
17262 <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>
17266 TOC with wgMaxTocLevel=3 (T8204)
17272 ====title 1.1.1====
17277 <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>
17279 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17281 <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>
17282 <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>
17285 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
17287 <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>
17293 <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>
17294 <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>
17295 <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>
17296 <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>
17297 <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>
17298 <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>
17302 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
17308 ====Section 1.1.1====
17309 ====Section 1.1.1.1====
17312 <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>
17314 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
17316 <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>
17319 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
17323 <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>
17324 <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>
17325 <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>
17326 <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>
17327 <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>
17332 Resolving duplicate section names
17337 <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>
17338 <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>
17342 Resolving duplicate section names with differing case (T12721)
17347 <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>
17348 <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>
17359 Template with sections, __NOTOC__
17366 <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>
17367 <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>
17368 <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>
17369 <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>
17373 __NOEDITSECTION__ keyword
17379 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
17380 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
17384 Link inside a section heading
17386 ==Section with a [[Main Page|link]] in it==
17388 <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>
17392 TOC regression (T14077)
17399 <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>
17401 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17403 <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>
17406 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17410 <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>
17411 <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>
17412 <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>
17416 T3219 URL next to image (good)
17418 http://example.com [[File:Foobar.jpg]]
17420 <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>
17423 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> <figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
17426 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17428 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17430 parsoid=wt2html,html2html
17433 The line above must have a trailing space!
17436 But just in case it doesn't...
17438 <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>
17439 <p>The line above must have a trailing space!
17441 <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>
17442 <p>But just in case it doesn't...
17445 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17446 <p>The line above must have a trailing space!</p>
17447 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17449 <p>But just in case it doesn't...</p>
17453 Header with special characters (T27462)
17455 The tooltips shall not show entities to the user (ie. be double escaped)
17472 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17474 <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>
17476 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17477 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17478 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17479 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17480 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17484 <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>
17487 <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>
17490 <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>
17493 <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>
17496 <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>
17500 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17502 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17505 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17508 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17511 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17514 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17519 Header with space, plus and underscore as entity
17521 Id should not contain + for spaces
17523 ==Space between Text==
17526 ==Space-Entity between Text==
17529 ==Plus+between+Text==
17532 ==Plus-Entity+between+Text==
17535 ==Underscore_between_Text==
17538 ==Underscore-Entity_between_Text==
17541 [[#Space between Text]]
17542 [[#Space-Entity between Text]]
17543 [[#Plus+between+Text]]
17544 [[#Plus-Entity+between+Text]]
17545 [[#Underscore_between_Text]]
17546 [[#Underscore-Entity_between_Text]]
17548 <p>Id should not contain + for spaces
17550 <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>
17552 <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>
17553 <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>
17554 <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>
17555 <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>
17556 <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>
17557 <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>
17561 <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>
17564 <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>
17567 <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>
17570 <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>
17573 <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>
17576 <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>
17578 </p><p><a href="#Space_between_Text">#Space between Text</a>
17579 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17580 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17581 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17582 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17583 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17586 <p>Id should not contain + for spaces</p>
17588 <h2 id="Space_between_Text">Space between Text</h2>
17591 <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>
17594 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17597 <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>
17600 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17603 <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>
17606 <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>
17607 <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>
17608 <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>
17609 <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>
17610 <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>
17611 <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>
17614 # Parsoid html2wt disabled because it adds padding spaces around =
17616 Headers with excess '=' characters
17617 (Are similar tests necessary beyond the 1st level?)
17619 parsoid=wt2html,wt2wt,html2html
17623 =''italic'' heading==
17624 ==''italic'' heading=
17626 <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>
17628 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17629 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17630 <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>
17631 <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>
17635 <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>
17636 <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>
17637 <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>
17638 <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>
17640 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17641 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17642 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17643 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17647 HTML headers vs TOC (T25393)
17648 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17660 <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>
17662 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17664 <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>
17665 <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>
17668 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17670 <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>
17671 <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>
17677 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17678 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17679 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17680 <h1><span class="mw-headline" id="Header_2">Header 2
17682 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17683 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17685 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17686 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17687 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17689 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17691 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17692 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17693 <meta property="mw:PageProp/noeditsection"/>
17697 Single-line or multiline-comments can follow headings
17699 parsoid=wt2html,wt2wt
17707 <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>
17708 <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>
17709 <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>
17711 <h2 id="foo">foo</h2><!---->
17712 <h2 id="bar">bar</h2><!--c1-->
17713 <h2 id="baz">baz</h2><!--
17719 T3219 URL next to image (broken)
17721 http://example.com[[File:Foobar.jpg]]
17723 <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>
17726 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
17730 T3186 news: in the middle of text
17732 http://en.wikinews.org/wiki/Wikinews:Workplace
17734 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17740 Namespaced link must have a title
17749 Namespaced link must have a title (bad fragment version)
17751 [[Project:#fragment]]
17753 <p>[[Project:#fragment]]
17759 ### HTML tags and HTML attributes
17763 div with no attributes
17765 <div>HTML rocks</div>
17767 <div>HTML rocks</div>
17771 div with double-quoted attribute
17773 <div id="rock">HTML rocks</div>
17775 <div id="rock">HTML rocks</div>
17779 div with single-quoted attribute
17781 <div id='rock'>HTML rocks</div>
17783 <div id="rock">HTML rocks</div>
17787 div with unquoted attribute
17789 <div id=rock>HTML rocks</div>
17791 <div id="rock">HTML rocks</div>
17795 div with illegal double attributes
17797 <div id="a" id="b">HTML rocks</div>
17799 <div id="b">HTML rocks</div>
17803 div with empty attribute value, space before equals
17805 parsoid=wt2html,html2html
17807 <div class =>HTML rocks</div>
17809 <div class="">HTML rocks</div>
17811 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17815 div with multiple empty attribute values
17817 wgFragmentMode=[ 'html5', 'legacy' ]
17819 parsoid=wt2html,html2html
17821 <div id= title=>HTML rocks</div>
17823 <div id="title=">HTML rocks</div>
17825 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17828 # FIXME Parsoid doesn't actually match PHP here.
17830 Extension tag in attribute value
17834 <span title="<html><div>123</div></html>">ok</span>
17836 <p><span title="<div>123</div>">ok</span>
17839 <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>
17843 table with multiple empty attribute values
17845 parsoid=wt2html,html2html
17851 <table title="id=">
17856 <table title="id=">
17857 <tbody><tr><td>hi</td></tr>
17862 div with braces in attribute value
17864 <div title="{}">Foo</div>
17866 <div title="{}">Foo</div>
17868 <div title="{}">Foo</div>
17872 div with empty attribute value, no space before equals
17874 parsoid=wt2html,html2html
17876 <div class=>HTML rocks</div>
17878 <div class="">HTML rocks</div>
17880 <div class="">HTML rocks</div>
17884 HTML multiple attributes correction
17886 <p class="error" class="awesome">Awesome!</p>
17888 <p class="awesome">Awesome!</p>
17892 Table multiple attributes correction
17895 !+ class="error" class="awesome"|status
17900 <th class="awesome">status
17907 <DIV ID="x">HTML ROCKS</DIV>
17909 <div id="x">HTML ROCKS</div>
17913 Non-ASCII pseudo-tags are rendered as text
17922 Pseudo-tag with URL 'name' renders as url link
17924 <http://example.com/>
17926 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17931 text with amp in the middle of nowhere
17935 <p>Remember AT&T?
17940 text with character entity: eacute
17942 I always thought é was a cute letter.
17944 <p>I always thought é was a cute letter.
17949 text with entity-escaped character entity-like string: eacute
17951 I always thought &eacute; was a cute letter.
17953 <p>I always thought &eacute; was a cute letter.
17958 text with undefined character entity: xacute
17960 I always thought &xacute; was a cute letter.
17962 <p>I always thought &xacute; was a cute letter.
17969 <data value="5">five</data>
17970 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17971 <mark>This highlighted text</mark>
17973 <p><data value="5">five</data>
17974 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17975 <mark>This highlighted text</mark>
17980 HTML tag with leading space is parsed as text
17984 <p>< div>foo< /div>
17988 ## FIXME: The untrimmed attribute in Parsoid is T205737
17990 Element with broken attribute syntax
17994 <div style=" style="123">hi</div>
17997 <div style="style=">hi</div>
18000 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
18001 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
18005 ### Nesting tests (see T43545, T52604, T53081)
18008 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
18009 # Note that html2wt is considerably more difficult if we use <b> in
18010 # the test case, instead of <small>
18012 Ensure that HTML adoption agency algorithm is properly implemented.
18014 <small>X<small>Y</small>Z</small>
18016 <p><small>X<small>Y</small>Z</small>
18020 # This was T43545 in the PHP parser.
18024 <kbd>X<kbd>Y</kbd>Z</kbd>
18026 <p><kbd>X<kbd>Y</kbd>Z</kbd>
18030 # The following cases were T53081 in the PHP parser.
18031 # Note that there are some other nestable tags (b, i, etc) which are
18032 # not covered; see T53081 for discussion.
18037 <em>X<em>Y</em>Z</em>
18039 <p><em>X<em>Y</em>Z</em>
18044 Nesting of <strong>
18046 <strong>X<strong>Y</strong>Z</strong>
18048 <p><strong>X<strong>Y</strong>Z</strong>
18057 <p><q>X<q>Y</q>Z</q>
18064 <ruby>X<ruby>Y</ruby>Z</ruby>
18066 <p><ruby>X<ruby>Y</ruby>Z</ruby>
18073 <bdo>X<bdo>Y</bdo>Z</bdo>
18075 <p><bdo>X<bdo>Y</bdo>Z</bdo>
18087 [[Media:Foobar.jpg]]
18088 [[Media:Video.ogv]]
18089 [[:Media:Video.ogv]]
18091 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
18092 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18093 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
18096 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
18097 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv">Media:Video.ogv</a>
18098 <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>
18102 Media link with text
18104 [[Media:Foobar.jpg|A neat file to look at]]
18106 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
18109 <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>
18113 Localized media link
18117 [[Miðill:Foobar.jpg]]
18119 [[Miðill:Foobar.jpg|Icelandic]]
18121 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Miðill:Foobar.jpg</a>
18122 </p><p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Icelandic</a>
18125 <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>
18126 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Icelandic</a></p>
18129 # FIXME: this is still bad HTML tag nesting
18130 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
18131 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
18133 Media link with nasty text
18135 parsoid=wt2html,html2html
18137 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
18139 <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>
18141 <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>
18143 <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>
18147 Media link from missing resource (parsoid-only)
18151 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18153 [[Media:Foobar.jpg|Bat!]]
18157 Media link from missing resource, localized (parsoid-only)
18162 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
18164 [[Miðill:Foobar.jpg|Bat!]]
18167 # This is a sanity test to ensure we don't crash or choke when given
18168 # old cached 1.7.0 HTML for media links; we don't require that the
18169 # result be "valid" because wt2wt was completely broken in 1.7.0
18171 Media link from old 1.7.0 DOM spec (crash test, parsoid-only) T198511
18175 <p>This is what Parsoid would emit (and we still handle this HTML fine):</p>
18176 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18177 <p>But VisualEditor would mangle the rel attribute, and give us back this:</p>
18178 <p><a rel="mw:ExtLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
18179 <p>But at least we don't crash when trying to handle the mangled HTML!</p>
18181 This is what Parsoid would emit (and we still handle this HTML fine):
18183 [[Media:Foobar.jpg|A neat file to look at]]
18185 But VisualEditor would mangle the rel attribute, and give us back this:
18187 [//example.com/images/3/3a/Foobar.jpg A neat file to look at]
18189 But at least we don't crash when trying to handle the mangled HTML!
18193 Media link to nonexistent file (T3702)
18195 [[Media:No such.jpg]]
18196 [[Media:No_such file.jpg]]
18198 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
18199 <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>
18202 <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>
18203 <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>
18207 Image link to nonexistent file (T3850 - good)
18209 [[File:No_such.jpg]]
18211 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
18214 <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="./File:No_such.jpg"><img resource="./File:No_such.jpg" src="./Special:FilePath/No_such.jpg" height="220" width="220"/></a></figure-inline></p>
18218 :Image link to nonexistent file (T3850 - bad)
18220 [[:Image:No such.jpg]]
18222 <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>
18225 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
18229 Character reference normalization in link text (T3938)
18231 [[Main Page|this&that]]
18233 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
18240 Test for unicode normalization
18242 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
18246 (T21451) Links should refer to the normalized form.
18254 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18255 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18256 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18257 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18258 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
18263 Empty attribute crash test (T4067)
18265 <font color="">foo</font>
18267 <p><font color="">foo</font>
18272 Empty attribute crash test single-quotes (T4067)
18274 <font color=''>foo</font>
18276 <p><font color="">foo</font>
18281 Attribute test: equals, then nothing
18283 parsoid=wt2html,html2html
18285 <font color=>foo</font>
18287 <p><font color="">foo</font>
18290 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
18294 Attribute test: unquoted value
18296 parsoid=wt2html,html2html
18298 <font color=x>foo</font>
18300 <p><font color="x">foo</font>
18303 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
18307 Attribute test: unquoted but illegal value (hash)
18309 <font color=#x>foo</font>
18311 <p><font color="#x">foo</font>
18315 # Parsoid does not serialize to empty attribute syntax,
18316 # so wt2wt and html2wt cases are skipped
18318 Attribute test: no value (T54330)
18320 parsoid=wt2html,html2html
18322 <font color>foo</font>
18324 <p><font color="">foo</font>
18327 <p><font color="">foo</font></p>
18331 T4095: link with three closing brackets
18335 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
18338 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
18342 T4095: link with pipe and three closing brackets
18344 [[Main Page|link]]]
18346 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
18349 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
18353 T4095: link with pipe and three closing brackets, version 2
18355 [[Main Page|[http://example.com/]]]
18357 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
18360 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
18369 Template:Dangerous attribute
18371 " onmouseover="alert(document.cookie)
18375 Template:Dangerous style attribute
18377 border-size: expression(alert(document.cookie))
18383 <div style="float: right; {{{1}}}">Magic div</div>
18387 T4304: HTML attribute safety (safe template; regression T4309)
18389 <div title="{{test}}"></div>
18391 <div title="This is a test template"></div>
18393 <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>
18396 # Parsoid has enough context to handle this case
18398 T4304: HTML attribute safety (dangerous template; 2309)
18400 <div title="{{dangerous attribute}}"></div>
18402 <div title=""></div>
18404 <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>
18408 T4304: HTML attribute safety (dangerous style template; 2309)
18410 <div style="{{dangerous style attribute}}"></div>
18412 <div style="/* insecure input */"></div>
18414 <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>
18418 T4304: HTML attribute safety (safe parameter; 2309)
18420 {{div style|width: 200px}}
18422 <div style="float: right; width: 200px">Magic div</div>
18424 <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>
18428 T4304: HTML attribute safety (unsafe parameter; 2309)
18430 {{div style|width: expression(alert(document.cookie))}}
18432 <div style="/* insecure input */">Magic div</div>
18434 <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>
18437 ## Parsoid output here differs; needs investigation.
18439 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
18441 {{div style|"><script>alert(document.cookie)</script>}}
18443 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18446 ## Parsoid output here differs; needs investigation.
18448 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18450 {{div style|" ><script>alert(document.cookie)</script>}}
18452 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18456 T4304: HTML attribute safety (link)
18458 <div title="[[Main Page]]"></div>
18460 <div title="[[Main Page]]"></div>
18462 <div title="[[Main Page]]"></div>
18466 T4304: HTML attribute safety (italics)
18468 <div title="''foobar''"></div>
18470 <div title="''foobar''"></div>
18474 T4304: HTML attribute safety (bold)
18476 <div title="'''foobar'''"></div>
18478 <div title="'''foobar'''"></div>
18482 T4304: HTML attribute safety (ISBN)
18484 <div title="ISBN 1234567890"></div>
18486 <div title="ISBN 1234567890"></div>
18490 T4304: HTML attribute safety (RFC)
18492 <div title="RFC 1234"></div>
18494 <div title="RFC 1234"></div>
18498 T4304: HTML attribute safety (PMID)
18500 <div title="PMID 1234567890"></div>
18502 <div title="PMID 1234567890"></div>
18506 T4304: HTML attribute safety (web link)
18508 <div title="http://example.com/"></div>
18510 <div title="http://example.com/"></div>
18514 T4304: HTML attribute safety (named web link)
18516 <div title="[http://example.com/ link]"></div>
18518 <div title="[http://example.com/ link]"></div>
18520 <div title="[http://example.com/ link]"></div>
18524 T5244: HTML attribute safety (extension; safe)
18526 <div style="<nowiki>background:blue</nowiki>"></div>
18528 <div style="background:blue"></div>
18530 <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>
18534 T5244: HTML attribute safety (extension; unsafe)
18536 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18538 <div style="/* insecure input */"></div>
18540 <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>
18543 # More MSIE fun discovered by Tom Gilder
18546 MSIE CSS safety test: spurious slash
18548 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18550 <div style="/* insecure input */">evil</div>
18552 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18556 MSIE CSS safety test: hex code
18558 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18560 <div style="/* insecure input */">evil</div>
18562 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18566 MSIE CSS safety test: comment in url
18568 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18570 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18572 <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>
18576 MSIE CSS safety test: comment in expression
18578 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18580 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18582 <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>
18586 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18588 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18590 <p style="/* invalid control char */">A</p>
18592 <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>
18596 MSIE 6 CSS safety test: Fullwidth (T57332)
18598 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18599 <div style="top:EXPRESSION(alert())">B</div>
18601 <p style="/* insecure input */">A</p>
18602 <div style="/* insecure input */">B</div>
18604 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18605 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18609 MSIE 6 CSS safety test: IPA extensions (T57332)
18611 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18612 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18614 <div style="/* insecure input */">A</div>
18615 <p style="/* insecure input */">B</p>
18617 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18618 <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>
18622 MSIE 6 CSS safety test: sup/sub script (T57332)
18624 <div style="background-image:url⁽javascript:alert())">A</div>
18625 <div style="background-image:url₍javascript:alert())">B</div>
18626 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18628 <div style="/* insecure input */">A</div>
18629 <div style="/* insecure input */">B</div>
18630 <p style="/* insecure input */">C</p>
18632 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18633 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18634 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18640 parsoid=wt2html,html2html
18643 title="data:text/html,<img src=1 onerror=alert(1)>"
18644 style="-o-link:attr(title);-o-link-source:current">X</div>
18646 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18648 <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>
18652 MSIE 6 CSS safety test: Repetition markers (T57332)
18654 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18655 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18656 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18657 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18658 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18659 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18660 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18662 <p style="/* insecure input */">A</p>
18663 <p style="/* insecure input */">B</p>
18664 <p style="/* insecure input */">C</p>
18665 <p style="/* insecure input */">D</p>
18666 <p style="/* insecure input */">E</p>
18667 <p style="/* insecure input */">F</p>
18668 <p style="/* insecure input */">G</p>
18670 <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>
18671 <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>
18672 <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>
18673 <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>
18674 <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>
18675 <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>
18676 <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>
18680 Table attribute legitimate extension
18683 !+ style="<nowiki>color:blue</nowiki>"|status
18688 <th style="color:blue">status
18693 Table attribute safety
18696 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18701 <th style="/* insecure input */">status
18706 CSS line continuation 1
18708 <div style="background-image: u\ rl(test.jpg);"></div>
18710 <div style="/* insecure input */"></div>
18714 CSS line continuation 2
18716 <div style="background-image: u\ rl(test.jpg); "></div>
18718 <div style="/* invalid control char */"></div>
18728 Expansion of multi-line templates in attribute values (T8255)
18730 <div style="background: {{identity|#00FF00}}">-</div>
18732 <div style="background: #00FF00">-</div>
18736 Expansion of multi-line templates in attribute values (T8255 sanity check)
18738 <div style="background:
18741 <div style="background: #00FF00">-</div>
18743 <div style="background:
18748 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18750 <div style="background: #00FF00">-</div>
18752 <div style="background: #00FF00">-</div>
18756 Tags which are hidden from tidiers cannot pass through the Sanitizer
18758 <mw:toc><script>alert();</script></mw:toc>
18760 <p><mw:toc><script>alert();</script></mw:toc>
18765 ### Parser hooks (see tests/parser/ParserTestParserHook.php for the <tag> extension)
18769 Parser hook: empty input
18779 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18782 ## Don't expect parsoid to rt this form.
18784 Parser hook: empty input using terminated empty elements
18786 parsoid=wt2html,html2html
18796 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
18800 Parser hook: empty input using terminated empty elements (space before)
18810 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
18814 Parser hook: basic input
18824 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18827 ## Don't expect parsoid to rt this form.
18829 Parser hook: case insensitive
18831 parsoid=wt2html,html2html
18841 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18844 ## Don't expect parsoid to rt this form.
18846 Parser hook: case insensitive, redux
18848 parsoid=wt2html,html2html
18858 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18862 Parser hook: nested tags
18866 <tag><tag></tag></tag>
18877 </tag></pre><p></tag></p>
18879 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
18883 Parser hook: basic arguments
18885 <tag width="200" height="100" depth="50" square=""></tag>
18897 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18900 ## Don't expect parsoid to rt this form.
18902 Parser hook: basic arguments, variations
18904 parsoid=wt2html,html2html
18906 <tag width=200 height = "100" depth = '50' square></tag>
18918 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18922 Parser hook: argument containing a forward slash (T7344)
18924 <tag filename="/tmp/bla"></tag>
18929 'filename' => '/tmp/bla',
18933 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18936 ## Don't expect parsoid to rt this form.
18938 Parser hook: empty input using terminated empty elements (T4374)
18940 parsoid=wt2html,html2html
18951 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"}}'></pre><p>text</p>
18954 ## </tag> should be output literally since there is no matching tag that begins it
18955 ## Don't expect parsoid to rt this form.
18957 Parser hook: basic arguments using terminated empty elements (T4374)
18961 <tag width=200 height = "100" depth = '50' square/>
18978 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""}}' about="#mwt2"></pre><p>other stuff
18982 ## Don't expect parsoid to rt this form.
18984 Parser hook: Don't allow unclosed extension tags
18990 this is a '''test'''
18992 <p>test <tag>123
18993 </p><p>this is a <b>test</b>
18996 <p>test <tag>123</p>
18998 <p>this is a <b>test</b></p>
19002 Parser hook: horizontal rule inside extension tag that outputs <pre>
19022 ### (see tests/parser/ParserTestParserHook.php for the <statictag> extension)
19026 Parser hook: static parser hook not inside a comment
19028 <statictag>hello, world</statictag>
19030 <statictag action="flush" />
19036 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' about="#mwt2"></span></p>
19037 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"}}' about="#mwt4">hello, world</span></p>
19041 Parser hook: static parser hook inside a comment
19043 <!-- <statictag>hello, world</statictag> -->
19044 <statictag action="flush" />
19049 <!-- <statictag>hello, world</statictag> -->
19050 <p><span typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about='#mwt2'></span></p>
19053 # Nested template calls; this case was broken by Parser.php rev 1.506,
19057 Template:One-parameter
19059 (My parameter is: {{{1}}})
19063 Template:Map-one-parameter
19065 {{{{{1}}}|{{{2}}}}}
19069 Nested template calls
19071 {{Map-one-parameter|One-parameter|param}}
19073 <p>(My parameter is: param)
19083 Sanitizer: Closing of open tags
19085 <s></s><table></table>
19087 <p><s></s></p><table></table>
19089 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
19093 Sanitizer: Closing of open but not closed tags
19102 Sanitizer: Closing of closed but not open tags
19108 <p class="mw-empty-elt">
19113 Sanitizer: Closing of closed but not open table tags
19117 Table not started</td></tr></table>
19119 <p>Table not started</p>
19123 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
19125 title=[[Main Page]]
19127 wgFragmentMode=[ 'html5', 'legacy' ]
19129 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19131 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
19134 <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>
19138 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
19140 wgFragmentMode=[ 'legacy' ]
19142 <span id="æ: v">byte</span>[[#æ: v|backlink]]
19144 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
19148 # In HTML5, the restrictions are that id must contain at least one character,
19149 # and must not contain any space characters.
19151 Sanitizer: Validating the contents of the id attribute (T6515)
19155 <br id="" /><br id="a space" />
19160 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
19162 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
19166 <br id="foo" /><br id="foo" />
19168 Something need to be done. foo-2 ?
19172 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
19175 <meta itemprop="hello" content="world">
19176 <meta http-equiv="refresh" content="5">
19177 <meta itemprop="hello" http-equiv="refresh" content="5">
19178 <link itemprop="hello" href="{{SERVER}}">
19179 <link rel="stylesheet" href="{{SERVER}}">
19180 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
19184 <p> <meta itemprop="hello" content="world" />
19185 <meta http-equiv="refresh" content="5">
19186 <meta itemprop="hello" content="5" />
19187 <link itemprop="hello" href="http://example.org" />
19188 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
19189 <link itemprop="hello" href="http://example.org" />
19195 Sanitizer: Strip comments from CSS attributes
19197 parsoid=wt2html,wt2wt
19199 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
19201 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
19204 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
19208 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
19210 [[meatball:Soft"Security]]
19212 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
19215 <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>
19219 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
19221 [[meatball:Foo<Bar]]
19222 [[meatball:Foo>Bar]]
19223 [[meatball:Foo<bar]]
19224 [[meatball:Foo>bar]]
19226 <p>[[meatball:Foo<Bar]]
19227 [[meatball:Foo>Bar]]
19228 [[meatball:Foo<bar]]
19229 [[meatball:Foo>bar]]
19232 <p>[[meatball:Foo<Bar]]
19233 [[meatball:Foo>Bar]]
19234 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
19235 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
19239 Language converter: output gets cut off unexpectedly (T7757)
19243 this bit is safe: }-
19245 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
19247 then we get cut off here: }-
19249 all additional text is vanished
19251 <p>this bit is safe: }-
19252 </p><p>but if we add a conversion instance: xxx
19253 </p><p>then we get cut off here: }-
19254 </p><p>all additional text is vanished
19257 <p>this bit is safe: }-</p>
19258 <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>
19259 <p>then we get cut off here: }-</p>
19260 <p>all additional text is vanished</p>
19264 Language converter glossary rules inside attributes (T119158)
19266 language=sr variant=sr-el
19268 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
19270 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
19273 </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>
19276 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
19278 <p><figure-inline class="mw-default-size" typeof="mw:Image"><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":{"alt":"foAjrjvi","resource":"./Датотека:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=-{}-foAjrjvi-{}-","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
19282 Self closed html pairs (T7487)
19284 <center><font id="bug" />Centered text</center>
19285 <div><font id="bug2" />In div text</div>
19287 <center><font id="bug"></font>Centered text</center>
19288 <div><font id="bug2"></font>In div text</div>
19292 Punctuation: nbsp before exclamation
19296 <p>C'est grave !
19301 Punctuation: CSS !important (T13874)
19303 <div style="width:50% !important">important</div>
19305 <div style="width:50% !important">important</div>
19309 Punctuation: CSS ! important (T13874; with space after)
19311 <div style="width:50% ! important">important</div>
19313 <div style="width:50% ! important">important</div>
19317 HTML bullet list, closed tags (T7497)
19329 <ul data-parsoid='{"stx":"html"}'>
19330 <li data-parsoid='{"stx":"html"}'>One</li>
19331 <li data-parsoid='{"stx":"html"}'>Two</li>
19336 HTML bullet list, unclosed tags (T7497)
19348 <ul data-parsoid='{"stx":"html"}'>
19349 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19350 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19355 HTML ordered list, closed tags (T7497)
19367 <ol data-parsoid='{"stx":"html"}'>
19368 <li data-parsoid='{"stx":"html"}'>One</li>
19369 <li data-parsoid='{"stx":"html"}'>Two</li>
19374 HTML ordered list, unclosed tags (T7497)
19387 <ol data-parsoid='{"stx":"html"}'>
19388 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19389 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19394 HTML nested bullet list, closed tags (T7497)
19416 <ul data-parsoid='{"stx":"html"}'>
19417 <li data-parsoid='{"stx":"html"}'>One</li>
19418 <li data-parsoid='{"stx":"html"}'>Two:
19419 <ul data-parsoid='{"stx":"html"}'>
19420 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19421 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19428 HTML nested bullet list, open tags (T7497)
19450 HTML nested ordered list, closed tags (T7497)
19474 HTML nested ordered list, open tags (T7497)
19509 HTML ordered list item with parameters oddity
19511 <ol><li id="fragment">One</li>
19514 <ol><li id="fragment">One</li>
19518 # parsoid doesn't explicitly mark autonumbered links, see T55505
19520 T7918: autonumbering
19522 [http://first/] [http://second] [ftp://ftp]
19526 [mailto:enclosed@mail.tld With target]
19528 [mailto:enclosed@mail.tld]
19530 mailto:inline@mail.tld
19532 <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>
19533 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19534 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19535 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19536 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19539 <p><a rel="mw:ExtLink" class="external autonumber" href="http://first/"></a> <a rel="mw:ExtLink" class="external autonumber" href="http://second"></a> <a rel="mw:ExtLink" class="external autonumber" href="ftp://ftp"></a></p>
19540 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19541 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19542 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19543 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19548 # Security and HTML correctness
19549 # From Nick Jenkins' fuzz testing
19553 Fuzz testing: Parser13
19566 # Note that Parsoid output differs from the PHP parser here: the PHP
19567 # parser breaks the URL for the magic word, while in Parsoid the URL
19568 # production takes precedence.
19570 Fuzz testing: Parser14
19575 <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>
19576 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>
19578 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19583 <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>
19584 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>
19586 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19590 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19591 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19595 Fuzz testing: Parser14-table
19597 parsoid=wt2html,html2html
19602 <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>
19603 <table style="__TOC__">
19607 <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>
19608 <table style="__TOC__">
19609 <tbody><tr><td></td></tr>
19613 <table style="__TOC__"></table>
19616 # Known to produce bogus xml (extra </td>)
19617 # Don't add the html/php section since it generates broken HTML
19619 Fuzz testing: Parser16
19636 Fuzz testing: Parser21
19639 !irc://{{ftp://a" onmouseover="alert('hello world');"
19644 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19653 Fuzz testing: Parser22
19655 http://===r:::https://b
19659 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19666 ## Remex doesn't account for fostered content.
19667 ## Known to produce bad XML for now
19669 Fuzz testing: Parser24
19676 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19677 <br style="onmouseover='alert(document.cookie);' " />
19679 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19684 <u class="|">}}}} >
19685 <br style="onmouseover='alert(document.cookie);'" />
19687 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19696 <u class="|">}}}} >
19697 <br style="onmouseover='alert(document.cookie);'" />
19699 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19700 </u><table><tbody><tr>
19706 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
19708 <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>"}'/>}}}} >
19709 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
19711 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
19712 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
19715 # Note: the current result listed for this is not what the original one was,
19716 # but the original bug was JavaScript injection, which is fixed in any case.
19717 # It's not clear that the original result listed was any more correct than the
19718 # current one. Original result:
19721 # <li class="||">
19722 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19724 Fuzz testing: Parser25 (T8055)
19730 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19732 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19735 <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"]}'>
19736 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19740 Fuzz testing: URL adjacent extension (with space, clean)
19742 http://example.com <nowiki>junk</nowiki>
19744 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19747 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
19751 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19753 http://example.com<nowiki>junk</nowiki>
19755 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19758 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
19762 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19764 http://example.com<pre>junk</pre>
19766 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19768 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19770 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"junk"}}'>junk</pre>
19774 Fuzz testing: image with bogus manual thumbnail
19776 [[Image:foobar.jpg|thumbnail= ]]
19778 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19780 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' data-mw='{"errors":[{"key":"apierror-invalidtitle","message":"Invalid thumbnail title.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"Image:foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/Foobar.jpg" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
19783 # Parsoid will emit the newline literally in wt2wt; see next test case.
19785 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19789 <pre dir=" "></pre>
19791 <pre dir=" "></pre>
19794 " typeof="mw:Extension/pre" about="#mwt2"data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19798 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19802 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19803 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19812 Templates in extension attributes are not expanded
19814 <pre dir="{{echo|ltr}}"></pre>
19816 <pre dir="{{echo|ltr}}"></pre>
19818 <pre dir="{{echo|ltr}}" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19822 Parsing optional HTML elements (T8171)
19827 <td> Some tabular data</td>
19828 <td> More tabular data ...
19829 <td> And yet som tabular data</td>
19835 <td> Some tabular data</td>
19836 <td> More tabular data ...
19837 </td><td> And yet som tabular data</td>
19843 Correct handling of <td>, <tr> (T8171)
19848 <td> Some tabular data</td>
19849 <td> More tabular data ...</td>
19850 <td> And yet som tabular data</td>
19856 <td> Some tabular data</td>
19857 <td> More tabular data ...</td>
19858 <td> And yet som tabular data</td>
19865 Parsing crashing regression (fr:JavaScript)
19869 <p></body></x>
19874 Inline wiki vs wiki block nesting
19880 <p><b>Bold paragraph</b>
19881 </p><p>New wiki paragraph
19885 # FIXME: The current php output is documented
19886 # and desired output is the parsoid target.
19888 Inline HTML vs wiki block nesting
19894 <p><b>Bold paragraph
19895 </p><p>New wiki paragraph</b>
19898 <p><b>Bold paragraph
19899 </b></p><p><b>New wiki paragraph
19902 <p><b>Bold paragraph</b>
19903 </p><p>New wiki paragraph
19907 # Original result was this:
19908 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19910 # While that might be marginally more intuitive, maybe, the six-apostrophe
19911 # construct is clearly pathological and the result stated here (which is what
19912 # the parser actually does) is about as reasonable as anything.
19914 Mixing markup for italics and bold
19917 '''bold''''''bold''bolditalics'''''
19919 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19927 Article for special page transclusion test
19931 Special page transclusion
19934 {{Special:Prefixindex/Xyzzyx}}
19936 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19941 Special page transclusion twice (T7021)
19944 {{Special:Prefixindex/Xyzzyx}}
19945 {{Special:Prefixindex/Xyzzyx}}
19947 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19949 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19954 Transclusion of default MediaWiki message
19956 {{MediaWiki:Mainpage}}
19963 Transclusion of nonexistent MediaWiki message
19965 {{MediaWiki:Mainpagexxx}}
19967 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19972 Transclusion of MediaWiki message with underscore
19974 {{MediaWiki:history_short}}
19981 Transclusion of MediaWiki message with space
19983 {{MediaWiki:history short}}
19990 Invalid header with following text
20000 Section extraction test (section 0)
20020 Section extraction test (section 1)
20042 Section extraction test (section 2)
20063 Section extraction test (section 3)
20083 Section extraction test (section 4)
20107 Section extraction test (section 5)
20127 Section extraction test (section 6)
20148 Section extraction test (section 7)
20168 Section extraction test (section 8)
20188 Section extraction test (section 9)
20209 Section extraction test (section 10)
20229 Section extraction test (nonexistent section 11)
20248 Section extraction test with bogus heading (section 1)
20253 ==bogus== not a legal section
20257 ==bogus== not a legal section
20261 Section extraction test with bogus heading (section 2)
20266 ==bogus== not a legal section
20273 Section extraction test with comment after heading (section 1)
20285 Section extraction test with comment after heading (section 2)
20297 Section extraction test with bogus <nowiki> heading (section 1)
20302 ==bogus== <nowiki>not a legal section</nowiki>
20306 ==bogus== <nowiki>not a legal section</nowiki>
20310 Section extraction test with bogus <nowiki> heading (section 2)
20315 ==bogus== <nowiki>not a legal section</nowiki>
20321 # Formerly testing for T4587, now resolved by the use of unmarked sections
20322 # instead of respecting commented sections
20324 Section extraction prefixed by comment (section 1)
20335 Section extraction prefixed by comment (section 2)
20344 # Formerly testing for T4607, now resolved by the use of unmarked sections
20345 # instead of respecting HTML-style headings
20347 Section extraction, mixed wiki and html (section 1)
20363 Section extraction, mixed wiki and html (section 2)
20379 # Formerly testing for T5342
20381 Section extraction, heading surrounded by <noinclude>
20385 <noinclude>==unmarked==</noinclude>
20391 # Test behavior of T21910
20393 Sectiion with all-equals
20398 The line above must have a trailing space
20401 But just in case it doesn't...
20405 But just in case it doesn't...
20409 Section replacement test (section 0)
20440 Section replacement test (section 1)
20469 Section replacement test (section 2)
20499 Section replacement test (section 3)
20530 Section replacement test (section 4)
20557 Section replacement test (section 5)
20588 Section replacement test (section 6)
20618 Section replacement test (section 7)
20649 Section replacement test (section 8)
20680 Section replacement test (section 9)
20709 Section replacement test (section 10)
20739 Section replacement test with initial whitespace (T15728)
20743 Preformatted initial line
20747 Preformatted initial line
20754 Section extraction, heading followed by pre with 20 spaces (T8398)
20766 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20779 Section extraction, <pre> around bogus header (T12309)
20796 Section replacement, <pre> around bogus header (T12309)
20817 Handling of 
 in URLs
20821 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20823 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&#x0A;a"}}'>irc://%0Aa</a></li></ul>
20827 Handling of %0A in URLs
20831 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20833 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20836 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20838 5 quotes, code coverage +1 line
20845 <p><b><i></i></b></p>
20848 # same html as previous, but wikitext adjusted to match parsoid html2wt
20849 # note that wt2html and html2html will put the <i> before the <b>
20851 5 quotes, code coverage +1 line w/ nowiki (1)
20853 parsoid=wt2wt,html2wt
20855 '''''<nowiki/>'''''
20860 <p><b><i></i></b></p>
20863 # same as previous, just swapping the <i> and <b>
20865 5 quotes, code coverage +1 line w/ nowiki (2)
20867 '''''<nowiki/>'''''
20872 <p><i><b></b></i></p>
20876 Special:Search page linking.
20880 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20885 {{!}} is a magic word
20887 {{!}} is a magic word there and {{!}} is still a magic word here
20888 | is not a magic word here but {{!}} is still a magic word here
20890 <p>| is a magic word there and | is still a magic word here
20891 | is not a magic word here but | is still a magic word here
20894 <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
20895 | 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>
20901 title=[[Parser test]]
20915 *{{SUBJECTPAGENAME}}
20916 *{{SUBJECTPAGENAMEE}}
20919 *{{NAMESPACENUMBER}}
20924 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20926 <ul><li>Parser test</li>
20927 <li>Parser_test</li>
20928 <li>Parser test</li>
20929 <li>Parser_test</li>
20930 <li>Parser test</li>
20931 <li>Parser_test</li>
20932 <li>Parser test</li>
20933 <li>Parser_test</li>
20934 <li>Parser test</li>
20935 <li>Parser_test</li>
20936 <li>Talk:Parser test</li>
20937 <li>Talk:Parser_test</li>
20938 <li>Parser test</li>
20939 <li>Parser_test</li>
20947 <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>
20949 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20952 Gallery with valid attributes
20954 <gallery type="123" summary="345">
20955 File:File:Foobar.jpg
20958 <ul class="gallery mw-gallery-traditional" type="123">
20959 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20960 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20961 <div class="gallerytext">
20966 <ul class="gallery mw-gallery-traditional" type="123" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"type":"123","summary":"345"},"body":{"extsrc":"\nFile:File:Foobar.jpg\n"}}'>
20967 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:File:Foobar.jpg"><img resource="./File:File:Foobar.jpg" src="./Special:FilePath/File:Foobar.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20971 ## Parsoid thinks the "centre" here is a property, not a caption.
20976 "modes": ["wt2html"],
20977 "nativeGallery": true
20985 image4 |300px| centre
20986 image5.svg| http://///////
20991 <ul class="gallery mw-gallery-traditional">
20992 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20993 <div class="thumb" style="height: 150px;">Image1.png</div>
20994 <div class="gallerytext">
20997 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20998 <div class="thumb" style="height: 150px;">Image2.gif</div>
20999 <div class="gallerytext">
21002 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21003 <div class="thumb" style="height: 150px;">Image3</div>
21004 <div class="gallerytext">
21007 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21008 <div class="thumb" style="height: 150px;">Image4</div>
21009 <div class="gallerytext">
21014 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21015 <div class="thumb" style="height: 150px;">Image5.svg</div>
21016 <div class="gallerytext">
21017 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
21021 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21022 <div class="thumb" style="height: 150px;">* image6</div>
21023 <div class="gallerytext">
21028 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21029 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image1.png"><img resource="./File:Image1.png" src="./Special:FilePath/Image1.png" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21030 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image2.gif"><img resource="./File:Image2.gif" src="./Special:FilePath/Image2.gif" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21031 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image3"><img resource="./File:Image3" src="./Special:FilePath/Image3" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21032 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image4"><img resource="./File:Image4" src="./Special:FilePath/Image4" height="300" width="300"/></a></figure-inline></div><div class="gallerytext"></div></li>
21033 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image5.svg"><img resource="./File:Image5.svg" src="./Special:FilePath/Image5.svg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"> <a rel="mw:ExtLink" class="external free" href="http://///////">http://///////</a></div></li>
21034 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:*_image6"><img resource="./File:*_image6" src="./Special:FilePath/*_image6" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21039 Gallery (with options, html)
21042 "modes": ["wt2html", "html2html"],
21043 "nativeGallery": true
21046 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21047 File:Nonexistent.jpg|caption
21048 File:Nonexistent.jpg
21049 image:foobar.jpg|some '''caption''' [[Main Page]]
21051 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21054 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21055 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21056 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21057 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21058 <div class="gallerytext">
21063 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21064 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21065 <div class="gallerytext">
21068 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21069 <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>
21070 <div class="gallerytext">
21071 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21075 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21076 <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>
21077 <div class="gallerytext">
21080 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21081 <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>
21082 <div class="gallerytext">
21089 <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":{}}'>
21090 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21091 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
21092 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
21093 <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>
21094 <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>
21095 <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>
21100 Gallery (with options, extsrc)
21103 "nativeGallery": false
21106 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
21107 File:Nonexistent.jpg|caption
21108 File:Nonexistent.jpg
21109 image:foobar.jpg|some '''caption''' [[Main Page]]
21111 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
21114 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
21115 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
21116 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21117 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21118 <div class="gallerytext">
21123 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21124 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
21125 <div class="gallerytext">
21128 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21129 <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>
21130 <div class="gallerytext">
21131 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21135 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21136 <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>
21137 <div class="gallerytext">
21140 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21141 <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>
21142 <div class="gallerytext">
21149 <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"}}'>
21150 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
21151 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
21152 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
21153 <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>
21154 <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>
21155 <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>
21160 Gallery (without px units)
21162 <gallery widths="70" heights="40">
21166 <ul class="gallery mw-gallery-traditional">
21167 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
21168 <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>
21169 <div class="gallerytext">
21174 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70","heights":"40"},"body":{"extsrc":"\nFile:Foobar.jpg\n"}}'>
21175 <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>
21180 Gallery (with invalid units)
21182 <gallery widths="70em" heights="40em">
21186 <ul class="gallery mw-gallery-traditional">
21187 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21188 <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>
21189 <div class="gallerytext">
21194 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70em","heights":"40em"},"body":{"extsrc":"\nFile:Foobar.jpg\n"}}'>
21195 <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>
21200 Gallery with link that has fragment
21203 "modes": ["wt2html", "html2html"],
21204 "nativeGallery": true
21208 image:foobar.jpg|link=Main_Page
21209 image:foobar.jpg|link=Main_Page#section
21210 image:foobar.jpg|link=Main Page#section|caption
21213 <ul class="gallery mw-gallery-traditional">
21214 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21215 <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>
21216 <div class="gallerytext">
21219 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21220 <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>
21221 <div class="gallerytext">
21224 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21225 <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>
21226 <div class="gallerytext">
21233 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21234 <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>
21235 <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>
21236 <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>
21241 Gallery with template inside caption
21244 "nativeGallery": true
21247 <gallery caption="{{echo|hi}}">
21248 File:Foobar.jpg|{{echo|ho}}
21251 <ul class="gallery mw-gallery-traditional">
21252 <li class='gallerycaption'>hi</li>
21253 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21254 <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>
21255 <div class="gallerytext">
21262 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21263 <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>
21264 <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>
21269 Gallery with wikitext inside gallery caption
21271 <gallery caption="# List item
21273 Text '''bold''' [[link]] {{ns:-1}}
21275 [[File:Foobar.jpg|thumb|File in gallery caption]]">
21276 File:Foobar.jpg|Image caption
21279 <ul class="gallery mw-gallery-traditional">
21280 <li class='gallerycaption'># 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>
21281 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21282 <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>
21283 <div class="gallerytext">
21292 Gallery with wikitext inside caption
21295 "nativeGallery": true
21299 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
21300 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
21303 <ul class="gallery mw-gallery-traditional">
21304 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21305 <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>
21306 <div class="gallerytext">
21307 <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>
21311 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21312 <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>
21313 <div class="gallerytext">
21314 <p>This is a test template
21320 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21321 <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>
21322 <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>
21327 Gallery (with showfilename option)
21330 "nativeGallery": true
21333 <gallery showfilename="">
21334 File:Nonexistent.jpg|caption
21335 File:Nonexistent.jpg
21336 File:Foobar.jpg|some '''caption''' [[Main Page]]
21340 <ul class="gallery mw-gallery-traditional">
21341 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21342 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21343 <div class="gallerytext">
21344 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21349 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21350 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21351 <div class="gallerytext">
21352 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21356 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21357 <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>
21358 <div class="gallerytext">
21359 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21360 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21364 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21365 <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>
21366 <div class="gallerytext">
21367 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21373 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
21374 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></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>
21375 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></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>
21376 <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>
21377 <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>
21381 ## Should Parsoid be preserving these variations? See T151367
21383 Gallery (with namespace-less filenames)
21386 "modes": ["wt2html", "html2html"],
21387 "nativeGallery": true
21391 File:Nonexistent.jpg
21397 <ul class="gallery mw-gallery-traditional">
21398 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21399 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21400 <div class="gallerytext">
21403 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21404 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21405 <div class="gallerytext">
21408 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21409 <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>
21410 <div class="gallerytext">
21413 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21414 <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>
21415 <div class="gallerytext">
21420 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21421 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21422 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
21423 <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>
21424 <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>
21429 Gallery override link with wikilink (T36852)
21432 "nativeGallery": true
21436 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21439 <ul class="gallery mw-gallery-traditional">
21440 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21441 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
21442 <div class="gallerytext">
21447 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21448 <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>
21453 Gallery override link with absolute external link (T36852)
21456 "nativeGallery": true
21460 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21463 <ul class="gallery mw-gallery-traditional">
21464 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21465 <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>
21466 <div class="gallerytext">
21471 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21472 <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>
21477 Gallery override link with absolute external link with LanguageConverter
21482 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21485 <ul class="gallery mw-gallery-traditional">
21486 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21487 <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>
21488 <div class="gallerytext">
21495 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org\n"}}'>
21496 <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>
21501 Gallery override link with malicious javascript (T36852)
21504 "modes": ["wt2html", "html2html"],
21505 "nativeGallery": true
21509 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21512 <ul class="gallery mw-gallery-traditional">
21513 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21514 <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>
21515 <div class="gallerytext">
21520 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21521 <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>
21525 # Note that parsoid uses the invalid link as a caption, PHP does not.
21527 Gallery with invalid title as link (T45964)
21530 "modes": ["wt2html", "html2html"],
21531 "nativeGallery": true
21535 File:Foobar.jpg|link=<
21538 <ul class="gallery mw-gallery-traditional">
21539 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21540 <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>
21541 <div class="gallerytext">
21546 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21547 <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">link=<</div></li>
21552 Serialize gallery without attrs in data-mw
21555 "modes": ["html2wt"],
21556 "nativeGallery": true
21559 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21560 <li class="gallerycaption">123</li>
21561 <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>
21564 <gallery caption="123">
21570 Gallery with class and style attributes
21573 "nativeGallery": true
21576 <gallery class="center" style="text-align: center;">
21580 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21581 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21582 <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>
21583 <div class="gallerytext">
21588 <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":{}}'>
21589 <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>
21594 Gallery in slideshow mode
21597 "nativeGallery": true
21600 <gallery mode="slideshow" showthumbnails="">
21604 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21605 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21606 <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>
21607 <div class="gallerytext">
21612 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21613 <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>
21618 Serialize gallery image captions on a line
21621 "modes": ["html2wt"],
21622 "nativeGallery": true
21625 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21626 <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>
21627 <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>
21631 File:Foobar.jpg| hi ho
21632 File:Foobar.jpg|hi<br />ho
21637 HTML Hex character encoding (spells the word "JavaScript")
21639 parsoid=wt2html,wt2wt,html2html
21641 JavaScript
21643 <p>JavaScript
21646 <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>
21650 HTML Hex character encoding bogus encoding (T28437 regression check)
21654 <p>&#xsee;&#XSEE;
21659 HTML Hex character encoding mixed case
21661 parsoid=wt2html,wt2wt,html2html
21668 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21671 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21672 # Note that U+000C (form feed) is not a valid XML character, so
21673 # it is banned even though allowed in HTML5.
21675 Illegal character references (T106578)
21680 ; Control (low): 
21681 ; Control (high):  Ÿ
21682 ; Surrogate: ��
21683 ; This is an okay astral character: 💩
21691 <dt>Control (low)</dt>
21693 <dt>Control (high)</dt>
21694 <dd>&#x7F; &#x9F;</dd>
21696 <dd>&#xD83D;&#xDCA9;</dd>
21697 <dt>This is an okay astral character</dt>
21698 <dd>💩</dd></dl>
21702 __FORCETOC__ override
21714 ISBN 978-0-1234-56 789
21716 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21719 <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>
21723 ISBN followed by 5 spaces
21734 ISBN ISBN 1234567890
21736 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21739 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21742 # Uppercase X and lowercase x as well
21753 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21754 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21755 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21756 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21757 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21758 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21761 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21762 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21763 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21764 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21765 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21766 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21770 ISBN with empty prefix (parsoid test)
21774 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21777 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21781 T24905: <abbr> followed by ISBN followed by </a>
21783 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21785 <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>
21788 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" class="external text" href="http://www.example.com">example.com</a></p>
21796 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21799 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21803 Double RFC with a wiki link
21807 <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>
21810 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21818 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21821 <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>
21825 Centre-aligned image
21827 [[Image:foobar.jpg|centre]]
21829 <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>
21831 <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></figure>
21837 [[Image:foobar.jpg|none]]
21839 <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>
21841 <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></figure>
21845 Width + Height sized image (using px) (height is ignored)
21847 [[Image:foobar.jpg|640x480px]]
21849 <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>
21852 <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>
21856 Width-sized image (using px, no following whitespace)
21858 [[Image:foobar.jpg|640px]]
21860 <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>
21863 <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>
21867 Width-sized image (using px, with following whitespace - test regression from r39467)
21869 [[Image:foobar.jpg|640px ]]
21871 <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>
21874 <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>
21878 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21880 [[Image:foobar.jpg| 640px]]
21882 <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>
21885 <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>
21889 Image with page parameter
21893 [[File:LoremIpsum.djvu|page=2]]
21895 <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>
21898 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"page","ak":"page=2"}]}' data-mw='{"page":"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>
21902 Another italics / bold test
21910 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21916 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21918 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21921 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21923 Images with the "|" character in the comment
21925 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21927 <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>
21929 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>An <a rel="mw:ExtLink" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx" data-parsoid='{"a":{"href":"http://test/?param1=%7Cleft%7C&param2=%7Cx"},"sa":{"href":"http://test/?param1=|left|&param2=|x"}}'>external</a> URL</figcaption></figure>
21933 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21935 <html><script>alert(1);</script></html>
21937 <p><html><script>alert(1);</script></html>
21942 HTML with raw HTML ($wgRawHtml==true)
21946 <html><script>alert(1);</script></html>
21948 <p><script>alert(1);</script>
21951 <p><script typeof="mw:Extension/html" about="#mwt3" data-mw='{"name":"html","attrs":{},"body":{"extsrc":"<script>alert(1);</script>"}}'>alert(1);</script></p>
21955 Parents of subpages, one level up
21957 subpage title=[[Subpage test/L1/L2/L3]]
21961 <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>
21967 Parents of subpages, one level up, not named
21969 subpage title=[[Subpage test/L1/L2/L3]]
21973 <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>
21980 Parents of subpages, two levels up
21982 subpage title=[[Subpage test/L1/L2/L3]]
21988 <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
21989 </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>
21994 Parents of subpages, two levels up, without trailing slash or name.
21996 subpage title=[[Subpage test/L1/L2/L3]]
22005 Parents of subpages, two levels up, with lots of extra trailing slashes.
22007 subpage title=[[Subpage test/L1/L2/L3]]
22011 <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>
22016 Subpage test/L1/L2/L3Sibling
22022 Transclusion of a sibling page (one level up)
22024 subpage title=[[Subpage test/L1/L2/L3]]
22033 Transclusion of a child page
22035 subpage title=[[Subpage test/L1/L2]]
22043 # This is wt2html only in Parsoid because we add <nowiki>
22044 # because of {{..}} and we don't expect to fix that to
22045 # eliminate the nowikis selective for {{..}} markup.
22047 Non-transclusion because of too many up levels
22049 subpage title=[[Subpage test/L1/L2/L3]]
22052 {{../../../../More than parent}}
22054 <p>{{../../../../More than parent}}
22057 <p>{{../../../../More than parent}}</p>
22061 Definition list code coverage
22074 <dl><dt>title </dt><dd>def</dd>
22075 <dt>title </dt><dd>def</dd>
22076 <dt>title</dt><dd>def</dd></dl>
22080 Don't fall for the self-closing div
22082 <div>hello world</div/>
22084 <div>hello world</div>
22092 <p>[[:Template:Msg]]
22101 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
22105 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
22107 Always escape literal '>' in output, not just after '<'
22121 <p>This is a test template
22122 This is a test template
22134 Inclusion of !userCanEdit() content
22138 <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>
22143 Out-of-order TOC heading levels
22152 <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>
22154 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
22156 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
22157 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
22160 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
22162 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
22163 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
22169 <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>
22170 <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>
22171 <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>
22172 <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>
22173 <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>
22174 <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>
22179 ISBN with a dummy number
22189 ISBN with space-delimited number
22193 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
22196 <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>
22201 ISBN with multiple spaces, no number
22220 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22221 </p><p>ISBN 12345678901
22224 <p>ISBN 123456789</p>
22226 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22228 <p>ISBN 12345678901</p>
22233 ISBN with trailing year (T9110)
22235 ISBN 1-234-56789-0 - 2006
22237 ISBN 1 234 56789 0 - 2006
22239 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
22240 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
22243 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
22245 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
22252 wgFragmentMode=[ 'html5', 'legacy' ]
22254 {{anchorencode:foo bar©#%n}}
22259 <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>
22263 anchorencode (legacy)
22265 wgFragmentMode=[ 'legacy' ]
22267 {{anchorencode:foo bar©#%n}}
22269 <p>foo_bar.C2.A9.23.25n
22274 anchorencode trims spaces
22276 wgFragmentMode=[ 'html5', 'legacy' ]
22278 {{anchorencode: __pretty__please__}}
22283 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
22287 anchorencode deals with links
22289 wgFragmentMode=[ 'html5', 'legacy' ]
22291 {{anchorencode: [[hello|world]] [[hi]]}}
22296 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
22300 anchorencode deals with templates
22302 wgFragmentMode=[ 'html5', 'legacy' ]
22304 {{anchorencode: {{Foo}} x}}
22309 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
22313 anchorencode encodes like the TOC generator: (T20431)
22315 wgFragmentMode=[ 'html5', 'legacy' ]
22317 ===_ +:.3A%3A _ &&]] x===
22318 {{anchorencode: _ +:.3A%3A _ &&]] x}}
22321 <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>
22322 <p>+:.3A%3A_&&]]_x
22325 <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>
22326 <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>
22327 <meta property="mw:PageProp/noeditsection"/>
22331 anchorencode encodes like the TOC generator: (T20431) (legacy)
22333 wgFragmentMode=[ 'legacy' ]
22335 ===_ +:.3A%3A&&]]===
22336 {{anchorencode: _ +:.3A%3A&&]] }}
22339 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
22340 <p>.2B:.3A.253A.26.26.5D.5D
22345 T8200: blockquotes and paragraph formatting
22366 T10293: Use of center tag ruins paragraph formatting
22387 Parsing of overlapping (improperly nested) inline html tags
22389 <span><s>x</span></s>
22391 <p><span><s>x</span></s></span>
22394 <p><span><s>x</s></span>
22399 ### Language variants related tests
22402 # Parsoid does not mark self-links.
22403 # Parsoid does not convert links; PHP will do any necessary redirects.
22406 Self-link in language variants
22408 title=[[Dunav]] language=sr
22410 Both [[Dunav]] and [[Дунав]] are names for this river.
22412 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22415 <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>
22425 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22427 title=[[Duna]] language=sr
22429 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22431 <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.
22434 <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>
22438 Link to a section of a variant of this title shouldn't be parsed as self-link
22440 title=[[Duna]] language=sr
22442 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22444 <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.
22447 <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>
22451 Link to pages in language variants
22455 Main Page can be written as [[Маин Паге]]
22457 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22460 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22465 Multiple links to pages in language variants
22469 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22471 <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>.
22474 <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>
22479 Simple template in language variants
22485 <p>This is a test template
22491 Template with explicit namespace in language variants
22497 <p>This is a test template
22503 Basic test for template parameter in language variants
22507 {{парамтест|param=foo}}
22509 <p>This is a test template with parameter foo
22514 Simple category in language variants
22518 [[Category:МедиаWики Усер'с Гуиде]]
22520 cat=МедиаWики_Усер'с_Гуиде sort=
22522 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22537 ## We used to, but no longer wt2wt this test since the default serializer
22538 ## will normalize all categories to serialize on their own line.
22539 ## This wikitext usage is going to be fairly uncommon in production and
22540 ## selser will take care of preserving formatting in those scenarios.
22542 Don't convert blue categorylinks to another variant (T35210)
22548 [[A]][[Category:分类]]
22552 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22553 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22557 Stripping -{}- tags (language variants)
22561 Latin proverb: -{Ne nuntium necare}-
22563 <p>Latin proverb: Ne nuntium necare
22566 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22571 Prevent conversion with -{}- tags (language variants)
22573 language=sr variant=sr-ec
22575 Latinski: -{Ne nuntium necare}-
22577 <p>Латински: Ne nuntium necare
22580 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22585 Prevent conversion of text with -{}- tags (language variants)
22587 language=sr variant=sr-ec
22589 Latinski: -{Ne nuntium necare}-
22591 <p>Латински: Ne nuntium necare
22594 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22599 Prevent conversion of links with -{}- tags (language variants)
22601 language=sr variant=sr-ec
22605 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22608 <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>
22613 -{}- tags within headlines (within html for parserConvert())
22615 wgFragmentMode=[ 'html5', 'legacy' ]
22617 language=sr variant=sr-ec
22621 Note that even an unprotected headline ID is not affected by language
22626 <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>
22627 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22630 <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>
22632 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22634 <p>Note that even an unprotected headline ID is not affected by language
22637 <h2 id="Latinski">Latinski</h2>
22641 Explicit definition of language variant alternatives
22643 language=zh variant=zh-tw
22645 -{zh:China;zh-tw:Taiwan}-, not China
22647 <p>Taiwan, not China
22650 <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>
22654 Explicit definition of language variant alternatives (BCP 47 codes)
22656 language=zh variant=zh-tw
22658 -{zh:China;zh-Hant-TW:Taiwan}-, not China
22660 <p>Taiwan, not China
22663 <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>
22667 Filter syntax for language variants
22669 language=zh variant=zh-tw
22671 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22673 <p>fooblog, WEBJOURNAL, WEBLOGquux
22676 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22679 # Note that Parsoid post-processing for language variants needs to
22680 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22682 Conversion around HTML tags
22684 language=sr variant=sr-ec
22686 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22687 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22690 <span title="ЛаCтин">ски</span>
22693 <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"}]}'/>
22694 <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>
22698 Explicit session-wise two-way language variant mapping (A flag and - flag)
22700 language=zh variant=zh-tw
22702 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22704 Taiwan is not China.
22706 But -{A|zh:China; zh-tw:Taiwan}- is China,
22708 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22710 and -{China}- is China.
22712 <p>This is Taiwan, but we'll forget that now.
22713 </p><p>Taiwan is not China.
22714 </p><p>But Taiwan is Taiwan,
22715 </p><p>(This should be stripped!)
22716 </p><p>and China is China.
22719 <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>
22720 <p>Taiwan is not China.</p>
22721 <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>
22722 <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>
22723 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22727 Explicit session-wise one-way language variant mapping (A flag and - flag)
22729 language=zh variant=zh-tw
22731 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22733 COUNTRY is China or Taiwan.
22735 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22737 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22739 and -{COUNTRY}- is COUNTRY.
22741 <p>This is Taiwan, but we'll forget that now.
22742 </p><p>COUNTRY is China or Taiwan.
22743 </p><p>But Taiwan is Taiwan,
22744 </p><p>(This should be stripped!)
22745 </p><p>and COUNTRY is COUNTRY.
22748 <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>
22749 <p>COUNTRY is China or Taiwan.</p>
22750 <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>
22751 <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>
22752 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22756 Explicit session-wise two-way language variant mapping (H flag for hide)
22758 language=zh variant=zh-tw
22760 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22764 <p>(This should be stripped!)
22765 </p><p>Taiwan is Taiwan.
22768 <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>
22769 <p>Taiwan is China.</p>
22773 Explicit session-wise one-way language variant mapping (H flag for hide)
22775 language=zh variant=zh-tw
22777 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22779 COUNTRY is Taiwan or China.
22781 <p>(This should be stripped!)
22782 </p><p>Taiwan is Taiwan or China.
22785 <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>
22786 <p>COUNTRY is Taiwan or China.</p>
22789 ## Note that parsoid test runner does not support 'showtitle' option.
22791 Adding explicit conversion rule for title (T flag)
22793 language=zh variant=zh-tw showtitle
22795 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22800 <p>Should be stripped!
22801 </p><p>Taiwan is China.
22804 <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>
22805 <p>Taiwan is China.</p>
22809 Code coverage: T combined with H flag
22811 language=zh variant=zh-tw showtitle
22813 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22818 <p>Should be stripped!
22819 </p><p>Taiwan is Taiwan.
22822 <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>
22823 <p>Taiwan is China.</p>
22827 Code coverage: T with no variants
22829 language=zh variant=zh-tw showtitle
22831 -{H|zh:China; zh-tw:Taiwan}-
22832 Taiwan is China.-{T|Taiwan is China}-
22839 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22840 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22844 Code coverage: rules with no variants
22846 language=zh variant=zh-tw
22848 -{H|zh:China; zh-tw:Taiwan}-
22859 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22861 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22862 Taiwan is China.</p>
22867 Code coverage: D flag for conversion rule
22869 language=zh variant=zh-tw
22871 -{D|zh-cn:XA; zh-tw:YA}-
22872 -{A;D|zh-cn:XB; zh-tw:YB}-
22873 -{D;H|zh-cn:XC; zh-tw:YC}-
22875 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22881 XA XB XC YA YB YC FOO BAR BAT 012345
22886 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22890 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22893 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22894 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22895 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22896 <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>
22897 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22898 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22899 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22900 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22904 Code coverage: N flag for conversion rule
22906 language=zh variant=zh-cn
22916 </p><p>српски (ћирилица)
22919 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22920 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22921 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22924 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22926 Code coverage: N flag for conversion rule (wt2html only)
22928 language=zh variant=zh-cn
22929 parsoid=wt2html,html2html
22936 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22940 Testing that changing the language variant here in the tests actually works
22942 language=zh variant=zh showtitle
22944 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22947 <p>Should be stripped!
22950 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22954 Recursive conversion of alt and title attrs shouldn't clear converter state
22956 language=zh variant=zh-cn
22959 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22960 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22964 Should be stripped<span title="Exclamation">!</span>
22967 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22968 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>
22972 T26072: more test on conversion rule for title
22974 language=zh variant=zh-tw showtitle
22976 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22978 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22981 <p>This should be stripped!
22982 </p><p>This won't take interferes with the title rule.
22985 <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>
22986 <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>
22990 Partly disable title conversion if variant == main language code
22992 language=zh variant=zh title=[[ZH]] showtitle
22994 -{T|zh-cn:CN;zh-tw:TW}-
23000 <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>
23004 Partly disable title conversion if variant == main language code, more
23006 language=zh variant=zh title=[[ZH]] showtitle
23014 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
23018 Raw output of variant escape tags (R flag)
23020 language=zh variant=zh-tw
23022 Raw: -{R|zh:China;zh-tw:Taiwan}-
23024 <p>Raw: zh:China;zh-tw:Taiwan
23027 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
23030 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
23032 Raw output of variant escape tags (R flag) (wt2html only)
23034 language=zh variant=zh-tw
23035 parsoid=wt2html,html2html
23037 -{Variant}- -{D|syntax}- -{D;R|options}-
23039 <p>Variant syntax options
23042 <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>
23046 Nested markup inside raw output of variant escape tags (R flag)
23048 language=zh variant=zh-tw
23050 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
23052 <p>Nested raw: nested Taiwan nested
23055 <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>
23059 Nested markup and spaces inside raw output of variant escape tags (R flag)
23061 language=zh variant=zh-tw
23063 X-{ outer -{ inner }- outer }-X
23065 <p>X outer inner outer X
23068 <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>
23072 Templates inside raw output of variant escape tags (R flag)
23074 language=zh variant=zh-tw
23076 Nested raw: -{R|nested {{echo|hi}} templates}-
23078 <p>Nested raw: nested hi templates
23081 <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>
23085 Strings evaluating false shouldn't be ignored by Language converter (T51072)
23087 language=zh variant=zh-cn
23089 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
23094 <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>
23098 Conversion rules from [numeric-only string] to [something else] (T48634)
23100 language=zh variant=zh-cn
23102 -{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
23107 <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>
23111 Two-way converter rule entries with an empty value should be ignored (T53551)
23113 language=zh variant=zh-cn
23115 -{H|zh-cn:foo;zh-tw:;}-foobar
23120 <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>
23124 One-way converter rule entries with an empty "from" string should be ignored (T53551)
23126 language=zh variant=zh-cn
23128 -{H|=>zh-cn:foo;}-foobar
23133 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
23137 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
23139 language=zh variant=zh-cn
23146 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
23150 Nested using of manual convert syntax
23152 language=zh variant=zh-hk
23154 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
23156 <p>Nested: Hello Hong Kong!
23159 <p>Nested: <span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[7]}' data-mw-variant='{"twoway":[{"l":"zh-hans","t":"Hi <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh-cn\",\"t\":\"China\"},{\"l\":\"zh-sg\",\"t\":\"Singapore\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[7],\"dsr\":[21,53,null,2]}'></span>"},{"l":"zh-hant","t":"Hello <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh-tw\",\"t\":\"Taiwan\"},{\"l\":\"zh-hk\",\"t\":\"H&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"ong\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[90,97,null,2]}&apos;>&lt;/span> K&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[99,103,null,2]}&apos;>&lt;/span>ong\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[7],\"dsr\":[68,109,null,2]}'></span>"}]}'></span>!</p>
23163 HTML markups with conversion syntax in attribs, nested in other conversion blocks
23165 language=zh variant=zh-cn
23167 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
23169 <p><span title="X">A</span>
23172 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"<span title=\"\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"title\":\"\"},\"sa\":{\"title\":\"-{X}-\"},\"dsr\":[21,49,20,7]}' data-mw='{\"attribs\":[[{\"txt\":\"title\"},{\"html\":\"&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[34,39,null,2]}&apos;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
23176 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
23178 language=zh variant=zh-cn
23180 -{<span title="-{X}-">A</span>}-
23181 !! html/php+disabled
23182 <p><span title="X">A</span>
23185 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span title=\"\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"title\":\"\"},\"sa\":{\"title\":\"-{X}-\"},\"dsr\":[2,30,20,7]}' data-mw='{\"attribs\":[[{\"txt\":\"title\"},{\"html\":\"&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[15,20,null,2]}&apos;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
23188 # Parsoid and PHP disagree on how to parse this example: Parsoid
23189 # insists that the content of a language converter element be a valid
23190 # DOM fragment or attribute string
23192 Language converter markup with block content
23194 language=zh variant=zh-cn
23196 <span>a-{b<div>c}-d
23198 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
23200 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
23204 <span>ad</span></div></span></div></span>
23206 <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
23208 <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
23210 <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>
23214 LanguageConverter selser (1)
23216 language=zh variant=zh-cn
23218 "modes": ["wt2wt", "selser"],
23220 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23230 LanguageConverter selser (2)
23232 language=zh variant=zh-cn
23234 "modes": ["wt2wt", "selser"],
23236 ["span[class='x']", "contents", "text", "-{foo}-"],
23237 ["a", "contents", "text", "-{"],
23238 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
23242 <span class="x">TEXT1</span>
23243 [http://example.com TEXT2]
23247 <span class="x"><nowiki>-{foo}-</nowiki></span>
23248 [http://example.com -{]
23249 [[Foo|<nowiki>-{</nowiki>]]
23250 {{1x|<nowiki>-{</nowiki>}}
23253 # Tests LanguageVariantText in ConstrainedText
23255 LanguageConverter selser (3)
23257 language=zh variant=zh-cn
23259 "modes": ["wt2wt", "selser"],
23261 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
23262 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23273 |<nowiki/>-{edited}-
23277 # Tests LanguageVariantText._fromSelSer
23279 LanguageConverter selser (4)
23281 language=zh variant=zh-cn
23283 "modes": ["wt2wt", "selser"],
23285 ["td > span.x", "remove"]
23291 |<span class="x">Foo</span>-{Bar}-
23292 ||<span class="x">Foo</span>-{Bar}-
23302 # Since Parsoid is starting to emit canonical wikitext for links,
23303 # [http://example.com http://example.com] will not RT back to that
23305 # Parsoid does not language-convert links (it is done in a
23306 # post-processing step)
23308 Proper conversion of text in external links
23310 language=sr variant=sr-ec
23313 http://www.google.com
23314 gopher://www.google.com
23315 [http://www.google.com http://www.google.com]
23316 [gopher://www.google.com gopher://www.google.com]
23317 [https://www.google.com irc://www.google.com]
23318 [ftp://www.google.com www.google.com/ftp://dir]
23319 [//www.google.com www.google.com]
23321 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
23322 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23323 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
23324 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23325 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
23326 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
23327 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
23330 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
23331 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23332 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
23333 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23334 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
23335 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
23336 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
23340 Do not convert roman numbers to language variants
23342 language=sr variant=sr-ec
23346 <p>Фридрих IV је цар.
23349 <p>Fridrih IV je car.</p>
23353 Unclosed language converter markup "-{"
23364 Don't convert raw rule "-{R|=>}-" to "=>"
23373 <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>
23377 Don't break link parsing if language converter markup is in the caption.
23379 language=sr variant=sr-ec
23381 [[Main Page|-{R|main page}-]]
23383 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23386 <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>
23390 T146304: Don't break template parsing if language converter markup is in the parameter.
23392 language=sr variant=sr-ec
23399 <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>
23403 T146305: Don't break image parsing if language converter markup is in the caption.
23407 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23409 <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>
23411 <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>
23415 T146305: Don't break image parsing if nested language converter markup is in the caption.
23417 language=zh variant=zh-cn
23419 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23421 <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>
23423 <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>
23426 # XXX html2wt disabled because rich markup in alt is not preserved.
23428 Don't break gallery if language converter markup is inside.
23433 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23434 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23437 <ul class="gallery mw-gallery-traditional">
23438 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23439 <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>
23440 <div class="gallerytext">
23441 <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>
23445 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23446 <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>
23447 <div class="gallerytext">
23448 <p>This is a test template
23454 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-\nFile:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt\n"}}'>
23455 <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="" 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":"<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>
23456 <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":"-{R|param}-"}},"i":0}}]}'>This is a test template</span></div></li>
23461 T153135: Don't break list handling if language converter markup is in the item.
23463 language=zh variant=zh-cn
23465 ;-{zh-cn:AAA;zh-tw:BBB}-
23469 <dt>foo:bar</dt></dl>
23471 <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>
23472 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23476 // Note that parsoid does not protect colons unless language converter
23477 // markup is properly nested, because it is a backtracking parser.
23479 T153135: Unclosed markup in definition list (code coverage)
23481 language=zh variant=zh-cn
23486 <dl><dt><b>foo:bar</b></dt><b>
23487 <dt>-{zh-cn:AAA</dt></b></dl>
23489 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23490 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23494 T153135: Nested language converter markup in definition list (code coverage)
23496 language=zh variant=zh-cn
23498 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23500 <dl><dt>AAA foo:bar bat:baz</dt>
23503 <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>
23504 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23508 # html2wt mode disabled due to <nowiki> insertion.
23510 T153140: Don't break table handling if language converter markup is in the cell.
23512 language=sr variant=sr-ec
23513 parsoid=wt2html,wt2wt,html2html
23529 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23536 Language converter tricky html2wt cases (1)
23539 parsoid=html2wt,wt2wt
23541 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23543 -{<nowiki>}-</nowiki>}-
23550 Language converter tricky html2wt cases (2)
23553 parsoid=html2wt,wt2wt
23557 <nowiki>-{foo}-</nowiki>
23559 <p>-{foo}-
23564 Language converter tricky html2wt cases (3)
23567 parsoid=html2wt,wt2wt
23569 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23570 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23571 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23577 -{<nowiki>-{foo}-</nowiki>}-
23581 </p><p>-{foo}-
23586 Language converter tricky html2wt cases (4)
23589 parsoid=html2wt,wt2wt
23591 <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>
23599 # Note that the <nowiki> escaping added by parsoid for source text,
23600 # destination text, and language names only works on the PHP side
23601 # for *destination text*. (HTML entity escaping wouldn't work
23602 # any better.) This is probably a bug, at least for source texts.
23603 # (For language names PHP uses a precise regexp based on the languages
23604 # it currently knows have variants, which is fragile since this set
23605 # can grow/shrink over time.)
23607 Language converter tricky html2wt cases (5)
23609 language=zh variant=zh-cn
23611 <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>
23612 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23613 <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>
23614 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23617 -{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
23619 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23621 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23623 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23626 !! html/php+disabled
23627 <p>foobat;xyz=>zh-cn:abc
23631 </p><p>a:b=>c 0;zh-tw:bar
23636 T179579: Nowiki and lc interaction
23643 -{123<nowiki>|</nowiki>456}-
23645 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23647 <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>
23651 T2529: Uncovered bullet
23660 T2529: Uncovered bullet in a deeply nested list
23662 *******Foo {{bullet}}
23664 <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>
23669 T2529: Uncovered table already at line-start
23692 T2529: Uncovered bullet in parser function result
23694 *Foo {{lc:{{bullet}} }}
23701 T7678: Double-parsed template argument
23703 {{lc:{{{1}}}|hello}}
23710 T7678: Double-parsed template invocation
23712 {{lc:{{paramtest {{!}} param = hello }} }}
23714 <p>{{paramtest | param = hello }}
23719 Case insensitivity of parser functions for non-ASCII characters (T10143)
23722 title=[[Main Page]]
23724 {{PRVNÍVELKÉ:ěščř}}
23725 {{prvnívelké:ěščř}}
23745 Morwen/13: Unclosed link followed by heading
23752 <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>
23756 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23763 <h1><span class="mw-headline" id="heading">heading</span></h1>
23767 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23774 <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>
23788 Paragraphs inside divs (no extra line breaks)
23799 Paragraphs inside divs (extra line break on open)
23813 Paragraphs inside divs (extra line break on close)
23827 Paragraphs inside divs (extra line break on open and close)
23842 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23844 Nesting tags, paragraphs on lines which begin with <div>
23846 <div></div><strong>A
23849 <div></div><p><strong>A
23850 </strong></p><strong></strong><p><strong>B</strong>
23853 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
23854 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
23857 # T8200: <blockquote> should behave like <div> with respect to line breaks
23859 T8200: paragraphs inside blockquotes (no extra line breaks)
23861 <blockquote>Line one
23863 Line two</blockquote>
23865 <blockquote>Line one
23866 Line two</blockquote>
23868 <blockquote><p>Line one
23869 Line two</p></blockquote>
23873 T8200: paragraphs inside blockquotes (extra line break on open)
23878 Line two</blockquote>
23883 Line two</blockquote>
23888 Line two</p></blockquote>
23892 T8200: paragraphs inside blockquotes (extra line break on close)
23894 <blockquote>Line one
23899 <blockquote>Line one
23904 <blockquote><p>Line one
23911 T8200: paragraphs inside blockquotes (extra line break on open and close)
23926 ## This is a corner case interaction between the paragraph wrapping in the
23927 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
23928 ## some tags which close paragraphs (and thus prevent wrapping on their line),
23929 ## of which "div" is one, but do p-wrapping inside them. These are referred
23930 ## to as "never suppressing". Remex, for its part, doesn't traverse into
23931 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
23933 Paragraphs inside blockquotes/divs (no extra line breaks)
23935 <blockquote><div>Line one
23937 Line two</div></blockquote>
23939 <blockquote><div>Line one
23940 Line two</div></blockquote>
23944 Paragraphs inside blockquotes/divs (extra line break on open)
23949 Line two</div></blockquote>
23954 Line two</div></blockquote>
23958 Paragraphs inside blockquotes/divs (extra line break on close)
23960 <blockquote><div>Line one
23963 </div></blockquote>
23965 <blockquote><div>Line one
23968 </div></blockquote>
23972 Paragraphs inside blockquotes/divs (extra line break on open and close)
23978 </div></blockquote>
23984 </div></blockquote>
23988 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23990 wgLinkHolderBatchSize=0
23996 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23997 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23998 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
24003 Free external link invading image caption
24005 [[Image:Foobar.jpg|thumb|http://x|hello]]
24007 <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>
24009 <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>
24013 T17196: localised external link numbers
24017 [http://en.wikipedia.org/]
24019 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
24022 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
24026 Multibyte character in padleft
24028 {{padleft:-Hello|7|Æ}}
24033 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
24037 Multibyte character in padright
24039 {{padright:Hello-|7|Æ}}
24044 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
24048 formatdate parser function
24050 {{#formatdate:2009-03-24}}
24052 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
24057 formatdate parser function, with default format
24059 {{#formatdate:2009-03-24|mdy}}
24061 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
24066 Spacing of numbers in formatted dates
24068 {{#formatdate:January 15}}
24070 <p><span class="mw-formatted-date" title="01-15">January 15</span>
24075 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
24077 language=nl title=[[MediaWiki:Common.css]]
24079 {{#formatdate:2009-03-24|dmy}}
24081 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
24094 Edit comment with link
24098 I like the [[Main Page]] a lot
24100 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
24104 Edit comment with link and link text
24108 I like the [[Main Page|best pages]] a lot
24110 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24114 Edit comment with link and link text with suffix
24118 I like the [[Main Page|best page]]s a lot
24120 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
24124 Edit comment with section link (non-local, eg in history list)
24126 comment title=[[Main Page]]
24128 /* External links */ removed bogus entries
24130 <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→External links</a>: </span> removed bogus entries</span>
24134 Edit comment with section link and text before it (non-local, eg in history list)
24136 comment title=[[Main Page]]
24138 pre-comment text /* External links */ removed bogus entries
24140 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>
24144 Edit comment with section link (local, eg in diff view)
24146 comment local title=[[Main Page]]
24148 /* External links */ removed bogus entries
24150 <span dir="auto"><span class="autocomment"><a href="#External_links">→External links</a>: </span> removed bogus entries</span>
24154 Edit comment with section link that has a link in it
24156 comment local title=[[Main Page]]
24160 <span dir="auto"><span class="autocomment"><a href="#A_link">→[[A link]]</a></span></span>
24164 Edit comment with section link that has a template in it
24166 comment local title=[[Main Page]]
24168 /* {{foobar|param}} */
24170 <span dir="auto"><span class="autocomment"><a href="#.7B.7Bfoobar.7Cparam.7D.7D">→{{foobar|param}}</a></span></span>
24174 Edit comment with subpage link (T16080)
24178 title=[[Subpage test]]
24180 Poked at a [[/subpage]] here...
24182 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
24186 Edit comment with subpage link and link text (T16080)
24190 title=[[Subpage test]]
24192 Poked at a [[/subpage|neat little page]] here...
24194 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
24198 Edit comment with bogus subpage link in non-subpage NS (T16080)
24201 title=[[Subpage test]]
24203 Poked at a [[/subpage]] here...
24205 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
24209 Edit comment with bare anchor link (local, as on diff)
24213 title=[[Main Page]]
24217 <a href="#section">#section</a>
24221 Edit comment with bare anchor link (non-local, as on history)
24224 title=[[Main Page]]
24228 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
24232 Anchor starting with underscore
24238 <p><a href="#_ref">One</a>
24241 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
24245 Id starting with underscore
24247 <div id="_ref"></div>
24249 <div id="_ref"></div>
24253 Edit comment with link with more than one pipe (T99346)
24257 [[Main Page|Many|pipes]]
24259 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
24263 Complex edit comment with link with more than one pipe (T99346)
24267 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
24269 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..."
24273 Space normalisation on autocomment (T24784)
24276 title=[[Main Page]]
24278 /* __hello__world__ */
24280 <span dir="auto"><span class="autocomment"><a href="/wiki/Main_Page#hello_world" title="Main Page">→__hello__world__</a></span></span>
24284 percent-encoding and + signs in comments (T28410)
24288 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
24290 <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>
24293 # Parsoid doesn't support this yet: see T75581
24294 # but it *should* omit the 'src' attribute if the image is bad.
24295 # PHP side of tests was disabled in
24296 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
24297 # because of issues in the PHP parserTests infrastructure
24298 # (but the output below is indeed what the PHP side emits)
24300 Bad images - basic functionality
24303 !! html/php+disabled
24305 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"bad-image","message":"This image is blacklisted in this context."}]}'><a href="./File:Bad.jpg"><img resource="./File:Bad.jpg" height="220" width="220"/></a></span></p>
24309 Bad images - T18039: text after bad image disappears
24314 !! html/php+disabled
24320 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"bad-image","message":"This image is blacklisted in this context."}]}'><a href="./File:Bad.jpg"><img resource="./File:Bad.jpg" height="220" width="220"/></a></span>
24325 Verify that displaytitle works (T24501) no displaytitle
24329 wgAllowDisplayTitle=true
24330 wgRestrictDisplayTitle=false
24332 this is not the the title
24335 <p>this is not the the title
24340 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
24345 wgAllowDisplayTitle=true
24346 wgRestrictDisplayTitle=false
24348 this is not the the title
24349 {{DISPLAYTITLE:whatever}}
24352 <p>this is not the the title
24357 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24362 wgAllowDisplayTitle=true
24363 wgRestrictDisplayTitle=true
24365 this is not the the title
24366 {{DISPLAYTITLE:whatever}}
24369 <p>this is not the the title
24374 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24379 wgAllowDisplayTitle=true
24380 wgRestrictDisplayTitle=true
24382 this is not the the title
24383 {{DISPLAYTITLE:screen}}
24386 <p>this is not the the title
24391 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24396 wgAllowDisplayTitle=false
24398 this is not the the title
24399 {{DISPLAYTITLE:screen}}
24402 <p>this is not the the title
24403 <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>
24408 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24413 wgAllowDisplayTitle=false
24415 this is not the the title
24418 <p>this is not the the title
24423 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24428 wgAllowDisplayTitle=true
24429 wgRestrictDisplayTitle=true
24431 this is not the the title
24432 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24434 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24435 <p>this is not the the title
24440 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24445 wgAllowDisplayTitle=true
24446 wgRestrictDisplayTitle=true
24448 this is not the the title
24449 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24451 <span style="color: red;">s</span>creen
24452 <p>this is not the the title
24457 Page status indicators: Empty name is invalid
24461 <indicator name=" "></indicator>
24462 <indicator></indicator>
24464 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24465 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24470 Page status indicators: Weird syntaxes that are okay
24474 <indicator name="empty" />
24475 <indicator name="name"></indicator>
24484 Page status indicators: Torture test
24488 <indicator name="01">hello world</indicator>
24489 <indicator name="02">[[Main Page]]</indicator>
24490 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24491 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24492 <indicator name="05">*foo
24494 <indicator name="06"><nowiki>foo</nowiki></indicator>
24495 <indicator name="07"> Preformatted</indicator>
24496 <indicator name="08"><div>Broken tag</indicator>
24497 <indicator name="09">{| class=wikitable
24500 <indicator name="10">Two
24502 paragraphs</indicator>
24505 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24506 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" />
24507 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>
24508 05=<ul><li>foo</li>
24511 07=<pre>Preformatted
24513 08=<div>Broken tag</div>
24515 09=<table class="wikitable">
24531 preload: check <noinclude> and <includeonly>
24535 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24541 preload: check <onlyinclude>
24545 Goodbye <onlyinclude>Hello world</onlyinclude>
24551 preload: can pass tags through if we want to
24555 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24557 <includeonly>Hello world</includeonly>
24561 preload: check that it doesn't try to do tricks
24565 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24567 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24571 Play a bit with r67090 and T5158
24573 <div style="width:50% !important"> </div>
24574 <div style="width:50% !important"> </div>
24575 <div style="width:50% !important"> </div>
24576 <div style="border : solid;"> </div>
24578 <div style="width:50% !important"> </div>
24579 <div style="width:50% !important"> </div>
24580 <div style="width:50% !important"> </div>
24581 <div style="border : solid;"> </div>
24583 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24584 <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>
24585 <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>
24586 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24590 French spaces in wikitext
24592 foo ! bar ? bat 50 % is less than 75 %.
24594 Hello : this ; is « something ‹ else › again »
24596 <p>foo ! bar ? bat 50 % is less than 75 %.
24597 </p><p>Hello : this ; is « something ‹ else › again »
24601 # It would be reasonable for Parsoid and PHP to differ here.
24602 # The PHP behavior is arguably a bug.
24604 Corner case: french spaces in definition list
24608 <dl><dt>foo </dt>
24613 T5158: Test for French spaces in attributes
24615 <br style=" clear : both ; " />
24617 <p><br style="clear : both ;" />
24622 HTML5 data attributes
24624 <span data-foo="bar">Baz</span>
24625 <p data-abc-def_hij="">Quuz</p>
24627 <p><span data-foo="bar">Baz</span>
24629 <p data-abc-def_hij="">Quuz</p>
24631 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24632 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24636 Strip reserved data attributes
24638 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24640 <div data-ok="fred">d</div>
24642 <div data-x-data-mw="foo" data-x-data-parsoid="bar" data-x-data-mw-someext="baz" data-ok="fred" data-parsoid='{"stx":"html","a":{"data-ooui":null,"data-bad:ns":null},"sa":{"data-ooui":"xyzzy","data-bad:ns":"ns"}}'>d</div>
24646 percent-encoding and + signs in internal links (T28410)
24648 [[User:+%]] [[Page+title%]]
24649 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24650 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24651 [[%33%45]] [[%33%45+]]
24653 <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>
24654 <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>
24655 <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>
24656 <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>
24659 <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>
24660 <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>
24661 <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='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"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>"}'><a href="./File:%25+abc9" data-parsoid='{"a":{"href":"./File:%25+abc9"},"sa":{}}'><img resource="./File:%25+abc9" src="./Special:FilePath/%25+abc9" height="220" width="220" data-parsoid='{"a":{"resource":"./File:%25+abc9","height":"220","width":"220"},"sa":{"resource":"File:%+abc%39"}}'/></a></figure-inline>
24662 <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>
24666 Special characters in embedded file links (T29679)
24668 [[File:Contains & ampersand.jpg]]
24669 [[File:Does not exist.jpg|Title with & ampersand]]
24671 <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>
24672 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24675 <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="./File:Contains_&_ampersand.jpg"><img resource="./File:Contains_&_ampersand.jpg" src="./Special:FilePath/Contains_&_ampersand.jpg" height="220" width="220"/></a></figure-inline>
24676 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"Title with &amp; ampersand"}'><a href="./File:Does_not_exist.jpg"><img resource="./File:Does_not_exist.jpg" src="./Special:FilePath/Does_not_exist.jpg" height="220" width="220"/></a></figure-inline></p>
24680 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24682 Text's been normalized?
24684 <p>Text's been normalized?
24689 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24691 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24693 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24698 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24700 [http://www.example.org/ ideograms]
24702 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24707 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24709 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24711 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24735 T33098 Template which includes system messages which includes the template
24739 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24740 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24745 T33490 Turkish: ucfirst 'blah'
24756 T33490 Turkish: ucfirst 'ix'
24767 T33490 Turkish: lcfirst 'BLAH'
24778 T33490 Turkish: ucfırst (with a dotless i)
24784 <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>
24789 T33490 ucfırst (with a dotless i) with English language
24795 <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>
24799 # Note that Parsoid doesn't emit an explicit TOC.
24800 # Note also that the html2wt direction tends to emit an extra newline
24801 # between the __TOC__ magicword and the first heading unless *both*
24802 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24806 T28375: TOC with italics
24808 title=[[Main Page]]
24811 ==''Lost'' episodes==
24813 <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>
24815 <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>
24819 <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>
24821 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24822 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24826 T28375: TOC with bold
24828 title=[[Main Page]]
24831 =='''should be bold''' then normal text==
24833 <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>
24835 <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>
24839 <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>
24841 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24842 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24846 T35845: Headings become cursive in TOC when they contain an image
24848 title=[[Main Page]]
24851 ==Image [[Image:foobar.jpg]]==
24853 <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>
24855 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24859 <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>
24861 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24862 <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>
24866 T35845 (2): Headings become bold in TOC when they contain a blockquote
24868 title=[[Main Page]]
24871 ==<blockquote>Quote</blockquote>==
24873 <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>
24875 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24879 <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>
24881 <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>
24883 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24887 <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>
24889 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24890 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
24894 Unclosed tags in TOC
24896 wgFragmentMode=[ 'html5', 'legacy' ]
24898 title=[[Main Page]]
24902 <small>Hanc marginis exiguitas non caperet.</small>
24905 <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>
24907 <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>
24911 <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>
24912 <p><small>Hanc marginis exiguitas non caperet.</small>
24916 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24917 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24918 <p><small>Hanc marginis exiguitas non caperet.</small>
24923 Multiple tags in TOC
24926 ==<i>Foo</i> <b>Bar</b>==
24928 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24930 <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>
24932 <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>
24933 <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>
24937 <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>
24938 <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>
24940 <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>
24942 <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>
24943 <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>
24947 <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>
24948 <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>
24950 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24951 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24953 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
24956 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24957 # html5 tag parsing.
24959 Tags with parameters in TOC
24964 ==<sup class="in-h2">Hello</sup>==
24966 ==<sup class="a > b">Evilbye</sup>==
24968 <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>
24970 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24971 <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>
24975 <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>
24976 <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>
24978 <meta property="mw:PageProp/toc" />
24979 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24981 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24985 span tags with directionality in TOC
24988 ==<span dir="ltr">C++</span>==
24990 ==<span dir="rtl">זבנג!</span>==
24992 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24994 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24996 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24998 <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>
25000 <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>
25001 <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>
25002 <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>
25003 <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>
25004 <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>
25008 <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>
25009 <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>
25010 <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>
25011 <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>
25012 <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>
25014 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25015 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
25016 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
25017 <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>
25018 <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>
25019 <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>
25023 T74884: bdi element in ToC
25026 ==<bdi>test</bdi>==
25028 <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>
25030 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
25034 <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>
25036 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25037 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
25041 T35715: s/strike element in ToC
25044 ==<s>test</s> test <strike>test</strike>==
25046 <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>
25048 <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>
25052 <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>
25054 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25055 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
25059 T198618: style element in ToC
25064 ==<style>.foo {}</style>Style<style>.bar {}</style>==
25066 <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>
25068 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
25072 <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>
25074 <meta property="mw:PageProp/toc" data-parsoid="{}"/>
25075 <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>
25079 T198618: script element in ToC
25084 ==<html><script>alert(1);</script></html>Script<html><script>alert(1);</script></html>==
25086 <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>
25088 <li class="toclevel-1 tocsection-1"><a href="#Script"><span class="tocnumber">1</span> <span class="toctext">Script</span></a></li>
25092 <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>
25094 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25095 <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>
25099 Empty <p> tag in TOC, removed by Sanitizer (T92892)
25104 <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>
25106 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
25110 <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>
25112 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
25113 <h2 id="x" data-parsoid='{}'>x</h2>
25119 == {{int:headline_sample}} ==
25123 T34057: Title needed when expanding <h> nodes.
25125 title=[[Main Page]]
25129 <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>
25133 Strip marker in urlencode
25135 {{urlencode:x<nowiki/>y}}
25136 {{urlencode:x<nowiki/>y|wiki}}
25137 {{urlencode:x<nowiki/>y|path}}
25138 {{urlencode:x<pre id="one">two</pre>y}}
25166 Strip marker in formatNum
25168 {{formatnum:1<nowiki/>2}}
25169 {{formatnum:1<nowiki/>2|R}}
25177 Check noCommafy in formatNum
25181 {{formatnum:123456.78}}
25182 {{formatnum:123456.78|NOSEP}}
25190 Wrong option for formatNum (T58199)
25192 {{formatnum:1,234.56|Random}}
25193 {{formatnum:1,234.56|EVERYTHING}}
25194 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
25203 Strip marker in grammar
25207 {{grammar:elative|foo<nowiki/>bar}}
25214 Strip marker in padleft
25216 {{padleft:|2|x<nowiki/>y}}
25223 Strip marker in padright
25225 {{padright:|2|x<nowiki/>y}}
25232 Strip marker in anchorencode
25234 {{anchorencode:x<nowiki/>y}}
25239 <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>
25243 nowiki inside link inside heading (T20295)
25245 ==[[foo|x<nowiki>y</nowiki>z]]==
25247 <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>
25251 new support for bdi element (T33817)
25253 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25255 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25259 Ignore pipe between table row attributes
25263 |- id=foo | style='color: red'
25271 <tr id="foo" style="color: red">
25277 Language parser function
25286 Padleft and padright (default 0-padding)
25295 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
25296 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
25300 Padleft and padright (partial fill)
25302 {{padleft:xyz|6|ab}}
25303 {{padright:xyz|6|ab}}
25309 <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>
25310 <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>
25314 Padleft and padright as substr
25316 {{padleft:|3|abcde}}
25317 {{padright:|3|abcde}}
25323 <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>
25324 <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>
25328 Padleft and padright with non-numerical length (T180403)
25330 {{padleft:abcdef|junk}}
25331 {{padright:abcdef|junk}}
25339 Special parser function
25341 {{#special:RandomPage}}
25342 {{#special:BaDtItLe}}
25343 {{#special:Foobar}}
25352 T36939 - Case insensitive link parsing ([HttP://])
25354 [HttP://MediaWiki.Org/]
25356 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25359 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
25363 T36939 - Case insensitive link parsing ([HttP:// title])
25365 [HttP://MediaWiki.Org/ MediaWiki]
25367 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25372 T36939 - Case insensitive link parsing (HttP://)
25374 HttP://MediaWiki.Org/
25376 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25379 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
25397 <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>
25398 <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>
25399 <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>
25400 <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>
25401 <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>
25406 ### Parsoid-specific tests
25407 ### Parsoid-PHP parser incompatibilities
25410 1. SOL-sensitive wikitext tokens as template-args
25412 parsoid=wt2html,wt2wt
25418 <ul><li>a</li></ul>
25419 <ol><li>a</li></ol>
25420 <dl><dd>a</dd></dl>
25422 <span about="#mwt1" typeof="mw:Transclusion">
25423 </span><ul about="#mwt1"><li>a</li>
25425 <span about="#mwt2" typeof="mw:Transclusion">
25426 </span><ol about="#mwt2"><li>a</li>
25428 <span about="#mwt3" typeof="mw:Transclusion">
25429 </span><dl about="#mwt3"><dd>a</dd>
25433 #### -----------------------------------------------------------------
25434 #### Parsoid-specific functionality tests
25435 #### -----------------------------------------------------------------
25437 # T65642/T68749: Formatting elt fixup around images.
25438 # We know wt2wt will fail, but we expect selser to pass.
25439 # Due to the nature of our testing, wt2wt and selser tests will enter the
25440 # blacklist and we'll catch selser regressions based on changes to the
25441 # blacklist entries for selser tests.
25443 1. Treebuilder fixup of formatting elt
25445 parsoid=wt2html,wt2wt
25450 [[Image:Foobar.jpg|right|Test]]
25458 </small></p><small>
25459 <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>
25460 </small><p><small></small>
25462 </td></tr></tbody></table>
25466 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25467 <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>
25468 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25473 2. Treebuilder fixup of formatting elt
25475 parsoid=wt2html,wt2wt
25477 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25479 <small>[[Image:Foobar.jpg|right|300px]]</small>
25481 <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>
25482 </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>
25484 <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>
25486 <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></figure></small>
25490 3. Treebuilder fixup of formatting elt
25492 parsoid=wt2html,wt2wt
25494 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25496 <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>
25498 <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>
25502 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25504 parsoid=wt2html,wt2wt
25506 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25508 <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>
25510 <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></figure></small></b>
25513 #### ----------------------------------------------------------------
25514 #### Parsoid-only testing of Parsoid's impl of LST
25515 #### Not implemented yet, see
25516 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25517 #### ----------------------------------------------------------------
25519 ## We still need to support serializing the older format while content is stored.
25521 LST Sections: Backwards compatibility
25524 "suppressErrors": true,
25525 "modes": ["html2wt"]
25528 <section begin="2011-05-16" />
25529 <section end="2014-04-10 (MW 1.23wmf22)" />
25531 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25532 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25536 LST Sections: Newfangled approach
25538 <section begin="2011-05-16" />
25539 <section end="2014-04-10 (MW 1.23wmf22)" />
25541 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"}}'>
25543 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"}}'>
25547 #--------- Test stripping of empty nodes in template content ----------
25550 Empty LI and TR nodes should be stripped from template content
25555 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25559 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25572 Empty LI and TR nodes should not be stripped from top-level content
25586 <li class='mw-empty-elt'></li>
25591 <tr class='mw-empty-elt'></tr>
25600 Empty TR nodes should not be stripped if they have any attributes set
25602 {{EmptyTRWithHTMLAttrTest}}
25604 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25605 <tr align='center'></tr>
25606 <tr><td>foo</td></tr>
25607 <tr align='center'></tr>
25608 <tr><td>bar</td></tr>
25612 #### ----------------------------------------------------------------
25613 #### The following section of tests are primarily to test
25614 #### wikitext escaping capabilities of Parsoid. Given that
25615 #### escaping can be done any number of ways, the wikitext (input)
25616 #### is always adjusted to reflect how Parsoid adds nowiki
25619 #### We are marking several tests as parsoid-only since the
25620 #### HTML in the result section is different from what the
25621 #### PHP parser generates for it.
25622 #### ----------------------------------------------------------------
25625 #### --------------- Headings ---------------
25627 #### 1. Nested inside html <h1>=foo=</h1>
25628 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25629 #### 3. Nested inside html with wikitext split by html tags
25630 #### 4. No escape needed
25631 #### 5. Empty headings <h1></h1>
25632 #### 6. Heading chars in SOL context
25633 #### ----------------------------------------
25635 Headings: 0. Unnested
25645 <p>=foo<i>a</i>=</p>
25647 <nowiki>=foo=</nowiki>
25649 <nowiki> </nowiki>=foo=
25651 <nowiki>=foo=</nowiki>
25653 =foo''a''<nowiki>=</nowiki>
25656 # New headings and existing headings are handled differently
25658 Headings: 1. Nested inside html
25666 <h1 data-parsoid=''>=foo=</h1>
25667 <h2 data-parsoid=''>=foo=</h2>
25668 <h3 data-parsoid=''>=foo=</h3>
25669 <h4 data-parsoid=''>=foo=</h4>
25670 <h5 data-parsoid=''>=foo=</h5>
25671 <h6 data-parsoid=''>=foo=</h6>
25679 =<nowiki>=foo=</nowiki>=
25680 ==<nowiki>=foo=</nowiki>==
25681 ===<nowiki>=foo=</nowiki>===
25682 ====<nowiki>=foo=</nowiki>====
25683 =====<nowiki>=foo=</nowiki>=====
25684 ======<nowiki>=foo=</nowiki>======
25688 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25697 <nowiki>*</nowiki>bar
25703 <nowiki>=bar=</nowiki>
25707 Headings: 3. Nested inside html with wikitext split by html tags
25711 <h1>=<b>bold</b>foo=</h1>
25713 = ='''bold'''foo= =
25717 Headings: 4a. No escaping needed (testing just h1 and h2)
25728 <h1><i>=</i>foo=</h1>
25748 Headings: 4b. No escaping needed (inside p-tags)
25765 Headings: 4c. Short headings (1)
25772 <nowiki>===</nowiki>
25778 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25780 Headings: 4d. Short headings (2)
25782 parsoid=wt2html,html2html
25793 <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>
25794 <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>
25795 <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>
25799 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25800 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25801 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25805 Headings: 5. Empty headings
25809 <h1 data-parsoid='{}'></h1>
25811 <h2 data-parsoid='{}'></h2>
25813 <h3 data-parsoid='{}'></h3>
25815 <h4 data-parsoid='{}'></h4>
25817 <h5 data-parsoid='{}'></h5>
25819 <h6 data-parsoid='{}'></h6>
25829 =====<nowiki/>=====
25831 ======<nowiki/>======
25835 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25845 <nowiki>=a=</nowiki>
25847 <nowiki>=a=</nowiki>
25849 <nowiki>=a=</nowiki>
25853 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25866 <nowiki>=a=</nowiki>
25869 <nowiki>=a=</nowiki>
25872 <nowiki>=a=</nowiki>
25877 Headings: 6c. Heading chars in SOL context (leading newline break)
25885 <nowiki>=b=</nowiki>
25889 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25893 <!--c0--><p>=a=</p>
25895 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25897 <!--c0--><nowiki>=a=</nowiki>
25899 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25903 Headings: 6d. Heading chars in SOL context (No escaping needed)
25913 Headings: 7. Insert a newline between new content and headings
25919 <h2 data-parsoid='{}'>A</h2>
25920 <p data-parsoid='{}'>a</p>
25930 Headings: Used as horizontal rule
25932 wgFragmentMode=[ 'html5', 'legacy' ]
25938 <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>
25940 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25943 #### --------------- Lists ---------------
25944 #### 0. Outside nests (*foo, etc.)
25945 #### 1. Nested inside html <ul><li>*foo</li></ul>
25946 #### 2. Inside definition lists
25947 #### 3. Only bullets at start should be escaped
25948 #### 4. No escapes needed
25949 #### 5. No unnecessary escapes
25950 #### 6. Escape bullets in SOL position
25951 #### 7. Escape bullets in a multi-line context
25952 #### ----------------------------------------
25955 Lists: 0. Outside nests
25965 <nowiki>*</nowiki>foo
25967 <nowiki>#</nowiki>foo
25969 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25972 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25973 ## to test wikitext escaping, and insignificant whitespace diffs
25974 ## cause PHP parser tests to barf
25976 Lists: 1. Nested inside html (No unnecessary escapes)
25985 <li data-parsoid='{}'>*foo</li>
25986 <li data-parsoid='{}'>#foo</li>
25987 <li data-parsoid='{}'>:foo</li>
25988 <li data-parsoid='{}'>;foo</li>
25996 <li data-parsoid='{}'>*foo</li>
25997 <li data-parsoid='{}'>#foo</li>
25998 <li data-parsoid='{}'>:foo</li>
25999 <li data-parsoid='{}'>;foo</li>
26006 *<nowiki>*foo</nowiki>
26007 *<nowiki>#foo</nowiki>
26008 *<nowiki>:foo</nowiki>
26009 *<nowiki>;foo</nowiki>
26015 #<nowiki>*foo</nowiki>
26016 #<nowiki>#foo</nowiki>
26017 #<nowiki>:foo</nowiki>
26018 #<nowiki>;foo</nowiki>
26022 Lists: 2. Inside definition lists
26026 <dl><dt>;foo</dt></dl>
26027 <dl><dt>:foo</dt></dl>
26030 <dl><dd>:foo</dd></dl>
26034 ; <nowiki>:foo</nowiki>
26036 ; <nowiki>:foo</nowiki>
26043 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
26049 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
26053 *<nowiki>*foo</nowiki>''it''*bar
26057 Lists: 4. No escapes needed
26070 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
26074 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
26088 Lists: 5. No unnecessary escapes
26092 <ul><li> bar <span>[[foo]]</span></li></ul>
26093 <ul><li> =bar <span>[[foo]]</span></li></ul>
26094 <ul><li> [[bar <span>[[foo]]</span></li></ul>
26095 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
26096 <ul><li> =bar <span>foo]]</span>=</li></ul>
26097 <ul><li> <s></s>: a</li></ul>
26098 <ul><li> <i>* foo</i></li></ul>
26101 * bar <span><nowiki>[[foo]]</nowiki></span>
26103 * =bar <span><nowiki>[[foo]]</nowiki></span>
26105 * [[bar <span><nowiki>[[foo]]</nowiki></span>
26107 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
26109 * =bar <span>foo]]</span>=
26117 Lists: 6. Escape bullets in SOL position
26121 <p><!--cmt-->*foo</p>
26123 <!--cmt--><nowiki>*</nowiki>foo
26127 Lists: 7. Escape bullets in a multi-line context
26136 <nowiki>*</nowiki>b
26140 Lists: 8. Escape colons only if not present in tags
26144 <dl><dt>a:b<i>c:d</i></dt></dl>
26146 ; <nowiki>a:b</nowiki>''c:d''
26149 #### --------------- HRs ---------------
26150 #### 1. Single line
26151 #### -----------------------------------
26154 HRs: 1. Single line
26162 ----<nowiki>----</nowiki>
26167 #### --------------- Tables ---------------
26168 #### 1a. Simple example
26169 #### 1b. No escaping needed (!foo)
26170 #### 1c. No escaping needed (|foo)
26171 #### 1d. No escaping needed (|}foo)
26173 #### 2a. Nested in td (<td>foo|bar</td>)
26174 #### 2b. Nested in td (<td>foo||bar</td>)
26175 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
26177 #### 3a. Nested in th (<th>foo!bar</th>)
26178 #### 3b. Nested in th (<th>foo!!bar</th>)
26179 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
26183 #### 4c. No escaping needed
26184 #### --------------------------------------
26187 Tables: 1a. Simple example
26195 <nowiki>{|</nowiki>
26200 Tables: 1b. No escaping needed
26211 Tables: 1c. No escaping needed
26222 Tables: 1d. No escaping needed
26233 Tables: 2a. Nested in td
26238 <td>foo|bar</td></tr>
26239 <tr><td>x<div>a|b</div></td>
26243 |<nowiki>foo|bar</nowiki>
26245 |x<div><nowiki>a|b</nowiki></div>
26253 <td>x<div>a|b</div>
26254 </td></tr></tbody></table>
26258 Tables: 2b. Nested in td
26264 <td>a<i>b||c</i></td>
26265 <td>a<i><div>b||c</div></i></td>
26266 </tr></tbody></table>
26269 |<nowiki>foo||bar</nowiki>
26270 |a''<nowiki>b||c</nowiki>''
26271 |a''<div><nowiki>b||c</nowiki></div>''
26280 <td>a<i><div>b||c</div></i>
26285 Tables: 2c. Nested in td -- no escaping needed
26300 Tables: 3a. Nested in th
26315 Tables: 3b. Nested in th
26320 <tr><th>foo!!bar</th>
26321 <th><i>foo|bar</i></th>
26322 <th><i>foo!!bar</i></th>
26323 <th><i><span>foo!!bar</span></i></th>
26324 </tr></tbody></table>
26327 !<nowiki>foo!!bar</nowiki>
26328 !''<nowiki>foo|bar</nowiki>''
26329 !''<nowiki>foo!!bar</nowiki>''
26330 !''<span><nowiki>foo!!bar</nowiki></span>''
26339 <th><i>foo!!bar</i>
26341 <th><i><span>foo!!bar</span></i>
26346 Tables: 3c. Nested in th
26351 <tr><th>foo||bar</th>
26352 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26353 </tr></tbody></table>
26356 !<nowiki>foo||bar</nowiki>
26357 !<nowiki>foo||bar</nowiki>
26369 Tables: 4a. Escape -
26384 |<nowiki>-bar</nowiki>
26389 Tables: 4b. Escape +
26404 |<nowiki>+bar</nowiki>
26409 Tables: 4c. No escaping needed
26414 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26415 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26421 <div>a|b</div></td>
26465 Tables: 4d. No escaping needed
26470 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26471 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26472 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26483 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26492 Tables: 4e. Escape }
26497 <tr><td>}</td></tr>
26498 <tr><td>x</td><td data-parsoid='{"stx":"row"}'>}</td></tr></table>
26502 |<nowiki>}</nowiki>
26518 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26522 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26524 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26526 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26528 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26531 | || align="center" | ||
26541 | {{!}}{{!}} align="center" | ||
26545 ! !! align="center" | !!
26551 <td align="center"></td>
26553 </td></tr></tbody></table>
26558 <td align="center">
26561 </td></tr></tbody></table>
26565 <td align="center"></td>
26567 </td></tr></tbody></table>
26571 <th align="center"></th>
26573 </th></tr></tbody></table>
26577 T97430: Don't emit empty nowiki pairs around marker meta tags
26581 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26582 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26584 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26585 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26589 Unclosed xmlish element in table line shouldn't eat end delimiters
26594 <tbody><tr><td> <foo</td>
26595 <td> bar></td></tr>
26611 #### --------------- Links ----------------
26612 #### 1. Quote marks in link text
26613 #### 2. Wikilinks: Escapes needed
26614 #### 3. Wikilinks: No escapes needed
26615 #### 4. Extlinks: Escapes needed
26616 #### 5. Extlinks: No escapes needed
26617 #### --------------------------------------
26619 Links 1. WikiLinks: No escapes needed
26623 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26624 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26625 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26629 [[Foo|x [Foobar] x]]
26631 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26632 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26633 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26638 Links 2. WikiLinks: Escapes needed
26642 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26643 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26644 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26645 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26646 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26647 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26648 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26649 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26650 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26651 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26653 [[Foo|<nowiki>Foobar]</nowiki>]]
26654 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26655 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26656 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26657 [[Foo|<nowiki>|Bar</nowiki>]]
26658 [[Foo|<nowiki>]]bar</nowiki>]]
26659 [[Foo|<nowiki>[[bar</nowiki>]]
26660 [[Foo|<nowiki>x [[ y</nowiki>]]
26661 [[Foo|<nowiki>x ]] y</nowiki>]]
26662 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26664 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26665 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26666 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26667 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26668 <a href="/wiki/Foo" title="Foo">|Bar</a>
26669 <a href="/wiki/Foo" title="Foo">]]bar</a>
26670 <a href="/wiki/Foo" title="Foo">[[bar</a>
26671 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26672 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26673 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26678 Links 3. WikiLinks: No escapes needed
26682 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26683 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26688 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26689 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26694 Links 4. ExtLinks: Escapes needed
26698 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26699 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26700 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26701 <p>[http://google.com]</p>
26702 <p>[http://google.com google]</p>
26703 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26704 <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>
26706 [http://google.com <nowiki>[google]</nowiki>]
26707 [http://google.com <nowiki>google]</nowiki>]
26708 [http://google.com <nowiki>goog] le</nowiki>]
26710 <nowiki>[http://google.com]</nowiki>
26712 <nowiki>[http://google.com google]</nowiki>
26714 [http://google.com<nowiki>]</nowiki>
26716 [{{echo|http://google.com}}<nowiki>]</nowiki>
26718 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26719 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26720 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26721 </p><p>[http://google.com]
26722 </p><p>[http://google.com google]
26723 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26724 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26729 Links 5. ExtLinks: No escapes needed
26733 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26734 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26736 [http://google.com [google]
26738 [[http://google.com]]
26740 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26741 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26746 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26750 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26751 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26752 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26753 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26754 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26755 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26756 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26757 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26758 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26759 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26760 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26761 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26762 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26765 x<nowiki/>http://example.com<nowiki/>y
26766 http://example.com<nowiki/>?x
26767 http://example.com<nowiki/>&x
26768 http://example.com<nowiki/>'x
26769 http://example.com<nowiki/>,x
26770 http://example.com<nowiki/>.x
26771 http://example.com<nowiki/>;x
26772 http://example.com<nowiki/>:x
26773 http://example.com<nowiki/>;x
26774 http://example.com<nowiki/>!x
26775 http://example.com<nowiki/>=x
26776 http://example.com<nowiki/>(x)
26777 http://example.com(x<nowiki/>)
26781 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26786 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26788 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26789 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26790 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26791 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26792 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26798 "http://example.com"
26799 (http://example.com)
26800 (http://example.com) foo
26801 http://example.com,
26802 http://example.com, foo
26805 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26807 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26808 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26809 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26810 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26811 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26816 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26820 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26821 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26823 http://example.com.,;:!?\
26824 -http://example.com:
26826 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26827 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26832 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26836 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26837 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26838 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26842 X<nowiki/>RFC 123<nowiki/>y
26846 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26850 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26851 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26852 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26859 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26860 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26861 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26866 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26870 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26871 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26872 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26876 X<nowiki/>PMID 123<nowiki/>y
26880 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26884 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26885 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26886 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26893 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26894 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26895 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26900 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26904 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26905 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26906 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26909 ISBN 1234567890<nowiki/>1
26910 ISBN 1234567890<nowiki/>x
26911 a<nowiki/>ISBN 1234567890<nowiki/>b
26915 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26919 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26923 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26928 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26932 <p>this is not a link: http://example.com
26935 this is not a link: <nowiki>http://example.com</nowiki>
26939 Links 15. Link trails can't become link prefixes.
26944 <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>
26946 [[Söfnuður]]-[[00]]
26948 <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>
26952 #### --------------- Quotes ---------------
26953 #### 1. Quotes inside <b> and <i>
26954 #### 2. Link fragments separated by <i> and <b> tags
26955 #### 3. Link fragments inside <i> and <b>
26956 #### 4. No escaping needed
26957 #### --------------------------------------
26959 1a. Quotes inside <b> and <i>
26970 <b>foo'<i>bar'</i>baz</b>
26979 <i>fools'<span> errand</span></i>
26980 <i><span>fool</span>'s errand</i>
26981 '<i>foo</i> bar '<i>baz</i>
26982 a|!*#-:;+-~[]{}b'<i>x</i>
26986 ''<nowiki>''foo''</nowiki>''
26987 ''<nowiki>'''foo'''</nowiki>''
26989 '''<nowiki/>'foo''''
26990 '''<nowiki>''foo''</nowiki>'''
26991 '''<nowiki>'''foo'''</nowiki>'''
26992 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26993 '''foo'''<nowiki/>'s
26999 '''foo'''<nowiki/>'
27000 ''''foo'''<nowiki/>'
27001 ''fools'<span> errand</span>''
27002 ''<span>fool</span>'s errand''
27003 '<nowiki/>''foo'' bar '''baz''
27004 a|!*#-:;+-~[]{}b'''x''
27008 1b. Quotes inside <b> and <i> with other tags on same line
27012 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27013 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
27014 <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>
27015 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
27016 '<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>
27017 '<i>foo</i> <div title="name">test</div>
27018 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
27019 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
27020 <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>
27023 '''a'' foo ''[[bar]]''
27024 ''a''' foo ''[[bar]]''
27025 ''a''' foo '''{{echo|[[bar]]}}'''
27026 [[foo]] x'''[[bar]]''
27027 '''foo'' <ref>test</ref>
27028 '''foo'' <div title="name">test</div>
27029 '''foo'' and <br> bar
27034 2. Link fragments separated by <i> and <b> tags
27038 <p>[[<i>foo</i>hello]]</p>
27039 <p>[[<b>foo</b>hello]]</p>
27041 [[''foo''<nowiki>hello]]</nowiki>
27043 [['''foo'''<nowiki>hello]]</nowiki>
27046 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
27047 # this is one of the shortcomings of this format
27049 3. Link fragments inside <i> and <b>
27053 <p><i>[[foo</i>]]</p>
27054 <p><b>[[foo</b>]]</p>
27056 ''[[foo''<nowiki>]]</nowiki>
27058 '''[[foo'''<nowiki>]]</nowiki>
27062 4. No escaping needed
27066 <p>'<span><i>bar</i></span>'
27067 '<span><b>bar</b></span>'
27071 '<span>''bar''</span>'
27072 '<span>'''bar'''</span>'
27076 #### ----------- Paragraphs ---------------
27077 #### 1. No unnecessary escapes
27078 #### --------------------------------------
27081 1. No unnecessary escapes
27085 <p>bar <span>[[foo]]</span>
27086 </p><p>=bar <span>[[foo]]</span>
27087 </p><p>[[bar <span>[[foo]]</span>
27088 </p><p>]]bar <span>[[foo]]</span>
27089 </p><p>=bar <span>foo]]</span>=
27092 bar <span><nowiki>[[foo]]</nowiki></span>
27094 =bar <span><nowiki>[[foo]]</nowiki></span>
27096 [[bar <span><nowiki>[[foo]]</nowiki></span>
27098 ]]bar <span><nowiki>[[foo]]</nowiki></span>
27100 =bar <span>foo]]</span><nowiki>=</nowiki>
27103 #### ----------------------- PRE --------------------------
27105 1. Leading whitespace in SOL context should be escaped
27128 <nowiki> </nowiki>a
27130 <nowiki> </nowiki> a
27134 <nowiki> </nowiki> a
27136 <nowiki> </nowiki>a
27139 <nowiki> </nowiki>b
27162 2. Leading whitespace in non-indent-pre contexts should not be escaped
27166 <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>
27167 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
27168 <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>
27178 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
27197 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
27201 <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>
27203 [[File:Foobar.jpg|thumb|caption]]
27207 5. Nowiki escaping should account for indent-pres
27217 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
27231 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
27234 "modes": ["html2wt"],
27235 "scrubWikitext": true
27243 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
27244 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
27245 <p> <!--boo-->*foo</p>
27246 <p><!--boo--> *foo</p>
27247 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
27248 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
27264 <nowiki>*</nowiki>foo
27266 <nowiki/><!--boo-->*foo
27268 <!--boo--><nowiki/>*foo
27270 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
27272 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
27275 #### --------------- Behavior Switches --------------------
27278 1. Valid behavior switches should be escaped
27285 <nowiki>__TOC__</nowiki>
27286 ''<nowiki>__TOC__</nowiki>''
27290 2. Invalid behavior switches should not be escaped
27301 # We use indent-pre as an indirect way to test for sol-transparent behavior.
27303 Behavior switches should be SOL-transparent
27307 <meta property="mw:PageProp/toc" />
27309 <!-- this one's bogus -->
27312 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
27314 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
27318 <!-- this one's bogus -->
27327 #### --------------- HTML tags ---------------
27330 #### 3. multi-line html tag
27331 #### 4. extension tags
27332 #### -----------------------------------------
27338 <a href="http://google.com">google</a>
27340 <a href="http://google.com">google</a>
27348 <ul><li> <div>foo</div></li>
27349 <li> <div style="color:red">foo</div></li>
27350 <li> <td></li></ul>
27353 * <nowiki><div>foo</div></nowiki>
27354 * <nowiki><div style="color:red">foo</div></nowiki>
27355 * <nowiki><td></nowiki>
27359 3. multi-line html tag
27378 <p><ref>foo</ref>
27379 </p><p><ref>bar
27380 </p><p>baz</ref>
27383 <nowiki><ref>foo</ref></nowiki>
27385 <nowiki><ref>bar</nowiki>
27387 baz<nowiki></ref></nowiki>
27391 Parsoid: newline inducing block nodes don't suppress <nowiki>
27397 <nowiki> </nowiki>a
27402 #### --------------- Others ---------------
27408 <p><nowiki>foo</nowiki>
27411 <nowiki>foo</nowiki>
27414 ## The quote-char in the input is necessary for triggering the bug
27416 (T54035) Nowiki-escaping should not get tripped by " :" in text
27425 #----------- End of wikitext escaping tests --------------
27429 Tag-like HTML structures are passed through as text
27451 </p><p>1<d e>f
27456 HTML tag with necessary entities in attributes
27458 <span title="&amp;">foo</span>
27460 <p><span title="&amp;">foo</span>
27465 HTML tag with 'unnecessary' entity encoding in attributes
27467 <span title="&">foo</span>
27469 <p><span title="&">foo</span>
27474 HTML tag with broken attribute value quoting
27476 parsoid=wt2html,html2html
27478 <span title="Hello world>Foo</span>
27480 <p><span title="Hello world">Foo</span>
27483 <p><span title="Hello world">Foo</span></p>
27487 Self-closed tag with broken attribute value quoting
27489 parsoid=wt2html,html2html
27491 <div title="Hello world />Foo
27493 <div title="Hello world"></div><p>Foo</p>
27495 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27499 Table with broken attribute value quoting
27501 parsoid=wt2html,html2html
27504 | title="Hello world|Foo
27509 <td title="Hello world">Foo
27514 <td title="Hello world">Foo
27519 Table with broken attribute value quoting on consecutive lines
27521 parsoid=wt2html,html2html
27524 | title="Hello world|Foo
27525 | style="color:red|Bar
27530 <td title="Hello world">Foo
27532 <td style="color:red">Bar
27537 <td title="Hello world">Foo
27538 </td><td style="color: red">Bar
27539 </td></tr></tbody></table>
27543 Accept empty td cell attribute
27546 | align="center" |foo|| |
27551 <td align="center">foo</td>
27557 Non-empty attributes in th-cells
27560 !Foo!! style="color: red" |Bar
27566 <th style="color: red">Bar
27571 Accept empty attributes in th-cells
27585 Empty table rows go away
27605 ### Parsoid-centric tests for testing RTing of inter-element separators
27606 ### Edge cases not tested by existing parser tests and specific to
27607 ### Parsoid-specific serialization strategies.
27611 RT-ed inter-element separators should be valid separators
27622 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27626 # Parsoid-only test of a DOM pass
27628 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27640 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27641 <p>bar</p></small></td></tr>
27645 <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>
27649 # Note that the "style" attribute is really a template parameter here.
27650 # The = would have to be {{=}} if you wanted the literal.
27652 Empty TD followed by TD with tpl-generated attribute
27657 |{{echo|style='color:red'}}|foo
27670 Indented table with an empty td
27688 Indented table with blank lines in between (T85627)
27706 <br /></p></td></tr>
27711 Indented block & table
27724 <div data-parsoid='{"stx":"html"}'>foo</div>
27726 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27731 Indent and comment before table row
27745 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27746 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27750 # PHP parser omits empty TR
27752 Empty TR followed by a template-generated TR
27756 {{echo|<tr><td>foo</td></tr>}}
27761 <tbody><tr><td>foo</td></tr>
27766 <tr class='mw-empty-elt'></tr>
27767 <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}}]}'>
27772 ## PHP and parsoid output differ for this; as usual PHP omits empty
27773 ## elements, and since it strips the comments the TR is empty.
27775 Empty TR followed by mixed-ws-comment line should RT correctly
27791 <tr class='mw-empty-elt'></tr>
27794 <!--c--> </tr><!--d-->
27799 Multi-line image caption generated by templates with/without trailing newlines
27801 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27802 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27804 <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>
27805 <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>
27809 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27813 <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>
27815 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27817 <includeonly>foo</includeonly>
27825 ## PHP emits broken html for this, and since this is primarily
27826 ## a Parsoid serializer test, marking this Parsoid only
27828 Improperly nested inline or quotes tags with whitespace in between
27830 <span> <s>x</span> </s>
27833 <p><span> <s>x</s></span><s> </s>
27834 <b> <i>x</i></b><i> </i>
27839 Encapsulate protected attributes from wt
27841 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27843 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27847 <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>
27849 <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">
27850 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
27854 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27855 ## Having nested or stray pre tags results in the attempt to add duplicates,
27856 ## causing an assertion fail. This test tries to prevent that situation.
27858 Ensure ParagraphWrapper can deal with stray closing pre tags
27867 ## Remex doesn't account for fostered content.
27869 1. Ensure fostered text content is wrapped in element nodes
27873 <table>hi</table><table>ho</table>
27875 hi<table></table>ho<table></table>
27877 <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>
27880 ## Remex doesn't account for fostered content.
27882 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27884 parsoid=wt2html,wt2wt
27894 </td></tr></tbody></table>
27896 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
27897 <table data-parsoid='{"stx":"html"}'>
27898 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
27899 </td></tr></tbody></table>
27902 ## Remex doesn't account for fostered content.
27904 Encapsulation properly handles null DSR information from foster box
27906 parsoid=wt2html,wt2wt
27908 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27910 <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>
27913 ## Remex doesn't account for fostered content.
27915 1. Encapsulate foster-parented transclusion content
27917 parsoid=wt2wt,wt2html
27919 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27921 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
27923 <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>
27927 2. Encapsulate foster-parented transclusion content
27929 parsoid=wt2wt,wt2html
27931 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27933 <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>
27944 3. Encapsulate foster-parented transclusion content
27946 parsoid=wt2wt,wt2html
27948 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27950 <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>"]}">
27963 4. Encapsulate foster-parented transclusion content
27965 parsoid=wt2wt,wt2html
27967 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27969 <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>"]}">
27981 ## Remex doesn't account for fostered content.
27983 5. Encapsulate foster-parented transclusion content
27985 parsoid=wt2wt,wt2html
27987 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27989 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27991 <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>
27994 ## Remex doesn't account for fostered content.
27996 6. Encapsulate foster-parented transclusion content
27998 parsoid=wt2wt,wt2html
28000 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
28002 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
28004 <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>
28008 7. Encapsulate foster-parented transclusion content
28010 parsoid=wt2wt,wt2html
28012 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
28014 <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>
28024 ## Remex doesn't account for fostered content.
28025 # Note that the wt is broken on purpose: the = should be {{=}} if you
28026 # don't want it to be a template parameter key.
28028 8. Encapsulate foster-parented transclusion content
28030 parsoid=wt2wt,wt2html
28033 }}{|{{echo|style='color:red'}}
28044 </td></tr></tbody></table>
28046 <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">
28047 </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">
28050 </td></tr></tbody></table>
28053 ## Remex doesn't account for fostered content.
28055 9. Encapsulate foster-parented transclusion content
28057 parsoid=wt2wt,wt2html
28059 <table>{{echo|hi</table>hello}}
28061 hi<table></table><p>hello</p>
28063 <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>
28067 Table in fosterable position
28078 <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">
28080 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
28086 # Parsoid only for T66747
28088 Properly encapsulate empty-content transclusions in fosterable positions
28096 <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"}]]}'>
28101 ## No longer captures its original intention
28103 Always encapsulate foster box when template range is expanded to table
28116 T115289: Unclosed table
28118 {{echo|<table>}}<!--c-->[[Category:Two]]
28120 <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>
28124 T115289: Don't migrate newlines out of tables with fostered content
28126 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
28128 <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>
28132 T73074: More fostering fun
28134 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
28136 <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>
28140 Support <object> element with .data attribute
28144 <object data="test.swf"></object>
28146 <object data="test.swf"></object>
28150 Don't block XML namespace declaration
28152 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28154 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
28157 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
28160 # -----------------------------------------------------------------
28161 # The following section of tests are primarily to spec requirements
28162 # around Parsoid's serialization (old, new, edited content)
28164 # All these tests are marked Parsoid html2wt and html2html only
28165 # ----------------------------------------------------------------
28168 Ignore rel attribute in a-tags during serialization to url-links
28172 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
28173 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
28174 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
28176 http://en.wikipedia.org/wiki/Foobar
28177 http://en.wikipedia.org/wiki/Foobar
28178 http://en.wikipedia.org/wiki/Foobar
28181 # 'mi' is a localinterwiki prefix as well as a language
28183 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
28187 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
28193 Parsoid should accept interwiki shortcuts
28197 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
28198 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
28199 <a href='./fr:Foo'>Foo</a></p>
28200 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
28201 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
28202 <a href='fr%3AFoo'>Foo</a></p>
28203 <p><a href='FR%3AFoo'>Foo</a>
28204 <a href='./FR:Foo'>Foo</a></p>
28219 Parsoid should not accept invalid interwiki shortcuts
28223 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
28224 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
28225 <a href='news:Foo'>Foo</a></p>
28234 New wikilinks should be serialized properly
28238 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
28239 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
28240 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
28241 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
28242 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
28246 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
28247 http://en.wikipedia.org/wiki/Foo
28248 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
28252 New wiki links (href variations)
28256 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28257 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
28258 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
28259 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
28264 [[Toxine bactérienne]]
28268 New wiki links (content string variations)
28272 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28273 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
28274 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
28278 [[Foo_bar|./Foo_bar]]
28282 New category links (href variations)
28286 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
28287 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
28288 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
28290 [[Category:Toxine bactérienne]]
28291 [[Category:Toxine bactérienne]]
28292 [[Category:Toxine bactérienne]]
28296 New sol transparent links don't need indent-pre nowiki protection
28301 <link rel="mw:PageProp/redirect" href="./Main_Page">
28302 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
28303 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
28305 #WEITERLEITUNG [[Main Page]]
28306 <!-- this is good --> [[Category:Good]]
28307 <!-- this is great --> [[Kategorie:Great]]
28311 New interlanguage links (href variations)
28315 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
28316 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
28317 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
28319 [[es:Toxine bactérienne]]
28320 [[es:Toxine_bactérienne]]
28321 [[es:Toxine_bactérienne]]
28325 Image: Modifying size of an image (1)
28328 "modes": ["wt2wt"],
28330 ["img[height]", "attr", "height", "22"],
28331 ["img[width]", "attr", "width", "200"]
28335 [[Image:Foobar.jpg|230x230px]]
28337 [[Image:Foobar.jpg|200x200px]]
28341 Image: Modifying size of an image (2)
28344 "modes": ["wt2wt"],
28346 ["img[height]", "attr", "height", "100"],
28347 ["img[width]", "attr", "width", "500"]
28351 [[Image:Foobar.jpg|230x230px]]
28353 [[Image:Foobar.jpg|500x500px]]
28356 # Change in size is ignored so long as class='mw-default-size'
28358 Image: Modifying size of an image (3)
28361 "modes": ["wt2wt"],
28363 ["figure[class]", "removeClass", "mw-default-size"],
28364 ["figure img", "attr", "height", "19"],
28365 ["figure img", "attr", "width", "170"]
28369 [[Image:Foobar.jpg|thumb]]
28371 [[Image:Foobar.jpg|thumb|170x170px]]
28375 Image: Modifying alignment of an image (T50665)
28378 "modes": ["wt2wt"],
28380 ["figure[class]", "removeClass", "mw-halign-right"],
28381 ["figure[class]", "addClass", "mw-halign-left"]
28385 [[Image:Foobar.jpg|thumb|caption|right]]
28387 [[Image:Foobar.jpg|thumb|caption|left]]
28391 Image: Modifying mw-default-size of an frameless image (T64805)
28394 "modes": ["wt2wt"],
28396 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28400 [[Image:Foobar.jpg|frameless|right]]
28402 [[Image:Foobar.jpg|frameless|right|220x220px]]
28406 Image: Modifying valign of an image (T51221)
28409 "modes": ["wt2wt"],
28411 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28412 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28416 [[File:Foobar.jpg|20px|middle]]
28418 [[File:Foobar.jpg|20px|text-top]]
28422 Image: Modifying alt attribute of an image (T58400)
28425 "modes": ["wt2wt"],
28427 ["img[alt]", "attr", "alt", "some alternate edited text"]
28431 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28433 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28437 Image: Modifying caption of an image
28440 "modes": ["wt2wt"],
28442 ["figcaption", "text", "new caption"]
28446 [[Image:Foobar.jpg|thumb|original caption]]
28448 [[Image:Foobar.jpg|thumb|new caption]]
28452 Image: empty alt attribute (T50924)
28454 [[File:Foobar.jpg|thumb|alt=|bar]]
28456 <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>
28458 <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>
28462 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28468 <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>
28470 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28474 Image: Block level image should have \n before and after
28477 [[File:Foobar.jpg|right|thumb|150x150px]]
28481 <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></figure>
28486 Image: New block level image should have \n before and after (existing content)
28489 [[File:Foobar.jpg|right|thumb|150x150px]]
28493 <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></figure>
28498 Image: upright option (parsoid)
28500 [[File:Foobar.jpg|thumb|upright|caption]]
28501 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28502 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28504 <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>
28505 <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>
28506 <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>
28510 Image: upright option is ignored on inline and frame images (parsoid)
28512 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28514 <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>
28518 Image: in template parameter with empty parameter
28520 {{echo|[[File:Foobar.jpg|link=]]}}
28522 <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>
28526 Image: from basic HTML (1)
28530 <span typeof="mw:Image">
28531 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28534 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28538 Image: from basic HTML (2)
28542 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28544 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28548 Image: from basic HTML (3)
28552 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28554 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28558 Image: from basic HTML (4)
28562 <img src="./File:Foobar.jpg">
28564 [[File:Foobar.jpg|link=]]
28568 Image: Invalid title as link
28570 [[File:Foobar.jpg|link=<]]
28572 <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>
28575 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=<"}]}' data-mw='{"caption":"link=&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>
28579 Various link types in alt and link options
28581 [[File:Foobar.jpg|link=[[Main Page]]|alt=[[Main Page]]|caption]]
28583 [[File:Foobar.jpg|link=[[Media:Thumb.png]]|alt=[[Media:Thumb.png]]|caption]]
28585 [[File:Foobar.jpg|link=[[wikipedia:Foo]]|alt=[[wikipedia:Foo]]|caption]]
28587 <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>
28588 </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>
28589 </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>
28592 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"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" data-parsoid='{"a":{"alt":"Main Page","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=[[Main Page]]","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
28594 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"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" data-parsoid='{"a":{"alt":"Media:Thumb.png","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=[[Media:Thumb.png]]","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
28596 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"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" data-parsoid='{"a":{"alt":"wikipedia:Foo","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=[[wikipedia:Foo]]","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
28600 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28605 <li><p>foo</p></li>
28612 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28616 <ul> <li>foo</li></ul>
28622 Don't strip leading whitespace when handling indent-pre suppressing tags
28627 <tr><td> indented row</td></tr>
28630 <b>This is very bold of you!</b>
28633 indented cell (no pre-wrapping!)
28643 '''This is very bold of you!'''
28647 indented cell (no pre-wrapping!)
28655 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28677 <nowiki> </nowiki></span>bar2
28680 <nowiki> </nowiki><span>bar</span>
28683 <nowiki> </nowiki><span>foo</span>
28688 Lists: Dont insert newlines in a serialized list item.
28692 <ul><li>a<br>b</li><li>c</li></ul>
28699 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28702 "modes": ["html2wt"],
28703 "scrubWikitext": false
28706 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28707 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28709 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28710 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28712 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28714 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28716 == hello there [[Category:A1]] ==
28718 == [[Category:A2]] hi pal ==
28720 == <!--foo--> [[Category:A3]] how goes it ==
28722 == it goes well [[Category:A4]] <!--bar--> ==
28724 ==howdy [[Category:A5]]==
28730 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28733 "modes": ["html2wt"],
28734 "scrubWikitext": true
28737 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28738 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28740 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28741 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28743 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28751 <!--foo-->[[Category:A3]]
28756 [[Category:A4]] <!--bar-->
28764 Headings: Don't hoist metas that come from templates
28767 "modes": ["html2wt"],
28768 "scrubWikitext": true
28771 <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>
28773 == {{echo|foo [[Category:Foo]]}} ==
28777 Headings: Category in ref isn't hoisted
28780 "modes": ["html2wt"],
28781 "scrubWikitext": true
28784 <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>
28786 <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>
28789 [[Category:Baz]] </ref> ==
28795 Parsoid: Serialize positional parameters with = in them as named parameter
28799 <p about="#mwt1" typeof="mw:Transclusion"
28800 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28802 <p about="#mwt1" typeof="mw:Transclusion"
28803 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28805 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28806 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28807 <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>
28811 {{echo|1=f=oo|2=bar}}
28813 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28814 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28815 {{echo|<nowiki>f=oo</nowiki>|bar}}
28819 Parsoid: Serialize positional parameters with = in extlink as named parameter
28823 <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>
28825 {{echo|1=http://stuff?is=ok}}
28829 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28833 <div>a<p>b</p></div>
28854 Substrings resembling wikitext in hrefs should not get nowiki escapes
28858 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28864 Enforce single-line context in the serializer
28871 <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">
28872 </span><span about="#mwt1">you</span> </h2>
28874 <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>
28876 <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
28877 there</span></li></ol>
28889 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28896 </tbody></table></dd></dl>
28900 == hi {{bogus|there
28911 * foo '''bar''' baz
28923 Serialize new placeholder space without spans
28927 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28929 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28931 <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>
28937 <ref>foo : bar</ref>ok
28941 #-----------------------
28942 # Tag minimization tests
28943 #-----------------------
28946 1. I/B quote minimization: wikitext-only tags should be combined
28950 <p><i>A</i><i>B</i></p>
28951 <p><b>A</b><b>B</b></p>
28952 <p><i>A</i><b><i>B</i></b></p>
28953 <p><b>A</b><i><b>B</b></i></p>
28954 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28955 <p><i><b>A</b></i><i><b>B</b></i></p>
28956 <p><i><b>A</b></i><b><i>B</i></b></p>
28957 <p><b><i>A</i></b><i><b>B</b></i></p>
28977 2. I/B quote minimization: wikitext and html tags should not be combined
28981 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28982 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28986 ''A''<nowiki/>'''<i>B</i>'''
28990 3. I/B quote minimization: templated content stops minimization
28994 <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>
28995 <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>
28997 ''A''{{echo|''B''}}
28999 ''A''{{echo|'''''B'''''}}
29003 4. I/B quote minimization: new content should be mimimized with adjacent old content
29007 <p><i>A</i><i>B</i></p>
29008 <p><b>A</b><b>B</b></p>
29009 <p><i>A</i><b><i>B</i></b></p>
29019 5a. Merge adjacent quote nodes if they've been edited
29022 "modes": ["wt2wt", "selser"],
29024 ["p", "contents", "remove", ":contains('b')"]
29034 5b. Merge adjacent quote nodes if they've been edited
29037 "modes": ["wt2wt", "selser"],
29043 ''a''<span id="x">b</span>''c''
29049 1. Merge adjacent link nodes as long as at least one element is new
29052 "modes": ["html2wt"],
29053 "scrubWikitext": true
29056 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29057 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29058 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
29062 [[Football|Foot]][[Football|ball]]
29066 2. Merge adjacent link nodes and enable additional normalizations
29069 "modes": ["html2wt"],
29070 "scrubWikitext": true
29073 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
29079 3. Don't merge adjacent link nodes if scrubWikitext is false
29082 "modes": ["html2wt"],
29083 "scrubWikitext": false
29086 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
29088 [[Football|Foot]][[Football|ball]]
29092 1. Move format tags outside of WikiLink
29095 "modes": ["html2wt"],
29096 "scrubWikitext": true
29099 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
29100 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
29101 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
29104 '''''[[Football]]'''''
29105 <u>'''''[[Football]]'''''</u>
29109 2. Move format tags outside of WikiLink with mergable A tags
29112 "modes": ["html2wt"],
29113 "scrubWikitext": true
29116 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
29118 '''''[[Football]]'''''
29122 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
29125 "modes": ["html2wt"],
29126 "scrubWikitext": true
29129 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
29131 <font color="red"><u>'''[[Foo]]'''</u></font>
29135 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
29138 "modes": ["html2wt"],
29139 "scrubWikitext": true
29142 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
29143 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
29144 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
29146 [[Foo|<font color="red">Foo</font>]]
29147 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
29148 [[Foo|<span class="Bar">Foo</span>]]
29152 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
29155 "modes": ["selser"],
29156 "scrubWikitext": true,
29158 ["a", "html", "<i>Foo</i>"]
29168 6. Regression test: Manual edit test to ensure diff markers are not lost
29171 "modes": ["selser"],
29172 "scrubWikitext": true,
29174 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
29184 7. T194083 Regression test: Manual edit test to ensure nested diff markers aren't inserted
29187 "modes": ["selser"],
29188 "scrubWikitext": true,
29190 ["div", "after", "\n<p><a href='./Foo' rel='mw:WikiLink'>Foo </a>, placeholder</p>"]
29194 <div>placeholder</div>
29196 <div>placeholder</div>
29197 [[Foo]] , placeholder
29200 #------------------------------
29201 # End of tag minimization tests
29202 #------------------------------
29205 T56262: New entities
29209 <span typeof="mw:Entity"> </span>
29214 ## Note that there is no wikitext output for 'unknownproperty' ##
29215 ## Unknown magic words are silently dropped ##
29222 <meta property='mw:PageProp/toc' />
29223 <meta property='mw:PageProp/notoc' />
29224 <meta property='mw:PageProp/forcetoc' />
29225 <meta property='mw:PageProp/index' />
29226 <meta property='mw:PageProp/noindex' />
29227 <meta property='mw:PageProp/nogallery' />
29228 <meta property='mw:PageProp/noeditsection' />
29229 <meta property='mw:PageProp/notitleconvert' />
29230 <meta property='mw:PageProp/nocontentconvert' />
29231 <meta property='mw:PageProp/unknownproperty' />
29241 __NOCONTENTCONVERT__
29245 Consecutive <pre>s should not get merged
29247 parsoid=html2wt,html2html
29249 <pre>a</pre><pre>b</pre>
29277 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
29281 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
29283 [[Special:BookSources/1234567890|ISBN 1234567895]]
29287 Edited RFC links not serializable as RFC links should serialize as extlinks
29291 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
29293 [https://tools.ietf.org/html/rfc123 New RFC]
29297 Edited PMID links not serializable as PMID links should serialize as extlinks
29301 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
29303 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
29307 WTS of autolinks with trailing/surrounding context
29311 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
29312 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
29313 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
29314 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
29315 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
29316 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
29318 http://cscott.net'''foo'''
29320 http://cscott.net<b>foo</b>
29322 '''http://cscott.net'''
29324 '''http://cscott.net '''
29326 '''http://cscott.net<nowiki/>x'''
29328 http://cscott.net<nowiki/>x
29332 WTS of autolinks with nowikis (round-trip)
29334 x<nowiki/>http://cscott.net<nowiki/>x
29336 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
29339 # this is the "easy" test because it leaves in place all the
29340 # data-parsoid information indicating this is an autolink
29342 WTS of autolinks with escapes (editing)
29345 "modes": ["wt2wt"],
29347 [ "span", "remove" ]
29351 x<nowiki/>http://cscott.net<nowiki/>x
29353 x<nowiki/>http://cscott.net<nowiki/>x
29357 WTS of edited autolink-like text (T103364)
29360 "modes": ["wt2wt"],
29362 [ "span[typeof]", "removeAttr", "typeof" ]
29366 Not a link: <nowiki>http://example.com</nowiki>.
29368 Not a link: <span><nowiki>http://example.com</nowiki></span>.
29372 WTS of newly-authored autolink-like text (T103364)
29376 <p>http://example.com is not a link.</p>
29378 <nowiki>http://example.com</nowiki> is not a link.
29382 WTS of autolink-like text after an autolink (T108563)
29386 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
29388 http://example.com <nowiki>http://example.com</nowiki> is not a link.
29392 Magic links inside links (not autolinked)
29394 [[Foo|http://example.com]]
29397 [[Foo|ISBN 123456789x]]
29399 [http://foo.com http://example.com]
29400 [http://foo.com RFC 1234]
29401 [http://foo.com PMID 1234]
29402 [http://foo.com ISBN 123456789x]
29404 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29405 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29406 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29407 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29408 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29409 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29410 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29411 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29414 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29415 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29416 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29417 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29419 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
29420 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
29421 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
29422 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
29426 Magic links inside image captions (autolinked)
29428 [[File:Foobar.jpg|thumb|http://example.com]]
29429 [[File:Foobar.jpg|thumb|RFC 1234]]
29430 [[File:Foobar.jpg|thumb|PMID 1234]]
29431 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
29433 <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>
29434 <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>
29435 <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>
29436 <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>
29438 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
29439 <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>
29440 <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>
29441 <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>
29445 WTS of magic word text (T109371)
29450 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
29451 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
29453 <nowiki>RFC 1234</nowiki>
29455 [http://foo.com RFC 1234]
29461 Edited Redirect link should emit a non-piped wikitext link
29465 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29471 T75121: Infer extension name from typeOf if data-mw is not present
29473 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29475 <div typeOf="mw:Extension/foo"></div>
29480 # Note that the <p> wrapping isn't present in PHP parser output
29481 # The important thing for this test is that P-wrapping doesn't
29482 # interfere with the <nowiki> protection for leading - in <td>
29483 # (which isn't necessary for <th>).
29485 T88318: p-wrapped dash in table.
29487 parsoid=html2wt,wt2wt
29490 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29491 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29492 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
29499 |<nowiki>-</nowiki>
29500 |<nowiki>- </nowiki>
29520 <td><small>-</small>
29527 </td></tr></tbody></table>
29531 T149209: WTS: Handle newlines in table cells properly
29539 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29541 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29547 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29549 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29571 T149209: Selser: Handle newlines in table cells properly
29574 "modes": ["selser"],
29576 [ "#h1", "html", "a\nb\n" ],
29577 [ "#h2", "html", "a\nb\n" ],
29578 [ "#c1", "html", "a\nb\n" ],
29579 [ "#c2", "html", "<p>a</p>" ],
29580 [ "#c3", "html", "<p>a</p>" ],
29581 [ "#c4", "html", "edit-me<p>a</p>" ]
29586 ! id="h1" |edit-me!!1
29588 ! id="h2" |edit-me||2
29590 | id="c1" |edit-me||3
29592 | id="c2" |edit-me||4
29594 | id="c3" |edit-me||p||q||r
29596 | id="c4" |edit-me||p||q||r
29625 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29630 <td id='mwAc'>foo</td>
29631 <td id='serialize-this'>bar</td>
29636 | id="serialize-this" |bar
29641 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29645 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29647 <div id="hello">ok</div>
29651 Testing serialization after deletion in references
29654 "modes": ["wt2wt"],
29660 hi <ref><div id="x">ho</div></ref>
29670 Testing serialization after deletion of table cells
29673 "modes": ["wt2wt", "selser"],
29681 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29691 Testing selser after addition of new row before first row (T125419)
29694 "modes": ["wt2wt", "selser"],
29696 [ "tr", "before", "<tr><td>X</td></tr>" ]
29712 Serialize new table rows in a HTML table using HTML tags
29715 "modes": ["wt2wt", "selser"],
29717 [ "tr", "before", "<tr><td>X</td></tr>" ]
29721 <table><tr><td>a</td></tr></table>
29723 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29727 Serialize new table cells in a HTML row using HTML tags
29730 "modes": ["wt2wt", "selser"],
29732 [ "td", "before", "<td>X</td>" ]
29736 <table><tr><td>a</td></tr></table>
29738 <table><tr><td>X</td><td>a</td></tr></table>
29742 Serialize wikitext list items as HTML list items when embedded in a HTML list
29746 <ul data-parsoid='{"stx": "html"}'>
29747 <li data-parsoid='{}'>a</li>
29762 # Nested list should be inside <li>, that is
29763 # <ul><li>foo<ul>..</ul></li></ul> instead of
29764 # <ul><li>foo</li><ul>..</ul></ul>
29765 # See https://stackoverflow.com/questions/5899337/proper-way-to-make-html-nested-list
29767 Wikitext lists can be nested inside HTML lists
29771 <ul data-parsoid='{"stx": "html"}'>
29772 <li data-parsoid='{"stx": "html"}'>a
29773 <ul><li>b</li></ul>
29777 <ul data-parsoid='{"stx": "html"}'>
29779 <ul><li>y</li></ul>
29797 <ul><li>b</li></ul>
29802 <ul><li>y</li></ul>
29811 "modes": ["wt2wt"],
29813 [ "#xyz", "before", "<b>before</b> stuff " ],
29814 [ "#xyz", "after", " stuff <i>after</i>" ],
29815 [ "#xyz", "html", "x <b>y</b> z" ]
29819 <span id="xyz">hello</span>
29821 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29825 Never serialize a-tag as html, regardless of what data-parsoid has to say
29827 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29829 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29834 ## SSS FIXME: This is broken output nevertheless.
29835 ## What might be a reasonable non-broken output for this?
29836 ## This is an edge case unlikely to be seen in production
29837 ## that I am not wasting more time on this right now.
29839 Never serialize a-tag as html, no matter what attributes it has
29841 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29843 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29845 [http://boo.org http://boohoo.org]
29848 # Misnested is an indication that selser can reuse the source but these have
29849 # shown to sneak through on occasion. See T101768.
29850 # The original wikitext here is: [http://test.com [[one]] two three]
29852 Strip span tags added to mark misnested links
29856 <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>
29858 [http://test.com][[one]] two three
29862 Catch regression when unpacking misnested links
29866 {{echo|hi}}[http://example.com [[ho]]]
29868 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"misnested":true}'>ho</a></p>
29872 Catch regression when unpacking with trailing content
29874 {{echo|Foo <references/> bar}}
29876 <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>
29880 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29884 <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|}"]}'>
29896 ## This test verifies the presence and computation of this attribute indirectly
29897 ## by making an edit and ensuring that the serialization is correct (which it would be
29898 ## only if firstWikitextNode is properly set).
29900 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
29903 "modes": ["wt2wt"],
29905 [ "div#x", "remove" ],
29906 [ "div", "before", "<div>new</div>" ]
29910 <div id="x">foo</div>
29912 {{echo|<div>boo</div>
29920 {{echo|<div>boo</div>
29926 # --------------------------------------------
29927 # Tests spec'ing wikitext serialization norms |
29928 # --------------------------------------------
29931 Serialize multi-line indent-pre starting with wikitext syntax
29945 1. Categories should always be serialized on their own line
29949 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
29957 2. Categories that are part of templates should not introduce a line break
29959 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
29961 <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>
29964 # Careful while editing these next 2 tests. There are \u200f characters
29965 # before and after the <link> tags in the HTML and following some
29966 # of the categories in wikitext
29967 # Do not remove these characters in edits.
29969 # As part of the serialization, these bidi characters will get stripped.
29971 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
29974 "modes": ["html2wt"],
29975 "scrubWikitext": true
29978 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
29979 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
29982 [[קטגוריה: שיטות משפט]]
29986 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
29989 "modes": ["html2wt"],
29990 "scrubWikitext": true
29993 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
30000 Lists: Add space after bullets
30007 <li><span> baz</span></li>
30012 * <span> baz</span>
30016 1. Headings: Add space before/after == (T53744)
30023 <h2><span> baz</span></h2>
30031 == <span> baz</span> ==
30035 2. Headings: Add space before/after == even after hoisted content
30038 "modes": ["html2wt"],
30039 "scrubWikitext": true
30042 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
30050 1. Headings: suppress newly created empty headings
30053 "modes": ["html2wt"],
30054 "scrubWikitext": true
30062 2. Headings: don't suppress empty headings if scrubWikitext is false
30072 3. Headings: suppress empty headings on edits
30075 "modes": ["selser"],
30076 "scrubWikitext": true,
30082 ==<span id="x">foo</span>==
30087 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
30090 "modes": ["html2wt"],
30091 "scrubWikitext": true
30094 <h2>foo<br/>bar</h2>
30095 <h2>foo <span><br/>bar</span> baz</h2>
30099 == foo <span> bar</span> baz ==
30103 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
30106 "modes": ["html2wt"],
30107 "scrubWikitext": false
30110 <h2>foo<br/>bar</h2>
30116 1. WT Quote Tags: suppress newly created empty style tags
30119 "modes": ["html2wt"],
30120 "scrubWikitext": true
30128 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
30134 ''<nowiki/>'''''<nowiki/>'''
30138 3. WT Quote Tags: suppress empty style tags on edits
30141 "modes": ["selser"],
30142 "scrubWikitext": true,
30148 '''<span id="x">foo</span>'''
30153 1. Anchors: suppress newly created empty anchors
30156 "modes": ["html2wt"],
30157 "scrubWikitext": true
30160 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30165 2. Anchors: don't suppress empty anchors if scrubWikitext is false
30168 "modes": ["html2wt"],
30169 "scrubWikitext": false
30172 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
30178 3. Anchors: suppress empty anchors on edits
30181 "modes": ["selser"],
30182 "scrubWikitext": true,
30188 [[Test|<span id="x">foo</span>]]
30193 3a. Anchors: do not suppress numbered extlinks
30196 "modes": ["wt2wt"],
30197 "scrubWikitext": true
30202 <a rel="mw:ExtLink" href="http://foo.com"></a>
30206 3b. Anchors: do not suppress numbered extlinks
30209 "modes": ["wt2wt"],
30210 "scrubWikitext": true,
30216 [http://foo.com <span id="x">foo</span>]
30222 Normalizations should be restricted to edited content
30225 "modes": ["selser"],
30226 "scrubWikitext": true,
30228 [ "h1", "before", "<i></i>"]
30242 1. Multiple normalizations (html2wt)
30245 "modes": ["html2wt"],
30246 "scrubWikitext": true
30250 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
30251 </a><b><i></i></b>x</p>
30259 2. Multiple normalizations (selser)
30262 "modes": ["selser"],
30263 "scrubWikitext": true,
30265 [ "#x", "after", "<h1><i></i></h1>\n<p> bar<b></b></p>"]
30269 <div id="x">foo</div>
30271 <div id="x">foo</div>
30276 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
30279 "modes": ["html2wt"],
30280 "scrubWikitext": true
30292 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
30299 <nowiki> </nowiki>hi
30301 <nowiki> </nowiki> hello
30305 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
30308 "modes": ["html2wt"],
30309 "scrubWikitext": true
30318 baz bang</td></tr></table>
30324 bar<span>boo</span></p>
30340 bar<span>boo</span>
30344 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
30347 "modes": ["selser"],
30348 "scrubWikitext": true,
30350 [ "p", "html", " a\n b" ]
30361 1. New links that end in spaces
30364 "modes": ["html2wt"],
30365 "scrubWikitext": false
30368 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30369 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30370 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30372 [[Berlin ]]<nowiki/>is the capital of Germany.
30376 [[Boston ]] is a city.
30380 2. New links that end in spaces
30383 "modes": ["html2wt"],
30384 "scrubWikitext": true
30387 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30388 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30389 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30391 [[Berlin]] is the capital of Germany.
30395 [[Boston]] is a city.
30399 1. Table cells with escapable prefixes
30402 "modes": ["html2wt"],
30403 "scrubWikitext": false
30407 <tr><td>a</td></tr>
30408 <tr><td>-</td></tr>
30409 <tr><td>+</td></tr>
30410 <tr><td>}</td></tr>
30416 |<nowiki>-</nowiki>
30418 |<nowiki>+</nowiki>
30420 |<nowiki>}</nowiki>
30425 2. Table cells with escapable prefixes
30428 "modes": ["html2wt"],
30429 "scrubWikitext": true
30433 <tr><td>a</td></tr>
30434 <tr><td>-</td></tr>
30435 <tr><td>+</td></tr>
30436 <tr><td>}</td></tr>
30451 3a. Table cells with escapable prefixes after edits
30454 "modes": ["selser"],
30455 "scrubWikitext": true,
30457 [ "table tbody tr:first-child td:first-child", "remove"]
30471 3b. Table cells with escapable prefixes after edits
30474 "modes": ["selser"],
30475 "scrubWikitext": true,
30477 [ "table tbody tr:first-child td:first-child", "html", "-" ],
30484 |<span id="x">foo</span>+
30493 # FIXME: This test will fail because
30494 # normalization doesn't realize that the id attribute
30495 # will eliminate the escapable scenario
30497 4a. Table cells without escapable prefixes after edits
30500 "modes": ["selser"],
30501 "scrubWikitext": true,
30503 [ "#x", "html", "-" ]
30516 ## This tests normalizer's ability to discriminate between
30517 ## cells having identical content.
30519 4b. Table cells without escapable prefixes after edits
30522 "modes": ["selser"],
30523 "scrubWikitext": true,
30525 [ "td", "html", "-" ]
30538 ## This tests normalizer's ability to not be tripped by
30539 ## comments (and whitespace)
30541 4c. Table cells without escapable prefixes after edits
30544 "modes": ["selser"],
30545 "scrubWikitext": true,
30547 [ "table tbody tr td:first-child", "remove" ]
30562 ## This tests normalizer's ability to handle HTML cells
30564 4d. Table cells without escapable prefixes after edits
30567 "modes": ["selser"],
30568 "scrubWikitext": true,
30570 [ "td", "html", "-" ]
30575 <tr><td>a</td></tr>
30579 <tr><td>-</td></tr>
30583 ## T111151 Remove font elements without attributes
30585 5a. font tags without attributes should be dropped in scrubWikitext mode
30588 "modes": ["html2wt"],
30589 "scrubWikitext": true
30593 <font><font>bar</font></font>
30594 <font class="x">boo</font>
30598 <font class="x">boo</font>
30602 5b. font tags should not be dropped without scrubWikitext being enabled
30605 "modes": ["html2wt"],
30606 "scrubWikitext": false
30615 Ignore empty <p></p> when scrubWikitext is false
30618 "modes": ["html2wt"],
30619 "scrubWikitext": false
30623 <p>a</p><p></p><p>b</p>
30664 Normalize empty paragraphs to HTML form that html2wt expects
30667 "modes": ["html2wt"],
30668 "scrubWikitext": true
30672 <p>a</p><p></p><p>b</p>
30737 Empty paragraphs (marked with mw-empty-elt) found in source should not be normalized away
30740 "modes": ["html2wt"],
30741 "scrubWikitext": true
30749 <p class="mw-empty-elt"></p>
30753 <caption></caption>
30764 Templated content should be skipped over by normalization
30767 "modes": ["html2wt"],
30768 "scrubWikitext": true
30771 <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">
30772 </span><p about="#mwt2"></p><span about="#mwt2">
30775 {{SomeTemplate1|boo}}{{SomeTemplate2|booboo}}
30779 Escape nowiki DOM elements
30783 <nowiki><i>foo</i></nowiki>
30785 <nowiki>''foo''</nowiki>
30788 # This is meant to be an interim fix while we go about figuring out
30789 # how to not introduce these trailing <nowiki/>s in the first place.
30791 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30795 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30797 <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>
30798 <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>
30812 New list is serialized on newlines
30816 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30820 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30822 The quick brown fox jumps over the lazy dog.
30828 The quick onyx goblin jumps over the lazy dwarf.
30832 New lists in formatting elements serialized w/o newlines
30844 <small><ul><li>hi</li></ul></small>
30856 New list in table doesn't need newlines
30860 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30869 # ---------------------------------------------------
30870 # End of tests spec'ing wikitext serialization norms |
30871 # ---------------------------------------------------
30875 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30883 <td><b>c</b><p>d</p></td>
30902 Anchor without href scenarios
30904 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30907 <a class="no">dice</a>
30912 <span name="foo"></span>
30916 New transclusion added after a list should be serialized after the list
30920 <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>
30926 # -----------------------------------------------------------------
30927 # End of section for Parsoid-only html2wt tests for serialization
30929 # -----------------------------------------------------------------
30931 # -----------------------------------------------------------------
30932 # The following section of tests are primarily to spec behavior of
30933 # the selective serializer. All these tests have manual selser
30934 # changes. The automated selser changes for all tests handle the
30935 # wide variation of changes, but these tests here capture specs
30936 # deterministically.
30937 # ----------------------------------------------------------------
30941 Selser: New comments should not be lost
30944 "modes": ["selser"],
30946 [ "#a", "after", "<!--c1-->" ],
30947 [ "#b", "before", "<!--c2-->" ]
30951 <span id="a">a</span>
30953 <span id="b">b</span>
30955 <span id="a">a</span><!--c1-->
30957 <!--c2--><span id="b">b</span>
30962 Selser: Check for validity of DSR before using it
30965 "modes": ["selser"],
30967 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30971 <span id="a">a</span>
30973 {{DISPLAYTITLE:foo}}
30974 <span id="a">a</span>
30978 1. DOMDiff: Changes to <ref> content should be looked up using id
30981 "modes": ["selser"],
30983 ["#X", "after", "bar"],
30984 ["#Y", "after", "baz"]
30988 X <ref><span id="X">foo</span></ref>
30991 <ref name="a"><span id="Y">foo</span></ref>
30994 X <ref><span id="X">foo</span>bar</ref>
30997 <ref name="a"><span id="Y">foo</span>baz</ref>
31002 2. DOMDiff: Changes to <ref> content should be looked up using id
31005 "modes": ["selser"],
31007 ["#Z", "after", "bar"]
31011 A <ref>foo bar for a</ref>
31012 B <ref group="X" name="b" />
31016 <references group="X">
31017 <ref name="b"><span id="Z">foo</span></ref>
31020 A <ref>foo bar for a</ref>
31021 B <ref group="X" name="b" />
31025 <references group="X">
31026 <ref name="b"><span id="Z">foo</span>bar</ref>
31031 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
31034 "modes": ["selser"],
31036 [ "div:first-child", "text", "bar" ]
31040 <div style="{{1x|color:red;}}%">foo</div>
31042 <div style="{{1x|color:red;}}%">bar</div>
31054 <li class="mw-empty-elt"></li>
31055 <li class="mw-empty-elt"></li>
31062 [[File:Thumb.png|thumb]]
31064 <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>
31066 <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></figure>
31070 unclosed internal link XSS (T137264)
31072 [[#%3Cscript%3Ealert(1)%3C/script%3E|
31074 <p>[[#<script>alert(1)</script>|
31077 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
31081 Validating that <style> isn't eaten by tidy (T167349)
31086 <style>.foo::before { content: "<foo>"; }</style>
31087 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31091 <style>.foo::before { content: "<foo>"; }</style>
31092 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
31096 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31097 <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>
31101 ## Right now, Parsoid doesn't de-duplicate style tags.
31102 ## So, we shouldn't see link tags that need to bypass the sanitizer.
31103 ## In a followup patch, when we de-duplicate style tags and
31104 ## introduce link tags, we'll add a hook for link tags in
31105 ## the parser test runner script.
31107 Validating that <style> isn't wrapped in a paragraph (T186965)
31111 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31113 <style>.foo::before { content: "<foo>"; }</style>
31115 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31117 But if it's on a line with other content, let it be wrapped.
31119 <style>.foo::before { content: "<foo>"; }</style> bar
31121 foo <style>.foo::before { content: "<foo>"; }</style>
31123 foo <style>.foo::before { content: "<foo>"; }</style> bar
31125 And the same if we have non-paragraph-breaking whitespace
31128 <style>.foo::before { content: "<foo>"; }</style>
31131 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31133 <style>.foo::before { content: "<foo>"; }</style>
31134 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
31135 <p>But if it's on a line with other content, let it be wrapped.
31136 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
31137 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
31138 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
31139 </p><p>And the same if we have non-paragraph-breaking whitespace
31141 <style>.foo::before { content: "<foo>"; }</style>
31145 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph</p>
31147 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31149 <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>
31151 <p>But if it's on a line with other content, let it be wrapped.</p>
31153 <p><style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style> bar</p>
31155 <p>foo <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style></p>
31157 <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>
31159 <p>And the same if we have non-paragraph-breaking whitespace</p>
31162 <style typeof="mw:Extension/style" data-mw='{"name":"style","attrs":{},"body":{"extsrc":".foo::before { content: \"<foo>\"; }"}}'>.foo::before { content: "<foo>"; }</style>
31167 Validating that <link> isn't wrapped in a paragraph (T186965)
31171 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31173 <link rel="foo" href="bar"/>
31175 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31177 But if it's on a line with other content, let it be wrapped.
31179 <link rel="foo" href="bar"/> bar
31181 foo <link rel="foo" href="bar"/>
31183 foo <link rel="foo" href="bar"/> bar
31185 And the same if we have non-paragraph-breaking whitespace
31188 <link rel="foo" href="bar"/>
31191 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
31193 <link rel="foo" href="bar"/>
31194 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
31195 <p>But if it's on a line with other content, let it be wrapped.
31196 </p><p><link rel="foo" href="bar"/> bar
31197 </p><p>foo <link rel="foo" href="bar"/>
31198 </p><p>foo <link rel="foo" href="bar"/> bar
31199 </p><p>And the same if we have non-paragraph-breaking whitespace
31201 <link rel="foo" href="bar"/>
31207 Extension returning multiple nodes starting with a style tag roundtrips
31212 {{echo|<html><style>.hi { color: red; }</style>
31214 <tr><td class="hi">ho</td></tr>
31217 <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">
31218 </span></p><table about="#mwt5" data-parsoid='{"stx":"html"}'>
31220 <tbody><tr><td class="hi">ho</td></tr>
31225 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
31227 wgFragmentMode=[ 'html5', 'legacy' ]
31229 ==A&B&C&amp;D&amp;amp;E==
31230 [[#A&B&C&amp;D&amp;amp;E]]
31232 <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>
31233 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
31236 <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>
31237 <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>
31241 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
31243 wgFragmentMode=[ 'legacy' ]
31245 ==A&B&C&amp;D&amp;amp;E==
31246 [[#A&B&C&amp;D&amp;amp;E]]
31248 <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>
31249 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
31254 Decoding of HTML entities in embedded HTML tags
31256 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31258 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
31260 <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>
31264 Decoding of HTML entities in indicator names for IDs (T104196)
31266 parsoid=wt2html,html2html
31269 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31271 1&2&3&4&amp;5=Indicator
31274 <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>
31277 # this version of the test strips out the ambiguity so Parsoid rts cleanly
31279 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
31283 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
31285 1&2&3&4&amp;5=Indicator
31288 <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>
31291 # This fragment mode is what Parsoid supports.
31293 HTML5 ids: fallback to legacy
31295 wgFragmentMode=[ 'html5', 'legacy' ]
31307 ==Hey < # " > % : '==
31308 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31310 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31312 <!-- These two links should produce identical HTML -->
31313 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31316 <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>
31318 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31319 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31320 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31321 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31322 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31323 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31327 <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>
31328 <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>
31329 <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>
31330 <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>
31331 <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>
31332 <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>
31333 <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>
31334 </p><p>💩 <span id="💩"></span>
31335 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31338 <h2 id="Foo_bar">Foo bar</h2>
31340 <h2 id="foo_Bar_2">foo Bar</h2>
31342 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
31344 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
31346 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
31348 <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>
31349 <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>
31351 <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>
31353 <!-- These two links should produce identical HTML -->
31354 <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>
31357 # Parsoid doesn't support this mode
31359 HTML5 ids: legacy with a fallback to modern
31361 wgFragmentMode=[ 'legacy', 'html5' ]
31373 ==Hey < # " > % : '==
31374 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31376 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31378 <!-- These two links should produce identical HTML -->
31379 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31382 <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>
31384 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31385 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31386 <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>
31387 <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>
31388 <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>
31389 <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>
31393 <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>
31394 <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>
31395 <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>
31396 <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>
31397 <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>
31398 <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>
31399 <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>
31400 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
31401 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
31405 # Parsoid doesn't support this mode.
31407 HTML5 ids: no legacy
31409 wgFragmentMode=[ 'html5' ]
31421 ==Hey < # " > % : '==
31422 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
31424 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
31426 <!-- These two links should produce identical HTML -->
31427 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
31430 <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>
31432 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
31433 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
31434 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
31435 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
31436 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
31437 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
31441 <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>
31442 <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>
31443 <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>
31444 <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>
31445 <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>
31446 <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>
31447 <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>
31448 </p><p>💩 <span id="💩"></span>
31449 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
31454 T90902: Normalize weird characters in section IDs
31456 wgFragmentMode=[ 'html5', 'legacy' ]
31462 <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>
31463 <p><a href="#Foo_bar">#Foo bar</a>
31466 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
31467 <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>
31471 T51672: Test for brackets in attributes of elements in external link texts
31473 [http://example.com/ link <span title="title with [brackets]">span</span>]
31474 [http://example.com/ link <span title="title with [brackets]">span</span>]
31477 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31478 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31481 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31482 <a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]" data-parsoid='{"stx":"html","a":{"title":"title with [brackets]"},"sa":{"title":"title with &#91;brackets&#93;"}}'>span</span></a></p>
31486 T72875: Test for brackets in attributes of elements in internal link texts
31488 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31489 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31492 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31493 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31496 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31497 <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>
31501 T199926: html arrow wt: Parsoid sometimes trips up on verticalbar chars in hrefs
31504 "modes": ["html2wt"]
31507 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total">9</a>
31508 <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>
31510 [https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total 9]
31511 [[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|10]]
31515 T179544: {{anchorencode:}} output should be always usable in links
31517 wgFragmentMode=[ 'html5' ]
31519 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
31521 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
31524 <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>
31527 ## ------------------------------
31528 ## Parsoid section-wrapping tests
31529 ## ------------------------------
31531 Section wrapping for well-nested sections (no leading content)
31534 "wrapSections": true
31555 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31558 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31561 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31564 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
31567 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
31570 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
31577 Section wrapping for well-nested sections (with leading content)
31580 "wrapSections": true
31585 Para 2 with a <div>nested in it</div>
31598 <section data-mw-section-id="0"><p>Para 1.</p>
31600 <p>Para 2 with a </p><div>nested in it</div>
31604 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31607 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31610 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31613 </section></section>
31617 Section wrapping with template-generated sections (good nesting 1)
31620 "wrapSections": true
31637 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31640 <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">
31641 </span><p about="#mwt1">b</p>
31642 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
31645 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
31649 # In this example, the template scope is mildly expanded to incorporate the
31650 # trailing newline after the transclusion since that is part of section 1.1.1
31652 Section wrapping with template-generated sections (good nesting 2)
31655 "wrapSections": true,
31656 "modes": ["wt2html", "wt2wt"]
31671 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31674 <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">
31675 </span><p about="#mwt1">b</p><span about="#mwt1">
31676 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
31677 </span><p about="#mwt1">d</p><span about="#mwt1">
31678 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
31682 # In this example, the template scope is mildly expanded to incorporate the
31683 # trailing newline after the transclusion since that is part of section 1.2.1
31685 Section wrapping with template-generated sections (good nesting 3)
31688 "wrapSections": true,
31689 "modes": ["wt2html", "wt2wt"]
31707 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
31710 <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">
31711 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
31712 </span><p about="#mwt1">b</p><span about="#mwt1">
31713 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
31714 </span><p about="#mwt1">c</p><span about="#mwt1">
31715 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
31716 </span><p about="#mwt1">d</p><span about="#mwt1">
31717 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
31721 # Because of section-wrapping and template-wrapping interactions,
31722 # the scope of the template is expanded so that the template markup
31723 # is valid in the presence of <section> tags.
31724 # This exercises the s1 is null scenario in the wrapSections code
31726 Section wrapping with template-generated sections (bad nesting 1)
31729 "wrapSections": true
31743 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
31746 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n=1=\nb\n"}},"i":0}},"\n\nc\n"]}'>
31747 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
31748 </span><p about="#mwt1">b
31749 </p><span about="#mwt1">
31751 </span><p about="#mwt1">c</p><span about="#mwt1">
31752 </span></section></div></section>
31755 # Because of section-wrapping and template-wrapping interactions,
31756 # the scope of the template is expanded so that the template markup
31757 # is valid in the presence of <section> tags.
31758 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
31760 Section wrapping with template-generated sections (bad nesting 2)
31763 "wrapSections": true
31781 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31784 </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">
31785 </span><p about="#mwt1">b</p><span about="#mwt1">
31786 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
31787 </span><p about="#mwt1">c</p><span about="#mwt1">
31789 </span><p about="#mwt1">d</p><span about="#mwt1">
31791 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
31795 # Because of section-wrapping and template-wrapping interactions,
31796 # additional template wrappers are added to <section> tags
31797 # so that template wrapping semantics are valid whether section
31798 # tags are retained or stripped. But, the template scope can expand
31799 # greatly when accounting for section tags.
31800 # This exercises the s1 and s2 are in different subtrees scenario
31802 Section wrapping with template-generated sections (bad nesting 3)
31805 "wrapSections": true,
31806 "modes": ["wt2html", "wt2wt"]
31824 <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>
31827 <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">
31828 </span><p about="#mwt1">b</p><span about="#mwt1">
31829 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
31830 </span><p about="#mwt1">c</p>
31833 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
31838 Section wrapping with uneditable lead section + div wrapping multiple sections
31841 "wrapSections": true
31846 <div style="border:1px solid red;">
31863 <section data-mw-section-id="-1"><p>foo</p>
31865 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31866 <section data-mw-section-id="1"><h1 id="1">1</h1>
31869 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31872 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31876 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31879 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31881 </section></section>
31885 Section wrapping with editable lead section + div overlapping multiple sections
31888 "wrapSections": true
31895 <div style="border:1px solid red;">
31912 <section data-mw-section-id="0"><p>foo</p>
31914 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31916 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31919 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31922 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31927 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31930 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31932 </section></section>
31936 HTML header tags should not be wrapped in section tags
31939 "wrapSections": true
31952 <section data-mw-section-id="0"><p>foo</p>
31954 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31956 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31958 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31960 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31964 Lead section containing only whitespace and comments.
31967 "wrapSections": true
31971 <!-- this is a comment, presumably significant to editors -->
31978 <section data-mw-section-id="0" data-parsoid="{}">
31979 <!-- this is a comment, presumably significant to editors -->
31980 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31983 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31988 Pseudo-sections emitted by templates should have id -2
31991 "wrapSections": true
32001 <section data-mw-section-id="-1"><p>foo</p>
32002 </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}}]}'>
32003 <section data-mw-section-id="-1"><h2 id="a">a</h2>
32004 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
32005 </section></div><span about="#mwt1">
32009 ##########################################################################
32010 Tests demonstrating white-space insensitivity in input wikitext
32011 for wikitext headings, wikitext list items, and wikitext table captions,
32012 headings, and cells. HTML versions of the same should preserve whitespace.
32013 ##########################################################################
32015 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
32018 "modes": ["wt2html"],
32019 "preserveIEW": true
32023 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
32024 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
32025 == <!--Headings with fallback ids--> Личная жизнь ==
32026 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
32027 ; <!--term to define--> term : <!--term's definition--> definition
32029 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
32031 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
32033 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32035 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
32037 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
32040 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
32043 <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>
32044 <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>
32045 <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>
32046 <ul><li>List item</li></ul>
32047 <dl><dt>term </dt>
32048 <dd>definition</dd></dl>
32050 <caption>Table Caption
32053 <th>Table Heading 1</th>
32054 <th>Table Heading 2
32057 <td>Table Cell 1</td>
32061 <td>class="foo"</td>
32065 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
32066 </td></tr></tbody></table>
32069 <td>Table Cell 1</td>
32071 </td></tr></tbody></table> foo</dd></dl>
32073 <meta property="mw:PageProp/notoc">
32074 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
32075 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
32076 <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>
32077 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
32078 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
32080 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
32082 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
32084 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32086 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
32088 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
32091 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
32092 </tbody></table> foo<!--c1--></dd></dl>
32095 # Looks like <caption> is not accepted in HTML
32097 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
32100 "modes": ["wt2html"],
32101 "preserveIEW": true
32105 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32106 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32108 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
32109 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
32112 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
32113 <ul><li> List item </li></ul>
32115 <tbody><tr><th> Table Heading </th><th></th></tr>
32116 <tr><td> Table Cell </td><th></th></tr>
32119 <meta property="mw:PageProp/notoc"/>
32120 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
32121 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
32123 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
32124 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
32129 Do not trim whitespace in links and quotes
32132 "modes": ["wt2html"],
32133 "preserveIEW": true
32136 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
32137 [[Foo| some text ]]
32139 <p>foo <i> italic </i> and <b> bold </b>
32140 <a href="/wiki/Foo" title="Foo"> some text </a>
32143 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
32144 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
32148 Remove p tags surrounding a single element in a figcaption
32152 [[File:Foobar.jpg|right|200x200px|Caption]]
32154 <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>
32158 Selser preserves lack of newline before list and allows newline after the list
32161 "modes": ["selser"],
32162 "scrubWikitext": true,
32164 [ "ul", "after", "<p>footer</p>" ]
32181 Selser does not introduce newlines between unedited paragraph preceding the list
32184 "modes": ["selser"],
32186 [ "table tbody tr td p:last-child", "empty" ]
32208 Selser does not introduce newlines between unedited paragraph following the list
32211 "modes": ["selser"],
32213 [ "table tbody tr td p:first-child", "empty" ]
32235 Remove a list item but do not insert newline above list
32238 "modes": ["selser"],
32240 [ "ul li:last-child", "remove" ]