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.
66 Template:redirect to foo
68 #REDIRECT [[Template:Foo]]
89 MediaWiki:bad image list
91 * [[File:Bad.jpg]] except [[Nasty page]]
126 // For Serbian; localize Template namespace
134 Template:echo_with_span
140 Template:echo_with_div
146 Template:echo with depth
159 Template:table_attribs
162 |</noinclude>style="color:red;"|Foo
166 Template:table_attribs_2
169 |</noinclude>style="color:red;"|Foo
174 Template:table_attribs_3
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
181 Template:table_attribs_4
183 | style="background-color:#DC241f;" width="10px" |
187 Template:table_attribs_5
190 |</noinclude>style="color:red;"||Bar
194 Template:table_attribs_6
196 style="background: <nowiki>
203 Template:table_attribs_7
206 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
210 Template:table_header_cells
212 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
218 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
222 Template:PartialTable
229 Template:image_attribs
232 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
235 ## See T48811 for details
237 Template:mixed_attr_content_template
239 style="color:red;" title="T48811"
245 Template:definition_list
292 Template:EmptyTRWithHTMLAttrTest
295 <tr align="center"></tr>
296 <tr><td>foo</td></tr>
297 <tr align="center"></tr>
298 <tr><td>bar</td></tr>
321 This is a simple paragraph.
323 <p>This is a simple paragraph.
328 Paragraphs with extra newline spacing
359 Paragraphs with newline spacing with comment lines in between
367 <!--foo--><!--More than 1 comment, still stripped-->
371 <!--foo--> <!----> <!-- bar -->
432 Paragraphs with newline spacing with non-empty white-space lines in between
459 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
467 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
506 Extra newlines: More paragraphs with indented comment
521 Extra newlines followed by heading
535 <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>
536 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
539 <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>
544 Extra newlines between heading and content are swallowed (Parsoid does not)
552 <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>
553 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
560 <p><a rel="mw:WikiLink" href="./A" title="A">a</a></p>
564 Extra new lines before and after lists are preserved
591 # Parsoid regression test
593 Multiple newlines after tables are converted to p-br-p tags
595 parsoid=wt2html,wt2wt
609 </td></tr></tbody></table>
613 <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>
628 Heading with line break in nowiki
632 wgFragmentMode=[ 'html5', 'legacy' ]
637 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
639 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>
643 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
650 http://fr.wikipedia.org/wiki/🍺
651 <!-- EasterEgg we love beer, better be able be able to link to it -->
653 <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>
705 # this example taken from the [[simple:Moon]] article (T49326)
707 Italics and possessives (1)
709 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
711 <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
715 # this example taken from [[en:Flaming Pie]] (T51926)
717 Italics and possessives (2)
719 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
721 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
725 # this example taken from [[en:Dictionary]] (T51926)
727 Italics and possessives (3)
729 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''.
731 <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>.
737 ### 2-quote opening sequence tests
740 Italics and bold: 2-quote opening sequence: (2,2)
749 Italics and bold: 2-quote opening sequence: (2,3)
758 Italics and bold: 2-quote opening sequence: (2,4)
768 # same html as previous, but wikitext adjusted to match parsoid html2wt
770 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
772 ''foo<nowiki>''</nowiki>''
778 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
780 Italics and bold: 2-quote opening sequence: (2,5)
793 # same html as previous, but wikitext adjusted to match parsoid html2wt
795 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
797 ''foo'''''<nowiki/>'''
808 ### 3-quote opening sequence tests
812 Italics and bold: 3-quote opening sequence: (3,2)
821 Italics and bold: 3-quote opening sequence: (3,3)
830 Italics and bold: 3-quote opening sequence: (3,4)
838 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
840 Italics and bold: 3-quote opening sequence: (3,5)
853 # same html as previous, but wikitext adjusted to match parsoid html2wt
855 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
857 '''foo'''''<nowiki/>''
868 ### 4-quote opening sequence tests
872 Italics and bold: 4-quote opening sequence: (4,2)
882 # same html as previous, but wikitext adjusted to match parsoid html2wt
884 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
886 <nowiki>''</nowiki>''foo''
893 Italics and bold: 4-quote opening sequence: (4,3)
902 Italics and bold: 4-quote opening sequence: (4,4)
912 # same html as previous, but wikitext adjusted to match parsoid html2wt
914 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
922 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
924 Italics and bold: 4-quote opening sequence: (4,5)
933 <p>'<b>foo</b><i></i>
937 # same html as previous, but wikitext adjusted to match parsoid html2wt
939 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
941 '<nowiki/>'''foo'''''<nowiki/>''
946 <p>'<b>foo</b><i></i>
952 ### 5-quote opening sequence tests
956 Italics and bold: 5-quote opening sequence: (5,2)
966 # same html as previous, but wikitext adjusted to match parsoid html2wt
968 Italics and bold: 5-quote opening sequence: (5,2+3)
977 Italics and bold: 5-quote opening sequence: (5,3)
987 # same html as previous, but wikitext adjusted to match parsoid html2wt
989 Italics and bold: 5-quote opening sequence: (5,3+2)
998 Italics and bold: 5-quote opening sequence: (5,4)
1004 <p><i><b>foo'</b></i>
1009 Italics and bold: 5-quote opening sequence: (5,5)
1013 <p><i><b>foo</b></i>
1018 Italics and bold: 5-quote opening sequence: (5,6)
1022 <p><i><b>foo'</b></i>
1027 ### multiple quote sequences in a line
1031 Italics and bold: multiple quote sequences: (2,4,2)
1037 <p><i>foo'<b>bar</b></i>
1041 # same html as previous, but wikitext adjusted to match parsoid html2wt
1043 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
1045 ''foo'<nowiki/>'''bar'''''
1047 <p><i>foo'<b>bar</b></i>
1052 Italics and bold: multiple quote sequences: (2,4,3)
1058 <p><i>foo'<b>bar</b></i>
1062 # same html as previous, but wikitext adjusted to match parsoid html2wt
1064 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
1066 ''foo'<nowiki/>'''bar'''''
1068 <p><i>foo'<b>bar</b></i>
1073 Italics and bold: multiple quote sequences: (2,4,4)
1079 <p><i>foo'<b>bar'</b></i>
1083 # same html as previous, but wikitext adjusted to match parsoid html2wt
1085 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1087 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1089 <p><i>foo'<b>bar'</b></i>
1093 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1095 Italics and bold: multiple quote sequences: (3,4,2)
1104 <p><b>foo'</b>bar<i></i>
1108 # same html as previous, but wikitext adjusted to match parsoid html2wt
1110 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1112 '''foo''''bar''<nowiki/>''
1117 <p><b>foo'</b>bar<i></i>
1121 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1123 Italics and bold: multiple quote sequences: (3,4,3)
1132 <p><b>foo'</b>bar<b></b>
1136 # same html as previous, but wikitext adjusted to match parsoid html2wt
1138 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1140 '''foo''''bar'''<nowiki/>'''
1145 <p><b>foo'</b>bar<b></b>
1150 ### other quote tests
1153 Italics and bold: other quote tests: (2,3,5)
1155 ''this is about '''foo's family'''''
1157 <p><i>this is about <b>foo's family</b></i>
1163 Italics and bold: other quote tests: (2,(3,3),2)
1165 ''this is about '''foo's''' family''
1167 <p><i>this is about <b>foo's</b> family</i>
1173 Italics and bold: other quote tests: (3,2,3,2)
1177 '''this is about ''foo'''s family''
1179 <p><b>this is about <i>foo</i></b><i>s family</i>
1184 # same html as previous, but wikitext adjusted to match parsoid html2wt
1186 Italics and bold: other quote tests: (3,2,3+2+2,2)
1188 '''this is about ''foo'''''<nowiki/>''s family''
1190 <p><b>this is about <i>foo</i></b><i>s family</i>
1196 Italics and bold: other quote tests: (3,2,3,3)
1198 '''this is about ''foo'''s family'''
1200 <p>'<i>this is about </i>foo<b>s family</b>
1206 Italics and bold: other quote tests: (3,(2,2),3)
1208 '''this is about ''foo's'' family'''
1210 <p><b>this is about <i>foo's</i> family</b>
1216 Italicized possessive
1218 The ''[[Main Page]]'''s talk page.
1220 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1223 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1227 Quote balancing context should be restricted to td/th cells on the same wikitext line
1229 parsoid=wt2html,wt2wt
1243 </td></tr></tbody></table>
1251 Non-html5 tags should be accepted
1253 <center>''foo''</center>
1255 <font>''foo''</font>
1256 <strike>''foo''</strike>
1259 <center><i>foo</i></center>
1260 <p><big><i>foo</i></big>
1261 <font><i>foo</i></font>
1262 <strike><i>foo</i></strike>
1268 <wbr> is valid wikitext (T54468)
1276 # <strike> is HTML4, <s> is HTML4/5.
1278 <s> or <strike> for strikethrough
1280 <strike>strike</strike>
1284 <p><strike>strike</strike>
1292 Text-level semantic html elements in wikitext
1295 <strong>text</strong>
1311 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1318 <strong>text</strong>
1334 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1342 # test cases taken from
1343 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1345 Ruby markup (W3C-style)
1347 ;Mono-ruby for individual base characters
1348 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1350 :<ruby>今日<rt>きょう</rt></ruby>
1352 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1354 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1356 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1359 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1360 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1361 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1364 <dl><dt>Mono-ruby for individual base characters</dt>
1365 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1367 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1368 <dt>Jukugo ruby</dt>
1369 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1370 <dt>Inline ruby</dt>
1371 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1372 <dt>Double-sided ruby</dt>
1373 <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>
1375 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1376 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1377 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1382 # The next two test different paths in the sanitizer.
1384 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1386 <blockquote|>a</blockquote>
1388 <b→> doesn't terminate </b→>
1390 <bä> doesn't terminate </bä>
1392 <boo> doesn't terminate </boo>
1394 <s.foo> doesn't terminate </s.foo>
1398 <p><blockquote|>a</blockquote>
1399 </p><p><b→> doesn't terminate </b→>
1400 </p><p><bä> doesn't terminate </bä>
1401 </p><p><boo> doesn't terminate </boo>
1402 </p><p><s.foo> doesn't terminate </s.foo>
1403 </p><p><sub-ID#1>
1408 Non-word characters don't terminate tag names
1410 <blockquote|>a</blockquote>
1412 <b→> doesn't terminate </b→>
1414 <bä> doesn't terminate </bä>
1416 <boo> doesn't terminate </boo>
1418 <s.foo> doesn't terminate </s.foo>
1422 <p><blockquote|>a
1423 </p><p><b→> doesn't terminate </b→>
1424 </p><p><bä> doesn't terminate </bä>
1425 </p><p><boo> doesn't terminate </boo>
1426 </p><p><s.foo> doesn't terminate </s.foo>
1427 </p><p><sub-ID#1>
1432 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1433 ### This checks that HTML5 tags (with non-word characters in the tag
1434 ### name) make it safely through the parser -- the Sanitizer will
1435 ### munge them later, as it should.
1438 Non-word characters are valid in extension tags (T19663)
1449 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1453 Isolated close tags should be treated as literal text (T54760)
1461 <p class="mw-empty-elt">
1462 </p><p><s.foo>s
1465 <p><s.foo>s</p>
1469 ### Special characters
1473 Bare pipe character (T54363)
1482 Bare pipe character from a template (T54363)
1491 ### <nowiki> test cases
1495 <nowiki> unordered list
1497 <nowiki>* This is not an unordered list item.</nowiki>
1499 <p>* This is not an unordered list item.
1502 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1508 <nowiki>Lorem ipsum dolor
1516 <p>Lorem ipsum dolor
1525 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1535 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1537 <nowiki><span class="error"></nowiki>
1539 <p><span class="error">
1542 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1548 :There is not nowiki.
1549 :There is <nowiki>nowiki</nowiki>.
1551 #There is not nowiki.
1552 #There is <nowiki>nowiki</nowiki>.
1554 *There is not nowiki.
1555 *There is <nowiki>nowiki</nowiki>.
1557 <dl><dd>There is not nowiki.</dd>
1558 <dd>There is nowiki.</dd></dl>
1559 <ol><li>There is not nowiki.</li>
1560 <li>There is nowiki.</li></ol>
1561 <ul><li>There is not nowiki.</li>
1562 <li>There is nowiki.</li></ul>
1565 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1566 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1568 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1569 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1571 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1572 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1576 Entities inside <nowiki>
1578 <nowiki><</nowiki>
1583 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1587 Entities inside template parameters
1594 <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>
1598 Properly escape nowiki when combined with other wiki markup
1602 <p>* </nowiki> tag</p>
1604 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1608 T93824: Put escaped HTML tags inside nowiki
1612 <p><h2>foo</h2></p>
1614 <nowiki><h2>foo</h2></nowiki>
1618 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1622 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1623 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1624 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1626 This text: L'[[Foo]]
1627 This text: L<nowiki>''</nowiki>[[Foo]]
1628 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1631 # This test fails because wikitext whitespace is not normalized before comparing.
1633 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1637 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1640 This text : L<nowiki>''</nowiki>[[Foo]]
1643 # This test and the next one are html2wt only as they test that incorrect wikitext
1644 # passed in template arguments gets escaped or wrapped in nowikis where required.
1646 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1650 <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>
1651 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1653 {{echo|foo{{!}}bar}}
1654 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1658 T53961: Output correct nowikis in template arguments
1662 <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>
1663 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1664 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1665 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1666 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1669 {{echo|<nowiki>a }} b</nowiki>}}
1670 {{echo|<nowiki>a [[ b</nowiki>}}
1671 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1672 {{echo|a <nowiki>}</nowiki>}}
1676 Cases where "!!" needs nowiki protection
1681 <tr><th>this needs protection !! here</th></tr>
1685 <tr><th>this does not need
1686 protection !! here</th></tr>
1690 !<nowiki>this needs protection !! here</nowiki>
1703 Comments and Indent-Pre
1705 <!-- comment 1 --> asdf
1707 <!-- comment 1 --> asdf
1710 <!-- comment 1 --> asdf
1711 <!-- comment 2 -->xyz
1713 <!-- comment 1 --> asdf
1714 <!-- comment 2 --> xyz
1770 asdf<!-- comment 1 -->jkl
1780 <!-- foo --> b <!-- bar -->
1794 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1800 Comment semantics and delimiters
1802 <!-- --><!----><!-----><!------>
1806 <!-- --><!----><!-----><!------>
1810 Comment semantics and delimiters, redux
1812 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1813 -- foo -- funky huh? ... -->
1817 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1818 -- foo -- funky huh? ... -->
1822 Comment semantics and delimiters: directors cut
1824 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1825 everything starting with < followed by !-- until the first -- and > we see,
1826 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1832 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1833 everything starting with < followed by !-- until the first -- and > we see,
1834 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1839 Comment semantics: nesting
1841 <!--<!-- no, we're not going to do anything fancy here -->-->
1846 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1849 # Parsoid closes the unclosed comment, even if it means a slight
1852 Comment semantics: unclosed comment at end
1854 parsoid=wt2html,html2html
1856 <!--This comment will run out to the end of the document
1860 <!--This comment will run out to the end of the document-->
1864 Comment semantics: normalize comments to play nice with XML and browsers
1866 <!-- Browsers --!> think this is closed -->
1867 <!--> This would normally be text -->
1868 <!---> As would this -->
1869 <!-- XML doesn't like trailing dashes -------->
1870 <!-- Nor doubled hyphens -- anywhere in the data -->
1871 But this is not a comment.
1873 <p>But this is not a comment.
1876 <!-- Browsers --!> think this is closed -->
1877 <!--> This would normally be text -->
1878 <!---> As would this -->
1879 <!-- XML doesn't like trailing dashes -------->
1880 <!-- Nor doubled hyphens -- anywhere in the data -->
1881 <p>But this is not a comment.</p>
1885 Comment semantics: round-trip even text which contains encoded -->
1887 <!-- hello & goodbye - > --> --&gt; --&xx -->
1889 <!-- hello & goodbye - > --> --&gt; --&xx -->
1893 Comment in template title
1902 Comment on its own line post-expand
1914 Comment on its own line post-expand with non-significant whitespace
1926 post-expand include size being exceeded
1930 {{echo3|1234567890}}
1932 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1937 max template depth being reached
1941 {{echo with depth|too deep!}}
1943 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1948 multiple templates that are redirects
1959 Multiple comments should still parse as SOL-transparent
1961 parsoid=wt2html,wt2wt
1964 <!--c2--><!--c3--><!--c4-->*b
1973 <!--c2--><!--c3--><!--c4-->
1979 ## Make sure ">" gets escaped in comments to avoid XSS
1981 IE conditional comments
1984 <script>alert('hi');</script>
1987 <!--[if lt IE 9]>
1988 <script>alert('hi');</script>
1993 ### paragraph wrapping tests
2009 Block tag on one line (<div>)
2019 <p>a </p><div>foo</div>
2024 # Remex wraps empty tag runs with p-tags.
2025 # Parsoid strips them out during p-wrapping.
2027 No p-wrappable content
2029 <span><div>x</div></span>
2030 <span><s><div>x</div></s></span>
2031 <small><em></em></small><span><s><div>x</div></s></span>
2033 <span><div>x</div></span>
2034 <span><s><div>x</div></s></span>
2035 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2037 <span><div>x</div></span>
2038 <span><s><div>x</div></s></span>
2039 <small><em></em></small><span><s><div>x</div></s></span>
2042 # T177612: Parsoid-only test
2044 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2046 {{echo|<span><div>x</div></span>}}
2049 <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>
2054 Block tag on one line (<blockquote>)
2056 a <blockquote>foo</blockquote>
2060 a <blockquote>foo</blockquote>
2064 <p>a </p><blockquote><p>foo</p></blockquote>
2070 Block tag on both lines (<div>)
2080 <p>a </p><div>foo</div><p>
2081 b </p><div>foo</div>
2085 Block tag on both lines (<blockquote>)
2087 a <blockquote>foo</blockquote>
2089 b <blockquote>foo</blockquote>
2091 a <blockquote>foo</blockquote>
2092 b <blockquote>foo</blockquote>
2095 <p>a </p><blockquote><p>foo</p></blockquote><p>
2096 b </p><blockquote><p>foo</p></blockquote>
2100 Multiple lines without block tags
2121 x </p><div>foo</div><p> z
2125 # The difference between Parsoid & Remex here
2126 # is because of Parsoid's Tidy-emulation code
2127 # for p-wrapping. We'll start work to remove this
2128 # emulation code in Parsoid sooner than later.
2129 # Remex wraps empty tag runs with p-tags.
2130 # Parsoid strips them out in a separate pass.
2132 Empty lines between lines with block tags
2167 </p><div>b</div><p>d
2172 <div data-parsoid='{"stx":"html"}'></div>
2175 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2178 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2180 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2183 <div data-parsoid='{"stx":"html"}'>e</div>
2187 Unclosed HTML p-tags should be handled properly
2194 <div><p>foo</p></div>
2199 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2204 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2205 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2208 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2212 a [[Category:A1]] [[Category:A2]]
2217 <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"/>
2221 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2227 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2231 No paragraph necessary for SOL transparent template
2233 <span><div>foo</div></span>
2236 <span><div>foo</div></span>
2237 {{echo|[[Category:Foo]]}}
2239 <span><div>foo</div></span>
2240 <span><div>foo</div></span>
2243 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2244 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2246 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2247 <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}}]}'/>
2251 Avoid expanding multiline sol transparent template ranges unnecessarily
2269 <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">
2272 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2276 Paragraph wrapping following unclosed table
2278 parsoid=wt2html,html2html
2299 </td></tr></tbody></table>
2305 <table data-parsoid='{"autoInsertedEnd":true}'>
2306 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2308 </tbody></table><table>
2309 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2320 Paragraph wrapping suppressed in html p
2322 parsoid=wt2html,html2html
2342 <p data-parsoid='{"stx":"html"}'>
2353 ### Preformatted text
2363 And a [[Main Page|link]]
2369 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2374 Tabs don't trigger preformatted text
2378 This is preformatted text.
2384 <pre>This is preformatted text.
2389 preformatted text.</p>
2390 <pre>This is preformatted text.
2395 Space before tab needs nowiki pre protection
2401 <nowiki> </nowiki> a
2405 Ident preformatting with inline content
2416 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2433 Regression with preformatted in <center>
2447 T54763: Preformatted in <blockquote>
2453 indented cell (no pre-wrapping!)
2463 <p> indented cell (no pre-wrapping!)
2471 T53086: Double newlines in blockquotes should be turned into paragraphs
2488 T17491: <ins>/<del> in blockquote
2491 Foo <del>bar</del> <ins>baz</ins> quux
2495 <p>Foo <del>bar</del> <ins>baz</ins> quux
2501 <p>Foo <del>bar</del> <ins>baz</ins> quux
2507 T17491: <ins>/<del> in blockquote (2)
2509 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2512 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2516 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2521 <pre> with attributes (T5202)
2523 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2525 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2530 <pre> with width attribute (T5202)
2532 <pre width="8">Narrow screen goodies</pre>
2534 <pre width="8">Narrow screen goodies</pre>
2539 <pre> with forbidden attribute (T5202)
2541 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2543 <pre width="8">Narrow screen goodies</pre>
2548 Entities inside <pre>
2557 <pre> with forbidden attribute values (T5202)
2559 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2561 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2566 <nowiki> inside <pre> (T15238)
2574 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2582 <pre><nowiki>Foo</nowiki></pre>
2587 <nowiki> inside of #tag:pre
2589 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2591 <pre>Foo →bar</pre>
2594 <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>
2597 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2598 ## aren't enclosed in nowikis.
2600 <nowiki> and <pre> preference (first one wins)
2631 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2636 <p><span typeof="mw:Nowiki">
2644 </pre> inside nowiki
2646 <nowiki></pre></nowiki>
2653 Empty pre; pre inside other HTML tags (T56946)
2670 <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
2672 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2676 HTML pre followed by indent-pre
2689 <p><pre>foo</pre></p>
2691 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2693 <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>
2697 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2705 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2715 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2727 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2748 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2752 {{echo| foo}}{{echo| bar}}
2757 {{echo|<!--cmt--> foo}}
2759 <!--cmt-->{{echo| foo}}
2761 {{echo|{{echo| }}bar}}
2779 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2815 ## Hmm, should Parsoid rt this?
2817 Pres with newline attributes
2819 parsoid=wt2html,html2html
2824 <pre class="one two">hi</pre>
2827 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2831 Things that look like <pre> tags aren't treated as such
2833 Barack Obama <President> of the United States
2834 <President></President>
2836 <p>Barack Obama <President> of the United States
2837 <President></President>
2842 Handle broken pre-like tags (T66025)
2846 {{echo|<pre <pre>x</pre>}}
2848 <table><pre </table>
2851 <table><pre </table>
2855 <pre <table></table>
2857 <pre typeof="mw:Transclusion mw:Extension/pre" 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>
2859 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'><pre </span><table data-parsoid='{"stx":"html"}'></table>
2863 Parsoid: handle pre with space after attribute
2867 <pre style="width:50%;" >{{echo|foo}}</pre>
2869 <pre style="width:50%;">{{echo|foo}}</pre>
2872 <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>
2875 # TODO / maybe: fix wt2wt for this
2877 Parsoid: Don't paragraph-wrap fosterable content
2910 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2914 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2942 #--------------------------------------------------------------------
2943 # Transclusion parameter whitespace stripping tests
2944 # Behavior is different for positional and named parameters
2945 #--------------------------------------------------------------------
2947 Templates: Strip leading and trailing whitespace from named-param values
2951 {{echo|1= {{echo|b}} }}
2969 Templates: Don't strip whitespace from positional-param values
2973 {{echo|{{echo|b}} }}
3013 Templates: Don't recognize targets split by newlines
3029 Templates: Recognize targets when newlines and comments don't split the target
3034 <!--X--> ech<!--X-->o<!--X-->
3042 <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>
3046 Templates: Handle empty comment-and-ws-only lines correctly
3049 <!--should be ignored-->
3050 <!--should be ignored as well-->
3057 <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>
3061 Templates: Handle comments in the target
3064 <!-- should be ignored -->
3068 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3071 {{echo<!-- should be ignored -->
3074 {{echo<!-- should be ignored -->|foo}}
3076 {{<!-- should be ignored -->echo|foo}}
3085 <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>
3087 <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>
3089 <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>
3091 <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>
3093 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3097 Templates: Handle comments in parameter names (T69657)
3100 <!-- should be ignored -->
3104 <!-- should be ignored -->
3107 {{echo|1<!-- should be ignored -->=foo}}
3109 {{echo|<!-- should be ignored -->1=foo}}
3117 <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>
3119 <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>
3121 <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>
3123 <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>
3127 Templates: Other wikitext in parameter names (T69657)
3134 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3138 Templates: With colons
3142 <p>Template with colon
3145 <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>
3148 #--------------------------------------------------------------------
3149 # Transclusion parameter escaping tests
3150 #--------------------------------------------------------------------
3153 Templates: Parsoid parameter escaping test 1
3155 {{echo|[foo]|{{echo|[bar]}}}}
3160 <p about="#mwt1" typeof="mw:Transclusion"
3161 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3165 Parsoid: Pipes in external links in template parameter
3167 {{echo|[{{echo|http://example.com}} link]}}
3169 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3172 <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>
3176 Parsoid: pipe in transclusion parameter
3178 {{echo|http://foo.com/a|b}}
3180 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3183 <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>
3187 Parsoid: Pipe in external link target and content in template parameter
3189 parsoid=html2wt,wt2wt
3191 {{echo|[http://foo.com/a|b a|b]}}
3193 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3196 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3197 typeof="mw:Transclusion"
3198 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3199 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3203 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3207 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3209 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
3213 Templates: Don't escape already nowiki-escaped text in template parameters
3215 parsoid=html2wt,wt2wt
3217 {{echo|foo<nowiki>|</nowiki>bar}}
3218 {{echo|<nowiki><div></nowiki>}}
3219 {{echo|<nowiki></nowiki>}}
3226 <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>
3227 <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>
3228 <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>
3234 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3236 parsoid=html2wt,wt2wt
3238 {{echo|{{echo|1=bar}}}}
3243 <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>
3248 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3255 <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>
3260 Templates: Preserve blank parameter names
3267 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3271 Templates: Preserve blank parameter names in other positions
3273 {{blank_param|bar|=foo}}
3279 <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
3284 ### Parsoid-centric tests for testing RT edge cases for pre
3288 1a. Indent-Pre and Comments
3301 1b. Indent-Pre and Comments
3314 1c. Indent-Pre and Comments
3327 1d. Indent-Pre and Comments
3328 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3341 2a. Indent-Pre and tables
3362 2b. Indent-Pre and tables
3378 2c. Indent-Pre and tables (T44252)
3395 2d. Indent-Pre and tables
3412 <tbody><tr><td> b</td></tr>
3417 2e. Indent-Pre and table-line syntax
3430 2f. Indent-pre started by table-line syntax
3449 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3454 Text that should be rendered preformatted
3462 <pre>Text that should be rendered preformatted
3471 2h. Indent pre in tables
3473 parsoid=wt2html,html2html
3516 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3518 </td></tr></tbody></table>
3522 3a. Indent-Pre and block tags (single-line html)
3526 c <blockquote> foo </blockquote>
3531 c <blockquote> foo </blockquote>
3532 <pre><span> foo </span>
3535 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3536 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3537 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3538 <pre><span> foo </span>
3541 <p> a </p><p> foo </p><p>
3542 b </p><div> foo </div><p>
3543 c </p><blockquote><p> foo </p></blockquote>
3544 <pre><span> foo </span>
3549 3b. Indent-Pre and block tags (multi-line html)
3552 <!-- comment --> b <div> foo </div>
3554 <pre>a <span>foo</span>
3559 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3560 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3562 <pre>a <span>foo</span>
3564 b </p><div> foo </div>
3568 3c. Indent-Pre and block tags (pre-content on separate line)
3632 4. Indent-Pre and extension tags
3643 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3647 5. Indent-Pre and html pre
3649 <pre class="123">hi</pre>
3651 <pre class="123">hi</pre>
3654 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3658 Render paragraphs when indent-pre is suppressed in blocklevels
3675 4. Multiple spaces at start-of-line
3693 ## NOTE: the leading white-space chars on empty line are significant
3695 5a. White-space in indent-pre
3707 ## NOTE: the leading white-space chars on empty line are significant
3709 5b. White-space in indent-pre
3728 5c. White-space in indent-pre
3741 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3764 7a. Indent-pre and category links
3766 parsoid=wt2html,wt2wt
3768 [[Category:foo]] <!-- No pre-wrapping -->
3769 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3772 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3773 <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 -->
3776 ## We used to, but no longer wt2wt this test since the default serializer
3777 ## will normalize all categories to serialize on their own line.
3778 ## This wikitext usage is going to be fairly uncommon in production and
3779 ## selser will take care of preserving formatting in those scenarios.
3781 7b. Indent-pre and category links
3786 [[Category:foo]] {{echo|b}}
3788 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3789 <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>
3793 Indent-Pre: Newlines in comments shouldn't affect sol state
3808 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3812 HTML-pre: 1. embedded newlines
3844 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3846 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3849 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3854 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3862 HTML-pre: big spaces
3898 <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"}}'>
3917 HTML-pre: 2: indented text
3930 HTML-pre: 3: other wikitext
3949 <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
3958 ### Definition lists
3966 <dd>Definition</dd></dl>
3971 Definition list for indentation only
3975 <dl><dd>Indented text</dd></dl>
3980 Definition list with no space
3985 <dd>Definition</dd></dl>
3990 Definition list with URL link
3992 ;http://example.com/ :definition
3994 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
3995 <dd>definition</dd></dl>
4000 Definition list with bracketed URL link
4002 ;[http://www.example.com/ Example]:Something about it
4004 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4005 <dd>Something about it</dd></dl>
4010 Definition list with wikilink containing colon
4012 ;[[Help:FAQ]]:The least-read page on Wikipedia
4014 <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>
4015 <dd>The least-read page on Wikipedia</dd></dl>
4019 # At Brion's and JeLuF's insistence... :)
4021 Definition list with news link containing colon
4023 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4025 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
4026 <dd>This isn't even a real newsgroup!</dd></dl>
4029 <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>
4033 Malformed definition list with colon
4035 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4037 <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>
4042 Definition lists: colon in external link text
4044 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4046 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
4047 <dd>OK, I made that up</dd></dl>
4052 Definition lists: colon in HTML attribute
4054 ;<b style="display: inline">bold</b>
4056 <dl><dt><b style="display: inline">bold</b></dt></dl>
4061 Definition lists: self-closed tag
4063 ;one<br/>two :two-line fun
4065 <dl><dt>one<br />two</dt>
4066 <dd>two-line fun</dd></dl>
4071 Definition lists: ignore colons inside tags
4073 ;one <b>two : tag <i>fun:</i>:</b>:def
4075 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4081 Definition lists: excess closed tags
4083 ;one</b>two :bad tag fun
4086 <dd>bad tag fun</dd></dl>
4090 <dd>bad tag fun</dd>
4095 T13748: Literal closing tags
4099 <dd>test test test test test</dd>
4101 <dd>test test test test test</dd>
4106 <dd>test test test test test</dd>
4108 <dd>test test test test test</dd>
4114 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4123 <dd>description</dd></dl>
4124 <ul><li>unordered</li></ul>
4130 Definition list with empty definition and following paragraph
4143 Nested definition lists using html syntax
4156 Definition Lists: No nesting: Multiple dd's
4169 Definition Lists: Indentation: Regular
4177 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4182 Definition Lists: Indentation: Missing 1st level
4188 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4193 Definition Lists: Indentation: Multi-level indent
4197 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4202 Definition Lists: Hacky use to indent tables
4209 should be left alone
4211 <dl><dd><dl><dd><table>
4216 </td></tr></table></dd></dl></dd></dl>
4218 should be left alone
4223 Definition Lists: Hacky use to indent tables (with content following table)
4228 |} <!--c1--> this text should be part of the dl
4235 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4242 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4246 Definition Lists: Hacky use to indent tables, with comments (T65979)
4254 should be left alone
4257 <dl><dd><dl><dd><table><tr>
4260 </tr></table><!-- bar --></dd></dl></dd></dl>
4262 should be left alone</p>
4266 Definition Lists: Hacky use to indent tables, with comment before table
4274 <dl><dd><dl><dd><!-- foo --><table><tr>
4276 </tr></table></dd></dl></dd></dl>
4279 # The trailing whitespace in this test is to catch a regression in
4280 # Parsoid after T54473.
4282 Definition Lists: Hacky use to indent tables (WS-insensitive)
4291 </td></tr></table></dd></dl>
4295 <tbody><tr><td>a</td></tr>
4296 </tbody></table></dd></dl>
4299 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4300 ## as an empty dt item. It also ignores all but the last ";" when followed
4301 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4302 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4305 ## Ex: ";;t2 ::d2" is transformed into:
4317 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4318 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4329 ## All Parsoid only definition list tests have this difference.
4331 ## See also: https://phabricator.wikimedia.org/T8569
4332 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4335 Table / list interaction: indented table with lists in table contents
4357 </td></tr></table></dd></dl>
4362 Table / list interaction: lists nested in tables nested in indented lists
4385 </td></tr></table></dd></dl>
4392 Definition Lists: Nesting: Multi-level (Parsoid only)
4420 Definition Lists: Nesting: Test 2
4427 <dl><dd>d2</dd></dl></dd></dl>
4432 Definition Lists: Nesting: Test 3
4437 <dl><dd><dl><dt>t1</dt>
4439 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4444 Definition Lists: Nesting: Test 4
4449 <dl><dd><dl><dd><dl><dt>t3</dt>
4450 <dd>d3</dd></dl></dd></dl></dd></dl>
4455 ## The Parsoid team believes the following three test exposes a
4456 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4457 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4458 ## It also exposes a "misfeature" in tidy, which doesn't like
4459 ## <dl> tags with a single <dt> child; it converts the <dt> into
4460 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4462 Definition Lists: Mixed Lists: Test 1
4468 <dl><dd><dl><dt><ul><li>foo</li>
4469 <li>bar</li></ul></dt></dl>
4470 <dl><dt>baz</dt></dl></dd></dl>
4473 <dl><dd><dl><dt><ul><li>foo</li>
4474 <li>bar</li></ul></dt></dl>
4475 <dl><dt>baz</dt></dl></dd></dl>
4493 Definition Lists: Mixed Lists: Test 2
4498 <ul><li><dl><dd>d1</dd>
4499 <dd>d2</dd></dl></li></ul>
4505 Definition Lists: Mixed Lists: Test 3
4510 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4511 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4517 Definition Lists: Mixed Lists: Test 4
4522 <ul><li><dl><dt>d1</dt>
4525 <dd>d4</dd></dl></li></ul>
4531 Definition Lists: Mixed Lists: Test 5
4537 <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>
4555 Definition Lists: Mixed Lists: Test 7
4560 <dl><dd><ul><li>d1</li>
4561 <li>d2</li></ul></dd></dl>
4567 Definition Lists: Mixed Lists: Test 8
4572 <dl><dd><ul><li>d1</li></ul>
4573 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4579 Definition Lists: Mixed Lists: Test 9
4583 <ul><li><dl><dt>foo</dt>
4584 <dd>bar</dd></dl></li></ul>
4590 Definition Lists: Mixed Lists: Test 10
4594 <ul><li><ol><li><dl><dt>foo</dt>
4595 <dd>bar</dd></dl></li></ol></li></ul>
4599 # The Parsoid team disagrees with the PHP parser's seemingly-random
4600 # rules regarding dd/dt on the next few tests. Parsoid is more
4601 # consistent, and recognizes the shared nesting and keeps the
4602 # still-open tags around until the nesting is complete.
4604 # This is a regression test for T175099
4606 Definition Lists: Mixed Lists: Test 11
4613 <ul><li>b</li></ul></dd></dl>
4617 <dd><ul><li>b</li></ul></dd></dl>
4620 # FIXME: Maybe get rid of this test?
4622 Definition Lists: Mixed Lists: Test 12
4627 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4628 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4630 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4633 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4634 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4636 <dd>baz</dd></dl></li></ol></li></ul>
4654 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4659 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4668 Definition Lists: Mixed Lists: Test 13
4673 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4674 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4675 <dl><dt>boo </dt>
4676 <dd>baz</dd></dl></li></ol></li></ul>
4679 # FIXME: Maybe get rid of this test?
4681 # * The test is wrong, there are two colons where there should be :;
4682 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4684 Definition Lists: Weird Ones: Test 1
4686 *#;*::;;foo :bar (who uses this?)
4688 <ul><li><ol><li><dl><dt>foo</dt>
4689 <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>
4707 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4719 Definition Lists: colons occurring in tags
4736 <dt><span>a:b</span></dt>
4737 <dt><div>a:b</div></dt>
4738 <dt><div>a</div></dt>
4742 <dt><i>a:b</i></dt></dl>
4743 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4745 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4747 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4748 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4749 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4750 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4752 <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>
4753 <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>
4754 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4757 # Parsoid's output differs here again because it shares
4758 # nesting between the two lists unlike the PHP parser.
4759 # Unsure which is more desirable.
4761 Definition Lists: colons and tables 1
4773 </td></tr></table></dd></dl>
4777 </td></tr></table></dd></dl>
4783 </td></tr></table></dd>
4787 </td></tr></table></dd></dl>
4790 # FIXME: Does this need a html/php section?
4792 Definition Lists: template interaction
4794 ::{{definition_list}}
4797 ::{{definition_list}}
4802 <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">
4803 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4805 <dl><dd data-parsoid='{}'>one
4806 <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">
4807 </span><dd about="#mwt2">two
4809 <dd>three</dd></dl></dd>
4810 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4818 External links: non-bracketed
4820 Non-bracketed: http://example.com
4822 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4826 # parsoid doesn't explicitly mark autonumbered links, see T55505
4828 External links: numbered
4830 Numbered: [http://example.com]
4831 Numbered: [http://example.net]
4832 Numbered: [http://example.com]
4834 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4835 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4836 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4839 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4840 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4841 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4845 External links: specified text
4847 Specified text: [http://example.com link]
4849 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4854 External links: trail
4856 Linktrails should not work for external links: [http://example.com link]s
4858 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4863 External links: dollar sign in URL
4865 http://example.com/1$2345
4867 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4871 # parsoid doesn't explicitly mark autonumbered links, see T55505
4873 External links: dollar sign in URL (autonumber)
4875 [http://example.com/1$2345]
4877 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4880 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4884 External links: open square bracket forbidden in URL (T6377)
4886 parsoid=wt2html,wt2wt,html2html
4888 http://example.com/1[2345
4890 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4893 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4897 External links: open square bracket forbidden in URL (named) (T6377)
4899 parsoid=wt2html,html2html
4901 [http://example.com/1[2345]
4903 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4906 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4909 # parsoid adds a space before the link name
4911 External links: open square bracket forbidden in URL (named) (T6377)
4914 [http://example.com/1 [2345]
4916 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4921 External links: nowiki in URL link text (T8230)
4923 [http://example.com/ <nowiki>''example site''</nowiki>]
4925 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4930 External links: newline forbidden in text (T8230 regression check)
4932 [http://example.com/ first
4935 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4941 External links: Pipe char between url and text
4943 [http://example.com | link]
4945 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4950 External links: protocol-relative URL in brackets
4952 [//example.com/ Test]
4954 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4958 # parsoid doesn't explicitly mark autonumbered links, see T55505
4960 External links: protocol-relative URL in brackets without text
4964 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4967 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4971 External links: protocol-relative URL in free text is left alone
4975 <p>//example.com/Foo
4980 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4982 foo//example.com/Foo
4984 <p>foo//example.com/Foo
4988 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4990 External links: with no contents
4992 parsoid=wt2html,wt2wt
4994 [http://en.wikipedia.org/wiki/Foo]
4996 [[wikipedia:Foo|Bar]]
4998 [[wikipedia:Foo|<span>Bar</span>]]
5000 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
5001 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
5002 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
5005 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
5006 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
5007 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
5011 External links: Free with trailing punctuation
5021 http://example.com/url_with_(brackets)
5022 (http://example.com/url_without_brackets)
5023 http://example.com/url_with_entity&
5024 http://example.com/url_with_entity&
5025 http://example.com/url_with_entity&
5026 http://example.com/url_with_entity
5027 http://example.com/url_with_entity 
5028 http://example.com/url_with_entity 
5029 http://example.com/url_with_entity<
5030 http://example.com/url_with_entity<
5031 http://example.com/url_with_entity<
5033 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5034 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5035 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5036 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5037 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5038 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5039 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5040 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5041 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5042 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5043 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5044 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5045 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5046 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5047 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5048 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5049 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5050 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5051 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5054 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5055 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5056 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5057 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5058 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5059 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5060 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5061 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5062 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5063 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5064 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5065 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5066 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5067 <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>
5068 <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>
5069 <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>
5070 <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>
5071 <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>
5072 <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>
5076 External links: tricky Parsoid html2html case
5078 parsoid=wt2html,wt2wt,html2html
5080 http://example.com/url_with_entity&amp;
5082 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5085 <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>
5089 External links: Free with trailing quotes (T113666)
5091 '''News:''' Stuff here
5095 <p><b>News:</b> Stuff here
5096 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5099 <p><b>News:</b> Stuff here</p>
5100 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5104 External links: with entity
5106 [http:// www.librarieswithoutborders.org Libraries without borders]
5108 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5111 <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>
5115 External links: Lone protocols are never linked (T105697)
5134 External links: No preceding word characters allowed (T67278)
5136 NOPEhttp://example.com
5137 N0http://example.com
5138 ok:http://example.com
5139 ok-http://example.com
5141 <p>NOPEhttp://example.com
5142 N0http://example.com
5143 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5144 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5149 External links: nofollow domain exception
5151 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5153 <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>.
5160 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5162 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5167 External image from https
5169 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5171 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5176 External image (when not allowed)
5178 wgAllowExternalImages=0
5180 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5182 <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>
5187 Link to non-http image, no img tag
5189 Link to non-http image, no img tag: ftp://example.com/test.jpg
5191 <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>
5196 External links: terminating separator
5198 Terminating separator: http://example.com/thing,
5200 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5205 External links: intervening separator
5207 Intervening separator: http://example.com/1,2,3
5209 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5214 External links: old bug with URL in query
5216 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5218 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5223 External links: old URL-in-URL bug, mixed protocols
5225 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5227 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5231 # Since Parsoid is starting to emit canonical wikitext for links,
5232 # [http://example.com http://example.com] will not RT back to that
5235 External links: URL in text
5239 URL in text: [http://example.com http://example.com]
5241 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5244 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5248 External links: Clickable images
5250 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5252 <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>
5255 <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>
5259 External links: raw ampersand
5261 Old & use: http://x&y
5263 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5268 External links: encoded ampersand
5270 Old & use: http://x&y
5272 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5275 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5279 External links: encoded equals (T8102)
5281 http://example.com/?foo=bar
5283 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5286 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5290 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5291 ## does it number them. As discussed in T55505, we can identify
5292 ## autonumbered links via CSS.
5296 External links: [raw ampersand]
5298 Old & use: [http://x&y]
5300 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5303 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5306 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5307 # mode will return the [raw ampersand] wikitext
5309 External links: [encoded ampersand]
5311 parsoid=wt2html,wt2wt,html2html
5313 Old & use: [http://x&y]
5315 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5318 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5322 External links: [raw equals]
5324 [http://example.com/?foo=bar]
5326 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5329 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5332 # note that parsoid html is identical to [raw equals] case; so html2wt
5333 # mode will return the [raw equals] wikitext
5335 External links: [encoded equals] (T8102)
5337 parsoid=wt2html,wt2wt,html2html
5339 [http://example.com/?foo=bar]
5341 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5344 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5347 # xxx parsoid strips the IDN character, so the round-trip tests will
5348 # obviously fail and are disabled. --cscott
5350 External links: [IDN ignored character reference in hostname; strip it right off]
5352 parsoid=wt2html,wt2wt,html2html
5354 [http://e‌xample.com/]
5356 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5359 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5362 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5363 # Where an external link could easily circumvent the sanitization of the text of
5364 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5365 # test demands a higher standard. That's a bit strange.
5369 # http://example.com -> [http://example.com|http://example.com]
5370 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5372 # The first example is sanitized, but the second is not. Any security benefits
5373 # from this production are trivial to circumvent. Either remove this test and
5374 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5375 # the test accordingly.
5379 # xxx parsoid strips the IDN character, so the round-trip tests will
5380 # obviously fail and are disabled. --cscott
5382 External links: IDN ignored character reference in hostname; strip it right off
5384 parsoid=wt2html,html2html
5386 http://e‌xample.com/
5388 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5391 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5395 External links: www.jpeg.org (T2554)
5399 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5403 # parsoid doesn't explicitly mark autonumbered links, see T55505
5405 External links: URL within URL (T2002)
5407 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5409 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5412 <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>
5416 T2361: URL inside bracketed URL
5418 [http://www.example.com/foo http://www.example.com/bar]
5420 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5425 T2361: URL within URL, not bracketed
5427 http://www.example.com/foo?=http://www.example.com/bar
5429 <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>
5434 T2289: ">"-token in URL-tail
5436 http://www.example.com/<hello>
5438 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5443 T2289: literal ">"-token in URL-tail
5445 http://www.example.com/<b>html</b>
5447 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5450 <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>
5454 T2289: ">"-token in bracketed URL
5456 [http://www.example.com/<hello> stuff]
5458 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5463 T2289: literal ">"-token in bracketed URL
5465 [http://www.example.com/<b>html</b> stuff]
5467 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5472 T2289: literal double quote at end of URL
5474 http://www.example.com/"hello"
5476 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5481 T2289: literal double quote in bracketed URL
5483 [http://www.example.com/"hello" stuff]
5485 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5490 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5492 [http://www.example.com test]
5494 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5499 External links: link text with spaces
5501 [http://www.example.com a b c]
5502 [http://www.example.com ''a'' ''b'']
5504 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5505 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5509 # Note edge case difference between PHP and Parsoid here.
5511 External links: wiki links within external link (T5695)
5513 parsoid=wt2html,html2html
5515 [http://example.com [[wikilink]] embedded in ext link]
5517 [http://example.com test [[wikilink]] embedded in ext link]
5519 <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>
5520 </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>
5523 <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>
5524 <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>
5528 T2787: Links with one slash after the url protocol are invalid
5532 [http:/example.com title]
5534 <p>http:/example.com
5535 </p><p>[http:/example.com title]
5540 Bracketed external links with template-generated invalid target
5542 [{{echo|http:/example.com}} title]
5544 <p>[http:/example.com title]
5548 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5550 Broken wikilinks (but not external links) prevent templates from closing
5554 [http://example.com x
5556 {{echo|[http://example.com x}}
5562 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5563 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5565 </p><p>{{echo|[[Foo}}
5568 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5569 <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>
5571 <p>{{echo|[[Foo}}</p>
5575 Wikilinks with embedded newlines are not broken
5586 <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>
5598 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5602 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5603 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5607 T4702: Mismatched <i>, <b> and <a> tags are invalid
5609 ''[http://example.com text'']
5610 [http://example.com '''text]'''
5611 ''Something [http://example.com in italic'']
5612 ''Something [http://example.com mixed''''', even bold]'''
5613 '''''Now [http://example.com both''''']
5615 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5616 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5617 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5618 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5619 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5627 http://www.example.com/?title=AT%26T
5629 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5632 <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>
5635 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5636 # % is actually legal in HTML5. Any change in output would need testing though.
5638 T6781, T7267: %25 in URL
5640 http://www.example.com/?title=100%25_Bran
5642 <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>
5645 <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>
5649 T6781, T7267: %28, %29 in URL
5651 http://www.example.com/?title=Ben-Hur_%281959_film%29
5653 <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>
5656 <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>
5661 T6781: %26 in autonumber URL
5663 [http://www.example.com/?title=AT%26T]
5665 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5668 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5672 T6781, T7267: %26 in autonumber URL
5674 [http://www.example.com/?title=100%25_Bran]
5676 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5679 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5683 T6781, T7267: %28, %29 in autonumber URL
5685 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5687 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5690 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5695 T6781: %26 in bracketed URL
5697 [http://www.example.com/?title=AT%26T link]
5699 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5702 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5706 T6781, T7267: %25 in bracketed URL
5708 [http://www.example.com/?title=100%25_Bran link]
5710 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5715 T6781, T7267: %28, %29 in bracketed URL
5717 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5719 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5722 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5726 External link containing a period in the anchor. (T65947)
5728 [//foo.org/bar#baz. bang]
5730 [//foo.org/bar. bang]
5732 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5733 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5736 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5737 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5741 External link containing a single quote. (T65947)
5745 [//foo.org/bar'baz bang]
5747 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5748 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5751 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5752 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5756 External link containing double-single-quotes in text '' (T6598 sanity check)
5758 Some [http://example.com/ pretty ''italics'' and stuff]!
5760 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5765 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5767 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5769 <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>
5773 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5775 External link containing double-single-quotes with no space separating the url from text in italics
5777 [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]].]
5779 <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>.
5782 <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>
5786 External link with comments in link text
5788 [http://www.google.com Google <!-- comment -->]
5790 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5793 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5797 External link to bare IPv4 address
5799 [http://192.168.0.1 Link]
5801 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5804 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5808 URL-encoding in URL functions (single parameter)
5810 {{localurl:Some page|amp=&}}
5812 <p>/index.php?title=Some_page&amp=&
5817 URL-encoding in URL functions (multiple parameters)
5819 {{localurl:Some page|q=?&=&}}
5821 <p>/index.php?title=Some_page&q=?&amp=&
5828 http://example.com/index.php?foozoid%5B%5D=bar
5830 http://example.com/index.php?foozoid[]=bar
5832 <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>
5833 </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>
5836 <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>
5838 <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>
5842 IPv6 urls, autolink format (T23261)
5844 http://[2404:130:0:1000::187:2]/index.php
5846 Examples from RFC 2373, section 2.2:
5848 *http://[1080::8:800:200C:417A]/unicast
5849 *http://[FF01::101]/multicast
5850 *http://[::1]/loopback
5851 *http://[::]/unspecified
5852 *http://[::13.1.68.3]/ipv4compat
5853 *http://[::FFFF:129.144.52.38]/ipv4compat
5855 Examples from RFC 2732, section 2:
5857 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5858 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5859 *http://[3ffe:2a00:100:7031::1]
5860 *http://[1080::8:800:200C:417A]/foo
5861 *http://[::192.9.5.5]/ipng
5862 *http://[::FFFF:129.144.52.38]:80/index.html
5863 *http://[2010:836B:4179::836B:4179]
5865 <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>
5866 </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:
5868 <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>
5869 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5870 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5871 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5872 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5873 <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>
5874 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5876 <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>
5877 <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>
5878 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5879 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5880 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5881 <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>
5882 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5885 <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>
5887 <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>
5888 <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>
5889 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5890 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5891 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5892 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5893 <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>
5895 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5896 <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>
5897 <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>
5898 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5899 <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>
5900 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5901 <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>
5902 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5906 IPv6 urls, bracketed format (T23261)
5908 [http://[2404:130:0:1000::187:2]/index.php test]
5910 Examples from RFC 2373, section 2.2:
5912 *[http://[1080::8:800:200C:417A] unicast]
5913 *[http://[FF01::101] multicast]
5914 *[http://[::1]/ loopback]
5915 *[http://[::] unspecified]
5916 *[http://[::13.1.68.3] ipv4compat]
5917 *[http://[::FFFF:129.144.52.38] ipv4compat]
5919 Examples from RFC 2732, section 2:
5921 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5922 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5923 *[http://[3ffe:2a00:100:7031::1] 3]
5924 *[http://[1080::8:800:200C:417A]/foo 4]
5925 *[http://[::192.9.5.5]/ipng 5]
5926 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5927 *[http://[2010:836B:4179::836B:4179] 7]
5929 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5930 </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:
5932 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5933 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5934 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5935 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5936 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5937 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5938 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5940 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5941 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5942 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5943 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5944 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5945 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5946 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5949 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5951 <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>
5952 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5953 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5954 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5955 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5956 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5957 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5959 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5960 <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>
5961 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5962 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5963 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5964 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5965 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5966 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5970 Non-extlinks in brackets
5979 [{{echo|foo}} ''bar'']
5980 [{{echo|foo}}l's] errand
5981 [{{echo|foo}}l's errand]
5983 [url=http://example.com]
5984 [http:// bare protocols don't count]
5997 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5998 [http:// bare protocols don't count]
6006 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6007 [<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]
6008 [<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>]
6009 [<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
6010 [<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]
6011 [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>]
6012 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6013 [http:// bare protocols don't count]</p>
6017 Percent encoding in external links
6019 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6021 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6024 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6028 Use url link syntax for links where the content is equal the link target
6032 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6035 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6039 Parenthesis in external links, especially URL links
6043 http://example.com/test)
6045 http://example.com/(test)
6047 http://example.com/((test)
6049 (http://example.com/(test))
6051 (http://example.com/(test)))))
6053 http://example.com/a)b
6055 [http://example.com) foo]
6057 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6058 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6059 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6060 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6061 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6062 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6063 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6064 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6067 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6068 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6069 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6070 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6071 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6072 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6073 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6074 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6078 Parenthesis in external links, w/ transclusion or comment
6080 (http://example.com/{{echo|hi}})
6082 (http://example.com<!-- hi -->)
6084 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6085 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6088 <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>
6090 <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>
6094 Serialize <a> tags with invalid link targets as plain text
6096 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6098 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6099 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6100 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6101 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6104 <nowiki>*</nowiki>text
6105 <nowiki>[[foo]]</nowiki>
6106 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6110 mw:ExtLink -vs- mw:WikiLink (T94723)
6114 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6115 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6116 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6117 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6119 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6120 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6128 [[:en:European_Robin|European Robin]]
6129 [[:en:European_Robin|European Robin]]
6133 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6137 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6139 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6150 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6152 Normal text. '''''Bold italic text.''''' Normal text.
6154 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6155 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6160 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6161 # parser strips. The wikitext contains just the first half of the bold
6164 Unclosed and unmatched quotes
6166 '''''Bold italic text '''with bold deactivated''' in between.'''''
6168 '''''Bold italic text ''with italic deactivated'' in between.'''''
6172 ..spanning two paragraphs (should not work).'''
6174 '''Bold tag left open
6176 ''Italic tag left open
6180 <!-- Unmatching number of opening, closing tags: -->
6181 '''This year''''s election ''should'' beat '''last year''''s.
6183 ''Tom'''s car is bigger than ''Susan'''s.
6185 Plain ''italic'''s plain
6187 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6188 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6189 </p><p><b>Bold text..</b>
6190 </p><p>..spanning two paragraphs (should not work).
6191 </p><p><b>Bold tag left open</b>
6192 </p><p><i>Italic tag left open</i>
6194 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6195 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6196 </p><p>Plain <i>italic'</i>s plain
6199 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6200 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6201 </p><p><b>Bold text..</b>
6202 </p><p>..spanning two paragraphs (should not work).<b></b>
6203 </p><p><b>Bold tag left open</b>
6204 </p><p><i>Italic tag left open</i>
6207 <!-- Unmatching number of opening, closing tags: -->
6208 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6209 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6210 </p><p>Plain <i>italic'</i>s plain
6217 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6220 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6221 # is the bare minimum required by the spec, see:
6222 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6223 # Parsoid team replies: empty table tags are legal in HTML5
6225 A table with no data.
6238 A table with stray table end tags on start tag line (wt2html)
6242 {|style="color: red;"|}
6244 {|style="color: red;" |}
6248 {|style="color: red;"|} id="foo"
6252 {|style="color: red;" |} id="foo"
6256 <table style="color: red;"></table>
6258 <table style="color: red;">
6264 <table style="color: red;" id="foo">
6270 <table style="color: red;" id="foo">
6279 A table with no data (take 2)
6287 # A table with nothing but a caption is invalid XHTML, we might want to render
6288 # this as <p>caption</p>
6289 # Parsoid team replies: table with only a caption is legal in HTML5
6291 A table with nothing but a caption
6299 </caption><tr><td></td></tr></table>
6302 <table><caption>caption</caption></table>
6306 A table with caption with default-spaced attributes and a table row
6309 |+ style="color: red;" |caption1
6315 <caption style="color: red;">caption1
6324 A table with captions with non-default spaced attributes and a table row
6327 |+style="color: red;"|caption2
6328 |+ style="color: red;"|caption3
6334 <caption style="color: red;">caption2
6336 <caption style="color: red;">caption3
6345 Table td-cell syntax variations
6350 |style='color:red;'|baz
6351 |style='color:red;'||baz
6358 <td>foo bar foo</td>
6361 <td style="color:red;">baz
6363 <td>style='color:red;'</td>
6391 Simple table but with multiple dashes for row wikitext
6410 Multiplication table
6412 {| border="1" cellpadding="2"
6413 |+Multiplication table
6433 <table border="1" cellpadding="2">
6434 <caption>Multiplication table
6481 Accept "||" in table headings
6496 Accept "!!" in table data
6510 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6515 Accept "||" in indented table headings
6525 </th></tr></table></dd></dl>
6530 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
6565 <p>b!!c</p></th></tr>
6570 Accept "!!" in table data of mixed wikitext / html syntax
6574 <tr><td>b!!c</td></tr>
6580 </th></tr><tr><td>b!!c</td></tr>
6584 <tbody><tr><th>a</th></tr>
6585 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6590 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6607 Accept "| !" at start of line in tables (ignore !-attribute)
6611 |!style="color:red"|bar
6623 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 +/-
6627 |style='color:red;'|+1
6628 |style='color:blue;'|-1
6640 <td style="color:red;">+1
6642 <td style="color:blue;">-1
6666 |rowspan=2|Cell 2, row 1 (and 2)
6677 <td rowspan="2">Cell 2, row 1 (and 2)
6695 {| bgcolor=#ABCDEF border=2
6700 |the original table again
6708 <table bgcolor="#ABCDEF" border="2">
6716 <td>the original table again
6722 Invalid attributes in table cell (T3830)
6736 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6740 |title="foo<nowiki>|</nowiki>" |bar
6741 |title="foo<nowiki>|</nowiki>" bar
6748 <td title="foo|">bar
6750 <td>title="foo|" bar
6755 <tbody><tr><td title="foo">bar</td>
6756 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6757 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6761 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6762 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6763 # *2wt modes will fail.
6765 Table security: embedded pipes
6767 parsoid=wt2html,html2html
6770 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6774 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6775 <td>]" onmouseover="alert(document.cookie)">test
6783 <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>
6787 Element attributes with double ! should not be broken up by <th>
6790 !hi <div class="!!">ha</div> ho
6795 <th>hi <div class="!!">ha</div> ho
6800 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6805 ! and || in element attributes should not be parsed as <th>/<td>
6808 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6813 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6818 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6822 # FIXME: The output seems broken. Filed as T110268.
6824 ! and || in td attributes should not be parsed as <th>/<td>
6829 |style="color: red !important;" data-contrived="put this here ||"|foo
6834 <td>style="color: red !important;" data-contrived="put this here</td>
6840 <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>
6845 Break on | in element attribute in template
6847 parsoid=wt2html,html2html
6849 {{echo|1=<div class="hi|ho">ha</div>}}
6851 <p>ho">ha</div>
6854 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</span>
6858 Break on | in element attribute name in template
6860 {{echo|<div cla|ss="hiho">ha</div>}}
6862 <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>
6866 Don't break on | in extension attribute in template
6868 {{echo|<ref name="hi|ho">ha</ref>}}
6872 <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="./Main_Page#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
6874 <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="./Main_Page#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>
6877 ## We don't support roundtripping of these attributes in Parsoid.
6878 ## Selective serialization takes care of preventing dirty diffs.
6879 ## But, on edits, we dirty-diff the invalid attribute text.
6881 Invalid text in table attributes should be discarded
6885 {| <span>boo</span> style='border:1px solid black'
6886 | <span>boo</span> style='color:blue' |1
6887 |<span>boo</span> style='color:blue'|2
6890 <table style="border:1px solid black">
6892 <td style="color:blue">1
6894 <td style="color:blue">2
6898 <table style="border:1px solid black">
6900 <td style="color:blue">1</td>
6901 <td style="color:blue">2</td>
6907 Invalid text in table attributes should be preserved by selective serializer
6910 "modes": ["selser"],
6912 ["td:first-child", "text", "abc"],
6913 ["td + td", "text", "xyz"]
6917 {| <span>boo</span> style='border:1px solid black'
6918 | <span>boo</span> style='color:blue' | 1
6919 |<span>boo</span> style='color:blue'| 2
6922 {| <span>boo</span> style='border:1px solid black'
6923 | <span>boo</span> style='color:blue' | abc
6924 |<span>boo</span> style='color:blue'| xyz
6929 1. Template-generated table cell attributes and cell content
6934 || {{table_attribs_5}}
6935 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6936 |align=center {{table_attribs}}
6937 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6942 <td style="color:red;">Foo
6944 <td style="color:red;">Foo
6946 <td>style="color:red;"</td>
6949 <td style="color:red;">Foo
6951 <td align="center" style="color:red;">Foo
6953 <td align="center" style="color:red;">Foo
6959 2. Template-generated table cell attributes and cell content
6962 |{{table_attribs_2}}
6967 <td style="color:red;">Foo
6975 <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>
6976 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6981 3. Template-generated table cell attributes and cell content
6984 !align=center {{table_header_cells}}
6986 |align=center {{table_cells}}
6991 <th align="center" style="color:red;">Foo</th>
6992 <th style="color:red;"><i>Bar</i></th>
6993 <th style="color:brown;"><i>Foo</i> and Baz
6996 <td align="center" style="color:red;">Foo</td>
6997 <td style="color:red;"><i>Bar</i></td>
6998 <td style="color:brown;"><i>Foo</i> and Baz
7003 <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>
7004 <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>
7009 4. Template-generated table cell attributes and cell content inside a templated table
7012 !align=center {{table_header_cells}}
7014 |align=center {{table_cells}}
7019 <th align="center" style="color:red;">Foo</th>
7020 <th style="color:red;"><i>Bar</i></th>
7021 <th style="color:brown;"><i>Foo</i> and Baz
7024 <td align="center" style="color:red;">Foo</td>
7025 <td style="color:red;"><i>Bar</i></td>
7026 <td style="color:brown;"><i>Foo</i> and Baz
7030 <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}}]}'>
7031 <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>
7033 <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>
7037 ## Edge case fix to prevent future regressions
7039 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7042 |{{table_attribs_7}}
7047 <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","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
7049 <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="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
7053 Table with row followed by newlines and table heading
7055 parsoid=wt2html,html2html
7073 Table with empty line following the start tag
7075 parsoid=wt2html,html2html
7093 Table attributes with empty value
7095 parsoid=wt2html,html2html
7108 <tbody><tr><td style="">hello</td></tr>
7113 Wikitext table with a lot of comments
7136 Wikitext table comments represented in parsoid dom
7138 {|<!--c1--><!--c2-->
7147 </td></tr></tbody></table>
7149 <table><!--c1--><!--c2-->
7150 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7151 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7156 Wikitext table with double-line table cell
7173 Table cell with a single comment
7190 Table-cell after a comment-only-empty-line
7207 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7209 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7215 Build table with {{!}}
7217 {{{!}} class="wikitable"
7220 {{!}}- style="color:red;"
7221 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7224 <table class="wikitable">
7230 <tr style="color:red;">
7232 <td style="color:red;">second data
7238 Build table with pipe as data
7240 {| class="wikitable"
7243 |- style="color:red;"
7244 |data|| style="color:red;" |second data
7246 | style="color:red;" |data with | || style="color:red;" | second data with |
7248 ||data with | |||second data with |
7251 <table class="wikitable">
7257 <tr style="color:red;">
7259 <td style="color:red;">second data
7262 <td style="color:red;">data with |</td>
7263 <td style="color:red;">second data with |
7266 <td>data with |</td>
7267 <td>second data with |
7273 Build table with wikilink
7275 {| class="wikitable"
7276 !header||second header
7277 |- style="color:red;"
7278 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7280 |data||second data [[Main Page|link|text with pipe]]
7283 <table class="wikitable">
7288 <tr style="color:red;">
7289 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7290 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7294 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7299 # The expected HTML structure in this test is debatable. The PHP parser does
7300 # not parse this kind of table at all. The main focus for Parsoid is on
7301 # round-tripping, so this output is ok for now. TODO: revisit!
7303 Wikitext table with html-syntax row
7313 <td>foo</td></tr></tbody></table>
7317 Fostered content in tables: Plain text
7319 parsoid=wt2html,html2html
7337 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7340 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7344 Fostered content in tables: Lists
7346 parsoid=wt2html,html2html
7359 <ul><li>a</li></ul><table>
7364 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7365 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7367 </tr></tbody></table>
7371 Template generated table cell with attributes
7375 {{table_attribs_4}} ||a||b
7381 <td style="background-color:#DC241f;" width="10px"></td>
7384 </td></tr></tbody></table>
7387 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7388 <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>
7392 Parsoid: Round-trip tables directly followed by content (T53219)
7394 parsoid=wt2html,wt2wt
7407 </td></tr></tbody></table><p> bar
7411 </td></tr></tbody></table><p><b>quux</b>
7416 Parsoid: Default to a newline after tables in new content (T53219)
7421 <tr><td>foo</td></tr></tbody></table> bar
7423 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7428 <nowiki> </nowiki>bar
7436 Parsoid: Row-syntax table headings followed by comment & table cells
7438 parsoid=wt2html,wt2wt
7442 <!-- foo --> ||baz||quux
7456 <tbody><tr><th>foo</th><th>bar
7457 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7462 Parsoid: Recover better from broken table attributes
7476 </td></tr></tbody></table>
7481 <p>foo</p></td></tr>
7486 Tables: Digest broken attributes on table and tr tag
7497 <tr class='mw-empty-elt'></tr>
7498 <tr class='mw-empty-elt'></tr>
7503 Table with missing opening <tr> tag
7505 parsoid=wt2html,wt2wt
7513 <tbody><tr><td>foo</td>
7518 # T137406: Whitespace in the HTML
7520 1. Generate correct wikitext for tables with thead/tbody/tfoot
7525 <caption>Test</caption>
7587 </td></tr></tbody></table>
7590 # T137406: No whitespace in the HTML
7592 2. Generate correct wikitext for tables with thead/tbody/tfoot
7596 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7606 Wikitext tables can be nested inside HTML tables
7610 <table data-parsoid='{"stx":"html"}'>
7613 <tr><td>foo</td></tr>
7631 Plain link, capitalized
7635 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7640 Plain link, uncapitalized
7644 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7651 [[Main Page|The Main Page]]
7653 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7658 Piped link with comment in link text
7660 [[Main Page|The Main<!--front--> Page]]
7662 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7667 Piped link with multiple pipe characters in link text
7669 [[Main Page||The|Main|Page|]]
7671 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7674 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7678 Piped link with no link text
7680 [[Thomas Bek (bishop of St David's)|]]
7682 <p>[[Thomas Bek (bishop of St David's)|]]
7685 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7689 Piped link with empty link text
7691 [[Main Page|<nowiki/>]] - empty nowiki
7692 [[Main Page| ]] - empty space
7693 [[Main Page| ]] - empty non breaking space
7695 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7696 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7697 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7700 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7701 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7702 <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>
7710 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7715 Broken link with fragment
7717 [[Zigzagzogzagzig#zug]]
7719 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7724 Special page link with fragment
7726 [[Special:Version#anchor]]
7728 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7733 Nonexistent special page link with fragment
7735 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7737 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7744 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7746 <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>
7753 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7755 <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>!!!
7766 T45661: Piped links with identical prefixes
7768 [[prefixed article|prefixed articles with spaces]]
7770 [[prefixed article|prefixed articlesaoeu]]
7772 [[Main Page|Main Page test]]
7774 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7775 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7776 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7782 Link with HTML entity in suffix / tail
7784 [[Main Page]]", [[Main Page]]a
7786 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7789 <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>
7793 Link with 3 brackets
7804 Link with 4 brackets
7808 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7813 Piped link with 3 brackets
7815 [[[main page|the main page]]]
7817 <p>[[[main page|the main page]]]
7822 Piped link with extlink-like text
7825 [[Main Page|This is a [bar]]]
7828 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7829 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7830 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7833 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7834 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7835 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7839 Link with multiple pipes
7841 [[Main Page|The|Main|Page]]
7843 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7848 Anchor containing a #. (T65430)
7850 wgFragmentMode=[ 'html5', 'legacy' ]
7852 [[Main Page#And#Link]]
7854 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7857 <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>
7863 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7865 <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>
7870 Link with space in namespace
7872 [[User talk:Foo bar]]
7874 <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>
7879 MemoryAlpha:AlphaTest
7881 This is an article in the MemoryAlpha namespace
7882 (which shadows the memoryalpha interwiki link).
7886 Namespace takes precedence over interwiki link (T53680)
7888 [[MemoryAlpha:AlphaTest]]
7890 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7894 # The previous test doesn't work correctly in html2*, due to not recognizing the
7895 # link as an internal one. This one checks for the correct behavior.
7897 Link to namespace preferred over interwiki with correct rel attribute
7899 parsoid=html2wt,html2html
7901 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7903 [[MemoryAlpha:AlphaTest]]
7907 Piped link to namespace
7909 [[Meta:Disclaimers|The disclaimers]]
7911 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7918 [[Usually caused by a typo (oops}]]
7920 <p>[[Usually caused by a typo (oops}]]
7927 Just a test of an article title containing a percent.
7931 Link containing % (not as a hex sequence)
7934 [[7% Solution|7%25 Solution]]
7936 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7937 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7940 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7941 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7944 # note that the parsoid HTML is identical to the previous test output,
7945 # so the previous test ensures that the html2wt mode will generate the
7946 # "not as a hex sequence" wikitext.
7948 Link containing % as a single hex sequence interpreted to char
7950 parsoid=wt2wt,wt2html,html2html
7953 [[7%25 Solution|7%25 Solution]]
7955 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7956 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7959 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7960 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7964 Link containing % as a double hex sequence interpreted to hex sequence
7968 <p>[[7%2525 Solution]]
7972 ## Example for such a section: == < ==
7974 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7976 wgFragmentMode=[ 'html5', 'legacy' ]
7978 [[%23%3c]][[%23%3e]]
7980 <p><a href="#<">#<</a><a href="#>">#></a>
7983 <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>
7986 ## Example for such a section: == < ==
7988 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7990 wgFragmentMode=[ 'legacy' ]
7992 [[%23%3c]][[%23%3e]]
7994 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7999 Link containing "<#" and ">#" as a hex sequences
8001 [[%3c%23]][[%3e%23]]
8003 <p>[[%3c%23]][[%3e%23]]
8008 Link containing an equals sign
8010 [[Special:BookSources/isbn=4-00-026157-6]]
8012 <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>
8015 <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>
8021 Just a test of an article title containing a tilde.
8024 # note that links containing signatures, like [[Foo~~~~]], are
8025 # massaged by the pre-save transform (PST) and so the tildes are never
8026 # seen by the parser.
8028 Link containing a tilde
8032 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8035 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8039 Link containing double-single-quotes '' (T6598)
8041 [[Lista d''e paise d''o munno]]
8043 <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>
8046 <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>
8050 Link containing double quotes and spaces
8054 <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>
8057 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8061 File containing double quotes and spaces
8063 [[File:Cool "Gator".png]]
8065 <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>
8069 Redirect containing double quotes and spaces
8071 #REDIRECT [[Cool "Gator"]]
8073 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8077 Link containing double-single-quotes '' in text (T6598 sanity check)
8079 Some [[Link|pretty ''italics'' and stuff]]!
8081 <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>!
8084 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8088 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8090 ''Some [[Link|pretty ''italics'' and stuff]]!''
8092 <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>
8097 Link with double quotes in title part (literal) and alternate part (interpreted)
8099 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8103 [[''Pentecoste''|Pentecoste]]
8105 [[''Pentecoste''|''Pentecoste'']]
8107 <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>
8108 </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>
8109 </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>
8110 </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>
8113 <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>
8114 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8115 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8116 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8120 Broken image links with HTML captions (T41700)
8122 [[File:Nonexistent|<script></script>]]
8123 [[File:Nonexistent|100x100px|<script></script>]]
8124 [[File:Nonexistent|<]]
8125 [[File:Nonexistent|a<i>b</i>c]]
8127 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8128 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8129 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8130 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8133 <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>
8134 <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>
8135 <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>
8136 <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>
8142 [[http://www.example.com]]
8144 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8147 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8151 Plain link to URL with link text
8153 [[http://www.example.com Link text]]
8155 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8160 Plain link to protocol-relative URL
8162 [[//www.example.com]]
8164 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8167 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8171 Plain link to protocol-relative URL with link text
8173 [[//www.example.com Link text]]
8175 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8180 Plain link to page with question mark in title
8186 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8187 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8191 # I'm fairly sure the expected result here is wrong.
8192 # We want these to be URL links, not pseudo-pages with URLs for titles....
8193 # However the current output is also pretty screwy.
8196 # I'm changing it to match the current output--it arguably makes more
8197 # sense in the light of the test above. Old expected result was:
8198 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8200 # But I think this test is bordering on "garbage in, garbage out" anyway.
8205 Piped link to URL: [[http://www.example.com|an example URL]]
8207 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8210 <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>
8214 Plain link in template argument
8218 {{echo|[http://www.example.com |123]}}
8220 {{echo|[[http://www.example.com |123]]}}
8222 {{echo|[[http://www.example.com |123]}}
8224 {{echo|[http://www.example.com |123]]}}
8226 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8227 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8228 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8229 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8232 <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>
8234 <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>
8236 <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>
8238 <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>
8242 T2002: [[page|http://url/]] should link to page, not http://url/
8244 [[Main Page|http://url/]]
8246 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8249 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8252 # Parsoid does not mark self-links, by design.
8254 T2337: Escaped self-links should be bold
8258 [[Bug462]] [[Bug462]]
8260 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8263 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8267 Self-link to section should not be bold
8271 [[Main Page#section]]
8273 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8284 Self-link to numeric title
8290 <p><a class="mw-selflink selflink">0</a>
8295 Link to numeric-equivalent title
8301 <p><a href="/wiki/00" title="00">00</a>
8306 <nowiki> inside a link
8308 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8310 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8315 Non-breaking spaces in title
8317 [[ Main Page ]]
8319 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8323 # Add new article for the test below so that it doesn't red-link
8331 Multiple spaces in titles should normalize to a single underscore
8333 parsoid=wt2html,wt2wt
8339 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8340 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8341 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8344 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8345 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8346 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8351 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8357 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8362 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8368 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8373 Internal link with en linktrail: no apostrophes (T29473)
8379 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8384 Internal link with ca linktrail with apostrophes (T29473)
8390 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8395 Internal link with kaa linktrail with apostrophes (T29473)
8401 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8406 Link with multiple ":" in a subpage-supporting namespace (T65636)
8408 [[User:Foo/Test/63636:Bar|Test]]
8410 <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>
8413 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8416 ## Mainly a sanity check for Parsoid
8418 Handle title parsing for subpages
8438 Link to a subpage from a namespace other than main
8445 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8448 <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>
8452 Ensure that transclusion titles are not url-decoded
8454 subpage title=[[Test]]
8457 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8459 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8462 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8466 Purely hash wikilink
8468 title=[[User:Test/123]]
8473 <p><a href="#a">b</a>
8476 <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>
8480 Serialization of purely hash wikilink
8482 title=[[User:Test/123]]
8486 <p><a href="#a">[[</a></p>
8488 [[#a|<nowiki>[[</nowiki>]]
8490 <p><a href="#a">[[</a>
8495 1. Interaction of linktrail and template encapsulation
8499 <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>
8503 2. Interaction of linktrail and template encapsulation
8507 {{echo|Some [[Fool]]}}s
8509 <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>
8513 3. Interaction of linktrail and template encapsulation
8517 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8519 <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>
8529 Internal link with is link prefix
8533 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8535 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8546 Internal link with is link trail and link prefix
8550 [[mótmælendatrú|xxx]]ar
8552 mótmælenda[[söfnuður]]
8553 mótmælenda[[söfnuður|söfnuðir]]
8554 mótmælenda[[söfnuður|söfnuðir]]xxx
8556 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8557 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8558 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8559 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8560 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8565 Parsoid link trail escaping
8567 parsoid=html2wt,html2html
8569 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8575 Parsoid link prefix escaping
8578 parsoid=html2wt,html2html
8580 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8582 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8586 Parsoid link bracket escaping
8588 parsoid=html2wt,html2html
8590 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8591 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8592 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8593 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8594 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8595 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8603 [[[<nowiki/>[[Test]]]]]
8607 [[[[[<nowiki/>[[Test]]]]]]]
8611 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8619 [http://wp.org ''foo'']
8621 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8622 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8623 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8624 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8629 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8631 [[Foo|{{echo|a}} b {{echo|c}}]]
8633 <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>
8637 Link with angle bracket after anchor
8639 wgFragmentMode=[ 'html5', 'legacy' ]
8643 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8646 <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>
8650 Link with angle bracket after anchor (legacy)
8652 wgFragmentMode=[ 'legacy' ]
8656 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8661 ### Interwiki links (see maintenance/interwiki.sql)
8665 Inline interwiki link
8667 parsoid=wt2html,wt2wt,html2html
8669 [[MeatBall:SoftSecurity]]
8671 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8674 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8678 Inline interwiki link with empty title (T4372)
8680 parsoid=wt2html,wt2wt,html2html
8684 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8687 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8690 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8692 Interwiki link encoding conversion (T3636)
8694 parsoid=wt2html,wt2wt
8696 *[[Wikipedia:ro:Olteniţa]]
8697 *[[Wikipedia:ro:Olteniţa]]
8699 <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>
8700 <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>
8704 <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>
8705 <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>
8709 <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>
8710 <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>
8715 Interwiki link with fragment (T4130)
8717 [[MeatBall:SoftSecurity#foo]]
8719 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8724 Link scenarios with escaped fragments
8726 wgFragmentMode=[ 'html5', 'legacy' ]
8729 [[Foo#Is this great?]]
8730 [[meatball:Foo#Is this great?]]
8732 <p><a href="#Is_this_great?">#Is this great?</a>
8733 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8734 <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>
8737 <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>
8738 <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>
8739 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
8743 Link scenarios with escaped fragments (legacy)
8745 wgFragmentMode=[ 'legacy' ]
8748 [[Foo#Is this great?]]
8749 [[meatball:Foo#Is this great?]]
8751 <p><a href="#Is_this_great.3F">#Is this great?</a>
8752 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8753 <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>
8757 # Ideally the wikipedia: prefix here should be proto-relative too
8758 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8759 # define the 'en' prefix, and originally the test used 'wikipedia',
8760 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8763 Different interwiki prefixes mapping to the same URL
8771 [[:wikipedia:Foo|Foo]]
8773 [[wikipedia:en:Foo]]
8775 [[:wikipedia:en:Foo]]
8779 <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>
8781 <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>
8783 <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>
8785 <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>
8787 <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>
8789 <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>
8791 <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>
8795 Interwiki links that cannot be represented in wiki syntax
8798 [[meatball:ok#foo|ok with fragment]]
8799 [[meatball:ok_as_well?|ok ending with ? mark]]
8800 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8801 [http://de.wikipedia.org/wiki/#foo is just fragment]
8804 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8805 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8806 <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>
8807 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8808 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8811 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8812 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8813 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
8814 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8815 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8819 Interwiki links: trail
8821 [[wikipedia:Foo|Ba]]r
8823 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8826 <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>
8830 Local interwiki link
8832 parsoid=wt2html,wt2wt,html2html
8834 [[local:Template:Foo]]
8836 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8839 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8842 # Parsoid does not mark self-links, by design.
8844 Local interwiki link: self-link to current page
8847 parsoid=wt2html,wt2wt,html2html
8851 <p><a class="mw-selflink selflink">local:Main Page</a>
8854 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8858 Local interwiki link: prefix only (T66167)
8860 parsoid=wt2html,wt2wt,html2html
8864 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8867 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8871 Local interwiki link: with additional interwiki prefix (T63357)
8873 parsoid=wt2html,wt2wt,html2html
8875 [[local:meatball:Hello]]
8877 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8880 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8884 Multiple local interwiki link prefixes
8886 [[local:local:local:local:mi:local:Foo]]
8888 parsoid=wt2html,wt2wt,html2html
8890 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8893 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8897 ### Interlanguage links
8898 ### Language links (so that searching for '### language' matches..)
8910 <p>Blah blah blah</p>
8911 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8914 ## parsoid html2wt will lose the space variations
8916 Interlanguage link with spacing
8918 parsoid=wt2html,wt2wt,html2html
8926 <p>Blah blah blah</p>
8927 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8931 Double interlanguage link
8940 <p>Blah blah blah</p>
8941 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8942 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8945 ## parsoid html2wt will lose the space variations
8947 Interlanguage link variations
8949 parsoid=wt2html,wt2wt,html2html
8959 <p>Blah blah blah</p>
8960 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8961 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8962 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8966 Escaping of interlanguage links (T129218, T156308)
8970 [[ : zh : Chinese ]]
8973 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8974 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8978 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8979 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8983 Multiple colons escaping interlanguage links
8991 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8996 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8998 [[:::es:Spanish]]</p>
9001 ## parsoid html2wt will normalize the space to _
9003 Space and question mark encoding in interlanguage links (T95473)
9005 parsoid=wt2html,wt2wt,html2html
9013 <p>Blah blah blah</p>
9014 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9018 Interlanguage link, with prefix links
9028 <p>Blah blah blah</p>
9029 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9033 Double interlanguage link, with prefix links (T10897)
9044 <p>Blah blah blah</p>
9045 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9046 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9050 "Extra" interlanguage links (T34189 / gerrit 111390)
9058 <p>Blah blah blah</p>
9059 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9062 ## PHP parser tests script needs an update
9063 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9065 Language links render as inline links if $wgInterwikiMagic=false
9067 wgInterwikiMagic=false
9068 parsoid=wt2html,wt2wt,html2html
9073 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9076 ## PHP parser tests script needs an update
9077 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9079 Language links render as inline links in the Talk namespace
9082 parsoid=wt2html,wt2wt,html2html
9087 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9091 Parsoid-specific test: Wikilinks with should RT properly
9097 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9102 Parsoid T55221: Wikilinks should be properly entity-escaped
9104 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9106 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9107 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9109 He&nbsp;llo [[Foo|He&nbsp;llo]]
9111 He&nbsp;llo He&nbsp;llo
9113 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9114 </p><p>He&nbsp;llo He&nbsp;llo
9118 # html2wt will fail because of title normalization without data-parsoid
9120 Parsoid: handle constructor well
9122 parsoid=wt2html,wt2wt
9128 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9129 </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>
9132 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9134 <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>
9138 Template parameter named "constructor"
9140 {{echo| constructor = |hi}}
9142 <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>
9151 # Note that `ko` isn't a known interlanguage prefix
9153 Parsoid: recognize interlanguage links without a target page
9163 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9165 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9168 # Note that `ko` isn't a known interwiki prefix
9170 Parsoid: recognize interwiki links without a target page
9172 parsoid=wt2html,wt2wt,html2html
9178 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9179 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9182 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9183 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9187 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9191 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9194 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9198 Interlanguage link with preceding local interwiki link (T70085)
9200 parsoid=wt2html,wt2wt,html2html
9203 [[local:es:Spanish]]
9206 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9210 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9214 Looks like an interlanguage link, but is actually a local interwiki
9216 parsoid=wt2html,wt2wt,html2html
9222 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9226 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9230 ### Redirects, Parsoid-only
9234 1. Simple redirect to page
9236 #REDIRECT [[Main Page]]
9238 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9242 2. Other redirect variants
9244 #REDIRECT [[Main_Page]]
9246 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9249 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9250 # This tests the Parsoid bail-out code.
9252 3. Other redirect variants
9256 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9258 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9262 4. Redirect to a templated destination
9264 #REDIRECT [[{{echo|Foo}}bar]]
9266 <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"}]]}'/>
9272 parsoid=wt2html,wt2wt
9277 <li>REDIRECT [[]]</li></ol>
9281 Optional colon in #REDIRECT
9283 # the colon is archaic syntax. we support it for wt2html, but we
9284 # don't care that it roundtrips back to the modern syntax.
9285 parsoid=wt2html,html2html
9287 #REDIRECT:[[Main Page]]
9289 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9293 Whitespace in #REDIRECT with optional colon
9295 # the colon and gratuitous whitespace is archaic syntax. we support
9296 # it for wt2html, but we don't care that it roundtrips back to the
9297 # modern syntax (without extra whitespace)
9298 parsoid=wt2html,html2html
9305 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9309 Piped link in #REDIRECT
9311 # content after piped link is ignored. we support this syntax,
9312 # but don't care that the piped link is lost when we roundtrip this.
9315 #REDIRECT [[Main Page|bar]]
9317 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9321 Redirect to category (T104502)
9323 parsoid=wt2html,wt2wt
9325 #REDIRECT [[Category:Foo]]
9327 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9331 Redirect to category with URL encoding (T104502)
9335 #REDIRECT [[Category%3AFoo]]
9337 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9341 Redirect to category page
9343 #REDIRECT [[:Category:Foo]]
9345 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9349 Redirect to image page (1)
9351 #REDIRECT [[File:Wiki.png]]
9353 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9357 Redirect to image page (2)
9359 #REDIRECT [[Image:Wiki.png]]
9361 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9364 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9365 # Next test confirms this.
9367 Redirect to language (1) (T104918)
9369 parsoid=wt2html,wt2wt,html2html
9371 #REDIRECT [[en:File:Wiki.png]]
9373 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9377 Redirect to language (2) (T104918)
9379 #REDIRECT [[:en:File:Wiki.png]]
9381 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9385 Redirect to interwiki (T104918)
9387 #REDIRECT [[meatball:File:Wiki.png]]
9389 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9393 Non-English #REDIRECT
9397 #TILVÍSUN [[Main Page]]
9399 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9403 Redirect syntax under text isn't considered a redirect
9407 #redirect [[Main Page]]
9410 <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>
9418 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9425 Redirect followed by block on the same line
9429 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9431 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9435 Redirect followed by a newline
9437 #REDIRECT [[Main Page]]
9440 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9445 Redirect followed by multiple newlines
9447 #REDIRECT [[Main Page]]
9452 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9459 Drop duplicate redirects
9463 <link rel="mw:PageProp/redirect" href="./Foo"/>
9464 <link rel="mw:PageProp/redirect" href="./Bar"/>
9465 <link rel="mw:PageProp/redirect" href="./Baz"/>
9484 Broken br tag sanitization
9492 # TODO: Fix html2html mode (T53055)!
9494 Parsoid: Broken br tag recognition
9508 Incorrecly removing closing slashes from correctly formed XHTML
9510 <br style="clear:both;" />
9512 <p><br style="clear:both;" />
9517 Failing to transform badly formed HTML into correct XHTML
9519 <br style="clear: left;">
9520 <br style="clear: right;">
9521 <br style="clear: both;">
9523 <p><br style="clear: left;" />
9524 <br style="clear: right;" />
9525 <br style="clear: both;" />
9529 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9530 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9532 Handling html with a div self-closing tag
9541 <p><div title />
9545 <p><div title=bar />
9546 <div title=bar/>
9548 <div title="bar/"></div>
9552 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9553 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9554 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9555 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9556 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9557 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9561 Handling html with a br self-closing tag
9588 Horizontal ruler (should it add that extra space?)
9597 foo </p><hr /><p> bar
9602 Horizontal ruler -- 4+ dashes render hr
9611 Horizontal ruler -- eats additional dashes on the same line
9620 Horizontal ruler -- does not collapse dashes on consecutive lines
9631 Horizontal ruler -- <4 dashes render as plain text
9640 Horizontal ruler -- Supports content following dashes on same line
9652 ### Block-level elements
9661 <ul><li>Common list</li>
9663 <li>item 3</li></ul>
9674 <ol><li>Numbered list</li>
9676 <li>item 3</li></ol>
9680 # the switch from level 3 to ordered should not introduce a newline between
9691 ***#Number on level 4
9693 **#Number on level 3
9694 **#Number on level 3
9698 #**Level 3, but ordered
9701 <ol><li>with numbers</li></ol>
9702 <ul><li>and bullets</li></ul>
9703 <ol><li>and numbers</li></ol></li>
9705 <ul><li>bullet level 2
9706 <ul><li>bullet level 3
9707 <ol><li>Number on level 4</li></ol></li></ul></li>
9709 <ol><li>Number on level 3</li>
9710 <li>Number on level 3</li></ol></li></ul>
9711 <ol><li>number level 2</li></ol></li>
9713 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9714 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9719 1. Nested mixed wikitext and html list
9722 *<ul><li>ho</li></ul>
9727 <li><ul><li>ho</li></ul></li>
9729 <ul><li>ho</li></ul></li></ul>
9733 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9735 <ul><li>ho</li></ul></li></ul>
9739 2. Nested mixed wikitext and html list (incompatible)
9742 :{{echo|<li>ho</li>}}
9745 <dd><li>ho</li></dd></dl>
9749 <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>
9759 <ul><li>bar</li></ul></li></ul>
9769 <ul><li><ul><li>foo</li></ul></li>
9775 Nested lists 3 (first element empty)
9781 <ul><li>bar</li></ul></li></ul>
9786 Nested lists 4 (first element empty)
9791 <ul><li><ul><li></li></ul></li>
9797 Nested lists 5 (both elements empty)
9802 <ul><li><ul><li></li></ul></li>
9808 Nested lists 6 (both elements empty)
9814 <ul><li></li></ul></li></ul>
9819 Nested lists 7 (skip initial nesting levels)
9823 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9828 Nested lists 8 (multiple nesting transitions)
9836 <ul><li><ul><li>bar</li></ul></li>
9837 <li>baz</li></ul></li>
9843 Nested lists 9 (extension interaction)
9849 <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>
9853 1. Lists with start-of-line-transparent tokens before bullets: Comments
9866 Nested lists 10 (list and span siblings: wt2wt regression)
9871 <ul><li>a <span>x</span>
9872 <ul><li>b <span>y</span></li></ul></li></ul>
9876 2. Lists with start-of-line-transparent tokens before bullets: Template close
9881 <ul><li>foo bar</li>
9887 List items are not parsed correctly following a <pre> block (T2785)
9893 <ul><li><pre>foo</pre></li>
9894 <li><pre>bar</pre></li>
9898 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9899 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9903 # FIXME: Might benefit from a html/parsoid since this has a template
9905 List items from template
9916 *notSOL{{inner list}}
9920 <li>item 2</li></ul>
9923 <li>item 2</li></ul>
9927 <li>item 2</li></ul>
9932 List interrupted by empty line or heading
9940 <ul><li>foo</li></ul>
9941 <ul><li><ul><li>bar</li></ul></li></ul>
9942 <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>
9943 <ul><li>Another list item</li></ul>
9948 Multiple list tags generated by templates
9967 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[0,44,null,null],"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"a\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":1}},"b\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":2}},"c"]}'>a
9968 </li><li about="#mwt1">b
9969 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9973 Multiple newlines in between HTML list items don't induce paragraph wrapping
9986 <dd>ho<div>123</div>
10002 <dd>ho<div>123</div>
10010 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10013 <!--This line will NOT split the list-->
10015 <!--This line will NOT split the list either-->
10017 <!--foo--> <!----> <!--This line NOT split the list either-->
10028 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10031 <!--This line will NOT split the list-->
10033 <!--This line will NOT split the list either-->
10035 <!--foo--> <!----> <!--This line NOT split the list
10046 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10047 # That pass could possibly be removed.
10049 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10051 parsoid=wt2html,wt2wt
10055 *{{echo|<li>templated li-hack}}
10056 *<!--foo--><li> unsupported li-hack with preceding comments
10059 <li><li>not a li-hack
10064 <li class="mw-empty-elt"></li><li>li-hack</li>
10065 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10066 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10068 <li class="mw-empty-elt"></li><li>not a li-hack
10073 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10074 <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>
10075 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10077 <ul data-parsoid='{"stx":"html"}'>
10078 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10085 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10114 Parsoid: Test of whitespace serialization with Templated bullets
10121 <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>
10125 # ------------------------------------------------------------------------
10126 # The next set of tests are about Parsoid's ability to handle badly nested
10127 # tags (parse, minimize scope of fixup, and roundtrip back)
10128 # ------------------------------------------------------------------------
10130 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10131 # Parsoid's list handling is more aware of block structure.
10133 Unbalanced closing block tags break a list
10140 <ul><li>a</li></ul></div><div>
10152 Unbalanced closing non-block tags don't break a list
10160 <ul><li>a<span></span></li>
10165 <li>a<span></span></li>
10171 # Parsoid does some post-dom-building cleanup
10172 # which is why its output differs from Remex.
10174 Unclosed formatting tags that straddle lists are closed and reopened
10176 parsoid=wt2html,wt2wt,html2html
10181 <ol><li><s> a</s></li><s>
10182 </s><li><s>b </s></li></ol>
10184 <ol><li><s> a</s></li>
10185 <li><s>b </s></li></ol>
10188 # Output is ugly because of all the misnested tag fixups.
10189 # Remex is wrapping p-tags around empty elements.
10190 # Parsoid has special-case handling of this pattern of
10191 # wrapping lists in formatting tags.
10192 # FIXME: Should we remove this code from Parsoid? Or add
10193 # special support in Remex? If the latter, maybe just wait
10194 # for Parsoid to become the default parser.
10197 1. List embedded in a formatting tag
10204 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10214 # Output is ugly because of all the misnested tag fixups
10215 # Remex is wrapping p-tags around empty elements.
10216 # Parsoid has code that strips useless p-tags.
10218 2. List embedded in a formatting tag in a misnested way
10225 </small></p><small></small><ul><small><li>a</li>
10226 </small><li><small>b</small></li></ul>
10232 <li><small>b</small></li>
10240 # Note that the current date is hard-coded as
10241 # 1970-01-01T00:02:03Z (a Thursday)
10242 # when running parser tests. The timezone is also fixed to GMT, so
10243 # local date will be identical to current date.
10246 Magic Word: {{CURRENTDAY}}
10255 Magic Word: {{CURRENTDAY2}}
10264 Magic Word: {{CURRENTDAYNAME}}
10273 Magic Word: {{CURRENTDOW}}
10282 Magic Word: {{CURRENTMONTH}}
10291 Magic Word: {{CURRENTMONTH1}}
10300 Magic Word: {{CURRENTMONTHABBREV}}
10302 {{CURRENTMONTHABBREV}}
10309 Magic Word: {{CURRENTMONTHNAME}}
10311 {{CURRENTMONTHNAME}}
10318 Magic Word: {{CURRENTMONTHNAMEGEN}}
10320 {{CURRENTMONTHNAMEGEN}}
10327 Magic Word: {{CURRENTTIME}}
10336 Magic Word: {{CURRENTHOUR}}
10345 Magic Word: {{CURRENTWEEK}} (T6594)
10354 Magic Word: {{CURRENTYEAR}}
10363 Magic Word: {{CURRENTTIMESTAMP}}
10365 {{CURRENTTIMESTAMP}}
10372 Magic Words LOCAL (UTC)
10376 *{{LOCALMONTHNAME}}
10377 *{{LOCALMONTHNAMEGEN}}
10378 *{{LOCALMONTHABBREV}}
10387 *{{LOCALTIMESTAMP}}
10402 <li>19700101000203</li></ul>
10407 Magic Word: {{FULLPAGENAME}}
10409 title=[[User:Ævar Arnfjörð Bjarmason]]
10410 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10414 <p>User:Ævar Arnfjörð Bjarmason
10419 Magic Word: {{FULLPAGENAMEE}}
10421 title=[[User:Ævar Arnfjörð Bjarmason]]
10422 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10426 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10431 Magic Word: {{TALKSPACE}}
10433 title=[[User:Ævar Arnfjörð Bjarmason]]
10434 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10443 Magic Word: {{TALKSPACE}}, same namespace
10445 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10446 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10455 Magic Word: {{TALKSPACE}}, main namespace
10457 title=[[Parser Test]]
10458 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10467 Magic Word: {{TALKSPACEE}}
10469 title=[[User:Ævar Arnfjörð Bjarmason]]
10470 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10479 Magic Word: {{SUBJECTSPACE}}
10481 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10482 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10491 Magic Word: {{SUBJECTSPACE}}, same namespace
10493 title=[[User:Ævar Arnfjörð Bjarmason]]
10494 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10503 Magic Word: {{SUBJECTSPACE}}, main namespace
10505 title=[[Parser Test]]
10506 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10514 Magic Word: {{SUBJECTSPACEE}}
10516 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10517 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10526 Magic Word: {{NAMESPACE}}
10528 title=[[User:Ævar Arnfjörð Bjarmason]]
10529 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10538 Magic Word: {{NAMESPACEE}}
10540 title=[[User:Ævar Arnfjörð Bjarmason]]
10541 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10550 Magic Word: {{NAMESPACENUMBER}}
10552 title=[[User:Ævar Arnfjörð Bjarmason]]
10553 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10555 {{NAMESPACENUMBER}}
10562 Magic Word: {{SUBPAGENAME}}
10564 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10565 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10574 Magic Word: {{SUBPAGENAMEE}}
10576 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10577 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10586 Magic Word: {{ROOTPAGENAME}}
10588 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10589 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10593 <p>Ævar Arnfjörð Bjarmason
10598 Magic Word: {{ROOTPAGENAMEE}}
10600 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10601 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10605 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10610 Magic Word: {{BASEPAGENAME}}
10612 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10613 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10617 <p>Ævar Arnfjörð Bjarmason
10622 Magic Word: {{BASEPAGENAMEE}}
10624 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10625 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10629 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10634 Magic Word: {{TALKPAGENAME}}
10636 title=[[User:Ævar Arnfjörð Bjarmason]]
10637 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10641 <p>User talk:Ævar Arnfjörð Bjarmason
10646 Magic Word: {{TALKPAGENAMEE}}
10648 title=[[User:Ævar Arnfjörð Bjarmason]]
10649 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10653 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10658 Magic Word: {{SUBJECTPAGENAME}}
10660 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10661 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10663 {{SUBJECTPAGENAME}}
10665 <p>User:Ævar Arnfjörð Bjarmason
10670 Magic Word: {{SUBJECTPAGENAMEE}}
10672 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10673 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10675 {{SUBJECTPAGENAMEE}}
10677 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10682 Magic Word: {{NUMBEROFFILES}}
10684 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10693 Magic Word: {{PAGENAME}}
10695 title=[[User:Ævar Arnfjörð Bjarmason]]
10696 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10700 <p>Ævar Arnfjörð Bjarmason
10705 Magic Word: {{PAGENAME}} with metacharacters
10707 title=[['foo & bar = baz']]
10708 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10712 <p><i>'foo & bar = baz'</i>
10717 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10719 title=[[*RFC 1234 http://example.com/]]
10720 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10724 <p>*RFC 1234 http://example.com/
10729 Magic Word: {{PAGENAMEE}}
10731 title=[[User:Ævar Arnfjörð Bjarmason]]
10732 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10736 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10741 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10743 title=[[*RFC 1234 http://example.com/]]
10744 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10748 <p>*RFC_1234_http://example.com/
10753 Magic Word: {{REVISIONID}}
10755 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10762 flags=vary-revision-id
10766 Magic Word: {{SCRIPTPATH}}
10768 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10776 Magic Word: {{STYLEPATH}}
10778 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10787 Magic Word: {{SERVER}}
10789 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10793 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10798 Magic Word: {{SERVERNAME}}
10800 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10809 Magic Word: {{SITENAME}}
10811 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10820 Magic Word: {{PAGELANGUAGE}}
10823 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10832 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10834 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10843 Case-sensitive magic words, when cased differently, should just be template transclusions
10850 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10851 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10852 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10853 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10858 Case-insensitive magic words should still work with weird casing.
10868 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10872 # From plwiki:PLOS_ONE
10874 Parsoid: Page property magic word with magic word contents
10876 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10878 <meta property="mw:PageProp/displaytitle" content="Main Page" 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}}]}'>Main Page</span></i>"}]]}'/>
10881 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10882 # But, this is a limitation of our representation and is documented in
10883 # TemplateHandler.js in processSpecialMagicWord
10885 Parsoid: Template-generated DISPLAYTITLE
10887 {{{{echo|DISPLAYTITLE}}:Foo}}
10891 wgAllowDisplayTitle=true
10892 wgRestrictDisplayTitle=false
10897 <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"}]]}'/>
10901 Namespace 1 {{ns:1}}
10910 Namespace 1 {{ns:01}}
10919 Namespace 0 {{ns:0}} (T6783)
10927 Namespace 0 {{ns:00}} (T6783)
10935 Namespace -1 {{ns:-1}}
10944 Namespace User {{ns:User}}
10953 Namespace User talk {{ns:User_talk}}
10962 Namespace User talk {{ns:uSeR tAlK}}
10971 Namespace File {{ns:File}}
10980 Namespace File {{ns:Image}}
10989 Namespace (lang=de) Benutzer {{ns:User}}
11000 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11006 <p>Benutzer Diskussion
11013 {{urlencode:hi world?!}}
11014 {{urlencode:hi world?!|WIKI}}
11015 {{urlencode:hi world?!|PATH}}
11016 {{urlencode:hi world?!|QUERY}}
11026 Magic Word: prioritize type info over data-parsoid
11030 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11036 Magic Word: serialize on separate line (parsoid)
11038 parsoid=wt2wt,html2wt
11044 foo<meta property="mw:PageProp/notoc"/>bar
11048 Magic Word: rt non-english wikis
11055 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11059 __proto__ is treated as normal wikitext (T105997)
11071 Magic links: internal link to RFC (T2479)
11075 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11078 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11082 Magic links: RFC (T2479)
11086 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11089 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11093 Magic links: RFC (T67278)
11095 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11097 <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.
11100 <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>
11104 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11106 RFC      822
11110 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11115 <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>
11121 Magic links: ISBN (T3937)
11125 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11128 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11132 Magic links: ISBN (T67278)
11134 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11136 <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.
11139 <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>
11143 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11145 ISBN      978 0 316 09811 3
11151 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11158 <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>
11166 Magic links: PMID incorrectly converts space to underscore
11170 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11173 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11177 Magic links: PMID (T67278)
11179 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11181 <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.
11184 <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>
11188 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11190 PMID      1234
11194 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11199 <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>
11204 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11205 # since these are ExtLinkText, not MagicLinkText
11207 Magic links: use appropriate serialization for "almost" magic links.
11209 X[[Special:BookSources/0978739256|foo]]
11211 X[https://tools.ietf.org/html/rfc1234 foo]
11213 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11214 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11217 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11218 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11222 Magic links: All disabled (T47942)
11224 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11230 <p>ISBN 0-306-40615-2
11241 Nonexistent template
11243 {{thistemplatedoesnotexist}}
11245 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11250 Template with invalid target containing tags
11252 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11254 <p>{{a<b>b</b>|foo|a=b|a = b}}
11259 Template with invalid target containing unclosed tag
11261 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11263 <p>{{a<b>|foo|a=b|a = b}}</b>
11268 Template with invalid target containing wikilink
11272 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11275 <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>
11279 Template with just whitespace in it, T70421
11283 <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>
11289 This is a test template
11297 <p>This is a test template
11302 Template with explicit namespace
11306 <p>This is a test template
11314 This is a test template with parameter {{{param}}}
11320 {{paramtest|param=foo}}
11322 <p>This is a test template with parameter foo
11327 Template:paramtestnum
11329 [[{{{1}}}|{{{2}}}]]
11333 Template unnamed parameter
11335 {{paramtestnum|Main Page|the main page}}
11337 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11342 Template:templatesimple
11348 Template:templateredirect
11350 #redirect [[Template:templatesimple]]
11354 Template:templateasargtestnum
11360 Template:templateasargtest
11362 {{template{{{templ}}}}}
11366 Template:templateasargtest2
11372 Template with template name as unnamed argument
11374 {{templateasargtestnum|templatesimple}}
11381 Template with template name as argument
11383 {{templateasargtest|templ=simple}}
11390 Template with template name as argument (2)
11392 {{templateasargtest2|templ=templatesimple}}
11399 Template:templateasargtestdefault
11401 {{{{{templ|templatesimple}}}}}
11411 Template with default value
11413 {{templateasargtestdefault}}
11420 Template with default value (value set)
11422 {{templateasargtestdefault|templ=templa}}
11431 {{templateredirect}}
11436 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11440 Template with argument in separate line
11442 {{ templateasargtest |
11450 Template with complex template as argument
11453 param ={{ templateasargtest |
11454 templ = simple }}}}
11456 <p>This is a test template with parameter (test)
11461 Templates with templated name
11463 {{{{echo|echo}}|foo}}
11464 {{{{echo|inner list}} }}
11468 <ul><li>item 1</li></ul>
11471 <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>
11472 <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>
11475 ## Regression test; the output here isn't really that interesting.
11477 Templates with templated name and top level template args
11479 {{1{{2{{{3}}}|4=5}}}}
11481 <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>
11484 # Parsoid markup is deliberate "broken". This is an edge case.
11485 # See long comment in TemplateHandler.js:convertAttribsToString.
11487 Templates with invalid templated targets
11498 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11503 Template with thumb image (with link in description)
11505 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11507 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>
11510 <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>
11512 <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>
11516 Template:complextemplate
11518 {{{1}}} {{paramtest|
11519 param ={{{param}}}}}
11523 Template with complex arguments
11526 param ={{ templateasargtest |
11527 templ = simple }}|[[Template:complextemplate|link]]}}
11529 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11534 T2553: link with two variables in a piped link
11537 |[[{{{1}}}|{{{2}}}]]
11542 <td>[[{{{1}}}|{{{2}}}]]
11547 <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>
11553 Abort table cell attribute parsing on wikilink
11556 |testing [[one|two]] |three||four
11557 |testing one two |three||four
11558 |testing="[[one|two]]" |three||four
11563 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11569 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11575 <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>
11576 <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>
11577 <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>
11582 Don't abort table cell attribute parsing if wikilink is found in template arg
11585 |Test {{#tag:ref|One two "[[three]]" four}}
11589 <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>
11594 Magic variable as template parameter
11596 {{paramtest|param={{SITENAME}}}}
11598 <p>This is a test template with parameter MediaWiki
11605 [[{{{param}}}|link]]
11609 Template parameter as link source
11611 {{linktest|param=Main Page}}
11613 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11618 Template:paramtest2
11620 including another template, {{paramtest|param={{{arg}}}}}
11624 Template passing argument to another template
11626 {{paramtest2|arg='hmm'}}
11628 <p>including another template, This is a test template with parameter 'hmm'
11639 Template as link source
11643 [[{{linktest2}}|Main Page]]
11645 [[{{linktest2}}]]Page
11647 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11648 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11649 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11667 Template infinite loop
11671 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11676 Template from main namespace
11685 Template from non-includable namespace
11687 wgNonincludableNamespaces=10
11691 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11706 T2529: Template with table, not included at beginning of line
11725 T2523: Template shouldn't eat newline (or add an extra one before table)
11745 T2041: Template parameters shown as broken links
11754 Template with targets containing wikilinks
11760 {{[[{{echo|foo}}]]}}
11762 {{{{echo|[[foo}}]]}}
11764 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11765 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11769 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11770 <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>
11771 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11781 Templates: Double quotes as template target
11788 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11792 ## This test is about making sure Parsoid's data-mw is well formed in the
11793 ## face of multiple templates with intersecting and overlapping ranges. The
11794 ## wikitext itself is wretched.
11796 Templates with intersecting and overlapping ranges
11807 </table><p>ho</p><table>
11811 </td></tr></tbody></table>
11813 <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":""}]]}'>
11815 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11817 <tbody><tr><td>hi</td></tr>
11822 Template:MSGNW test
11824 ''None'' of '''this''' should be
11826 but rather passed unmodified
11834 # hmm, fix this or just deprecate msgnw and document its behavior?
11838 {{msgnw:MSGNW test}}
11840 <p>''None'' of '''this''' should be
11842  but rather passed unmodified
11843 {{test}}
11847 <!-- comment -->
11854 {{int:youhavenewmessages|lots of money|not!}}
11856 <p>You have lots of money (not!).
11861 int keyword - non-existing message
11872 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11876 <includeonly> and <noinclude> being included
11887 <onlyinclude>Foo</onlyinclude>bar
11891 <onlyinclude> being included
11903 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11907 <onlyinclude> and <includeonly> being included
11916 <includeonly> and <noinclude> on a page
11918 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11925 Un-closed <noinclude>
11932 <onlyinclude> on a page
11934 <onlyinclude>Foo</onlyinclude>bar
11941 Un-closed <onlyinclude>
11948 Self-closed noinclude, includeonly, onlyinclude tags
11959 Unbalanced includeonly and noinclude tags
11963 |b</noinclude></noinclude>
11964 |c</noinclude></includeonly>
11965 |d</includeonly></includeonly>
11974 <td>c</includeonly>
11976 <td>d</includeonly></includeonly>
11982 Template:Includeonly section
11985 ==Includeonly section==
11991 T8563: Edit link generation for section shown by <includeonly>
11993 {{includeonly section}}
11995 <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>
11996 <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>
12000 # Uses same input as the contents of [[Template:Includeonly section]]
12002 T8563: Section extraction for section shown by <includeonly>
12007 ==Includeonly section==
12015 T8563: Edit link generation for section suppressed by <includeonly>
12018 ==Includeonly section==
12022 <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>
12027 T8563: Section extraction for section suppressed by <includeonly>
12032 ==Includeonly section==
12040 Un-closed <includeonly>
12045 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
12048 ## We used to, but no longer wt2wt this test since the default serializer
12049 ## will normalize the include directives to serialize on their own line.
12050 ## Selser will take care of preserving formatting in scenarios where they
12051 ## intermingled with other wikitext.
12053 Includes and comments at SOL
12055 parsoid=wt2html,html2html
12057 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12064 <includeonly>can have stuff</includeonly>===here===
12067 <h2><span class="mw-headline" id="hu">hu</span></h2>
12072 <h3><span class="mw-headline" id="here">here</span></h3>
12075 <!-- 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>
12077 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12079 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12082 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3 id="here">here</h3>
12086 # TODO: test with DOM fragment reuse!
12088 Parsoid: DOM fragment reuse
12090 parsoid=wt2wt,wt2html
12092 a{{echo|b<table></table>c}}d
12104 <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>
12106 <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">
12107 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12108 </span><p about="#mwt2">cd</p>
12110 <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">
12112 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12114 </span><p about="#mwt3">b</p>
12118 Parsoid: Merge double tds (T52603)
12123 |{{echo|{{!}} foo}}
12127 <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>
12132 Parsoid: Merge double tds in nested transclusion content (T52603)
12138 |{{echo|{{!}} foo}}
12142 <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}}]}'>
12144 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12150 ### <includeonly> and <noinclude> in attributes
12153 0. includeonly around the entire attribute
12155 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12157 <p><span id="v2">bar</span>
12162 1. includeonly in html attr key
12164 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12166 <p><span id="foo">bar</span>
12171 2. includeonly in html attr value
12173 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12174 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12176 <p><span id="v1">bar</span>
12177 <span id="v1">bar</span>
12182 3. includeonly in part of an attr value
12184 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12186 <p><span style="color:red;">bar</span>
12191 4. includeonly in table attributes
12215 ### Preprocessor precedence tests
12216 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12218 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12220 Preprocessor precedence 1: link is rightmost opening
12226 But close-brace is not a valid character in a link title:
12229 However, we can still tell this was handled as a link in the preprocessor:
12230 {{echo|[[Foo}}|bar]]|bat}}
12232 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12233 </p><p>But close-brace is not a valid character in a link title:
12235 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12239 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12240 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12241 <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>
12245 Preprocessor precedence 2: template is rightmost opening
12254 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12258 Preprocessor precedence 3: language converter is rightmost opening
12274 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12275 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12276 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12280 Preprocessor precedence 4: left-most angle bracket
12291 Template:Precedence5
12297 Preprocessor precedence 5: tplarg takes precedence over template
12299 {{Precedence5|Bullet}}
12301 <ul><li>Bar</li></ul>
12304 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12308 Preprocessor precedence 6: broken link is rightmost opening
12314 {{echo|[[Foo|bar|bat=baz}}
12317 </p><p>{{echo|[[Foo|bar|bat=baz}}
12320 <p>{{echo|[[Foo}}</p>
12321 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12324 # This next test exposes a difference between PHP and Parsoid:
12325 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12326 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12327 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12328 # outer `[[Foo` extends until the `y]]`
12329 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12330 # intermediate result (after template expansion), and link processing
12331 # happens on this intermediate result, which moves the wikilink
12332 # boundary leftward to `[[Foo|Bar]]`
12333 # 2b) Parsoid works in a single step, so it's going to keep the
12334 # wikilink as extending to the `y]]`
12335 # 3a) Then PHP does linktrail processing which slurps up the trailing
12336 # `xy` inside the link.
12337 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12338 # `z` inside the link.
12339 # This is "correct" behavior. Parsoid's basic worldview is that the
12340 # `]]` inside the template shouldn't be allowed to leak out to affect
12341 # the surrounding wikilink. PHP may match Parsoid (in the future)
12342 # if you use {{#balance}} (T114445).
12345 Preprocessor precedence 7: broken template is rightmost opening
12351 [[Foo|{{echo|Bar]]-x}}-y]]-z
12353 Careful: linktrails can move the end of the wikilink:
12354 [[Foo|{{echo|y']]a}}l]]l
12356 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12357 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12358 </p><p>Careful: linktrails can move the end of the wikilink:
12359 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12362 <p>[[Foo|{{echo|Bar]]</p>
12363 <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>
12364 <p>Careful: linktrails can move the end of the wikilink:
12365 <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>
12369 Preprocessor precedence 8: broken language converter is rightmost opening
12380 Template:Preprocessor_precedence_9
12385 ;7: {{{{{{{4}}}}}}}
12389 Preprocessor precedence 9: groups of braces
12391 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12397 <ul><li>Bar</li></ul>
12401 <dd>{Bullet}</dd></dl>
12404 <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}}]}'>
12409 </dl><ul about="#mwt1">
12411 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12420 Template:Preprocessor_precedence_10
12427 ;6: -{{{{{{4}}}}}}-
12428 ;7: -{{{{{{{5}}}}}}}-
12432 Preprocessor precedence 10: groups of braces with leading dash
12436 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12442 <ul><li>Bar-</li></ul>
12449 <ul><li>Bar-</li></ul>
12456 <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}}]}'>
12458 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12461 </dl><ul about="#mwt1">
12463 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12467 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12470 </dl><ul about="#mwt1">
12472 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12476 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12481 Preprocessor precedence 11: found during visual diff testing
12483 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12485 {{echo|-{{echo|-{{echo|x}}}}}}
12487 {{echo|-{{echo|x}}}}
12489 <p><span>-<span>-x</span></span>
12494 <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>
12496 <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>
12498 <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>
12502 Preprocessor precedence 12: broken language converter closed by brace.
12506 This form breaks the template, which is unfortunate:
12507 *{{echo|foo-{bar}bat}}
12509 But if the broken language converter markup is inside an extension
12510 tag, nothing bad happens:
12511 *<nowiki>foo-{bar}bat</nowiki>
12512 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12513 *<pre>foo-{bar}bat</pre>
12514 *{{echo|<pre>foo-{bar}bat</pre>}}
12516 <tag>foo-{bar}bat</tag>
12517 {{echo|<tag>foo-{bar}bat</tag>}}
12520 <p>This form breaks the template, which is unfortunate:
12522 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12523 <p>But if the broken language converter markup is inside an extension
12524 tag, nothing bad happens:
12526 <ul><li>foo-{bar}bat</li>
12527 <li>foo-{bar}bat</li>
12528 <li><pre>foo-{bar}bat</pre></li>
12529 <li><pre>foo-{bar}bat</pre></li></ul>
12530 <pre>'foo-{bar}bat'
12534 <pre>'foo-{bar}bat'
12539 <p>This form breaks the template, which is unfortunate:</p>
12541 <li>{{echo|foo-{bar}bat}}</li>
12543 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12545 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12546 <li><span typeof="mw:Transclusion mw:Nowiki" 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>
12547 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12548 <li><pre typeof="mw:Transclusion mw:Extension/pre" 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>
12550 <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>
12554 Preprocessor precedence 13: broken language converter in external link
12558 *[http://example.com/-{foo Example in URL]
12559 *[http://example.com Example in -{link} description]
12560 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12562 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12563 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12564 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12567 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12568 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12569 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12574 Preprocessor precedence 14: broken language converter in comment
12576 *<!--{{foo}}-->...should be ok
12577 *<!---{{foo}}-->...extra dashes
12578 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12580 <ul><li>...should be ok</li>
12581 <li>...extra dashes</li>
12582 <li>foobat...should be ok</li></ul>
12585 <li><!--{{foo}}-->...should be ok</li>
12586 <li><!---{{foo}}-->...extra dashes</li>
12587 <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>
12592 Preprocessor precedence 15: broken brace markup in headings
12594 wgFragmentMode=[ 'html5', 'legacy' ]
12598 __NOTOC__ __NOEDITSECTION__
12607 ===5 foo{{{bar 5===
12612 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12615 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12618 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12621 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12624 <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>
12627 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12631 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12632 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12634 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12636 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12638 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12640 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12642 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12647 Preprocessor precedence 16: matching closing braces to opening braces
12652 -{{{echo|foo}}bar}-
12657 <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>
12661 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12670 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12674 Preprocessor precedence 18: another rightmost wins scenario
12678 {{ -{{{{1|tplarg}}} }} }-
12680 <p>{{ -{tplarg }} }-
12683 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12687 Preprocessor precedence 19: break syntax
12700 ### Token Stream Patcher tests
12702 ### These tests won't always pass wt2wt and other modes because
12703 ### on serialization, the table will be output on a new line.
12704 ### For now, we are blacklisting them, and using this to test selser.
12708 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12710 parsoid=wt2html,wt2wt
12712 {{echo|}}{| width = '100%'
12716 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12717 <tbody><tr><td>foo</td></tr>
12721 ## We used to, but no longer wt2wt this test since the default serializer
12722 ## will normalize the include directives to serialize on their own line.
12723 ## Selser will take care of preserving formatting in scenarios where they
12724 ## intermingled with other wikitext.
12726 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12730 <includeonly>a</includeonly>{| {{{b}}}
12734 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"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":""}]]}'>
12735 <tbody><tr><td>c</td></tr>
12740 Table wikitext syntax outside wiki-tables
12744 ! not a table heading
12747 | class="foo bar" | baz
12755 ! not a table heading
12758 | class="foo bar" | baz
12767 ### Testing parsing of templates where a template arg
12768 ### has the same name as the template itself.
12774 {{{quote|{{{1}}}}}}
12778 Templates: Template Name/Arg clash: 1. Use of positional param
12787 Templates: Template Name/Arg clash: 2. Use of named param
12789 {{quote|quote=foo}}
12796 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12805 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12809 Templates: 1. Simple use
12818 Templates: 2. Inside a block tag
12820 <div>{{echo|Foo}}</div>
12821 <blockquote>{{echo|Foo}}</blockquote>
12824 <blockquote>Foo</blockquote>
12828 <blockquote><p>Foo</p></blockquote>
12832 Templates: P-wrapping: 1a. Templates on consecutive lines
12843 Templates: P-wrapping: 1b. Templates on consecutive lines
12857 Templates: P-wrapping: 1c. Templates on consecutive lines
12860 {{echo|bar}} <div>baz</div>
12869 bar </p><div>baz</div>
12873 Templates: P-wrapping: 1d. Template preceded by comment-only line
12882 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12886 Templates: Inline Text: 1. Multiple template uses
12888 {{echo|Foo}}bar{{echo|baz}}
12895 Templates: Inline Text: 2. Back-to-back template uses
12897 {{echo|Foo}}{{echo|bar}}
12904 Templates: Block Tags: 1. Multiple template uses
12906 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12908 <div>Foo</div><div>bar</div><div>baz</div>
12913 Templates: Block Tags: 2. Back-to-back template uses
12915 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12917 <div>Foo</div><div>bar</div>
12921 ## This is an edge case relating to paragraph wrapping.
12922 ## Note that Parsoid fails to match Remex because it's using the closing tag
12923 ## as a heuristic to determine if it's in a block, rather than SAX based events.
12924 ## And Parsoid drops empty elements in templates.
12926 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12933 b</p><p class="mw-empty-elt"></p>
12935 <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">
12936 </span><span about="#mwt1">b</span>
12940 Templates: Links: 1. Simple example
12942 {{echo|[[Foo|bar]]}}
12944 <p><a href="/wiki/Foo" title="Foo">bar</a>
12949 Templates: Links: 2. Generation of link href
12951 [[{{echo|Foo}}|bar]]
12953 <p><a href="/wiki/Foo" title="Foo">bar</a>
12958 Templates: Links: 3. Generation of part of a link href
12960 [[Fo{{echo|o}}|bar]]
12962 [[Foo{{echo|bar}}]]
12964 [[Foo{{echo|bar}}baz]]
12966 [[Foo{{echo|bar}}|bar]]
12968 [[:Foo{{echo|bar}}]]
12970 [[:Foo{{echo|bar}}|bar]]
12972 <p><a href="/wiki/Foo" title="Foo">bar</a>
12973 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12974 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12975 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12976 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12977 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12982 Templates: Links: 4. Multiple templates generating link href
12984 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12986 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12991 Templates: Links: 5. Generation of link text
12993 [[Foo|{{echo|bar}}]]
12995 <p><a href="/wiki/Foo" title="Foo">bar</a>
13000 Templates: Links: 5. Nested templates (only outermost template should be marked)
13002 {{echo|[[{{echo|Foo}}|bar]]}}
13004 <p><a href="/wiki/Foo" title="Foo">bar</a>
13009 Templates: HTML Tag: 1. Generation of HTML attr. key
13011 <div {{echo|style}}="color:red;">foo</div>
13013 <div style="color:red;">foo</div>
13018 Templates: HTML Tag: 2. Generation of HTML attr. value
13020 <div style={{echo|'color:red;'}}>foo</div>
13022 <div style="color:red;">foo</div>
13027 Templates: HTML Tag: 3. Generation of HTML attr key and value
13029 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13031 <div style="color:red;">foo</div>
13036 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13038 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13040 <div title="This is a long title with just one piece templated">foo</div>
13045 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13047 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13049 <div title="This is a long title with just one piece templated">foo</div>
13054 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13056 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13058 <div title="This is a long title with just one piece templated">foo</div>
13062 # SSS FIXME: While it is great we added support for all this,
13063 # do we want to make this part of the spec? Maybe we want to
13064 # deprecate this kind of usage in the future?
13066 Templates: HTML Tag: 7. Generation of partial attribute key string
13068 <div st{{echo|yle}}="color:red;">foo</div>
13070 <div style="color:red;">foo</div>
13075 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13077 <div {{echo|1=id="v1"}}>bar</div>
13079 <div id="v1">bar</div>
13084 Templates: HTML Tag: 9. Multiple template-generated attributes
13086 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13088 <div id="v1" title="foo">bar</div>
13093 Templates: Support for templates generating attributes and content
13095 {| {{mixed_attr_content_template}}
13100 <table style="color:red;" title="T48811">
13110 <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|}"]}'>
13119 Template:attribute_from_template
13125 Table cell with attribute before expanded attribute
13128 | align="center" {{attribute_from_template}} |456
13132 <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>
13137 1. Entities and nowikis inside templated attributes should be handled correctly
13139 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13141 <div style="background:#f9f9f9;">foo</div>
13144 <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>
13148 2. Entities and nowikis inside templated attributes should be handled correctly
13151 |{{table_attribs_3}}
13156 <td style="background:#f9f9f9;">Foo
13161 <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>
13166 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13169 |{{table_attribs_3}}
13174 <td style="background:#f9f9f9;">Foo
13178 <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}}]}'>
13179 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13185 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13188 |{{table_attribs_6}} hi
13193 <td style="background: red;">hi
13198 <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>
13203 Templates: HTML Tables: 1. Generating start of a HTML table
13205 {{echo|<table><tr><td>foo</td>}}</tr></table>
13207 <table><tr><td>foo</td></tr></table>
13212 Templates: HTML Tables: 2a. Generating middle of a HTML table
13214 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13216 <table><tr><td>foo</td></tr></table>
13221 Templates: HTML Tables: 2b. Generating middle of a HTML table
13223 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13225 <table><tr><td>foo</td></tr></table>
13230 Templates: HTML Tables: 3. Generating end of a HTML table
13232 <table><tr>{{echo|<td>foo</td></tr></table>}}
13234 <table><tr><td>foo</td></tr></table>
13239 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13241 {{echo|<table>}}<tr><td>foo</td></tr></table>
13243 <table><tr><td>foo</td></tr></table>
13248 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13250 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13252 <table><tr><td>foo</td></tr></table>
13257 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13259 <table><tr>{{echo|<td>}}foo</td></tr></table>
13261 <table><tr><td>foo</td></tr></table>
13266 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13268 <table><tr><td>foo{{echo|</td>}}</tr></table>
13270 <table><tr><td>foo</td></tr></table>
13275 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13277 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13279 <table><tr><td>foo</td></tr></table>
13284 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13286 <table><tr><td>foo</td></tr>{{echo|</table>}}
13288 <table><tr><td>foo</td></tr></table>
13293 Templates: HTML Tables: 5. Proper fostering of categories from inside
13295 parsoid=wt2html,wt2wt
13297 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13298 <!--Two categories (T52330)-->
13299 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13301 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13302 <!--Two categories (T52330)-->
13303 <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>
13307 Templates: Wiki Tables: 1a. Fostering of entire template content
13315 <tr><td></td></tr></table>
13320 <table><tbody><tr><td></td></tr></tbody></table>
13322 <span 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</span><table about="#mwt2">
13328 Templates: Wiki Tables: 1b. Fostering of entire template content
13341 <tr><td></td></tr></table>
13349 <tbody><tr><td></td></tr></tbody></table>
13351 <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|}"]}'>
13353 </div><table about="#mwt3">
13359 Templates: Wiki Tables: 2. Fostering of partial template content
13369 <tr><td></td></tr></table>
13374 <div>b</div><table>
13375 <tbody><tr><td></td></tr></tbody></table>
13377 <span 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</span><div about="#mwt2">b</div><table about="#mwt2">
13384 Templates: Wiki Tables: 3. td-content via multiple templates
13387 {{echo|{{pipe}}a}}{{echo|b}}
13398 Templates: Wiki Tables: 4. Templated tags, no content
13404 <tr><td></td></tr></table>
13409 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13423 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13436 ## This test case is very specific to Parsoid's internals
13437 ## and is hence only tested for Parsoid's code. Parsoid uses
13438 ## a <meta> marker tag for <ref> tags and they are expanded
13439 ## much later. We are verifying that this <meta> tag usage
13440 ## doesn't prevent foster parenting.
13442 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13444 {{PartialTable}}<ref>foo</ref>
13449 <sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></sup><table about="#mwt2">
13453 <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="./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">foo</span></li></ol>
13457 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13467 <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{{!}}}"]}'>
13468 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13472 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13477 Templates: Lists: Multi-line list-items via templates
13479 *{{echo|a {{nonexistent|
13481 *{{echo|b {{nonexistent|
13484 <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>
13485 <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>
13490 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13492 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13494 <p><i>ab</i>c<i>d</i>e
13499 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13500 (PHP parser generates misnested html)
13502 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13504 <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>
13508 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13509 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13511 parsoid=wt2html,wt2wt
13513 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13515 <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>
13516 <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>
13517 <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>
13521 Templates: Ugly nesting: 4. Divs opened/closed across templates
13523 a<div>b{{echo|c</div>d}}e
13528 <p>a</p><div>bc</div><p>de
13533 Templates: Ugly templates: 3. newline-only template parameter
13542 # This looks like a bug: a single newline triggers p/br for some reason.
13544 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13553 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13554 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13556 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13562 <div about="#mwt1" typeof="mw:Transclusion" 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}}]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}'>foo
13563 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13567 # T66017 -- ugly wikitext with fostered content generates two template ranges
13568 # that are "identical" and generate nesting cycles in the algorithm
13570 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13572 {{echo|<table><tr><td><table>}}
13576 <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"}'>
13577 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13578 </table></td></tr></tbody></table>
13582 Templates: Parameters substituted at the top-level
13584 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13588 <p><i>who</i> me? <b>never!</b>
13592 <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>
13594 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13598 Templates: Param with empty arg in the final position
13602 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13606 Parser Functions: 1. Simple example
13615 Parser Functions: 2. Nested use (only outermost should be marked up)
13623 ## Note that the templates inside the references are not wrapped
13625 Template nested in extension tag in template
13627 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13628 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13631 <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","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup>
13632 <span about="#mwt7" 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="#mwt7" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="./Main_Page#cite_note-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup></p>
13633 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt10" 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" data-parsoid='{"stx":"piped","a":{"href":"./Ho"},"sa":{"href":"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 typeof="mw:ExpandedAttrs" about="#mwt11" rel="mw:ExtLink" class="external autonumber" href="http://test.com?q=ho" data-mw='{"attribs":[[{"txt":"href"},{"html":"http://test.com?q=ho"}]]}'></a></span></li></ol>
13637 ### Pre-save transform tests
13640 pre-save transform: subst:
13646 This is a test template
13650 pre-save transform: normal template
13660 pre-save transform: nonexistent template
13664 {{thistemplatedoesnotexist}}
13666 {{thistemplatedoesnotexist}}
13670 pre-save transform: subst magic variables
13679 # This is T2089, which I fixed. -- wtm
13681 pre-save transform: subst: templates with parameters
13685 {{subst:paramtest|param="something else"}}
13687 This is a test template with parameter "something else"
13691 Template:nowikitest
13693 <nowiki>'''not wiki'''</nowiki>
13697 pre-save transform: nowiki in subst (T3188)
13701 {{subst:nowikitest}}
13703 <nowiki>'''not wiki'''</nowiki>
13707 Template:commenttest
13709 This template has <!-- a comment --> in it.
13713 pre-save transform: comment in subst (T3936)
13717 {{subst:commenttest}}
13719 This template has <!-- a comment --> in it.
13723 pre-save transform: unclosed tag
13727 <nowiki>'''not wiki'''
13729 <nowiki>'''not wiki'''
13733 pre-save transform: mixed tag case
13737 <NOwiki>'''not wiki'''</noWIKI>
13739 <NOwiki>'''not wiki'''</noWIKI>
13743 pre-save transform: unclosed comment in <nowiki>
13747 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13749 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13752 # Leading @ in this template definition works around a limitation
13753 # in parsoid's parserTests which otherwise strips the <span> from the
13754 # result (confusing it for a template wrapper)
13758 @<span onmouseover="alert('crap')">Oh no</span>
13762 (confirming safety of fix for subst T3936)
13764 {{Template:dangerous}}
13766 <p>@<span>Oh no</span>
13771 pre-save transform: comment containing gallery (T7024)
13775 <!-- <gallery>data</gallery> -->
13777 <!-- <gallery>data</gallery> -->
13781 pre-save transform: comment containing extension
13785 <!-- <tag>data</tag> -->
13787 <!-- <tag>data</tag> -->
13791 pre-save transform: comment containing nowiki
13795 <!-- <nowiki>data</nowiki> -->
13797 <!-- <nowiki>data</nowiki> -->
13801 pre-save transform: <noinclude> in subst (T5298)
13811 pre-save transform: <onlyinclude> in subst (T5298)
13815 {{subst:Includes2}}
13823 {{<includeonly>subst:</includeonly>Includes}}
13827 Template:SafeSubstTest
13829 {{<includeonly>safesubst:</includeonly>Includes}}
13833 T24297: safesubst: works during PST
13837 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13843 T24297: safesubst: works during normal parse
13852 subst: does not work during normal parse
13856 <p>{{subst:Includes}}
13861 pre-save transform: context links ("pipe trick")
13865 [[Article (context)|]]
13868 [[Bar:Article (context)|]]
13869 [[:Bar:Article (context)|]]
13871 [[|Article (context)]]
13875 [[Article (context)|Article]]
13876 [[Bar:Article|Article]]
13877 [[:Bar:Article|Article]]
13878 [[Bar:Article (context)|Article]]
13879 [[:Bar:Article (context)|Article]]
13881 [[Article (context)]]
13882 [[Bar:X (Y) Z|X (Y) Z]]
13883 [[:Bar:X (Y) Z|X (Y) Z]]
13887 pre-save transform: context links ("pipe trick") with interwiki prefix
13891 [[interwiki:Article|]]
13892 [[:interwiki:Article|]]
13893 [[interwiki:Bar:Article|]]
13894 [[:interwiki:Bar:Article|]]
13896 [[interwiki:Article|Article]]
13897 [[:interwiki:Article|Article]]
13898 [[interwiki:Bar:Article|Bar:Article]]
13899 [[:interwiki:Bar:Article|Bar:Article]]
13903 pre-save transform: context links ("pipe trick") with parens in title
13905 pst title=[[Somearticle (context)]]
13909 [[Article (context)|Article]]
13913 pre-save transform: context links ("pipe trick") with comma in title
13915 pst title=[[Someplace, Somewhere]]
13918 [[Otherplace, Elsewhere|]]
13919 [[Otherplace, Elsewhere, Anywhere|]]
13921 [[Otherplace, Somewhere|Otherplace]]
13922 [[Otherplace, Elsewhere|Otherplace]]
13923 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13927 pre-save transform: context links ("pipe trick") with parens and comma
13929 pst title=[[Someplace (IGNORED), Somewhere]]
13932 [[Otherplace (place), Elsewhere|]]
13934 [[Otherplace, Somewhere|Otherplace]]
13935 [[Otherplace (place), Elsewhere|Otherplace]]
13939 pre-save transform: context links ("pipe trick") with comma and parens
13941 pst title=[[Who, me? (context)]]
13944 [[Me, Myself, and I (1937 song)|]]
13946 [[Yes, you. (context)|Yes, you.]]
13947 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13951 pre-save transform: context links ("pipe trick") with namespace
13953 pst title=[[Ns:Somearticle]]
13957 [[Ns:Article|Article]]
13961 pre-save transform: context links ("pipe trick") with namespace and parens
13963 pst title=[[Ns:Somearticle (context)]]
13967 [[Ns:Article (context)|Article]]
13971 pre-save transform: context links ("pipe trick") with namespace and comma
13973 pst title=[[Ns:Somearticle, Context, Whatever]]
13977 [[Ns:Article, Context, Whatever|Article]]
13981 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13983 pst title=[[Ns:Somearticle, Context (context)]]
13987 [[Ns:Article (context)|Article]]
13991 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13993 pst title=[[Ns:Somearticle (IGNORED), Context]]
13997 [[Ns:Article, Context|Article]]
14001 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14005 [[Article(context)|]]
14006 [[Bar:Article(context)|]]
14007 [[:Bar:Article(context)|]]
14008 [[|Article(context)]]
14012 [[Article(context)|Article]]
14013 [[Bar:Article(context)|Article]]
14014 [[:Bar:Article(context)|Article]]
14015 [[Article(context)]]
14016 [[Bar:X(Y)Z|X(Y)Z]]
14017 [[:Bar:X(Y)Z|X(Y)Z]]
14021 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14025 [[Article (context)|]]
14026 [[Bar:Article (context)|]]
14027 [[:Bar:Article (context)|]]
14028 [[|Article (context)]]
14032 [[Article (context)|Article]]
14033 [[Bar:Article (context)|Article]]
14034 [[:Bar:Article (context)|Article]]
14035 [[Article (context)]]
14036 [[Bar:X (Y) Z|X (Y) Z]]
14037 [[:Bar:X (Y) Z|X (Y) Z]]
14041 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14045 [[Article(context)|]]
14046 [[Bar:Article(context)|]]
14047 [[:Bar:Article(context)|]]
14048 [[|Article(context)]]
14052 [[Article(context)|Article]]
14053 [[Bar:Article(context)|Article]]
14054 [[:Bar:Article(context)|Article]]
14055 [[Article(context)]]
14056 [[Bar:X(Y)Z|X(Y)Z]]
14057 [[:Bar:X(Y)Z|X(Y)Z]]
14061 pre-save transform: context links ("pipe trick") with commas (T23660)
14065 [[Article (context), context|]]
14066 [[Article (context),context|]]
14067 [[Bar:Article (context), context|]]
14068 [[Bar:Article (context),context|]]
14069 [[:Bar:Article (context), context|]]
14070 [[:Bar:Article (context),context|]]
14072 [[Article (context), context|Article]]
14073 [[Article (context),context|Article]]
14074 [[Bar:Article (context), context|Article]]
14075 [[Bar:Article (context),context|Article]]
14076 [[:Bar:Article (context), context|Article]]
14077 [[:Bar:Article (context),context|Article]]
14081 Parsoid: backwards pipe trick
14088 <p>[[|<b>bar</b>]]</p>
14092 pre-save transform: trim trailing empty lines
14096 Empty lines are trimmed
14102 Empty lines are trimmed
14106 pre-save transform: Signature expansion
14113 * <noinclude>~~~</noinclude>
14114 * <includeonly>~~~</includeonly>
14115 * <onlyinclude>~~~</onlyinclude>
14117 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14118 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14119 * 00:02, 1 January 1970 (UTC)
14120 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14121 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14122 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14127 ParserOutput flags from signature expansion (T84843)
14134 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14135 flags=user-signature
14140 pre-save transform: Signature expansion in nowiki tags (T2093)
14146 <nowiki>~~~~</nowiki>
14148 <includeonly><nowiki>~~~~</nowiki></includeonly>
14150 <noinclude><nowiki>~~~~</nowiki></noinclude>
14152 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14154 {{subst:Foo}} shall be converted to FOO
14156 As well as inside noinclude/onlyinclude
14157 <noinclude>{{subst:Foo}}</noinclude>
14158 <onlyinclude>{{subst:Foo}}</onlyinclude>
14160 But not inside includeonly
14161 <includeonly>{{subst:Foo}}</includeonly>
14165 <nowiki>~~~~</nowiki>
14167 <includeonly><nowiki>~~~~</nowiki></includeonly>
14169 <noinclude><nowiki>~~~~</nowiki></noinclude>
14171 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14173 FOO shall be converted to FOO
14175 As well as inside noinclude/onlyinclude
14176 <noinclude>FOO</noinclude>
14177 <onlyinclude>FOO</onlyinclude>
14179 But not inside includeonly
14180 <includeonly>{{subst:Foo}}</includeonly>
14184 Parsoid: Recognize nowiki with trailing space in tags
14188 <nowiki ><div>[[foo]]</nowiki >
14196 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14203 Parsoid: Recognize nowiki with odd capitalization
14207 <noWikI ><div>[[foo]]</Nowiki >
14209 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14214 Parsoid: Escape nowiki with trailing space in tags
14218 <p><nowiki > foo </nowiki ></p>
14219 <p>a<nowiki />b</p>
14220 <p>c<nowiki/ >d</p>
14222 <nowiki > foo </nowiki >
14230 Parsoid: Escape weird noWikI capitalizations
14234 <p><noWikI > foo </NoWikI ></p>
14236 <noWikI > foo </NoWikI >
14240 ### Message transform tests
14243 message transform: magic variables
14253 message transform: should not transform wiki markup
14263 message transform: <noinclude> in transcluded template (T6926)
14273 message transform: <onlyinclude> in transcluded template (T6926)
14283 {{#special:}} page name, known
14287 {{#special:Recentchanges}}
14289 Special:RecentChanges
14293 {{#special:}} page name with subpage, known
14297 {{#special:Recentchanges/param}}
14299 Special:RecentChanges/param
14303 {{#special:}} page name, unknown
14307 {{#special:foobar nonexistent}}
14309 Special:Foobar nonexistent
14313 {{#speciale:}} page name, known
14317 {{#speciale:Recentchanges}}
14319 Special:RecentChanges
14323 {{#speciale:}} page name with subpage, known
14327 {{#speciale:Recentchanges/param}}
14329 Special:RecentChanges/param
14333 {{#speciale:}} page name, unknown
14337 {{#speciale:foobar nonexistent}}
14339 Special:Foobar_nonexistent
14345 ### For Parsoid-specific tests, see
14346 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14351 parsoid=wt2html,wt2wt,html2html
14353 [[Image:foobar.jpg]]
14355 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14358 <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>
14362 Serialize simple image with span wrapper
14366 <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>
14368 [[File:Foobar.jpg]]
14372 Simple image (using File: namespace, now canonical)
14374 [[File:Foobar.jpg]]
14376 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14379 <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>
14383 Right-aligned image
14385 [[File:Foobar.jpg|right]]
14387 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14390 <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>
14396 [[File:Foobar.jpg|right|Caption text]]
14398 <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" width="1941" height="220" /></a></div>
14401 <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>
14405 Image with caption, T55312 #1
14407 [[File:Foobar.jpg|right|Caption page stuff]]
14409 <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" width="1941" height="220" /></a></div>
14412 <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>
14416 Image with caption, T55312 #2
14418 [[File:Foobar.jpg|right|Caption page=]]
14420 <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" width="1941" height="220" /></a></div>
14423 <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>
14427 Image with caption, T55312 #3
14429 [[File:Foobar.jpg|right|Caption page=stuff]]
14431 <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" width="1941" height="220" /></a></div>
14434 <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>
14438 Image caption with pipe entity
14440 [[File:Foobar.jpg|thumb|one | two]]
14441 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14443 <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" 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>
14444 <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" 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>
14447 <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>
14448 <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>
14452 Allow empty links in image captions (T62753)
14456 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14461 <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" 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>
14464 <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>
14466 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14467 </figcaption></figure>
14471 Titles in unlinked images (T23454)
14473 [[File:Foobar.jpg|link=|stuff]]
14475 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14478 <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>
14482 Link with empty target
14491 Image with link trail
14493 Linktrails should not work for images: [[File:Foobar.jpg]]s
14495 <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" width="1941" height="220" /></a>s
14498 <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>
14502 Image with empty attribute
14504 parsoid=wt2html,wt2wt,html2html
14506 [[File:Foobar.jpg|right||Caption text]]
14508 <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" width="1941" height="220" /></a></div>
14511 <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>
14515 1. Block image with individual attributes from templates
14517 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14519 <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" 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>
14522 <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>
14526 2. Block Image with individual attributes from templates
14528 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14530 <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" 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>
14533 <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>
14537 3. Inline image with individual attributes from templates
14539 [[File:Foobar.jpg|{{echo|50px}}]]
14541 <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" 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>
14544 <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>
14547 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14548 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14550 Image with multiple attributes from the same template
14552 [[File:Foobar.jpg|{{image_attribs}}]]
14554 <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" width="1941" height="220" /></a></div>
14557 <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>
14561 Image with link tails
14565 123[[File:Foobar.jpg]]456
14566 123[[File:Foobar.jpg|right]]456
14567 123[[File:Foobar.jpg|thumb]]456
14569 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
14571 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" width="1941" height="220" /></a></div>456
14572 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" 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
14575 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
14577 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" width="1941" height="220" /></a></div><p>456
14578 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" 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
14581 <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>
14582 <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</p>
14583 <p>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>
14587 Image with multiple captions -- only last one is accepted
14589 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14591 <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" width="1941" height="220" /></a></div>
14594 <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>
14598 Image with multiple widths -- use last
14600 [[File:Foobar.jpg|200px|300px|caption]]
14602 <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" 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>
14605 <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>
14609 Image with multiple alignments -- use first (T50664)
14613 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14615 [[File:Foobar.jpg|middle|text-top|caption]]
14617 <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" 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>
14618 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" style="vertical-align: middle" /></a>
14621 <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>
14622 <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>
14626 Image with width attribute at different positions
14628 [[File:Foobar.jpg|200px|right|Caption]]
14629 [[File:Foobar.jpg|right|200px|Caption]]
14630 [[File:Foobar.jpg|right|Caption|200px]]
14632 <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" 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>
14633 <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" 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>
14634 <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" 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>
14637 <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>
14638 <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>
14639 <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>
14642 # a sad bit of backward-compatibility
14644 Image with size specified with pxpx (T15500, T53628)
14646 parsoid=wt2html,wt2wt,html2html
14648 [[File:Foobar.jpg|20pxpx]]
14649 [[File:Foobar.jpg|200x20pxpx]]
14651 <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" 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>
14652 <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" 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>
14655 <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>
14659 Image with link parameter, wiki target
14661 [[File:Foobar.jpg|link=Main Page]]
14663 <p><a href="/wiki/Main_Page" title="Main Page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14666 <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>
14669 # parsoid T51293 (part 1)
14671 Image with link parameter, URL target
14673 [[File:Foobar.jpg|link=http://example.com/]]
14675 <p><a href="http://example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14678 <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>
14681 # parsoid T51293 (part 2)
14683 Image with link parameter, protocol-less URL target
14685 [[File:Foobar.jpg|link=//example.com/]]
14687 <p><a href="//example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14690 <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>
14694 Escaping non-block captions (T107435)
14697 "modes": ["wt2wt"],
14699 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14703 [[Image:Foobar.jpg|caption]]
14705 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14708 # wgExternalLinkTarget not supported by Parsoid
14710 Image with link parameter, wgExternalLinkTarget
14712 [[Image:foobar.jpg|link=http://example.com/]]
14714 wgExternalLinkTarget='foobar'
14716 <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" width="1941" height="220" /></a>
14721 Image with link parameter, wgNoFollowLinks set to false
14723 [[Image:foobar.jpg|link=http://example.com/]]
14725 wgNoFollowLinks=false
14727 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14732 Image with link parameter, wgNoFollowDomainExceptions
14734 [[Image:foobar.jpg|link=http://example.com/]]
14736 wgNoFollowDomainExceptions='example.com'
14738 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14742 # wgExternalLinkTarget not supported by Parsoid
14744 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14746 [[Image:foobar.jpg|link=http://example.com/|Title]]
14748 wgExternalLinkTarget='foobar'
14750 <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" width="1941" height="220" /></a>
14755 Image with empty link parameter
14757 [[File:Foobar.jpg|link=]]
14759 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14762 <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>
14766 Image with link parameter (wiki target) and unnamed parameter
14768 [[File:Foobar.jpg|link=Main_Page|Title]]
14770 <p><a href="/wiki/Main_Page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14773 <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>
14777 Image with link parameter (URL target) and unnamed parameter
14779 [[File:Foobar.jpg|link=http://example.com/|Title]]
14781 <p><a href="http://example.com/" title="Title" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14784 <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>
14788 Thumbnail image with link parameter
14791 parsoid=wt2html,wt2wt,html2html
14793 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14795 <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" 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>
14798 <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>
14802 Manually-specified thumbnail image
14806 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14808 <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" 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>
14811 <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>
14815 Manually-specified thumbnail image with explicit link to wiki page
14818 parsoid=wt2html,wt2wt,html2html
14820 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14822 <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" 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>
14825 <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>
14829 Manually-specified thumbnail image with explicit link to url
14832 parsoid=wt2html,wt2wt,html2html
14834 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14836 <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" 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>
14839 <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>
14843 Manually-specified thumbnail image with explicit no link
14846 parsoid=wt2html,wt2wt,html2html
14848 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14850 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><img alt="" src="http://example.com/images/e/ea/Thumb.png" 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>
14853 <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>
14857 Manually-specified thumbnail image with explicit link and alt text
14860 parsoid=wt2html,wt2wt,html2html
14862 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14864 <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" 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>
14867 <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>
14871 Image with frame and link
14873 parsoid=wt2html,wt2wt,html2html
14875 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14877 <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" 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>
14880 <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>
14884 Image with frame and link and explicit alt
14886 parsoid=wt2html,wt2wt,html2html
14888 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14890 <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" 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>
14893 <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>
14897 Image with wiki markup in implicit alt
14899 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14901 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14903 <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" width="1941" height="220" /></a>
14904 </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" width="1941" height="220" /></a>
14907 <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>
14909 <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>
14913 Alt image option should handle most kinds of wikitext without barfing
14915 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14917 <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" 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>
14920 <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>
14924 Image with table with attributes in caption
14926 parsoid=wt2html,html2html
14928 [[File:Foobar.jpg|thumb|
14935 <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>
14936 <table class="123">
14937 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14940 </figcaption></figure>
14944 Image with table with rows from templates in caption
14946 [[File:Foobar.jpg|thumb|
14952 <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>
14954 <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>
14956 </figcaption></figure>
14960 Image with nested tables in caption
14962 [[File:Foobar.jpg|thumb|Foo<br />
14971 <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}'/>
14975 <tbody><tr><td>z</td></tr>
14976 </tbody></table></td></tr>
14978 </figcaption></figure>
14982 Image with heading and horizontal rule in caption
14984 [[File:Foobar.jpg|thumb|
14990 <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" 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>
14993 <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>
14994 <h3 id="Testing">Testing</h3>
14996 <hr data-parsoid='{"extra_dashes":10}'/>
14997 </figcaption></figure>
15000 ###################
15001 # Conflicting image format options.
15002 # First option specified should 'win'.
15003 # All three cases in each test should be identical.
15006 Image with 'frameless' first.
15008 parsoid=wt2html,wt2wt,html2html
15010 [[File:Foobar.jpg|frameless|caption]]
15012 [[File:Foobar.jpg|frameless|frame|caption]]
15014 [[File:Foobar.jpg|frameless|thumb|caption]]
15016 <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" 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>
15017 </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" 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>
15018 </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" 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>
15021 <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>
15022 <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>
15023 <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>
15027 Image with 'frame' first.
15029 parsoid=wt2html,wt2wt,html2html
15031 [[File:Foobar.jpg|frame|caption]]
15032 [[File:Foobar.jpg|frame|frameless|caption]]
15033 [[File:Foobar.jpg|frame|thumb|caption]]
15035 <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" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15036 <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" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15037 <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" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15040 <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>
15041 <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>
15042 <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>
15046 Image with 'thumb' first.
15048 parsoid=wt2html,wt2wt,html2html
15050 [[File:Foobar.jpg|thumb|caption]]
15051 [[File:Foobar.jpg|thumb|frameless|caption]]
15052 [[File:Foobar.jpg|thumb|frame|caption]]
15054 <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" 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>
15055 <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" 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>
15056 <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" 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>
15059 <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>
15060 <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>
15061 <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>
15064 ###################
15066 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15067 # and https://phabricator.wikimedia.org/T64258
15068 # Foobar has actual size of 1941x220
15069 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15070 # a scalable format.
15071 # 2. Framed images always ignore size options; always render at default size.
15072 # 3. "Unspecified format" and border are the only types which can be
15076 Image: unspecified format and border enlarge
15078 parsoid=wt2html,wt2wt,html2html
15080 [[File:Foobar.jpg|2000px]]
15082 [[File:Foobar.jpg|border|2000px]]
15084 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" /></a>
15085 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" class="thumbborder" /></a>
15088 <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>
15089 <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>
15093 Image: "unspecified format" and border reduce
15095 parsoid=wt2html,wt2wt,html2html
15097 [[File:Foobar.jpg|1000px]]
15099 [[File:Foobar.jpg|border|1000px]]
15101 <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" 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>
15102 </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" 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>
15105 <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>
15106 <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>
15110 Image: thumbs reduce
15112 parsoid=wt2html,wt2wt,html2html
15114 [[File:Foobar.jpg|thumb|50px]]
15116 <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" 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>
15119 <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>
15123 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15125 parsoid=wt2html,wt2wt,html2html
15127 [[File:Foobar.jpg|thumb|2000px]]
15129 [[File:Foobar.svg|thumb|2000px]]
15131 <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" 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>
15132 <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" 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>
15135 <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>
15136 <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>
15140 Image: frameless can reduce in size
15142 parsoid=wt2html,wt2wt,html2html
15144 [[File:Foobar.jpg|frameless|50px]]
15146 <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" 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>
15149 <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>
15153 Image: bitmap frameless can't be enlarged past original size, but vector can
15155 parsoid=wt2html,wt2wt,html2html
15157 [[File:Foobar.jpg|frameless|2000px]]
15159 [[File:Foobar.svg|frameless|2000px]]
15161 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15162 </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" 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>
15165 <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>
15166 <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>
15170 Image: framed images are always unscaled.
15172 parsoid=wt2html,wt2wt,html2html
15174 [[File:Foobar.jpg|frame]]
15176 [[File:Foobar.jpg|frame|50px]]
15178 [[File:Foobar.jpg|frame|50x50px]]
15180 [[File:Foobar.jpg|frame|2000px]]
15182 <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" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15183 <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" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15184 <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" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15185 <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" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15188 <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>
15189 <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>
15190 <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>
15191 <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>
15194 ###################
15197 Link to image page- image page normally doesn't exists, hence edit link
15198 Add test with existing image page
15199 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15203 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15208 T20784 Link to non-existent image page with caption should use caption as link text
15210 [[:Image:test|caption]]
15212 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15217 Frameless image caption with a free URL
15219 [[File:Foobar.jpg|http://example.com]]
15221 <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" width="1941" height="220" /></a>
15224 <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>
15228 Thumbnail image caption with a free URL
15232 [[File:Foobar.jpg|thumb|http://example.com]]
15234 <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" 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>
15237 <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>
15241 Thumbnail image caption with a free URL and explicit alt
15244 parsoid=wt2html,wt2wt,html2html
15246 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15248 <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" 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>
15251 <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>
15255 SVG thumbnails with no language set
15258 [[File:Foobar.svg|thumb|caption]]
15260 <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" 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>
15263 <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>
15267 SVG thumbnails with language de
15269 parsoid=wt2html,wt2wt,html2html
15271 [[File:Foobar.svg|thumb|caption|lang=de]]
15273 <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" 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>
15276 <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>
15280 SVG thumbnails with invalid language code
15282 parsoid=wt2html,wt2wt,html2html
15284 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15286 <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" 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>
15289 <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>
15293 T3887: A ISBN with a thumbnail
15295 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15297 <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" 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>
15300 <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>
15304 T3887: A RFC with a thumbnail
15306 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15308 <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" 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>
15311 <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>
15315 T3887: A mailto link with a thumbnail
15317 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15319 <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" 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>
15322 <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>
15325 # Pending resolution to T2368
15327 T2648: Frameless image caption with a link
15329 [[File:Foobar.jpg|text with a [[link]] in it]]
15331 <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" width="1941" height="220" /></a>
15334 <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>
15338 T2648: Frameless image caption with a link (suffix)
15340 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15342 <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" width="1941" height="220" /></a>
15345 <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>
15349 T2648: Frameless image caption with an interwiki link
15351 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15353 <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" width="1941" height="220" /></a>
15356 <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>
15360 T2648: Frameless image caption with a piped interwiki link
15362 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15364 <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" width="1941" height="220" /></a>
15367 <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>
15371 T107474: Frameless image caption with <nowiki>
15373 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15375 <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>
15379 Escape HTML special chars in image alt text
15381 [[File:Foobar.jpg|& < > "]]
15383 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15386 <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>
15390 Escape HTML special chars in image alt text with LanguageConverter
15394 [[File:Foobar.jpg|& < > "]]
15396 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15399 <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>
15403 Entities in file name and attributes
15405 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15407 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15410 <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>
15414 T2499: Alt text should have Ӓ, not &1234;
15416 [[File:Foobar.jpg|♀]]
15418 <p><a href="/wiki/File:Foobar.jpg" class="image" title="♀"><img alt="♀" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15421 <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>
15425 Broken image caption with link
15427 parsoid=wt2html,wt2wt,html2html
15429 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15431 <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.
15434 <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>
15438 Image caption containing another image
15440 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15442 <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" 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" width="135" height="135" /></a> inside it!</div></div></div>
15445 <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>
15449 Image: caption containing a newline
15451 [[File:Foobar.jpg|This
15454 <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" width="1941" height="220" /></a>
15457 <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>
15461 Image: caption containing leading space
15462 (The leading space should not trigger nowiki escaping in wt2wt mode)
15464 [[File:Foobar.jpg|thumb| bar]]
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" 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>
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> bar</figcaption></figure>
15472 # html/php output not have newlines after table, td, th, etc. because
15473 # Linker::makeThumbLink2() replaces the newlines with spaces since
15474 # the table is inside a caption.
15475 # FIXME: Verify if that circa 2004 fix is still required.
15477 Image: caption containing a table
15479 parsoid=wt2html,wt2wt,html2html
15481 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15487 and some more text.]]
15489 <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" 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>
15492 <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
15495 <tr><th>Foo</th><th>Bar</th></tr>
15498 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15502 T5090: External links other than http: in image captions
15504 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15506 <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" 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>
15509 <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>
15515 parsoid=wt2html,wt2wt,html2html
15517 [[Image:foobar.jpg|a|class=b]]
15519 <p><a href="/wiki/File:Foobar.jpg" class="image" title="a"><img alt="a" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="b" /></a>
15522 <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>
15526 Localized image handling (1).
15528 parsoid=wt2html,wt2wt,html2html
15531 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15533 <div class="floatleft"><a href="/wiki/Foo" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
15536 <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>
15540 Localized image handling (2).
15543 parsoid=wt2html,wt2wt,html2html
15546 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15548 <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" 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>
15551 <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>
15555 Localized image handling (3).
15560 <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>
15562 [[File:Foobar.jpg|بندانگشتی]]
15566 "border", "frameless" and "class" attributes on an image.
15569 parsoid=wt2html,wt2wt,html2html
15571 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15573 <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" 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>
15576 <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>
15579 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15581 Invalid image attributes (T64500)
15584 parsoid=wt2html,wt2wt,html2html
15586 [[File:Foobar.jpg|thumb|float|left|caption]]
15588 [[File:Foobar.jpg|thumb|righ|caption]]
15590 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15592 <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" 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>
15593 <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" 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>
15594 <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" 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>
15597 <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>
15598 <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>
15599 <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>
15605 #REDIRECT [[File:Barfoo.jpg]]
15608 # FIXME: Parsoid should run this test -- but we'd need to teach the
15609 # mockAPI about the redirected Barfoo.jpg image.
15613 [[Image:Barfoo.jpg]]
15615 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15620 Missing image with uploads disabled
15624 [[File:Foobaz.jpg]]
15626 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15629 <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>
15632 # Parsoid-specific testing for images
15633 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15634 # Currently imperfect due to a flaw in the Parsoid testrunner
15636 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15640 Parsoid-specific image handling - simple image with size and middle alignment
15642 [[File:Foobar.jpg|middle|50px]]
15644 <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>
15648 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
15650 parsoid=wt2wt,wt2html,html2html
15652 [[Image:Foobar.jpg|middle|50px]]
15654 <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>
15658 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
15660 [[File:Foobar.jpg|50px|middle]]
15662 <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>
15666 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
15668 parsoid=wt2html,wt2wt,html2html
15670 [[Image:Foobar.jpg|50px|middle]]
15672 <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>
15676 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15678 [[File:Foobar.jpg|500x10px|baseline|caption]]
15680 <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>
15684 Parsoid-specific image handling - simple image with border and size spec
15686 [[File:Foobar.jpg|50px|border|caption]]
15688 <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>
15692 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15694 parsoid=wt2html,html2html
15696 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15698 <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>
15702 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
15704 parsoid=wt2html,html2html
15706 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15708 <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>
15712 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15714 parsoid=wt2html,html2html
15716 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15718 <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>
15722 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
15724 parsoid=wt2html,html2html
15726 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15728 <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>
15732 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
15734 parsoid=wt2html,wt2wt,html2html
15736 [[File:Foobar.jpg|frame|500x50px|caption]]
15738 <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>
15742 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
15744 parsoid=wt2html,html2html
15746 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15748 <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>
15752 Parsoid-specific image handling - frameless image with specific size, border, and caption
15754 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15756 <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>
15760 Parsoid-specific image handling - simple image with a formatted caption
15762 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15764 <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>
15768 Parsoid-specific image handling - caption with a template in it
15770 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15772 <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>
15776 Parsoid-specific image handling - caption with unbalanced tags in it
15778 parsoid=wt2html,wt2wt,html2html
15781 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15785 <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>
15790 Parsoid-specific image handling - empty caption (1)
15792 parsoid=wt2html,wt2wt
15794 [[File:Foobar.jpg|thumb|]]
15796 <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>
15799 # empty captions don't get serialized unless we're in the "round trip" case
15801 Parsoid-specific image handling - empty caption (2)
15805 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15806 <a href="./File:Foobar.jpg">
15807 <img resource="./File:Foobar.jpg"
15808 src="//example.com/images/3/3a/Foobar.jpg"
15809 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15810 height="25" width="220"/>
15812 <figcaption></figcaption>
15815 [[File:Foobar.jpg|thumb]]
15819 Parsoid-specific image handling - whitespace caption
15821 [[File:Foobar.jpg|thumb| ]]
15823 <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>
15827 Parsoid-specific image handling - lang option
15830 [[File:Foobar.svg|lang=de|caption]]
15834 <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>
15838 ## Edge case bugs in Parsoid from T93580
15840 T93580: 1. Templated <ref> inside block images
15842 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15846 <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="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></figcaption></figure>
15848 <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="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
15852 T93580: 2. <ref> inside inline images
15854 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15858 <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\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a href=\"./Main_Page#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>
15860 <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="./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">foo</span></li></ol>
15864 T93580: 3. Templated <ref> inside inline images
15866 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15870 <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=\"./Main_Page#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>
15872 <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="./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">foo</span></li></ol>
15879 Subpage test/subpage
15887 subpage title=[[Subpage test]]
15891 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15896 Subpage noslash link
15898 subpage title=[[Subpage test]]
15902 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15907 Subpage test/1/2/subpage
15913 Relative subpage noslash link
15915 parsoid=wt2wt,wt2html,html2html
15916 subpage title=[[Subpage test/1/2/3/4]]
15922 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15923 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15926 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15927 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15931 Parsoid: dot-slash prefixed wikilinks
15941 </p><p>[[././baz/]]
15946 </p><p>[[././baz/]]
15951 Render invalid page names as plain text (T53090)
15963 [[foo[http://example.com]xyz]]
15965 [[{{echo|./../foo}}|bar]]
15966 [[{{echo|foo/.}}|bar]]
15967 [[{{echo|foo/..}}|bar]]
15968 [[{{echo|foo~~~~bar}}]]
15969 [[{{echo|foo>bar}}]]
15970 [[{{echo|foo././bar}}]]
15971 [[{{echo|foo{bar}}]]
15972 [[{{echo|foo}bar}}]]
15973 [[{{echo|foo[bar}}]]
15974 [[{{echo|foo]bar}}]]
15975 [[{{echo|foo<bar}}]]
15977 <p>[[./../foo|bar]]
15987 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15988 </p><p>[[./../foo|bar]]
16001 <p>[[./../foo|bar]]
16011 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16013 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16014 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16015 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16016 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16017 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16018 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16019 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16020 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16021 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16022 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16023 [[<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>
16031 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16036 T2561: {{/Subpage}}
16038 subpage title=[[Page]]
16042 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16050 Category:MediaWiki User's Guide
16058 [[:Category:MediaWiki User's Guide]]
16060 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16069 [[Category:MediaWiki User's Guide]]
16071 cat=MediaWiki_User's_Guide sort=
16073 <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"}}'/>
16077 PAGESINCATEGORY invalid title fatal (r33546 fix)
16079 {{PAGESINCATEGORY:<bogus>}}
16086 Category with different sort key
16090 [[Category:MediaWiki User's Guide|Foo]]
16092 cat=MediaWiki_User's_Guide sort=Foo
16094 <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"}}'/>
16098 Category with identical sort key
16102 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16104 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16106 <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"}}'/>
16110 Category with empty sort key
16115 [[Category:MediaWiki User's Guide|]]
16117 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16121 Category with empty sort key and parentheses
16126 [[Category:Foo (bar)|]]
16128 [[Category:Foo (bar)|Foo]]
16132 Category with link tail
16137 123[[Category:Foo]]456
16139 123[[Category:Foo]]456
16143 Category with template
16148 [[Category:{{echo|Foo}}]]
16150 [[Category:{{echo|Foo}}]]
16154 Category with template in sort key
16159 [[Category:Foo|{{echo|Bar}}]]
16161 [[Category:Foo|{{echo|Bar}}]]
16165 Category with template in sort key and title
16170 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16172 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16175 ## We used to, but no longer wt2wt this test since the default serializer
16176 ## will normalize all categories to serialize on their own line.
16177 ## This wikitext usage is going to be fairly uncommon in production and
16178 ## selser will take care of preserving formatting in those scenarios.
16180 Category / paragraph interactions
16184 Foo [[Category:Baz]] Bar
16186 Foo [[Category:Baz]]
16194 [[Category:Baz]] Bar
16207 {{echo|[[Category:Baz]]}}
16220 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16221 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16222 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16223 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16224 <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>
16225 <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}}]}'/>
16226 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16229 ## We used to, but no longer wt2wt this test since the default serializer
16230 ## will normalize all categories to serialize on their own line.
16231 ## This wikitext usage is going to be fairly uncommon in production and
16232 ## selser will take care of preserving formatting in those scenarios.
16234 ## The whitespace on the empty line is part of the test. Please do not delete
16236 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16242 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16244 {{echo|[[Category:Foo]] and so should this!}}
16246 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16251 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16253 <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>
16256 ## Parsoid will not try to wt2wt this while preserving newlines because
16257 ## it suppresses excess newlines within list items -- and we don't want to
16258 ## introduce a special case just for categories, which is, in reality somewhat
16259 ## odd behavior -- categories are unlikely to be used in list items like this
16260 ## in top-level pages and are only likely to show up in template-generated
16261 ## list items where this RT-ing is a non-issue.
16263 ## The whitespace on the empty line is part of the test. Please do not delete
16265 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16271 [[Category:Foo]] and this should be part of the same list item
16274 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16276 <ul><li>This and this should be part of the same list item</li>
16277 <li>So should this and this should be part of the same list item</li></ul>
16280 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16281 <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>
16285 ## Newlines and categories that follow the last item of a list
16286 ## are treated differently because this (list followed by categories)
16287 ## is an extremely common pattern on wikis.
16289 3. Categories and newlines: newline suppression for last list item should RT properly
16310 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16312 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16313 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16315 <dl><dd>c</dd></dl>
16317 <link rel="mw:PageProp/Category" href="./Category:C"/>
16319 <dl><dt>d</dt></dl>
16321 <link rel="mw:PageProp/Category" href="./Category:D"/>
16325 4. Categories and newlines: newline suppression for last list item should RT properly
16333 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16335 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16338 ## only wt2html for this to make sure the algo only applies to the rightmost path
16340 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16353 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16355 <ul><li>d</li></ul></li></ul>
16356 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16359 ## We used to, but no longer wt2wt this test since the default serializer
16360 ## will normalize all categories to serialize on their own line.
16361 ## This wikitext usage is going to be fairly uncommon in production and
16362 ## selser will take care of preserving formatting in those scenarios.
16364 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16368 *a [[Category:Foo]]
16370 <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>
16373 # This test also demonstrates because of newline+category tunneling
16374 # through the list hander, template wrapping doesn't expand to the
16375 # containing list when the list item swallows the category.
16377 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16382 <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
16383 </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>
16387 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16391 {{echo|[[Category:Foo]]
16395 <ul><li>a</li></ul>
16397 <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">
16398 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16399 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16403 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16407 [[Category:Bar]]<!--boo1--> <!--boo2-->
16408 [[Category:Baz]]<!--boo3--> <!--boo4-->
16410 <ul><li>a</li></ul>
16412 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16413 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16417 Categories and newlines: should behave properly with linkprefix (T87753)
16432 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16433 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16437 No regressions on internal links following category (T174639)
16439 parsoid=wt2html,html2html
16441 [[Category:Foo]]<div>a
16446 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16449 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16451 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16454 # Note that Parsoid differs slightly from PHP due to T175421
16456 11. Special case where only newlines separate links (T175416)
16458 parsoid=wt2html,html2html
16462 [[Foo]][[es:Alimento]]
16467 <a href="/wiki/Foo" title="Foo">Foo</a>
16468 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16471 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16473 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16475 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16479 Category links with multiple namespaces
16481 [[Category:Project:Foo]]
16483 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16487 Parsoid: Serialize link to category page with colon escape
16493 [[:Category:Foo|Bar]]
16496 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16497 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16501 # We used to, but no longer wt2wt this test since the default serializer
16502 # will normalize all categories to serialize on their own line.
16503 # This wikitext usage is going to be fairly uncommon in production and
16504 # selser will take care of preventing whitespace insertion if this
16505 # occurs in an article.
16507 # html2html disabled for the same reason (whitespace insertion between
16510 # html2wt disabled because it localizes the "Category" namespace.
16512 Link prefix/suffixes aren't applied to category links
16522 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16526 Link prefix/suffixes aren't applied to language links
16536 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16540 Parsoid: Serialize link to file page with colon escape
16546 [[:File:Foo.png|Bar]]
16549 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16550 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16555 Parsoid: Serialize a genuine category link without colon escape
16560 [[Category:Foo|Bar]]
16562 <link rel="mw:PageProp/Category" href="./Category:Foo">
16563 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16567 Normalize hrefs properly before testing for invalid link targets (T72894)
16571 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16573 [[Category:Toxine bactérienne]]
16577 Parsoid: Defaultsort
16579 {{DEFAULTSORT:Foo}}
16581 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16584 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16585 # But, this is a limitation of our representation and is documented in
16586 # TemplateHandler.js in processSpecialMagicWord
16588 Parsoid: Defaultsort (template-generated)
16590 {{{{echo|DEFAULTSORT}}:Foo}}
16592 <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"}]]}'/>
16596 ### Inter-language links
16599 Interlanguage links
16607 es:Alimento fr:Nourriture zh:食品
16609 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16610 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16611 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16615 Duplicate interlanguage links (T26502)
16626 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16627 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16628 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16629 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16636 Basic section headings
16643 ===Smaller headline===
16646 <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>
16649 <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>
16652 <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>
16658 Section headings with TOC
16661 ===Subheadline 1===
16662 =====Skipping a level=====
16663 ======Skipping a level======
16667 ===Another headline===
16669 <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>
16671 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16673 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16675 <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>
16677 <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>
16684 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16686 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16692 <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>
16693 <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>
16694 <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>
16695 <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>
16696 <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>
16699 <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>
16704 TOC anchors don't collide
16712 <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>
16714 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16715 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16716 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16717 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16721 <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>
16722 <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>
16723 <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>
16724 <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>
16728 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16729 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16731 Handling of sections up to level 6 and beyond
16736 ==Level 2 Heading==
16737 ===Level 3 Heading===
16738 ====Level 4 Heading====
16739 =====Level 5 Heading=====
16740 ======Level 6 Heading======
16741 =======Level 7 Heading=======
16742 ========Level 8 Heading========
16743 =========Level 9 Heading=========
16744 ==========Level 10 Heading==========
16746 <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>
16748 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16750 <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>
16752 <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>
16754 <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>
16756 <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>
16758 <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>
16759 <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>
16760 <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>
16761 <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>
16762 <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>
16776 <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>
16777 <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>
16778 <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>
16779 <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>
16780 <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>
16781 <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>
16782 <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>
16783 <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>
16784 <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>
16785 <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>
16788 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16789 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16790 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16791 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16792 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16793 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16794 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16795 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16796 <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>
16797 <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>
16801 TOC regression (T11764)
16805 ====title 1.1.1====
16810 <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>
16812 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16814 <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>
16816 <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>
16819 <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>
16822 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16824 <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>
16830 <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>
16831 <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>
16832 <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>
16833 <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>
16834 <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>
16835 <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>
16840 TOC for heading containing <span id="..."></span> (T96153)
16843 ==<span id="old-anchor"></span>New title==
16845 <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>
16847 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16851 <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>
16856 TOC with wgMaxTocLevel=3 (T8204)
16862 ====title 1.1.1====
16867 <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>
16869 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16871 <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>
16872 <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>
16875 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16877 <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>
16883 <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>
16884 <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>
16885 <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>
16886 <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>
16887 <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>
16888 <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>
16893 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16899 ====Section 1.1.1====
16900 ====Section 1.1.1.1====
16903 <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>
16905 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16907 <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>
16910 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16914 <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>
16915 <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>
16916 <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>
16917 <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>
16918 <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>
16924 Resolving duplicate section names
16929 <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>
16930 <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>
16935 Resolving duplicate section names with differing case (T12721)
16940 <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>
16941 <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>
16953 Template with sections, __NOTOC__
16960 <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>
16961 <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>
16962 <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>
16963 <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>
16968 __NOEDITSECTION__ keyword
16974 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16975 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16980 Link inside a section heading
16982 ==Section with a [[Main Page|link]] in it==
16984 <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>
16989 TOC regression (T14077)
16996 <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>
16998 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17000 <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>
17003 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17007 <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>
17008 <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>
17009 <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>
17014 T3219 URL next to image (good)
17016 http://example.com [[File:Foobar.jpg]]
17018 <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" width="1941" height="220" /></a>
17021 <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>
17024 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17026 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17028 parsoid=wt2html,html2html
17031 The line above must have a trailing space!
17034 But just in case it doesn't...
17036 <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>
17037 <p>The line above must have a trailing space!
17039 <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>
17040 <p>But just in case it doesn't...
17043 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17044 <p>The line above must have a trailing space!</p>
17045 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17047 <p>But just in case it doesn't...</p>
17051 Header with special characters (T27462)
17053 The tooltips shall not show entities to the user (ie. be double escaped)
17070 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17072 <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>
17074 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17075 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17076 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17077 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17078 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17082 <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>
17085 <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>
17088 <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>
17091 <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>
17094 <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>
17098 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17100 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17103 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17106 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17109 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17112 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17117 Header with space, plus and underscore as entity
17119 Id should not contain + for spaces
17121 ==Space between Text==
17124 ==Space-Entity between Text==
17127 ==Plus+between+Text==
17130 ==Plus-Entity+between+Text==
17133 ==Underscore_between_Text==
17136 ==Underscore-Entity_between_Text==
17139 [[#Space between Text]]
17140 [[#Space-Entity between Text]]
17141 [[#Plus+between+Text]]
17142 [[#Plus-Entity+between+Text]]
17143 [[#Underscore_between_Text]]
17144 [[#Underscore-Entity_between_Text]]
17146 <p>Id should not contain + for spaces
17148 <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>
17150 <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>
17151 <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>
17152 <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>
17153 <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>
17154 <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>
17155 <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>
17159 <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>
17162 <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>
17165 <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>
17168 <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>
17171 <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>
17174 <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>
17176 </p><p><a href="#Space_between_Text">#Space between Text</a>
17177 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17178 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17179 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17180 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17181 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17184 <p>Id should not contain + for spaces</p>
17186 <h2 id="Space_between_Text">Space between Text</h2>
17189 <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>
17192 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17195 <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>
17198 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17201 <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>
17204 <p><a rel="mw:WikiLink" href="./Main_Page#Space_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Space_between_Text"},"sa":{"href":"#Space between Text"}}'>#Space between Text</a>
17205 <a rel="mw:WikiLink" href="./Main_Page#Space-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Space-Entity_between_Text"},"sa":{"href":"#Space-Entity&#32;between&#32;Text"}}'>#Space-Entity between Text</a>
17206 <a rel="mw:WikiLink" href="./Main_Page#Plus+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Plus+between+Text"},"sa":{"href":"#Plus+between+Text"}}'>#Plus+between+Text</a>
17207 <a rel="mw:WikiLink" href="./Main_Page#Plus-Entity+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Plus-Entity+between+Text"},"sa":{"href":"#Plus-Entity&#43;between&#43;Text"}}'>#Plus-Entity+between+Text</a>
17208 <a rel="mw:WikiLink" href="./Main_Page#Underscore_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Underscore_between_Text"},"sa":{"href":"#Underscore_between_Text"}}'>#Underscore_between_Text</a>
17209 <a rel="mw:WikiLink" href="./Main_Page#Underscore-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Underscore-Entity_between_Text"},"sa":{"href":"#Underscore-Entity&#95;between&#95;Text"}}'>#Underscore-Entity_between_Text</a></p>
17212 # Parsoid html2wt disabled because it adds padding spaces around =
17214 Headers with excess '=' characters
17215 (Are similar tests necessary beyond the 1st level?)
17217 parsoid=wt2html,wt2wt,html2html
17221 =''italic'' heading==
17222 ==''italic'' heading=
17224 <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>
17226 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17227 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17228 <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>
17229 <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>
17233 <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>
17234 <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>
17235 <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>
17236 <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>
17239 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17240 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17241 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17242 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17246 HTML headers vs TOC (T25393)
17247 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17259 <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>
17261 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17263 <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>
17264 <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>
17267 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17269 <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>
17270 <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>
17276 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17277 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17278 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17279 <h1><span class="mw-headline" id="Header_2">Header 2
17281 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17282 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17285 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17286 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17287 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17289 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17291 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17292 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17293 <meta property="mw:PageProp/noeditsection"/>
17297 Single-line or multiline-comments can follow headings
17299 parsoid=wt2html,wt2wt
17307 <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>
17308 <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>
17309 <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>
17312 <h2 id="foo">foo</h2><!---->
17313 <h2 id="bar">bar</h2><!--c1-->
17314 <h2 id="baz">baz</h2><!--
17320 T3219 URL next to image (broken)
17322 http://example.com[[File:Foobar.jpg]]
17324 <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" width="1941" height="220" /></a>
17327 <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>
17331 T3186 news: in the middle of text
17333 http://en.wikinews.org/wiki/Wikinews:Workplace
17335 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17341 Namespaced link must have a title
17350 Namespaced link must have a title (bad fragment version)
17352 [[Project:#fragment]]
17354 <p>[[Project:#fragment]]
17360 ### HTML tags and HTML attributes
17364 div with no attributes
17366 <div>HTML rocks</div>
17368 <div>HTML rocks</div>
17373 div with double-quoted attribute
17375 <div id="rock">HTML rocks</div>
17377 <div id="rock">HTML rocks</div>
17382 div with single-quoted attribute
17384 <div id='rock'>HTML rocks</div>
17386 <div id="rock">HTML rocks</div>
17391 div with unquoted attribute
17393 <div id=rock>HTML rocks</div>
17395 <div id="rock">HTML rocks</div>
17400 div with illegal double attributes
17402 <div id="a" id="b">HTML rocks</div>
17404 <div id="b">HTML rocks</div>
17409 div with empty attribute value, space before equals
17411 parsoid=wt2html,html2html
17413 <div class =>HTML rocks</div>
17415 <div class="">HTML rocks</div>
17418 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17422 div with multiple empty attribute values
17424 wgFragmentMode=[ 'html5', 'legacy' ]
17426 parsoid=wt2html,html2html
17428 <div id= title=>HTML rocks</div>
17430 <div id="title=">HTML rocks</div>
17433 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17436 # FIXME Parsoid doesn't actually match PHP here.
17437 # Probably we should use the synthetic <foo /> or <indicator>
17438 # extensions for this test, which are enabled when running parser tests.
17440 Extension tag in attribute value
17442 <span title="<translate>123</translate>">ok</span>
17443 !! html/php+disabled
17444 <p><span title="<translate>123</translate>">ok</span>
17447 <p><span title="123" about="#mwt4" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"123"},"sa":{"title":"<translate>123</translate>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<translate typeof=\"mw:Extension/translate\" about=\"#mwt3\" data-parsoid='{\"dsr\":[13,39,2,2]}' data-mw='{\"name\":\"translate\",\"attrs\":{},\"body\":{\"extsrc\":\"123\"}}'>123</translate>"}]]}'>ok</span></p>
17451 table with multiple empty attribute values
17453 parsoid=wt2html,html2html
17459 <table title="id=">
17465 <table title="id=">
17466 <tbody><tr><td>hi</td></tr>
17471 div with braces in attribute value
17473 <div title="{}">Foo</div>
17475 <div title="{}">Foo</div>
17478 <div title="{}">Foo</div>
17482 div with empty attribute value, no space before equals
17484 parsoid=wt2html,html2html
17486 <div class=>HTML rocks</div>
17488 <div class="">HTML rocks</div>
17491 <div class="">HTML rocks</div>
17495 HTML multiple attributes correction
17497 <p class="error" class="awesome">Awesome!</p>
17499 <p class="awesome">Awesome!</p>
17504 Table multiple attributes correction
17507 !+ class="error" class="awesome"|status
17512 <th class="awesome">status
17520 <DIV ID="x">HTML ROCKS</DIV>
17522 <div id="x">HTML ROCKS</div>
17527 Non-ASCII pseudo-tags are rendered as text
17536 Pseudo-tag with URL 'name' renders as url link
17538 <http://example.com/>
17540 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17545 text with amp in the middle of nowhere
17549 <p>Remember AT&T?
17554 text with character entity: eacute
17556 I always thought é was a cute letter.
17558 <p>I always thought é was a cute letter.
17563 text with entity-escaped character entity-like string: eacute
17565 I always thought &eacute; was a cute letter.
17567 <p>I always thought &eacute; was a cute letter.
17572 text with undefined character entity: xacute
17574 I always thought &xacute; was a cute letter.
17576 <p>I always thought &xacute; was a cute letter.
17583 <data value="5">five</data>
17584 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17585 <mark>This highlighted text</mark>
17587 <p><data value="5">five</data>
17588 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17589 <mark>This highlighted text</mark>
17594 HTML tag with leading space is parsed as text
17598 <p>< div>foo< /div>
17602 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17603 ## the HTML5 parsing spec.
17605 Element with broken attribute syntax
17609 <div style=" style="123">hi</div>
17612 <div style="123">hi</div>
17616 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17617 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17621 ### Nesting tests (see T43545, T52604, T53081)
17624 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17625 # Note that html2wt is considerably more difficult if we use <b> in
17626 # the test case, instead of <small>
17628 Ensure that HTML adoption agency algorithm is properly implemented.
17630 <small>X<small>Y</small>Z</small>
17632 <p><small>X<small>Y</small>Z</small>
17636 # This was T43545 in the PHP parser.
17640 <kbd>X<kbd>Y</kbd>Z</kbd>
17642 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17646 # The following cases were T53081 in the PHP parser.
17647 # Note that there are some other nestable tags (b, i, etc) which are
17648 # not covered; see T53081 for discussion.
17653 <em>X<em>Y</em>Z</em>
17655 <p><em>X<em>Y</em>Z</em>
17660 Nesting of <strong>
17662 <strong>X<strong>Y</strong>Z</strong>
17664 <p><strong>X<strong>Y</strong>Z</strong>
17673 <p><q>X<q>Y</q>Z</q>
17680 <ruby>X<ruby>Y</ruby>Z</ruby>
17682 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17689 <bdo>X<bdo>Y</bdo>Z</bdo>
17691 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17703 [[Media:Foobar.jpg]]
17704 [[Media:Video.ogv]]
17705 [[:Media:Video.ogv]]
17707 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17708 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17709 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17712 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17713 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17714 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv" data-parsoid='{"a":{"namespace":"Media"},"sa":{"namespace":":Media"}}'>Media:Video.ogv</a></p>
17718 Media link with text
17720 [[Media:Foobar.jpg|A neat file to look at]]
17722 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17725 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17728 # FIXME: this is still bad HTML tag nesting
17729 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17730 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17732 Media link with nasty text
17734 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17736 <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>
17739 <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>
17741 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true}'>Safe Link</a></p><div style="display:none" data-parsoid='{"stx":"html"}'><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'>" onmouseover="alert(document.cookie)" onfoo="</a></div>
17746 Media link to nonexistent file (T3702)
17748 [[Media:No such.jpg]]
17749 [[Media:No_such file.jpg]]
17751 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17752 <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>
17755 <p><a rel="mw:MediaLink" href="./Special:FilePath/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":{"fileName":"No_such.jpg"},"sa":{"fileName":"No such.jpg"}}'>Media:No such.jpg</a>
17756 <a rel="mw:MediaLink" href="./Special:FilePath/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":{"fileName":"No_such_file.jpg"},"sa":{"fileName":"No_such file.jpg"}}'>Media:No_such file.jpg</a></p>
17760 Image link to nonexistent file (T3850 - good)
17762 [[File:No_such.jpg]]
17764 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17767 <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>
17771 :Image link to nonexistent file (T3850 - bad)
17773 [[:Image:No such.jpg]]
17775 <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>
17778 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17782 Character reference normalization in link text (T3938)
17784 [[Main Page|this&that]]
17786 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17793 Test for unicode normalization
17795 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17799 (T21451) Links should refer to the normalized form.
17807 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17808 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17809 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17810 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17811 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17816 Empty attribute crash test (T4067)
17818 <font color="">foo</font>
17820 <p><font color="">foo</font>
17825 Empty attribute crash test single-quotes (T4067)
17827 <font color=''>foo</font>
17829 <p><font color="">foo</font>
17834 Attribute test: equals, then nothing
17836 parsoid=wt2html,html2html
17838 <font color=>foo</font>
17840 <p><font color="">foo</font>
17843 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17847 Attribute test: unquoted value
17849 parsoid=wt2html,html2html
17851 <font color=x>foo</font>
17853 <p><font color="x">foo</font>
17856 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17860 Attribute test: unquoted but illegal value (hash)
17862 <font color=#x>foo</font>
17864 <p><font color="#x">foo</font>
17868 # Parsoid does not serialize to empty attribute syntax,
17869 # so wt2wt and html2wt cases are skipped
17871 Attribute test: no value (T54330)
17873 parsoid=wt2html,html2html
17875 <font color>foo</font>
17877 <p><font color="">foo</font>
17880 <p><font color="">foo</font></p>
17884 T4095: link with three closing brackets
17888 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17891 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17895 T4095: link with pipe and three closing brackets
17897 [[Main Page|link]]]
17899 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17902 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17906 T4095: link with pipe and three closing brackets, version 2
17908 [[Main Page|[http://example.com/]]]
17910 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17913 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17922 Template:Dangerous attribute
17924 " onmouseover="alert(document.cookie)
17928 Template:Dangerous style attribute
17930 border-size: expression(alert(document.cookie))
17936 <div style="float: right; {{{1}}}">Magic div</div>
17940 T4304: HTML attribute safety (safe template; regression T4309)
17942 <div title="{{test}}"></div>
17944 <div title="This is a test template"></div>
17947 <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>
17950 # Parsoid has enough context to handle this case
17952 T4304: HTML attribute safety (dangerous template; 2309)
17954 <div title="{{dangerous attribute}}"></div>
17956 <div title=""></div>
17959 <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>
17963 T4304: HTML attribute safety (dangerous style template; 2309)
17965 <div style="{{dangerous style attribute}}"></div>
17967 <div style="/* insecure input */"></div>
17970 <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>
17974 T4304: HTML attribute safety (safe parameter; 2309)
17976 {{div style|width: 200px}}
17978 <div style="float: right; width: 200px">Magic div</div>
17981 <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>
17985 T4304: HTML attribute safety (unsafe parameter; 2309)
17987 {{div style|width: expression(alert(document.cookie))}}
17989 <div style="/* insecure input */">Magic div</div>
17992 <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>
17995 ## Parsoid output here differs; needs investigation.
17997 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17999 {{div style|"><script>alert(document.cookie)</script>}}
18001 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18005 ## Parsoid output here differs; needs investigation.
18007 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18009 {{div style|" ><script>alert(document.cookie)</script>}}
18011 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18016 T4304: HTML attribute safety (link)
18018 <div title="[[Main Page]]"></div>
18020 <div title="[[Main Page]]"></div>
18023 <div title="[[Main Page]]"></div>
18027 T4304: HTML attribute safety (italics)
18029 <div title="''foobar''"></div>
18031 <div title="''foobar''"></div>
18036 T4304: HTML attribute safety (bold)
18038 <div title="'''foobar'''"></div>
18040 <div title="'''foobar'''"></div>
18045 T4304: HTML attribute safety (ISBN)
18047 <div title="ISBN 1234567890"></div>
18049 <div title="ISBN 1234567890"></div>
18054 T4304: HTML attribute safety (RFC)
18056 <div title="RFC 1234"></div>
18058 <div title="RFC 1234"></div>
18063 T4304: HTML attribute safety (PMID)
18065 <div title="PMID 1234567890"></div>
18067 <div title="PMID 1234567890"></div>
18072 T4304: HTML attribute safety (web link)
18074 <div title="http://example.com/"></div>
18076 <div title="http://example.com/"></div>
18081 T4304: HTML attribute safety (named web link)
18083 <div title="[http://example.com/ link]"></div>
18085 <div title="[http://example.com/ link]"></div>
18088 <div title="[http://example.com/ link]"></div>
18092 T5244: HTML attribute safety (extension; safe)
18094 <div style="<nowiki>background:blue</nowiki>"></div>
18096 <div style="background:blue"></div>
18099 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18103 T5244: HTML attribute safety (extension; unsafe)
18105 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18107 <div style="/* insecure input */"></div>
18110 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18113 # More MSIE fun discovered by Tom Gilder
18116 MSIE CSS safety test: spurious slash
18118 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18120 <div style="/* insecure input */">evil</div>
18123 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18127 MSIE CSS safety test: hex code
18129 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18131 <div style="/* insecure input */">evil</div>
18134 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18138 MSIE CSS safety test: comment in url
18140 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18142 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18145 <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>
18149 MSIE CSS safety test: comment in expression
18151 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18153 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18156 <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>
18160 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18162 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18164 <p style="/* invalid control char */">A</p>
18167 <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>
18171 MSIE 6 CSS safety test: Fullwidth (T57332)
18173 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18174 <div style="top:EXPRESSION(alert())">B</div>
18176 <p style="/* insecure input */">A</p>
18177 <div style="/* insecure input */">B</div>
18180 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18181 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18185 MSIE 6 CSS safety test: IPA extensions (T57332)
18187 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18188 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18190 <div style="/* insecure input */">A</div>
18191 <p style="/* insecure input */">B</p>
18194 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18195 <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>
18199 MSIE 6 CSS safety test: sup/sub script (T57332)
18201 <div style="background-image:url⁽javascript:alert())">A</div>
18202 <div style="background-image:url₍javascript:alert())">B</div>
18203 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18205 <div style="/* insecure input */">A</div>
18206 <div style="/* insecure input */">B</div>
18207 <p style="/* insecure input */">C</p>
18210 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18211 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18212 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18218 parsoid=wt2html,html2html
18221 title="data:text/html,<img src=1 onerror=alert(1)>"
18222 style="-o-link:attr(title);-o-link-source:current">X</div>
18224 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18227 <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>
18231 MSIE 6 CSS safety test: Repetition markers (T57332)
18233 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18234 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18235 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18236 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18237 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18238 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18239 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18241 <p style="/* insecure input */">A</p>
18242 <p style="/* insecure input */">B</p>
18243 <p style="/* insecure input */">C</p>
18244 <p style="/* insecure input */">D</p>
18245 <p style="/* insecure input */">E</p>
18246 <p style="/* insecure input */">F</p>
18247 <p style="/* insecure input */">G</p>
18250 <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>
18251 <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>
18252 <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>
18253 <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>
18254 <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>
18255 <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>
18256 <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>
18260 Table attribute legitimate extension
18263 !+ style="<nowiki>color:blue</nowiki>"|status
18268 <th style="color:blue">status
18274 Table attribute safety
18277 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18282 <th style="/* insecure input */">status
18288 CSS line continuation 1
18290 <div style="background-image: u\ rl(test.jpg);"></div>
18292 <div style="/* insecure input */"></div>
18297 CSS line continuation 2
18299 <div style="background-image: u\ rl(test.jpg); "></div>
18301 <div style="/* invalid control char */"></div>
18312 Expansion of multi-line templates in attribute values (T8255)
18314 <div style="background: {{identity|#00FF00}}">-</div>
18316 <div style="background: #00FF00">-</div>
18321 Expansion of multi-line templates in attribute values (T8255 sanity check)
18323 <div style="background:
18326 <div style="background: #00FF00">-</div>
18329 <div style="background:
18334 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18336 <div style="background: #00FF00">-</div>
18338 <div style="background: #00FF00">-</div>
18343 Tags which are hidden from tidiers cannot pass through the Sanitizer
18345 <mw:toc><script>alert();</script></mw:toc>
18347 <p><mw:toc><script>alert();</script></mw:toc>
18352 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18356 Parser hook: empty input
18367 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18370 ## Don't expect parsoid to rt this form.
18372 Parser hook: empty input using terminated empty elements
18374 parsoid=wt2html,html2html
18385 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18389 Parser hook: empty input using terminated empty elements (space before)
18400 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18404 Parser hook: basic input
18415 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18418 ## Don't expect parsoid to rt this form.
18420 Parser hook: case insensitive
18422 parsoid=wt2html,html2html
18433 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18436 ## Don't expect parsoid to rt this form.
18438 Parser hook: case insensitive, redux
18440 parsoid=wt2html,html2html
18451 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18455 Parser hook: nested tags
18457 <tag><tag></tag></tag>
18466 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18470 Parser hook: basic arguments
18472 <tag width="200" height="100" depth="50" square=""></tag>
18485 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18488 ## Don't expect parsoid to rt this form.
18490 Parser hook: basic arguments, variations
18492 parsoid=wt2html,html2html
18494 <tag width=200 height = "100" depth = '50' square></tag>
18507 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18511 Parser hook: argument containing a forward slash (T7344)
18513 <tag filename="/tmp/bla"></tag>
18518 'filename' => '/tmp/bla',
18523 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18526 ## Don't expect parsoid to rt this form.
18528 Parser hook: empty input using terminated empty elements (T4374)
18530 parsoid=wt2html,html2html
18542 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18545 ## </tag> should be output literally since there is no matching tag that begins it
18546 ## Don't expect parsoid to rt this form.
18548 Parser hook: basic arguments using terminated empty elements (T4374)
18552 <tag width=200 height = "100" depth = '50' square/>
18569 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":null}' about="#mwt2"></pre><p>other stuff
18573 ## Don't expect parsoid to rt this form.
18575 Parser hook: Don't allow unclosed extension tags
18581 this is a '''test'''
18583 <p>test <tag>123
18584 </p><p>this is a <b>test</b>
18587 <p>test <tag>123</p>
18589 <p>this is a <b>test</b></p>
18593 Parser hook: horizontal rule inside extension tag that outputs <pre>
18614 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18618 Parser hook: static parser hook not inside a comment
18620 <statictag>hello, world</statictag>
18622 <statictag action="flush" />
18628 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18629 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18633 Parser hook: static parser hook inside a comment
18635 <!-- <statictag>hello, world</statictag> -->
18636 <statictag action="flush" />
18641 <!-- <statictag>hello, world</statictag> -->
18642 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18645 # Nested template calls; this case was broken by Parser.php rev 1.506,
18649 Template:One-parameter
18651 (My parameter is: {{{1}}})
18655 Template:Map-one-parameter
18657 {{{{{1}}}|{{{2}}}}}
18661 Nested template calls
18663 {{Map-one-parameter|One-parameter|param}}
18665 <p>(My parameter is: param)
18674 # Remex wraps empty tag runs with p-tags.
18675 # Parsoid strips them out during p-wrapping.
18677 Sanitizer: Closing of open tags
18679 <s></s><table></table>
18681 <p><s></s></p><table></table>
18683 <s></s><table></table>
18687 Sanitizer: Closing of open but not closed tags
18696 Sanitizer: Closing of closed but not open tags
18702 <p class="mw-empty-elt">
18708 Sanitizer: Closing of closed but not open table tags
18712 Table not started</td></tr></table>
18714 <p>Table not started
18719 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18721 wgFragmentMode=[ 'html5', 'legacy' ]
18723 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18725 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18728 <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>
18732 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18734 wgFragmentMode=[ 'legacy' ]
18736 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18738 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18742 # In HTML5, the restrictions are that id must contain at least one character,
18743 # and must not contain any space characters.
18745 Sanitizer: Validating the contents of the id attribute (T6515)
18749 <br id="" /><br id="a space" />
18754 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18756 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18760 <br id="foo" /><br id="foo" />
18762 Something need to be done. foo-2 ?
18766 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18769 <meta itemprop="hello" content="world">
18770 <meta http-equiv="refresh" content="5">
18771 <meta itemprop="hello" http-equiv="refresh" content="5">
18772 <link itemprop="hello" href="{{SERVER}}">
18773 <link rel="stylesheet" href="{{SERVER}}">
18774 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18778 <p> <meta itemprop="hello" content="world" />
18779 <meta http-equiv="refresh" content="5">
18780 <meta itemprop="hello" content="5" />
18781 <link itemprop="hello" href="http://example.org" />
18782 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18783 <link itemprop="hello" href="http://example.org" />
18790 Sanitizer: Strip comments from CSS attributes
18792 parsoid=wt2html,wt2wt
18794 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18796 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18799 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18803 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18805 [[meatball:Soft"Security]]
18807 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18810 <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>
18814 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18816 [[meatball:Foo<Bar]]
18817 [[meatball:Foo>Bar]]
18818 [[meatball:Foo<bar]]
18819 [[meatball:Foo>bar]]
18821 <p>[[meatball:Foo<Bar]]
18822 [[meatball:Foo>Bar]]
18823 [[meatball:Foo<bar]]
18824 [[meatball:Foo>bar]]
18827 <p>[[meatball:Foo<Bar]]
18828 [[meatball:Foo>Bar]]
18829 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18830 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18834 Language converter: output gets cut off unexpectedly (T7757)
18838 this bit is safe: }-
18840 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18842 then we get cut off here: }-
18844 all additional text is vanished
18846 <p>this bit is safe: }-
18847 </p><p>but if we add a conversion instance: xxx
18848 </p><p>then we get cut off here: }-
18849 </p><p>all additional text is vanished
18852 <p>this bit is safe: }-</p>
18853 <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>
18854 <p>then we get cut off here: }-</p>
18855 <p>all additional text is vanished</p>
18859 Language converter glossary rules inside attributes (T119158)
18861 language=sr variant=sr-el
18863 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18865 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18868 </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" width="1941" height="220" /></a>
18871 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18873 <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>
18877 Self closed html pairs (T7487)
18879 <center><font id="bug" />Centered text</center>
18880 <div><font id="bug2" />In div text</div>
18882 <center><font id="bug"></font>Centered text</center>
18883 <div><font id="bug2"></font>In div text</div>
18887 Punctuation: nbsp before exclamation
18891 <p>C'est grave !
18896 Punctuation: CSS !important (T13874)
18898 <div style="width:50% !important">important</div>
18900 <div style="width:50% !important">important</div>
18905 Punctuation: CSS ! important (T13874; with space after)
18907 <div style="width:50% ! important">important</div>
18909 <div style="width:50% ! important">important</div>
18914 HTML bullet list, closed tags (T7497)
18927 <ul data-parsoid='{"stx":"html"}'>
18928 <li data-parsoid='{"stx":"html"}'>One</li>
18929 <li data-parsoid='{"stx":"html"}'>Two</li>
18935 HTML bullet list, unclosed tags (T7497)
18947 <ul data-parsoid='{"stx":"html"}'>
18948 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18949 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18955 HTML ordered list, closed tags (T7497)
18968 <ol data-parsoid='{"stx":"html"}'>
18969 <li data-parsoid='{"stx":"html"}'>One</li>
18970 <li data-parsoid='{"stx":"html"}'>Two</li>
18976 HTML ordered list, unclosed tags (T7497)
18989 <ol data-parsoid='{"stx":"html"}'>
18990 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18991 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18997 HTML nested bullet list, closed tags (T7497)
19020 <ul data-parsoid='{"stx":"html"}'>
19021 <li data-parsoid='{"stx":"html"}'>One</li>
19022 <li data-parsoid='{"stx":"html"}'>Two:
19023 <ul data-parsoid='{"stx":"html"}'>
19024 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19025 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19032 HTML nested bullet list, open tags (T7497)
19054 HTML nested ordered list, closed tags (T7497)
19079 HTML nested ordered list, open tags (T7497)
19116 HTML ordered list item with parameters oddity
19118 <ol><li id="fragment">One</li>
19121 <ol><li id="fragment">One</li>
19126 # parsoid doesn't explicitly mark autonumbered links, see T55505
19128 T7918: autonumbering
19130 [http://first/] [http://second] [ftp://ftp]
19134 [mailto:enclosed@mail.tld With target]
19136 [mailto:enclosed@mail.tld]
19138 mailto:inline@mail.tld
19140 <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>
19141 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19142 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19143 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19144 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19147 <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>
19148 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19149 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19150 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19151 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19156 # Security and HTML correctness
19157 # From Nick Jenkins' fuzz testing
19161 Fuzz testing: Parser13
19175 # Note that Parsoid output differs from the PHP parser here: the PHP
19176 # parser breaks the URL for the magic word, while in Parsoid the URL
19177 # production takes precedence.
19179 Fuzz testing: Parser14
19184 <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>
19185 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>
19187 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19193 <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>
19194 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>
19196 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19200 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19201 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19205 Fuzz testing: Parser14-table
19207 parsoid=wt2html,html2html
19212 <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>
19213 <table style="__TOC__">
19218 <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>
19219 <table style="__TOC__">
19226 <table style="__TOC__"></table>
19229 # Known to produce bogus xml (extra </td>)
19230 # Don't add the html/php section since it generates broken HTML
19232 Fuzz testing: Parser16
19249 Fuzz testing: Parser21
19252 !irc://{{ftp://a" onmouseover="alert('hello world');"
19257 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19267 Fuzz testing: Parser22
19269 http://===r:::https://b
19273 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19281 # Known to produce bad XML for now
19283 Fuzz testing: Parser24
19290 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19291 <br style="onmouseover='alert(document.cookie);' " />
19293 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19298 <u class="|">}}}} >
19299 <br style="onmouseover='alert(document.cookie);'" />
19301 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19309 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19310 <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>"}'/>}}}} >
19311 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/></u></p><p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true,"autoInsertedStart":true}'>MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p><table data-parsoid='{"autoInsertedEnd":true}'>
19315 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19318 # Note: the current result listed for this is not what the original one was,
19319 # but the original bug was JavaScript injection, which is fixed in any case.
19320 # It's not clear that the original result listed was any more correct than the
19321 # current one. Original result:
19324 # <li class="||">
19325 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19327 Fuzz testing: Parser25 (T8055)
19333 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19335 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19338 <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"]}'>
19339 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19343 Fuzz testing: URL adjacent extension (with space, clean)
19345 http://example.com <nowiki>junk</nowiki>
19347 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19350 <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>
19354 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19356 http://example.com<nowiki>junk</nowiki>
19358 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19361 <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>
19365 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19367 http://example.com<pre>junk</pre>
19369 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19372 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19374 <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>
19378 Fuzz testing: image with bogus manual thumbnail
19380 [[Image:foobar.jpg|thumbnail= ]]
19382 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19385 <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>
19388 # Parsoid will emit the newline literally in wt2wt; see next test case.
19390 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19394 <pre dir=" "></pre>
19396 <pre dir=" "></pre>
19399 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19400 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19404 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19408 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19409 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19419 Templates in extension attributes are not expanded
19421 <pre dir="{{echo|ltr}}"></pre>
19423 <pre dir="{{echo|ltr}}"></pre>
19426 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19430 Parsing optional HTML elements (T8171)
19435 <td> Some tabular data</td>
19436 <td> More tabular data ...
19437 <td> And yet som tabular data</td>
19443 <td> Some tabular data</td>
19444 <td> More tabular data ...
19445 </td><td> And yet som tabular data</td>
19452 Correct handling of <td>, <tr> (T8171)
19457 <td> Some tabular data</td>
19458 <td> More tabular data ...</td>
19459 <td> And yet som tabular data</td>
19465 <td> Some tabular data</td>
19466 <td> More tabular data ...</td>
19467 <td> And yet som tabular data</td>
19475 Parsing crashing regression (fr:JavaScript)
19479 <p></body></x>
19484 Inline wiki vs wiki block nesting
19490 <p><b>Bold paragraph</b>
19491 </p><p>New wiki paragraph
19495 # FIXME: The current php output is documented
19496 # and desired output is the parsoid target.
19498 Inline HTML vs wiki block nesting
19504 <p><b>Bold paragraph
19505 </p><p>New wiki paragraph</b>
19508 <p><b>Bold paragraph</b>
19509 </p><p>New wiki paragraph
19513 # Original result was this:
19514 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19516 # While that might be marginally more intuitive, maybe, the six-apostrophe
19517 # construct is clearly pathological and the result stated here (which is what
19518 # the parser actually does) is about as reasonable as anything.
19520 Mixing markup for italics and bold
19523 '''bold''''''bold''bolditalics'''''
19525 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19533 Article for special page transclusion test
19537 Special page transclusion
19540 {{Special:Prefixindex/Xyzzyx}}
19542 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19548 Special page transclusion twice (T7021)
19551 {{Special:Prefixindex/Xyzzyx}}
19552 {{Special:Prefixindex/Xyzzyx}}
19554 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19556 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19562 Transclusion of default MediaWiki message
19564 {{MediaWiki:Mainpage}}
19571 Transclusion of nonexistent MediaWiki message
19573 {{MediaWiki:Mainpagexxx}}
19575 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19580 Transclusion of MediaWiki message with underscore
19582 {{MediaWiki:history_short}}
19589 Transclusion of MediaWiki message with space
19591 {{MediaWiki:history short}}
19598 Invalid header with following text
19608 Section extraction test (section 0)
19628 Section extraction test (section 1)
19650 Section extraction test (section 2)
19671 Section extraction test (section 3)
19691 Section extraction test (section 4)
19715 Section extraction test (section 5)
19735 Section extraction test (section 6)
19756 Section extraction test (section 7)
19776 Section extraction test (section 8)
19796 Section extraction test (section 9)
19817 Section extraction test (section 10)
19837 Section extraction test (nonexistent section 11)
19856 Section extraction test with bogus heading (section 1)
19861 ==bogus== not a legal section
19865 ==bogus== not a legal section
19869 Section extraction test with bogus heading (section 2)
19874 ==bogus== not a legal section
19881 Section extraction test with comment after heading (section 1)
19893 Section extraction test with comment after heading (section 2)
19905 Section extraction test with bogus <nowiki> heading (section 1)
19910 ==bogus== <nowiki>not a legal section</nowiki>
19914 ==bogus== <nowiki>not a legal section</nowiki>
19918 Section extraction test with bogus <nowiki> heading (section 2)
19923 ==bogus== <nowiki>not a legal section</nowiki>
19929 # Formerly testing for T4587, now resolved by the use of unmarked sections
19930 # instead of respecting commented sections
19932 Section extraction prefixed by comment (section 1)
19943 Section extraction prefixed by comment (section 2)
19953 # Formerly testing for T4607, now resolved by the use of unmarked sections
19954 # instead of respecting HTML-style headings
19956 Section extraction, mixed wiki and html (section 1)
19972 Section extraction, mixed wiki and html (section 2)
19988 # Formerly testing for T5342
19990 Section extraction, heading surrounded by <noinclude>
19994 <noinclude>==unmarked==</noinclude>
20000 # Test behavior of T21910
20002 Sectiion with all-equals
20007 The line above must have a trailing space
20010 But just in case it doesn't...
20014 But just in case it doesn't...
20018 Section replacement test (section 0)
20049 Section replacement test (section 1)
20078 Section replacement test (section 2)
20108 Section replacement test (section 3)
20139 Section replacement test (section 4)
20166 Section replacement test (section 5)
20197 Section replacement test (section 6)
20227 Section replacement test (section 7)
20258 Section replacement test (section 8)
20289 Section replacement test (section 9)
20318 Section replacement test (section 10)
20348 Section replacement test with initial whitespace (T15728)
20352 Preformatted initial line
20356 Preformatted initial line
20363 Section extraction, heading followed by pre with 20 spaces (T8398)
20375 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20388 Section extraction, <pre> around bogus header (T12309)
20405 Section replacement, <pre> around bogus header (T12309)
20426 Handling of 
 in URLs
20430 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20433 <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>
20437 Handling of %0A in URLs
20441 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20444 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20447 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20449 5 quotes, code coverage +1 line
20459 # same html as previous, but wikitext adjusted to match parsoid html2wt
20460 # note that wt2html and html2html will put the <i> before the <b>
20462 5 quotes, code coverage +1 line w/ nowiki (1)
20464 parsoid=wt2wt,html2wt
20466 '''''<nowiki/>'''''
20471 <p><b><i></i></b></p>
20474 # same as previous, just swapping the <i> and <b>
20476 5 quotes, code coverage +1 line w/ nowiki (2)
20478 '''''<nowiki/>'''''
20483 <p><i><b></b></i></p>
20487 Special:Search page linking.
20491 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20496 {{!}} is a magic word
20498 {{!}} is a magic word there and {{!}} is still a magic word here
20499 | is not a magic word here but {{!}} is still a magic word here
20501 <p>| is a magic word there and | is still a magic word here
20502 | is not a magic word here but | is still a magic word here
20505 <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
20506 | 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>
20512 title=[[Parser test]]
20526 *{{SUBJECTPAGENAME}}
20527 *{{SUBJECTPAGENAMEE}}
20530 *{{NAMESPACENUMBER}}
20535 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20537 <ul><li>Parser test</li>
20538 <li>Parser_test</li>
20539 <li>Parser test</li>
20540 <li>Parser_test</li>
20541 <li>Parser test</li>
20542 <li>Parser_test</li>
20543 <li>Parser test</li>
20544 <li>Parser_test</li>
20545 <li>Parser test</li>
20546 <li>Parser_test</li>
20547 <li>Talk:Parser test</li>
20548 <li>Talk:Parser_test</li>
20549 <li>Parser test</li>
20550 <li>Parser_test</li>
20558 <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>
20561 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20564 Gallery with valid attributes
20566 <gallery type="123" summary="345">
20567 File:File:Foobar.jpg
20570 <ul class="gallery mw-gallery-traditional" type="123">
20571 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20572 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20573 <div class="gallerytext">
20579 <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"}}'>
20580 <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>
20584 ## Parsoid thinks the "centre" here is a property, not a caption.
20589 "modes": ["wt2html"],
20590 "nativeGallery": true
20598 image4 |300px| centre
20599 image5.svg| http://///////
20604 <ul class="gallery mw-gallery-traditional">
20605 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20606 <div class="thumb" style="height: 150px;">Image1.png</div>
20607 <div class="gallerytext">
20610 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20611 <div class="thumb" style="height: 150px;">Image2.gif</div>
20612 <div class="gallerytext">
20615 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20616 <div class="thumb" style="height: 150px;">Image3</div>
20617 <div class="gallerytext">
20620 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20621 <div class="thumb" style="height: 150px;">Image4</div>
20622 <div class="gallerytext">
20627 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20628 <div class="thumb" style="height: 150px;">Image5.svg</div>
20629 <div class="gallerytext">
20630 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20634 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20635 <div class="thumb" style="height: 150px;">* image6</div>
20636 <div class="gallerytext">
20642 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20643 <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>
20644 <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>
20645 <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>
20646 <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>
20647 <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>
20648 <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>
20653 Gallery (with options, html)
20656 "modes": ["wt2html", "html2html"],
20657 "nativeGallery": true
20660 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20661 File:Nonexistent.jpg|caption
20662 File:Nonexistent.jpg
20663 image:foobar.jpg|some '''caption''' [[Main Page]]
20665 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20668 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20669 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20670 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20671 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20672 <div class="gallerytext">
20677 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20678 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20679 <div class="gallerytext">
20682 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20683 <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" 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>
20684 <div class="gallerytext">
20685 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20689 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20690 <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" 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>
20691 <div class="gallerytext">
20694 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20695 <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" 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>
20696 <div class="gallerytext">
20704 <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":{}}'>
20705 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20706 <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>
20707 <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>
20708 <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>
20709 <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>
20710 <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>
20715 Gallery (with options, extsrc)
20718 "nativeGallery": false
20721 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20722 File:Nonexistent.jpg|caption
20723 File:Nonexistent.jpg
20724 image:foobar.jpg|some '''caption''' [[Main Page]]
20726 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20729 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20730 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20731 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20732 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20733 <div class="gallerytext">
20738 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20739 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20740 <div class="gallerytext">
20743 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20744 <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" 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>
20745 <div class="gallerytext">
20746 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20750 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20751 <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" 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>
20752 <div class="gallerytext">
20755 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20756 <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" 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>
20757 <div class="gallerytext">
20765 <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"}}'>
20766 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20767 <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>
20768 <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>
20769 <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>
20770 <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>
20771 <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>
20776 Gallery (without px units)
20778 <gallery widths="70" heights="40">
20782 <ul class="gallery mw-gallery-traditional">
20783 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20784 <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" 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>
20785 <div class="gallerytext">
20791 <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"}}'>
20792 <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>
20797 Gallery (with invalid units)
20799 <gallery widths="70em" heights="40em">
20803 <ul class="gallery mw-gallery-traditional">
20804 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20805 <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" 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>
20806 <div class="gallerytext">
20812 <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"}}'>
20813 <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>
20818 Gallery with link that has fragment
20821 "modes": ["wt2html", "html2html"],
20822 "nativeGallery": true
20826 image:foobar.jpg|link=Main_Page
20827 image:foobar.jpg|link=Main_Page#section
20828 image:foobar.jpg|link=Main Page#section|caption
20831 <ul class="gallery mw-gallery-traditional">
20832 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20833 <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" 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>
20834 <div class="gallerytext">
20837 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20838 <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" 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>
20839 <div class="gallerytext">
20842 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20843 <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" 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>
20844 <div class="gallerytext">
20852 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20853 <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>
20854 <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>
20855 <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>
20859 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20861 Gallery with template inside caption
20864 "nativeGallery": true
20867 <gallery caption="{{echo|hi}}">
20868 File:Foobar.jpg|{{echo|ho}}
20871 <ul class="gallery mw-gallery-traditional">
20872 <li class='gallerycaption'>{{echo|hi}}</li>
20873 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20874 <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" 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>
20875 <div class="gallerytext">
20883 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20884 <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>
20885 <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>
20890 Gallery with wikitext inside caption
20893 "nativeGallery": true
20897 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20898 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20901 <ul class="gallery mw-gallery-traditional">
20902 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20903 <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" 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>
20904 <div class="gallerytext">
20905 <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" 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>
20909 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20910 <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" 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>
20911 <div class="gallerytext">
20912 <p>This is a test template
20919 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20920 <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>
20921 <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>
20926 Gallery (with showfilename option)
20929 "nativeGallery": true
20932 <gallery showfilename="">
20933 File:Nonexistent.jpg|caption
20934 File:Nonexistent.jpg
20935 File:Foobar.jpg|some '''caption''' [[Main Page]]
20939 <ul class="gallery mw-gallery-traditional">
20940 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20941 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20942 <div class="gallerytext">
20943 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20948 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20949 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20950 <div class="gallerytext">
20951 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20955 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20956 <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" 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>
20957 <div class="gallerytext">
20958 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20959 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20963 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20964 <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" 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>
20965 <div class="gallerytext">
20966 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20973 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20974 <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>
20975 <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>
20976 <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>
20977 <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>
20981 ## Should Parsoid be preserving these variations? See T151367
20983 Gallery (with namespace-less filenames)
20986 "modes": ["wt2html", "html2html"],
20987 "nativeGallery": true
20991 File:Nonexistent.jpg
20997 <ul class="gallery mw-gallery-traditional">
20998 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20999 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21000 <div class="gallerytext">
21003 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21004 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21005 <div class="gallerytext">
21008 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21009 <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" 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>
21010 <div class="gallerytext">
21013 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21014 <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" 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>
21015 <div class="gallerytext">
21021 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21022 <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>
21023 <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>
21024 <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>
21025 <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>
21030 Gallery override link with wikilink (T36852)
21033 "nativeGallery": true
21037 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21040 <ul class="gallery mw-gallery-traditional">
21041 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21042 <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" 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>
21043 <div class="gallerytext">
21049 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21050 <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>
21055 Gallery override link with absolute external link (T36852)
21058 "nativeGallery": true
21062 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21065 <ul class="gallery mw-gallery-traditional">
21066 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21067 <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" 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>
21068 <div class="gallerytext">
21074 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21075 <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>
21080 Gallery override link with absolute external link with LanguageConverter
21085 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21088 <ul class="gallery mw-gallery-traditional">
21089 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21090 <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" 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>
21091 <div class="gallerytext">
21099 <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"}}'>
21100 <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>
21105 Gallery override link with malicious javascript (T36852)
21108 "modes": ["wt2html", "html2html"],
21109 "nativeGallery": true
21113 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21116 <ul class="gallery mw-gallery-traditional">
21117 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21118 <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" 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>
21119 <div class="gallerytext">
21125 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21126 <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>
21130 # Note that parsoid uses the invalid link as a caption, PHP does not.
21132 Gallery with invalid title as link (T45964)
21135 "modes": ["wt2html", "html2html"],
21136 "nativeGallery": true
21140 File:Foobar.jpg|link=<
21143 <ul class="gallery mw-gallery-traditional">
21144 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21145 <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" 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>
21146 <div class="gallerytext">
21152 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21153 <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>
21158 Serialize gallery without attrs in data-mw
21161 "modes": ["html2wt"],
21162 "nativeGallery": true
21165 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21166 <li class="gallerycaption">123</li>
21167 <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>
21170 <gallery caption="123">
21176 Gallery with class and style attributes
21179 "nativeGallery": true
21182 <gallery class="center" style="text-align: center;">
21186 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
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" 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">
21195 <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":{}}'>
21196 <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>
21201 Gallery in slideshow mode
21204 "nativeGallery": true
21207 <gallery mode="slideshow" showthumbnails="">
21211 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21212 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21213 <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" 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>
21214 <div class="gallerytext">
21220 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21221 <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>
21226 Serialize gallery image captions on a line
21229 "modes": ["html2wt"],
21230 "nativeGallery": true
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;"><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>
21235 <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>
21239 File:Foobar.jpg| hi ho
21240 File:Foobar.jpg|hi<br />ho
21245 HTML Hex character encoding (spells the word "JavaScript")
21247 parsoid=wt2html,wt2wt,html2html
21249 JavaScript
21251 <p>JavaScript
21254 <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>
21258 HTML Hex character encoding bogus encoding (T28437 regression check)
21262 <p>&#xsee;&#XSEE;
21267 HTML Hex character encoding mixed case
21269 parsoid=wt2html,wt2wt,html2html
21276 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21279 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21280 # Note that U+000C (form feed) is not a valid XML character, so
21281 # it is banned even though allowed in HTML5.
21283 Illegal character references (T106578)
21288 ; Control (low): 
21289 ; Control (high):  Ÿ
21290 ; Surrogate: ��
21291 ; This is an okay astral character: 💩
21299 <dt>Control (low)</dt>
21301 <dt>Control (high)</dt>
21302 <dd>&#x7F; &#x9F;</dd>
21304 <dd>&#xD83D;&#xDCA9;</dd>
21305 <dt>This is an okay astral character</dt>
21306 <dd>💩</dd></dl>
21310 __FORCETOC__ override
21322 ISBN 978-0-1234-56 789
21324 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21327 <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>
21331 ISBN followed by 5 spaces
21342 ISBN ISBN 1234567890
21344 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21347 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21350 # Uppercase X and lowercase x as well
21361 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21362 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21363 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21364 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21365 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21366 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21369 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21370 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21371 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21372 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21373 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21374 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21378 ISBN with empty prefix (parsoid test)
21382 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21385 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21389 T24905: <abbr> followed by ISBN followed by </a>
21391 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21393 <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>
21396 <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>
21404 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21407 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21411 Double RFC with a wiki link
21415 <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>
21418 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21426 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21429 <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>
21433 Centre-aligned image
21435 [[Image:foobar.jpg|centre]]
21437 <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" width="1941" height="220" /></a></div></div>
21440 <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>
21446 [[Image:foobar.jpg|none]]
21448 <div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
21451 <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>
21455 Width + Height sized image (using px) (height is ignored)
21457 [[Image:foobar.jpg|640x480px]]
21459 <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" 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>
21462 <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>
21466 Width-sized image (using px, no following whitespace)
21468 [[Image:foobar.jpg|640px]]
21470 <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" 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>
21473 <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>
21477 Width-sized image (using px, with following whitespace - test regression from r39467)
21479 [[Image:foobar.jpg|640px ]]
21481 <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" 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>
21484 <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>
21488 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21490 [[Image:foobar.jpg| 640px]]
21492 <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" 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>
21495 <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>
21499 Image with page parameter
21503 [[File:LoremIpsum.djvu|page=2]]
21505 <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" 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>
21508 <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>
21512 Another italics / bold test
21520 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21526 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21529 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21533 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21535 Images with the "|" character in the comment
21537 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21539 <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" 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>
21542 <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>
21546 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21548 <html><script>alert(1);</script></html>
21550 <p><html><script>alert(1);</script></html>
21555 HTML with raw HTML ($wgRawHtml==true)
21559 <html><script>alert(1);</script></html>
21561 <p><script>alert(1);</script>
21566 Parents of subpages, one level up
21568 subpage title=[[Subpage test/L1/L2/L3]]
21572 <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>
21578 Parents of subpages, one level up, not named
21580 subpage title=[[Subpage test/L1/L2/L3]]
21584 <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>
21591 Parents of subpages, two levels up
21593 subpage title=[[Subpage test/L1/L2/L3]]
21599 <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
21600 </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>
21605 Parents of subpages, two levels up, without trailing slash or name.
21607 subpage title=[[Subpage test/L1/L2/L3]]
21616 Parents of subpages, two levels up, with lots of extra trailing slashes.
21618 subpage title=[[Subpage test/L1/L2/L3]]
21622 <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>
21627 Subpage test/L1/L2/L3Sibling
21633 Transclusion of a sibling page (one level up)
21635 subpage title=[[Subpage test/L1/L2/L3]]
21644 Transclusion of a child page
21646 subpage title=[[Subpage test/L1/L2]]
21654 # This is wt2html only in Parsoid because we add <nowiki>
21655 # because of {{..}} and we don't expect to fix that to
21656 # eliminate the nowikis selective for {{..}} markup.
21658 Non-transclusion because of too many up levels
21660 subpage title=[[Subpage test/L1/L2/L3]]
21663 {{../../../../More than parent}}
21665 <p>{{../../../../More than parent}}
21668 <p>{{../../../../More than parent}}</p>
21672 Definition list code coverage
21686 <dl><dt>title </dt><dd>def</dd>
21687 <dt>title </dt><dd>def</dd>
21688 <dt>title</dt><dd>def</dd></dl>
21692 Don't fall for the self-closing div
21694 <div>hello world</div/>
21696 <div>hello world</div>
21705 <p>[[:Template:Msg]]
21714 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21718 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21720 Always escape literal '>' in output, not just after '<'
21734 <p>This is a test template
21735 This is a test template
21747 Inclusion of !userCanEdit() content
21751 <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>
21757 Out-of-order TOC heading levels
21766 <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>
21768 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21770 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21771 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21774 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21776 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21777 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21783 <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>
21784 <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>
21785 <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>
21786 <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>
21787 <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>
21788 <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>
21794 ISBN with a dummy number
21804 ISBN with space-delimited number
21808 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21811 <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>
21816 ISBN with multiple spaces, no number
21835 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21836 </p><p>ISBN 12345678901
21839 <p>ISBN 123456789</p>
21841 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21843 <p>ISBN 12345678901</p>
21848 ISBN with trailing year (T9110)
21850 ISBN 1-234-56789-0 - 2006
21852 ISBN 1 234 56789 0 - 2006
21854 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21855 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21858 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21860 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21867 wgFragmentMode=[ 'html5', 'legacy' ]
21869 {{anchorencode:foo bar©#%n}}
21874 <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>
21878 anchorencode (legacy)
21880 wgFragmentMode=[ 'legacy' ]
21882 {{anchorencode:foo bar©#%n}}
21884 <p>foo_bar.C2.A9.23.25n
21889 anchorencode trims spaces
21891 wgFragmentMode=[ 'html5', 'legacy' ]
21893 {{anchorencode: __pretty__please__}}
21898 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21902 anchorencode deals with links
21904 wgFragmentMode=[ 'html5', 'legacy' ]
21906 {{anchorencode: [[hello|world]] [[hi]]}}
21911 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21915 anchorencode deals with templates
21917 wgFragmentMode=[ 'html5', 'legacy' ]
21919 {{anchorencode: {{Foo}} x}}
21924 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21928 anchorencode encodes like the TOC generator: (T20431)
21930 wgFragmentMode=[ 'html5', 'legacy' ]
21932 ===_ +:.3A%3A _ &&]] x===
21933 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21936 <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>
21937 <p>+:.3A%3A_&&]]_x
21940 <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>
21941 <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>
21942 <meta property="mw:PageProp/noeditsection"/>
21946 anchorencode encodes like the TOC generator: (T20431) (legacy)
21948 wgFragmentMode=[ 'legacy' ]
21950 ===_ +:.3A%3A&&]]===
21951 {{anchorencode: _ +:.3A%3A&&]] }}
21954 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21955 <p>.2B:.3A.253A.26.26.5D.5D
21960 T8200: blockquotes and paragraph formatting
21981 T10293: Use of center tag ruins paragraph formatting
22002 Parsing of overlapping (improperly nested) inline html tags
22004 <span><s>x</span></s>
22006 <p><span><s>x</span></s></span>
22009 <p><span><s>x</s></span>
22014 ### Language variants related tests
22017 # Parsoid does not mark self-links.
22018 # Parsoid does not convert links; PHP will do any necessary redirects.
22021 Self-link in language variants
22023 title=[[Dunav]] language=sr
22025 Both [[Dunav]] and [[Дунав]] are names for this river.
22027 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22030 <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>
22040 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22042 title=[[Duna]] language=sr
22044 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22046 <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.
22049 <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>
22053 Link to a section of a variant of this title shouldn't be parsed as self-link
22055 title=[[Duna]] language=sr
22057 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22059 <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.
22062 <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>
22066 Link to pages in language variants
22070 Main Page can be written as [[Маин Паге]]
22072 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22075 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22080 Multiple links to pages in language variants
22084 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22086 <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>.
22089 <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>
22094 Simple template in language variants
22100 <p>This is a test template
22106 Template with explicit namespace in language variants
22112 <p>This is a test template
22118 Basic test for template parameter in language variants
22122 {{парамтест|param=foo}}
22124 <p>This is a test template with parameter foo
22129 Simple category in language variants
22133 [[Category:МедиаWики Усер'с Гуиде]]
22135 cat=МедиаWики_Усер'с_Гуиде sort=
22137 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22152 ## We used to, but no longer wt2wt this test since the default serializer
22153 ## will normalize all categories to serialize on their own line.
22154 ## This wikitext usage is going to be fairly uncommon in production and
22155 ## selser will take care of preserving formatting in those scenarios.
22157 Don't convert blue categorylinks to another variant (T35210)
22163 [[A]][[Category:分类]]
22167 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22168 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22172 Stripping -{}- tags (language variants)
22176 Latin proverb: -{Ne nuntium necare}-
22178 <p>Latin proverb: Ne nuntium necare
22181 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22186 Prevent conversion with -{}- tags (language variants)
22188 language=sr variant=sr-ec
22190 Latinski: -{Ne nuntium necare}-
22192 <p>Латински: Ne nuntium necare
22195 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22200 Prevent conversion of text with -{}- tags (language variants)
22202 language=sr variant=sr-ec
22204 Latinski: -{Ne nuntium necare}-
22206 <p>Латински: Ne nuntium necare
22209 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22214 Prevent conversion of links with -{}- tags (language variants)
22216 language=sr variant=sr-ec
22220 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22223 <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>
22228 -{}- tags within headlines (within html for parserConvert())
22230 wgFragmentMode=[ 'html5', 'legacy' ]
22232 language=sr variant=sr-ec
22236 Note that even an unprotected headline ID is not affected by language
22241 <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>
22242 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22245 <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>
22248 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22250 <p>Note that even an unprotected headline ID is not affected by language
22253 <h2 id="Latinski">Latinski</h2>
22257 Explicit definition of language variant alternatives
22259 language=zh variant=zh-tw
22261 -{zh:China;zh-tw:Taiwan}-, not China
22263 <p>Taiwan, not China
22266 <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>
22270 Filter syntax for language variants
22272 language=zh variant=zh-tw
22274 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22276 <p>fooblog, WEBJOURNAL, WEBLOGquux
22279 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22282 # Note that Parsoid post-processing for language variants needs to
22283 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22285 Conversion around HTML tags
22287 language=sr variant=sr-ec
22289 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22290 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22293 <span title="ЛаCтин">ски</span>
22296 <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"}]}'/>
22297 <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>
22301 Explicit session-wise two-way language variant mapping (A flag and - flag)
22303 language=zh variant=zh-tw
22305 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22307 Taiwan is not China.
22309 But -{A|zh:China; zh-tw:Taiwan}- is China,
22311 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22313 and -{China}- is China.
22315 <p>This is Taiwan, but we'll forget that now.
22316 </p><p>Taiwan is not China.
22317 </p><p>But Taiwan is Taiwan,
22318 </p><p>(This should be stripped!)
22319 </p><p>and China is China.
22322 <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>
22323 <p>Taiwan is not China.</p>
22324 <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>
22325 <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>
22326 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22330 Explicit session-wise one-way language variant mapping (A flag and - flag)
22332 language=zh variant=zh-tw
22334 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22336 COUNTRY is China or Taiwan.
22338 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22340 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22342 and -{COUNTRY}- is COUNTRY.
22344 <p>This is Taiwan, but we'll forget that now.
22345 </p><p>COUNTRY is China or Taiwan.
22346 </p><p>But Taiwan is Taiwan,
22347 </p><p>(This should be stripped!)
22348 </p><p>and COUNTRY is COUNTRY.
22351 <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>
22352 <p>COUNTRY is China or Taiwan.</p>
22353 <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>
22354 <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>
22355 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22359 Explicit session-wise two-way language variant mapping (H flag for hide)
22361 language=zh variant=zh-tw
22363 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22367 <p>(This should be stripped!)
22368 </p><p>Taiwan is Taiwan.
22371 <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>
22372 <p>Taiwan is China.</p>
22376 Explicit session-wise one-way language variant mapping (H flag for hide)
22378 language=zh variant=zh-tw
22380 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22382 COUNTRY is Taiwan or China.
22384 <p>(This should be stripped!)
22385 </p><p>Taiwan is Taiwan or China.
22388 <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>
22389 <p>COUNTRY is Taiwan or China.</p>
22392 ## Note that parsoid test runner does not support 'showtitle' option.
22394 Adding explicit conversion rule for title (T flag)
22396 language=zh variant=zh-tw showtitle
22398 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22403 <p>Should be stripped!
22404 </p><p>Taiwan is China.
22407 <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>
22408 <p>Taiwan is China.</p>
22412 Code coverage: T combined with H flag
22414 language=zh variant=zh-tw showtitle
22416 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22421 <p>Should be stripped!
22422 </p><p>Taiwan is Taiwan.
22425 <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>
22426 <p>Taiwan is China.</p>
22430 Code coverage: T with no variants
22432 language=zh variant=zh-tw showtitle
22434 -{H|zh:China; zh-tw:Taiwan}-
22435 Taiwan is China.-{T|Taiwan is China}-
22442 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22443 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22447 Code coverage: rules with no variants
22449 language=zh variant=zh-tw
22451 -{H|zh:China; zh-tw:Taiwan}-
22462 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22464 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22465 Taiwan is China.</p>
22470 Code coverage: D flag for conversion rule
22472 language=zh variant=zh-tw
22474 -{D|zh-cn:XA; zh-tw:YA}-
22475 -{A;D|zh-cn:XB; zh-tw:YB}-
22476 -{D;H|zh-cn:XC; zh-tw:YC}-
22478 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22484 XA XB XC YA YB YC FOO BAR BAT 012345
22489 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22493 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22496 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22497 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22498 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22499 <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>
22500 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22501 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22502 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22503 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22507 Code coverage: N flag for conversion rule
22509 language=zh variant=zh-cn
22519 </p><p>српски (ћирилица)
22522 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22523 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22524 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22527 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22529 Code coverage: N flag for conversion rule (wt2html only)
22531 language=zh variant=zh-cn
22532 parsoid=wt2html,html2html
22539 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22543 Testing that changing the language variant here in the tests actually works
22545 language=zh variant=zh showtitle
22547 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22550 <p>Should be stripped!
22553 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22557 Recursive conversion of alt and title attrs shouldn't clear converter state
22559 language=zh variant=zh-cn
22562 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22563 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22567 Should be stripped<span title="Exclamation">!</span>
22570 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22571 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>
22575 T26072: more test on conversion rule for title
22577 language=zh variant=zh-tw showtitle
22579 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22581 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22584 <p>This should be stripped!
22585 </p><p>This won't take interferes with the title rule.
22588 <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>
22589 <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>
22593 Partly disable title conversion if variant == main language code
22595 language=zh variant=zh title=[[ZH]] showtitle
22597 -{T|zh-cn:CN;zh-tw:TW}-
22603 <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>
22607 Partly disable title conversion if variant == main language code, more
22609 language=zh variant=zh title=[[ZH]] showtitle
22617 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22621 Raw output of variant escape tags (R flag)
22623 language=zh variant=zh-tw
22625 Raw: -{R|zh:China;zh-tw:Taiwan}-
22627 <p>Raw: zh:China;zh-tw:Taiwan
22630 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22633 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22635 Raw output of variant escape tags (R flag) (wt2html only)
22637 language=zh variant=zh-tw
22638 parsoid=wt2html,html2html
22640 -{Variant}- -{D|syntax}- -{D;R|options}-
22642 <p>Variant syntax options
22645 <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>
22649 Nested markup inside raw output of variant escape tags (R flag)
22651 language=zh variant=zh-tw
22653 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22655 <p>Nested raw: nested Taiwan nested
22658 <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>
22662 Nested markup and spaces inside raw output of variant escape tags (R flag)
22664 language=zh variant=zh-tw
22666 X-{ outer -{ inner }- outer }-X
22668 <p>X outer inner outer X
22671 <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>
22675 Templates inside raw output of variant escape tags (R flag)
22677 language=zh variant=zh-tw
22679 Nested raw: -{R|nested {{echo|hi}} templates}-
22681 <p>Nested raw: nested hi templates
22684 <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>
22688 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22690 language=zh variant=zh-cn
22692 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22697 <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>
22701 Conversion rules from [numeric-only string] to [something else] (T48634)
22703 language=zh variant=zh-cn
22705 -{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
22710 <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>
22714 Two-way converter rule entries with an empty value should be ignored (T53551)
22716 language=zh variant=zh-cn
22718 -{H|zh-cn:foo;zh-tw:;}-foobar
22723 <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>
22727 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22729 language=zh variant=zh-cn
22731 -{H|=>zh-cn:foo;}-foobar
22736 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22740 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22742 language=zh variant=zh-cn
22749 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22753 Nested using of manual convert syntax
22755 language=zh variant=zh-hk
22757 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22759 <p>Nested: Hello Hong Kong!
22762 <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>
22766 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22768 language=zh variant=zh-cn
22770 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22772 <p><span title="X">A</span>
22775 <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>
22779 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22781 language=zh variant=zh-cn
22783 -{<span title="-{X}-">A</span>}-
22784 !! html/php+disabled
22785 <p><span title="X">A</span>
22788 <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>
22791 # Parsoid and PHP disagree on how to parse this example: Parsoid
22792 # insists that the content of a language converter element be a valid
22793 # DOM fragment or attribute string
22795 Language converter markup with block content
22797 language=zh variant=zh-cn
22799 <span>a-{b<div>c}-d
22801 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22803 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22808 </span></div></span></div></span>
22810 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><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><p>d</p>
22812 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><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><p>d</p>
22814 <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>
22818 LanguageConverter selser (1)
22820 language=zh variant=zh-cn
22822 "modes": ["wt2wt", "selser"],
22824 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22834 LanguageConverter selser (2)
22836 language=zh variant=zh-cn
22838 "modes": ["wt2wt", "selser"],
22840 ["span[class='x']", "contents", "text", "-{foo}-"],
22841 ["a", "contents", "text", "-{"],
22842 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22846 <span class="x">TEXT1</span>
22847 [http://example.com TEXT2]
22851 <span class="x"><nowiki>-{foo}-</nowiki></span>
22852 [http://example.com -{]
22853 [[Foo|<nowiki>-{</nowiki>]]
22854 {{1x|<nowiki>-{</nowiki>}}
22857 # Tests LanguageVariantText in ConstrainedText
22859 LanguageConverter selser (3)
22861 language=zh variant=zh-cn
22863 "modes": ["wt2wt", "selser"],
22865 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22866 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22877 |<nowiki/>-{edited}-
22881 # Tests LanguageVariantText._fromSelSer
22883 LanguageConverter selser (4)
22885 language=zh variant=zh-cn
22887 "modes": ["wt2wt", "selser"],
22889 ["td > span.x", "remove"]
22895 |<span class="x">Foo</span>-{Bar}-
22896 ||<span class="x">Foo</span>-{Bar}-
22906 # Since Parsoid is starting to emit canonical wikitext for links,
22907 # [http://example.com http://example.com] will not RT back to that
22909 # Parsoid does not language-convert links (it is done in a
22910 # post-processing step)
22912 Proper conversion of text in external links
22914 language=sr variant=sr-ec
22917 http://www.google.com
22918 gopher://www.google.com
22919 [http://www.google.com http://www.google.com]
22920 [gopher://www.google.com gopher://www.google.com]
22921 [https://www.google.com irc://www.google.com]
22922 [ftp://www.google.com www.google.com/ftp://dir]
22923 [//www.google.com www.google.com]
22925 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22926 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22927 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22928 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22929 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22930 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22931 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22934 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22935 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22936 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
22937 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22938 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22939 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22940 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22944 Do not convert roman numbers to language variants
22946 language=sr variant=sr-ec
22950 <p>Фридрих IV је цар.
22953 <p>Fridrih IV je car.</p>
22957 Unclosed language converter markup "-{"
22968 Don't convert raw rule "-{R|=>}-" to "=>"
22977 <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>
22981 Don't break link parsing if language converter markup is in the caption.
22983 language=sr variant=sr-ec
22985 [[Main Page|-{R|main page}-]]
22987 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22990 <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>
22994 T146304: Don't break template parsing if language converter markup is in the parameter.
22996 language=sr variant=sr-ec
23003 <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>
23007 T146305: Don't break image parsing if language converter markup is in the caption.
23011 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23013 <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" 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>
23016 <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>
23020 T146305: Don't break image parsing if nested language converter markup is in the caption.
23022 language=zh variant=zh-cn
23024 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23026 <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" 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>
23029 <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>
23032 # XXX html2wt disabled because rich markup in alt is not preserved.
23034 Don't break gallery if language converter markup is inside.
23039 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23040 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23043 <ul class="gallery mw-gallery-traditional">
23044 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23045 <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" 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>
23046 <div class="gallerytext">
23047 <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" 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>
23051 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23052 <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" 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>
23053 <div class="gallerytext">
23054 <p>This is a test template
23061 <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"}}'>
23062 <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>
23063 <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>
23068 T153135: Don't break list handling if language converter markup is in the item.
23070 language=zh variant=zh-cn
23072 ;-{zh-cn:AAA;zh-tw:BBB}-
23076 <dt>foo:bar</dt></dl>
23079 <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>
23080 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23084 // Note that parsoid does not protect colons unless language converter
23085 // markup is properly nested, because it is a backtracking parser.
23087 T153135: Unclosed markup in definition list (code coverage)
23089 language=zh variant=zh-cn
23094 <dl><dt><b>foo:bar</b></dt><b>
23095 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23098 <dl><dt data-parsoid='{"dsr":[0,11,1,0]}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23099 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
23100 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
23105 T153135: Nested language converter markup in definition list (code coverage)
23107 language=zh variant=zh-cn
23109 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23111 <dl><dt>AAA foo:bar bat:baz</dt>
23115 <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>
23116 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23120 # html2wt mode disabled due to <nowiki> insertion.
23122 T153140: Don't break table handling if language converter markup is in the cell.
23124 language=sr variant=sr-ec
23125 parsoid=wt2html,wt2wt,html2html
23142 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23149 Language converter tricky html2wt cases (1)
23152 parsoid=html2wt,wt2wt
23154 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23156 -{<nowiki>}-</nowiki>}-
23163 Language converter tricky html2wt cases (2)
23166 parsoid=html2wt,wt2wt
23170 <nowiki>-{foo}-</nowiki>
23172 <p>-{foo}-
23177 Language converter tricky html2wt cases (3)
23180 parsoid=html2wt,wt2wt
23182 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23183 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23184 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23190 -{<nowiki>-{foo}-</nowiki>}-
23194 </p><p>-{foo}-
23199 Language converter tricky html2wt cases (4)
23202 parsoid=html2wt,wt2wt
23204 <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>
23212 # Note that the <nowiki> escaping added by parsoid for source text,
23213 # destination text, and language names only works on the PHP side
23214 # for *destination text*. (HTML entity escaping wouldn't work
23215 # any better.) This is probably a bug, at least for source texts.
23216 # (For language names PHP uses a precise regexp based on the languages
23217 # it currently knows have variants, which is fragile since this set
23218 # can grow/shrink over time.)
23220 Language converter tricky html2wt cases (5)
23222 language=zh variant=zh-cn
23224 <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>
23225 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23226 <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>
23227 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23230 -{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
23232 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23234 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23236 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23239 !! html/php+disabled
23240 <p>foobat;xyz=>zh-cn:abc
23244 </p><p>a:b=>c 0;zh-tw:bar
23249 T179579: Nowiki and lc interaction
23256 -{123<nowiki>|</nowiki>456}-
23258 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23260 <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>
23264 T2529: Uncovered bullet
23274 T2529: Uncovered bullet in a deeply nested list
23276 *******Foo {{bullet}}
23278 <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>
23284 T2529: Uncovered table already at line-start
23307 T2529: Uncovered bullet in parser function result
23309 *Foo {{lc:{{bullet}} }}
23317 T7678: Double-parsed template argument
23319 {{lc:{{{1}}}|hello}}
23326 T7678: Double-parsed template invocation
23328 {{lc:{{paramtest {{!}} param = hello }} }}
23330 <p>{{paramtest | param = hello }}
23335 Case insensitivity of parser functions for non-ASCII characters (T10143)
23338 title=[[Main Page]]
23340 {{PRVNÍVELKÉ:ěščř}}
23341 {{prvnívelké:ěščř}}
23361 Morwen/13: Unclosed link followed by heading
23368 <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>
23373 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23380 <h1><span class="mw-headline" id="heading">heading</span></h1>
23385 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23392 <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>
23407 Paragraphs inside divs (no extra line breaks)
23419 Paragraphs inside divs (extra line break on open)
23434 Paragraphs inside divs (extra line break on close)
23449 Paragraphs inside divs (extra line break on open and close)
23465 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23466 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23468 Nesting tags, paragraphs on lines which begin with <div>
23470 <div></div><strong>A
23473 <div></div><p><strong>A
23474 </strong></p><strong></strong><p><strong>B</strong>
23483 # T8200: <blockquote> should behave like <div> with respect to line breaks
23485 T8200: paragraphs inside blockquotes (no extra line breaks)
23487 <blockquote>Line one
23489 Line two</blockquote>
23491 <blockquote>Line one
23492 Line two</blockquote>
23495 <blockquote><p>Line one
23496 Line two</p></blockquote>
23500 T8200: paragraphs inside blockquotes (extra line break on open)
23505 Line two</blockquote>
23510 Line two</blockquote>
23516 Line two</p></blockquote>
23519 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23521 T8200: paragraphs inside blockquotes (extra line break on close)
23523 <blockquote>Line one
23528 <blockquote>Line one
23534 <blockquote><p>Line one
23541 T8200: paragraphs inside blockquotes (extra line break on open and close)
23557 ## This is a corner case interaction between the paragraph wrapping in the
23558 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
23559 ## some tags which close paragraphs (and thus prevent wrapping on their line),
23560 ## of which "div" is one, but do p-wrapping inside them. These are referred
23561 ## to as "never suppressing". Remex, for its part, doesn't traverse into
23562 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
23564 Paragraphs inside blockquotes/divs (no extra line breaks)
23566 <blockquote><div>Line one
23568 Line two</div></blockquote>
23570 <blockquote><div>Line one
23571 Line two</div></blockquote>
23576 Paragraphs inside blockquotes/divs (extra line break on open)
23581 Line two</div></blockquote>
23586 Line two</div></blockquote>
23591 Paragraphs inside blockquotes/divs (extra line break on close)
23593 <blockquote><div>Line one
23596 </div></blockquote>
23598 <blockquote><div>Line one
23601 </div></blockquote>
23606 Paragraphs inside blockquotes/divs (extra line break on open and close)
23612 </div></blockquote>
23618 </div></blockquote>
23623 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23625 wgLinkHolderBatchSize=0
23631 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23632 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23633 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23638 Free external link invading image caption
23640 [[Image:Foobar.jpg|thumb|http://x|hello]]
23642 <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" 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>
23645 <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>
23649 T17196: localised external link numbers
23653 [http://en.wikipedia.org/]
23655 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23658 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23662 Multibyte character in padleft
23664 {{padleft:-Hello|7|Æ}}
23669 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23673 Multibyte character in padright
23675 {{padright:Hello-|7|Æ}}
23680 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23684 formatdate parser function
23686 {{#formatdate:2009-03-24}}
23688 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23693 formatdate parser function, with default format
23695 {{#formatdate:2009-03-24|mdy}}
23697 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23702 Spacing of numbers in formatted dates
23704 {{#formatdate:January 15}}
23706 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23711 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
23713 language=nl title=[[MediaWiki:Common.css]]
23715 {{#formatdate:2009-03-24|dmy}}
23717 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23730 Edit comment with link
23734 I like the [[Main Page]] a lot
23736 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23740 Edit comment with link and link text
23744 I like the [[Main Page|best pages]] a lot
23746 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23750 Edit comment with link and link text with suffix
23754 I like the [[Main Page|best page]]s a lot
23756 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23760 Edit comment with section link (non-local, eg in history list)
23762 comment title=[[Main Page]]
23764 /* External links */ removed bogus entries
23766 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23770 Edit comment with section link and text before it (non-local, eg in history list)
23772 comment title=[[Main Page]]
23774 pre-comment text /* External links */ removed bogus entries
23776 pre-comment text <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23780 Edit comment with section link (local, eg in diff view)
23782 comment local title=[[Main Page]]
23784 /* External links */ removed bogus entries
23786 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23790 Edit comment with subpage link (T16080)
23794 title=[[Subpage test]]
23796 Poked at a [[/subpage]] here...
23798 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23802 Edit comment with subpage link and link text (T16080)
23806 title=[[Subpage test]]
23808 Poked at a [[/subpage|neat little page]] here...
23810 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23814 Edit comment with bogus subpage link in non-subpage NS (T16080)
23817 title=[[Subpage test]]
23819 Poked at a [[/subpage]] here...
23821 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23825 Edit comment with bare anchor link (local, as on diff)
23829 title=[[Main Page]]
23833 <a href="#section">#section</a>
23837 Edit comment with bare anchor link (non-local, as on history)
23840 title=[[Main Page]]
23844 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23848 Anchor starting with underscore
23854 <p><a href="#_ref">One</a>
23857 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23861 Id starting with underscore
23863 <div id="_ref"></div>
23865 <div id="_ref"></div>
23870 Edit comment with link with more than one pipe (T99346)
23874 [[Main Page|Many|pipes]]
23876 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23880 Complex edit comment with link with more than one pipe (T99346)
23884 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23886 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..."
23890 Space normalisation on autocomment (T24784)
23893 title=[[Main Page]]
23895 /* __hello__world__ */
23897 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23901 percent-encoding and + signs in comments (T28410)
23905 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23907 <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>
23910 # Parsoid doesn't support this yet: see T75581
23911 # but it *should* omit the 'src' attribute if the image is bad.
23912 # PHP side of tests was disabled in
23913 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23914 # because of issues in the PHP parserTests infrastructure
23915 # (but the output below is indeed what the PHP side emits)
23917 Bad images - basic functionality
23920 !! html/php+disabled
23922 <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>
23926 Bad images - T18039: text after bad image disappears
23931 !! html/php+disabled
23937 <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>
23942 Verify that displaytitle works (T24501) no displaytitle
23946 wgAllowDisplayTitle=true
23947 wgRestrictDisplayTitle=false
23949 this is not the the title
23952 <p>this is not the the title
23957 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23962 wgAllowDisplayTitle=true
23963 wgRestrictDisplayTitle=false
23965 this is not the the title
23966 {{DISPLAYTITLE:whatever}}
23969 <p>this is not the the title
23974 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23979 wgAllowDisplayTitle=true
23980 wgRestrictDisplayTitle=true
23982 this is not the the title
23983 {{DISPLAYTITLE:whatever}}
23986 <p>this is not the the title
23991 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23996 wgAllowDisplayTitle=true
23997 wgRestrictDisplayTitle=true
23999 this is not the the title
24000 {{DISPLAYTITLE:screen}}
24003 <p>this is not the the title
24008 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24013 wgAllowDisplayTitle=false
24015 this is not the the title
24016 {{DISPLAYTITLE:screen}}
24019 <p>this is not the the title
24020 <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>
24025 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24030 wgAllowDisplayTitle=false
24032 this is not the the title
24035 <p>this is not the the title
24040 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24045 wgAllowDisplayTitle=true
24046 wgRestrictDisplayTitle=true
24048 this is not the the title
24049 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24051 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24052 <p>this is not the the title
24057 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24062 wgAllowDisplayTitle=true
24063 wgRestrictDisplayTitle=true
24065 this is not the the title
24066 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24068 <span style="color: red;">s</span>creen
24069 <p>this is not the the title
24074 Page status indicators: Empty name is invalid
24078 <indicator name=" "></indicator>
24079 <indicator></indicator>
24081 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24082 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24087 Page status indicators: Weird syntaxes that are okay
24091 <indicator name="empty" />
24092 <indicator name="name"></indicator>
24101 Page status indicators: Torture test
24105 <indicator name="01">hello world</indicator>
24106 <indicator name="02">[[Main Page]]</indicator>
24107 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24108 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24109 <indicator name="05">*foo
24111 <indicator name="06"><nowiki>foo</nowiki></indicator>
24112 <indicator name="07"> Preformatted</indicator>
24113 <indicator name="08"><div>Broken tag</indicator>
24114 <indicator name="09">{| class=wikitable
24117 <indicator name="10">Two
24119 paragraphs</indicator>
24122 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24123 03=<img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" 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" />
24124 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" 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>
24125 05=<ul><li>foo</li>
24129 07=<pre>Preformatted
24131 08=<div>Broken tag</div>
24133 09=<table class="wikitable">
24150 preload: check <noinclude> and <includeonly>
24154 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24160 preload: check <onlyinclude>
24164 Goodbye <onlyinclude>Hello world</onlyinclude>
24170 preload: can pass tags through if we want to
24174 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24176 <includeonly>Hello world</includeonly>
24180 preload: check that it doesn't try to do tricks
24184 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24186 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24190 Play a bit with r67090 and T5158
24192 <div style="width:50% !important"> </div>
24193 <div style="width:50% !important"> </div>
24194 <div style="width:50% !important"> </div>
24195 <div style="border : solid;"> </div>
24197 <div style="width:50% !important"> </div>
24198 <div style="width:50% !important"> </div>
24199 <div style="width:50% !important"> </div>
24200 <div style="border : solid;"> </div>
24203 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24204 <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>
24205 <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>
24206 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24211 French spaces in wikitext
24213 foo ! bar ? bat 50 % is less than 75 %.
24215 Hello : this ; is « something ‹ else › again »
24217 <p>foo ! bar ? bat 50 % is less than 75 %.
24218 </p><p>Hello : this ; is « something ‹ else › again »
24222 # It would be reasonable for Parsoid and PHP to differ here.
24223 # The PHP behavior is arguably a bug.
24225 Corner case: french spaces in definition list
24229 <dl><dt>foo </dt>
24234 T5158: Test for French spaces in attributes
24236 <br style=" clear : both ; " />
24238 <p><br style="clear : both ;" />
24243 HTML5 data attributes
24245 <span data-foo="bar">Baz</span>
24246 <p data-abc-def_hij="">Quuz</p>
24248 <p><span data-foo="bar">Baz</span>
24250 <p data-abc-def_hij="">Quuz</p>
24253 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24254 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24258 Strip reserved data attributes
24260 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24262 <div data-ok="fred">d</div>
24265 <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>
24269 percent-encoding and + signs in internal links (T28410)
24271 [[User:+%]] [[Page+title%]]
24272 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24273 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24274 [[%33%45]] [[%33%45+]]
24276 <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>
24277 <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>
24278 <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>
24279 <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>
24282 <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>
24283 <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>
24284 <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>
24285 <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>
24289 Special characters in embedded file links (T29679)
24291 [[File:Contains & ampersand.jpg]]
24292 [[File:Does not exist.jpg|Title with & ampersand]]
24294 <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>
24295 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24298 <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>
24299 <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>
24303 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24305 Text's been normalized?
24307 <p>Text's been normalized?
24312 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24314 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24316 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24321 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24323 [http://www.example.org/ ideograms]
24325 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24330 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24332 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24334 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24358 T33098 Template which includes system messages which includes the template
24362 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24363 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24368 T33490 Turkish: ucfirst 'blah'
24379 T33490 Turkish: ucfirst 'ix'
24390 T33490 Turkish: lcfirst 'BLAH'
24401 T33490 Turkish: ucfırst (with a dotless i)
24407 <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>
24412 T33490 ucfırst (with a dotless i) with English language
24418 <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>
24422 # Note that Parsoid doesn't emit an explicit TOC.
24423 # Note also that the html2wt direction tends to emit an extra newline
24424 # between the __TOC__ magicword and the first heading unless *both*
24425 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24429 T28375: TOC with italics
24431 title=[[Main Page]]
24434 ==''Lost'' episodes==
24436 <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>
24438 <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>
24442 <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>
24445 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24446 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24450 T28375: TOC with bold
24452 title=[[Main Page]]
24455 =='''should be bold''' then normal text==
24457 <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>
24459 <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>
24463 <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>
24466 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24467 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24471 T35845: Headings become cursive in TOC when they contain an image
24473 title=[[Main Page]]
24476 ==Image [[Image:foobar.jpg]]==
24478 <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>
24480 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24484 <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" 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>
24487 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24488 <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>
24492 T35845 (2): Headings become bold in TOC when they contain a blockquote
24494 title=[[Main Page]]
24497 ==<blockquote>Quote</blockquote>==
24499 <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>
24501 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24505 <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>
24508 <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>
24510 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24514 <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>
24516 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24517 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24521 Unclosed tags in TOC
24523 wgFragmentMode=[ 'html5', 'legacy' ]
24525 title=[[Main Page]]
24529 <small>Hanc marginis exiguitas non caperet.</small>
24532 <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>
24534 <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>
24538 <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>
24539 <p><small>Hanc marginis exiguitas non caperet.</small>
24543 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24544 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24545 <p><small>Hanc marginis exiguitas non caperet.</small>
24550 Multiple tags in TOC
24553 ==<i>Foo</i> <b>Bar</b>==
24555 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24557 <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>
24559 <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>
24560 <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>
24564 <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>
24565 <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>
24568 <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>
24570 <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>
24571 <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>
24575 <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>
24576 <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>
24578 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24579 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24581 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24584 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24585 # html5 tag parsing.
24587 Tags with parameters in TOC
24592 ==<sup class="in-h2">Hello</sup>==
24594 ==<sup class="a > b">Evilbye</sup>==
24596 <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>
24598 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24599 <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>
24603 <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>
24604 <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>
24607 <meta property="mw:PageProp/toc" />
24608 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24610 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24614 span tags with directionality in TOC
24617 ==<span dir="ltr">C++</span>==
24619 ==<span dir="rtl">זבנג!</span>==
24621 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24623 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24625 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24627 <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>
24629 <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>
24630 <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>
24631 <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>
24632 <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>
24633 <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>
24637 <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>
24638 <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>
24639 <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>
24640 <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>
24641 <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>
24644 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24645 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24646 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24647 <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>
24648 <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>
24649 <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>
24653 T74884: bdi element in ToC
24656 ==<bdi>test</bdi>==
24658 <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>
24660 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24664 <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>
24667 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24668 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24672 T35715: s/strike element in ToC
24675 ==<s>test</s> test <strike>test</strike>==
24677 <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>
24679 <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>
24683 <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>
24686 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24687 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24691 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24696 <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>
24698 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24702 <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>
24705 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24706 <h2 id="x" data-parsoid='{}'>x</h2>
24712 == {{int:headline_sample}} ==
24716 T34057: Title needed when expanding <h> nodes.
24718 title=[[Main Page]]
24722 <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>
24727 Strip marker in urlencode
24729 {{urlencode:x<nowiki/>y}}
24730 {{urlencode:x<nowiki/>y|wiki}}
24731 {{urlencode:x<nowiki/>y|path}}
24732 {{urlencode:x<pre id="one">two</pre>y}}
24760 Strip marker in formatNum
24762 {{formatnum:1<nowiki/>2}}
24763 {{formatnum:1<nowiki/>2|R}}
24771 Check noCommafy in formatNum
24775 {{formatnum:123456.78}}
24776 {{formatnum:123456.78|NOSEP}}
24784 Wrong option for formatNum (T58199)
24786 {{formatnum:1,234.56|Random}}
24787 {{formatnum:1,234.56|EVERYTHING}}
24788 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24797 Strip marker in grammar
24801 {{grammar:elative|foo<nowiki/>bar}}
24808 Strip marker in padleft
24810 {{padleft:|2|x<nowiki/>y}}
24817 Strip marker in padright
24819 {{padright:|2|x<nowiki/>y}}
24826 Strip marker in anchorencode
24828 {{anchorencode:x<nowiki/>y}}
24833 <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>
24837 nowiki inside link inside heading (T20295)
24839 ==[[foo|x<nowiki>y</nowiki>z]]==
24841 <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>
24846 new support for bdi element (T33817)
24848 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24850 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24855 Ignore pipe between table row attributes
24859 |- id=foo | style='color: red'
24867 <tr id="foo" style="color: red">
24874 Language parser function
24883 Padleft and padright (default 0-padding)
24892 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24893 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24897 Padleft and padright (partial fill)
24899 {{padleft:xyz|6|ab}}
24900 {{padright:xyz|6|ab}}
24906 <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>
24907 <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>
24911 Padleft and padright as substr
24913 {{padleft:|3|abcde}}
24914 {{padright:|3|abcde}}
24920 <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>
24921 <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>
24925 Padleft and padright with non-numerical length (T180403)
24927 {{padleft:abcdef|junk}}
24928 {{padright:abcdef|junk}}
24936 Special parser function
24938 {{#special:RandomPage}}
24939 {{#special:BaDtItLe}}
24940 {{#special:Foobar}}
24949 T36939 - Case insensitive link parsing ([HttP://])
24951 [HttP://MediaWiki.Org/]
24953 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24956 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24960 T36939 - Case insensitive link parsing ([HttP:// title])
24962 [HttP://MediaWiki.Org/ MediaWiki]
24964 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24969 T36939 - Case insensitive link parsing (HttP://)
24971 HttP://MediaWiki.Org/
24973 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24976 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24994 <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>
24995 <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>
24996 <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>
24997 <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>
24998 <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>
25004 ### Parsoid-specific tests
25005 ### Parsoid-PHP parser incompatibilities
25008 1. SOL-sensitive wikitext tokens as template-args
25010 parsoid=wt2html,wt2wt
25016 <span about="#mwt1" typeof="mw:Transclusion">
25017 </span><ul about="#mwt1"><li>a</li>
25019 <span about="#mwt2" typeof="mw:Transclusion">
25020 </span><ol about="#mwt2"><li>a</li>
25022 <span about="#mwt3" typeof="mw:Transclusion">
25023 </span><dl about="#mwt3"><dd>a</dd>
25027 #### -----------------------------------------------------------------
25028 #### Parsoid-specific functionality tests
25029 #### -----------------------------------------------------------------
25031 # T65642/T68749: Formatting elt fixup around images is cleaned up.
25032 # We know wt2wt will fail, but we expect selser to pass.
25033 # Due to the nature of our testing, wt2wt and selser tests will enter the
25034 # blacklist and we'll catch selser regressions based on changes to the
25035 # blacklist entries for selser tests.
25037 1. Bad treebuilder fixup of formatting elt is cleaned up
25039 parsoid=wt2html,wt2wt
25044 [[Image:Foobar.jpg|right|Test]]
25051 <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>
25058 2. Bad treebuilder fixup of formatting elt is cleaned up
25060 parsoid=wt2html,wt2wt
25062 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25064 <small>[[Image:Foobar.jpg|right|300px]]</small>
25068 <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><b>caption</b></figcaption></figure>
25070 <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>
25074 3. Bad treebuilder fixup of formatting elt is cleaned up
25076 parsoid=wt2html,wt2wt
25078 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25080 <p><small><b>foo</b></small></p>
25081 <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><small><b>caption</b></small></figcaption></figure>
25082 <p><small><b>bar</b></small></p>
25086 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
25088 parsoid=wt2html,wt2wt
25090 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25092 <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>
25095 #### ----------------------------------------------------------------
25096 #### Parsoid-only testing of Parsoid's impl of LST
25097 #### Not implemented yet, see
25098 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25099 #### ----------------------------------------------------------------
25101 ## We still need to support serializing the older format while content is stored.
25103 LST Sections: Backwards compatibility
25106 "suppressErrors": true,
25107 "modes": ["html2wt"]
25110 <section begin="2011-05-16" />
25111 <section end="2014-04-10 (MW 1.23wmf22)" />
25113 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25114 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25118 LST Sections: Newfangled approach
25120 <section begin="2011-05-16" />
25121 <section end="2014-04-10 (MW 1.23wmf22)" />
25123 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
25125 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
25129 #--------- Test stripping of empty nodes in template content ----------
25132 Empty LI and TR nodes should be stripped from template content
25137 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25141 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25154 Empty LI and TR nodes should not be stripped from top-level content
25168 <li class='mw-empty-elt'></li>
25173 <tr class='mw-empty-elt'></tr>
25182 Empty TR nodes should not be stripped if they have any attributes set
25184 {{EmptyTRWithHTMLAttrTest}}
25186 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25187 <tr align='center'></tr>
25188 <tr><td>foo</td></tr>
25189 <tr align='center'></tr>
25190 <tr><td>bar</td></tr>
25194 #### ----------------------------------------------------------------
25195 #### The following section of tests are primarily to test
25196 #### wikitext escaping capabilities of Parsoid. Given that
25197 #### escaping can be done any number of ways, the wikitext (input)
25198 #### is always adjusted to reflect how Parsoid adds nowiki
25201 #### We are marking several tests as parsoid-only since the
25202 #### HTML in the result section is different from what the
25203 #### PHP parser generates for it.
25204 #### ----------------------------------------------------------------
25207 #### --------------- Headings ---------------
25209 #### 1. Nested inside html <h1>=foo=</h1>
25210 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25211 #### 3. Nested inside html with wikitext split by html tags
25212 #### 4. No escape needed
25213 #### 5. Empty headings <h1></h1>
25214 #### 6. Heading chars in SOL context
25215 #### ----------------------------------------
25217 Headings: 0. Unnested
25227 <p>=foo<i>a</i>=</p>
25229 <nowiki>=foo=</nowiki>
25231 <nowiki> </nowiki>=foo=
25233 <nowiki>=foo=</nowiki>
25235 =foo''a''<nowiki>=</nowiki>
25238 # New headings and existing headings are handled differently
25240 Headings: 1. Nested inside html
25248 <h1 data-parsoid=''>=foo=</h1>
25249 <h2 data-parsoid=''>=foo=</h2>
25250 <h3 data-parsoid=''>=foo=</h3>
25251 <h4 data-parsoid=''>=foo=</h4>
25252 <h5 data-parsoid=''>=foo=</h5>
25253 <h6 data-parsoid=''>=foo=</h6>
25261 =<nowiki>=foo=</nowiki>=
25262 ==<nowiki>=foo=</nowiki>==
25263 ===<nowiki>=foo=</nowiki>===
25264 ====<nowiki>=foo=</nowiki>====
25265 =====<nowiki>=foo=</nowiki>=====
25266 ======<nowiki>=foo=</nowiki>======
25271 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25280 <nowiki>*</nowiki>bar
25286 <nowiki>=bar=</nowiki>
25290 Headings: 3. Nested inside html with wikitext split by html tags
25294 <h1>=<b>bold</b>foo=</h1>
25296 = ='''bold'''foo= =
25300 Headings: 4a. No escaping needed (testing just h1 and h2)
25311 <h1><i>=</i>foo=</h1>
25331 Headings: 4b. No escaping needed (inside p-tags)
25348 Headings: 4c. Short headings (1)
25355 <nowiki>===</nowiki>
25361 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25363 Headings: 4d. Short headings (2)
25365 parsoid=wt2html,html2html
25376 <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>
25377 <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>
25378 <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>
25383 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25384 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25385 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25389 Headings: 5. Empty headings
25393 <h1 data-parsoid='{}'></h1>
25395 <h2 data-parsoid='{}'></h2>
25397 <h3 data-parsoid='{}'></h3>
25399 <h4 data-parsoid='{}'></h4>
25401 <h5 data-parsoid='{}'></h5>
25403 <h6 data-parsoid='{}'></h6>
25413 =====<nowiki/>=====
25415 ======<nowiki/>======
25419 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25429 <nowiki>=a=</nowiki>
25431 <nowiki>=a=</nowiki>
25433 <nowiki>=a=</nowiki>
25437 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25450 <nowiki>=a=</nowiki>
25453 <nowiki>=a=</nowiki>
25456 <nowiki>=a=</nowiki>
25461 Headings: 6c. Heading chars in SOL context (leading newline break)
25469 <nowiki>=b=</nowiki>
25473 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25477 <!--c0--><p>=a=</p>
25479 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25481 <!--c0--><nowiki>=a=</nowiki>
25483 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25487 Headings: 6d. Heading chars in SOL context (No escaping needed)
25497 Headings: 7. Insert a newline between new content and headings
25503 <h2 data-parsoid='{}'>A</h2>
25504 <p data-parsoid='{}'>a</p>
25515 Headings: Used as horizontal rule
25517 wgFragmentMode=[ 'html5', 'legacy' ]
25523 <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>
25526 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25529 #### --------------- Lists ---------------
25530 #### 0. Outside nests (*foo, etc.)
25531 #### 1. Nested inside html <ul><li>*foo</li></ul>
25532 #### 2. Inside definition lists
25533 #### 3. Only bullets at start should be escaped
25534 #### 4. No escapes needed
25535 #### 5. No unnecessary escapes
25536 #### 6. Escape bullets in SOL position
25537 #### 7. Escape bullets in a multi-line context
25538 #### ----------------------------------------
25541 Lists: 0. Outside nests
25551 <nowiki>*</nowiki>foo
25553 <nowiki>#</nowiki>foo
25555 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25558 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25559 ## to test wikitext escaping, and insignificant whitespace diffs
25560 ## cause PHP parser tests to barf
25562 Lists: 1. Nested inside html (No unnecessary escapes)
25571 <li data-parsoid='{}'>*foo</li>
25572 <li data-parsoid='{}'>#foo</li>
25573 <li data-parsoid='{}'>:foo</li>
25574 <li data-parsoid='{}'>;foo</li>
25582 <li data-parsoid='{}'>*foo</li>
25583 <li data-parsoid='{}'>#foo</li>
25584 <li data-parsoid='{}'>:foo</li>
25585 <li data-parsoid='{}'>;foo</li>
25592 *<nowiki>*foo</nowiki>
25593 *<nowiki>#foo</nowiki>
25594 *<nowiki>:foo</nowiki>
25595 *<nowiki>;foo</nowiki>
25601 #<nowiki>*foo</nowiki>
25602 #<nowiki>#foo</nowiki>
25603 #<nowiki>:foo</nowiki>
25604 #<nowiki>;foo</nowiki>
25608 Lists: 2. Inside definition lists
25612 <dl><dt>;foo</dt></dl>
25613 <dl><dt>:foo</dt></dl>
25616 <dl><dd>:foo</dd></dl>
25620 ; <nowiki>:foo</nowiki>
25622 ; <nowiki>:foo</nowiki>
25629 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25635 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25639 *<nowiki>*foo</nowiki>''it''*bar
25643 Lists: 4. No escapes needed
25656 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25660 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25674 Lists: 5. No unnecessary escapes
25678 <ul><li> bar <span>[[foo]]</span></li></ul>
25679 <ul><li> =bar <span>[[foo]]</span></li></ul>
25680 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25681 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25682 <ul><li> =bar <span>foo]]</span>=</li></ul>
25683 <ul><li> <s></s>: a</li></ul>
25684 <ul><li> <i>* foo</i></li></ul>
25687 * bar <span><nowiki>[[foo]]</nowiki></span>
25689 * =bar <span><nowiki>[[foo]]</nowiki></span>
25691 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25693 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25695 * =bar <span>foo]]</span>=
25703 Lists: 6. Escape bullets in SOL position
25707 <p><!--cmt-->*foo</p>
25709 <!--cmt--><nowiki>*</nowiki>foo
25713 Lists: 7. Escape bullets in a multi-line context
25722 <nowiki>*</nowiki>b
25726 Lists: 8. Escape colons only if not present in tags
25730 <dl><dt>a:b<i>c:d</i></dt></dl>
25732 ; <nowiki>a:b</nowiki>''c:d''
25735 #### --------------- HRs ---------------
25736 #### 1. Single line
25737 #### -----------------------------------
25740 HRs: 1. Single line
25748 ----<nowiki>----</nowiki>
25753 #### --------------- Tables ---------------
25754 #### 1a. Simple example
25755 #### 1b. No escaping needed (!foo)
25756 #### 1c. No escaping needed (|foo)
25757 #### 1d. No escaping needed (|}foo)
25759 #### 2a. Nested in td (<td>foo|bar</td>)
25760 #### 2b. Nested in td (<td>foo||bar</td>)
25761 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25763 #### 3a. Nested in th (<th>foo!bar</th>)
25764 #### 3b. Nested in th (<th>foo!!bar</th>)
25765 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25769 #### 4c. No escaping needed
25770 #### --------------------------------------
25773 Tables: 1a. Simple example
25781 <nowiki>{|</nowiki>
25786 Tables: 1b. No escaping needed
25797 Tables: 1c. No escaping needed
25808 Tables: 1d. No escaping needed
25819 Tables: 2a. Nested in td
25824 <td>foo|bar</td></tr>
25825 <tr><td>x<div>a|b</div></td>
25829 |<nowiki>foo|bar</nowiki>
25831 |x<div><nowiki>a|b</nowiki></div>
25839 <td>x<div>a|b</div>
25840 </td></tr></tbody></table>
25844 Tables: 2b. Nested in td
25850 <td>a<i>b||c</i></td>
25851 <td>a<i><div>b||c</div></i></td>
25852 </tr></tbody></table>
25855 |<nowiki>foo||bar</nowiki>
25856 |a''<nowiki>b||c</nowiki>''
25857 |a''<div><nowiki>b||c</nowiki></div>''
25866 <td>a<i><div>b||c</div></i>
25872 Tables: 2c. Nested in td -- no escaping needed
25888 Tables: 3a. Nested in th
25904 Tables: 3b. Nested in th
25909 <tr><th>foo!!bar</th>
25910 <th><i>foo|bar</i></th>
25911 <th><i>foo!!bar</i></th>
25912 <th><i><span>foo!!bar</span></i></th>
25913 </tr></tbody></table>
25916 !<nowiki>foo!!bar</nowiki>
25917 !''<nowiki>foo|bar</nowiki>''
25918 !''<nowiki>foo!!bar</nowiki>''
25919 !''<span><nowiki>foo!!bar</nowiki></span>''
25928 <th><i>foo!!bar</i>
25930 <th><i><span>foo!!bar</span></i>
25936 Tables: 3c. Nested in th
25941 <tr><th>foo||bar</th>
25942 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25943 </tr></tbody></table>
25946 !<nowiki>foo||bar</nowiki>
25947 !<nowiki>foo||bar</nowiki>
25960 Tables: 4a. Escape -
25976 |<nowiki>-bar</nowiki>
25981 Tables: 4b. Escape +
25997 |<nowiki>+bar</nowiki>
26002 Tables: 4c. No escaping needed
26007 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26008 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26014 <div>a|b</div></td>
26059 Tables: 4d. No escaping needed
26064 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26065 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26066 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26077 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26087 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26091 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26093 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26095 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26097 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26100 | || align="center" | ||
26110 | {{!}}{{!}} align="center" | ||
26114 ! !! align="center" | !!
26120 <td align="center"></td>
26122 </td></tr></tbody></table>
26127 <td align="center">
26130 </td></tr></tbody></table>
26134 <td align="center"></td>
26136 </td></tr></tbody></table>
26140 <th align="center"></th>
26142 </th></tr></tbody></table>
26146 T97430: Don't emit empty nowiki pairs around marker meta tags
26150 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26151 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26153 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26154 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26158 Unclosed xmlish element in table line shouldn't eat end delimiters
26163 <tbody><tr><td> <foo</td>
26164 <td> bar></td></tr>
26181 #### --------------- Links ----------------
26182 #### 1. Quote marks in link text
26183 #### 2. Wikilinks: Escapes needed
26184 #### 3. Wikilinks: No escapes needed
26185 #### 4. Extlinks: Escapes needed
26186 #### 5. Extlinks: No escapes needed
26187 #### --------------------------------------
26189 Links 1. WikiLinks: No escapes needed
26193 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26194 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26195 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26199 [[Foo|x [Foobar] x]]
26201 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26202 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26203 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26208 Links 2. WikiLinks: Escapes needed
26212 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26213 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26214 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26215 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26216 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26217 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26218 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26219 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26220 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26221 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26223 [[Foo|<nowiki>Foobar]</nowiki>]]
26224 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26225 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26226 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26227 [[Foo|<nowiki>|Bar</nowiki>]]
26228 [[Foo|<nowiki>]]bar</nowiki>]]
26229 [[Foo|<nowiki>[[bar</nowiki>]]
26230 [[Foo|<nowiki>x [[ y</nowiki>]]
26231 [[Foo|<nowiki>x ]] y</nowiki>]]
26232 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26234 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26235 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26236 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26237 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26238 <a href="/wiki/Foo" title="Foo">|Bar</a>
26239 <a href="/wiki/Foo" title="Foo">]]bar</a>
26240 <a href="/wiki/Foo" title="Foo">[[bar</a>
26241 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26242 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26243 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26248 Links 3. WikiLinks: No escapes needed
26252 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26253 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26258 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26259 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26264 Links 4. ExtLinks: Escapes needed
26268 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26269 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26270 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26271 <p>[http://google.com]</p>
26272 <p>[http://google.com google]</p>
26273 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26274 <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>
26276 [http://google.com <nowiki>[google]</nowiki>]
26277 [http://google.com <nowiki>google]</nowiki>]
26278 [http://google.com <nowiki>goog] le</nowiki>]
26280 <nowiki>[http://google.com]</nowiki>
26282 <nowiki>[http://google.com google]</nowiki>
26284 [http://google.com<nowiki>]</nowiki>
26286 [{{echo|http://google.com}}<nowiki>]</nowiki>
26288 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26289 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26290 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26291 </p><p>[http://google.com]
26292 </p><p>[http://google.com google]
26293 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26294 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26299 Links 5. ExtLinks: No escapes needed
26303 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26304 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26306 [http://google.com [google]
26308 [[http://google.com]]
26310 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26311 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26316 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26320 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26321 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26322 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26323 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26324 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26325 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26326 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26327 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26328 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26329 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26330 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26331 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26332 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26335 x<nowiki/>http://example.com<nowiki/>y
26336 http://example.com<nowiki/>?x
26337 http://example.com<nowiki/>&x
26338 http://example.com<nowiki/>'x
26339 http://example.com<nowiki/>,x
26340 http://example.com<nowiki/>.x
26341 http://example.com<nowiki/>;x
26342 http://example.com<nowiki/>:x
26343 http://example.com<nowiki/>;x
26344 http://example.com<nowiki/>!x
26345 http://example.com<nowiki/>=x
26346 http://example.com<nowiki/>(x)
26347 http://example.com(x<nowiki/>)
26351 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26356 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26358 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26359 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26360 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26361 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26362 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26368 "http://example.com"
26369 (http://example.com)
26370 (http://example.com) foo
26371 http://example.com,
26372 http://example.com, foo
26375 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26377 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26378 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26379 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26380 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26381 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26386 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26390 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26391 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26393 http://example.com.,;:!?\
26394 -http://example.com:
26396 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26397 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26402 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26406 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26407 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26408 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26412 X<nowiki/>RFC 123<nowiki/>y
26416 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26420 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26421 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26422 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26429 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26430 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26431 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26436 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26440 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26441 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26442 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26446 X<nowiki/>PMID 123<nowiki/>y
26450 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26454 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26455 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26456 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26463 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26464 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26465 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26470 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26474 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26475 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26476 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26479 ISBN 1234567890<nowiki/>1
26480 ISBN 1234567890<nowiki/>x
26481 a<nowiki/>ISBN 1234567890<nowiki/>b
26485 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26489 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26493 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26498 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26502 <p>this is not a link: http://example.com
26505 this is not a link: <nowiki>http://example.com</nowiki>
26509 Links 15. Link trails can't become link prefixes.
26514 <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>
26516 [[Söfnuður]]-[[00]]
26518 <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>
26522 #### --------------- Quotes ---------------
26523 #### 1. Quotes inside <b> and <i>
26524 #### 2. Link fragments separated by <i> and <b> tags
26525 #### 3. Link fragments inside <i> and <b>
26526 #### 4. No escaping needed
26527 #### --------------------------------------
26529 1a. Quotes inside <b> and <i>
26540 <b>foo'<i>bar'</i>baz</b>
26549 <i>fools'<span> errand</span></i>
26550 <i><span>fool</span>'s errand</i>
26551 '<i>foo</i> bar '<i>baz</i>
26552 a|!*#-:;+-~[]{}b'<i>x</i>
26556 ''<nowiki>''foo''</nowiki>''
26557 ''<nowiki>'''foo'''</nowiki>''
26559 '''<nowiki/>'foo''''
26560 '''<nowiki>''foo''</nowiki>'''
26561 '''<nowiki>'''foo'''</nowiki>'''
26562 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26563 '''foo'''<nowiki/>'s
26569 '''foo'''<nowiki/>'
26570 ''''foo'''<nowiki/>'
26571 ''fools'<span> errand</span>''
26572 ''<span>fool</span>'s errand''
26573 '<nowiki/>''foo'' bar '''baz''
26574 a|!*#-:;+-~[]{}b'''x''
26578 1b. Quotes inside <b> and <i> with other tags on same line
26582 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26583 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26584 <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>
26585 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26586 '<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>
26587 '<i>foo</i> <div title="name">test</div>
26588 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26589 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26590 <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>
26593 '''a'' foo ''[[bar]]''
26594 ''a''' foo ''[[bar]]''
26595 ''a''' foo '''{{echo|[[bar]]}}'''
26596 [[foo]] x'''[[bar]]''
26597 '''foo'' <ref>test</ref>
26598 '''foo'' <div title="name">test</div>
26599 '''foo'' and <br> bar
26604 2. Link fragments separated by <i> and <b> tags
26608 <p>[[<i>foo</i>hello]]</p>
26609 <p>[[<b>foo</b>hello]]</p>
26611 [[''foo''<nowiki>hello]]</nowiki>
26613 [['''foo'''<nowiki>hello]]</nowiki>
26616 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26617 # this is one of the shortcomings of this format
26619 3. Link fragments inside <i> and <b>
26623 <p><i>[[foo</i>]]</p>
26624 <p><b>[[foo</b>]]</p>
26626 ''[[foo''<nowiki>]]</nowiki>
26628 '''[[foo'''<nowiki>]]</nowiki>
26632 4. No escaping needed
26636 <p>'<span><i>bar</i></span>'
26637 '<span><b>bar</b></span>'
26641 '<span>''bar''</span>'
26642 '<span>'''bar'''</span>'
26646 #### ----------- Paragraphs ---------------
26647 #### 1. No unnecessary escapes
26648 #### --------------------------------------
26651 1. No unnecessary escapes
26655 <p>bar <span>[[foo]]</span>
26656 </p><p>=bar <span>[[foo]]</span>
26657 </p><p>[[bar <span>[[foo]]</span>
26658 </p><p>]]bar <span>[[foo]]</span>
26659 </p><p>=bar <span>foo]]</span>=
26662 bar <span><nowiki>[[foo]]</nowiki></span>
26664 =bar <span><nowiki>[[foo]]</nowiki></span>
26666 [[bar <span><nowiki>[[foo]]</nowiki></span>
26668 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26670 =bar <span>foo]]</span><nowiki>=</nowiki>
26673 #### ----------------------- PRE --------------------------
26675 1. Leading whitespace in SOL context should be escaped
26698 <nowiki> </nowiki>a
26700 <nowiki> </nowiki> a
26704 <nowiki> </nowiki> a
26706 <nowiki> </nowiki>a
26709 <nowiki> </nowiki>b
26732 2. Leading whitespace in non-indent-pre contexts should not be escaped
26736 <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>
26737 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26738 <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>
26748 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26767 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26771 <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>
26773 [[File:Foobar.jpg|thumb|caption]]
26777 5. Nowiki escaping should account for indent-pres
26787 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26801 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
26804 "modes": ["html2wt"],
26805 "scrubWikitext": true
26813 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
26814 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
26815 <p> <!--boo-->*foo</p>
26816 <p><!--boo--> *foo</p>
26817 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
26818 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
26834 <nowiki>*</nowiki>foo
26836 <nowiki/><!--boo-->*foo
26838 <!--boo--><nowiki/>*foo
26840 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
26842 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
26845 #### --------------- Behavior Switches --------------------
26848 1. Valid behavior switches should be escaped
26855 <nowiki>__TOC__</nowiki>
26856 ''<nowiki>__TOC__</nowiki>''
26860 2. Invalid behavior switches should not be escaped
26871 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26873 Behavior switches should be SOL-transparent
26877 <meta property="mw:PageProp/toc" />
26879 <!-- this one's bogus -->
26882 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26884 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26888 <!-- this one's bogus -->
26897 #### --------------- HTML tags ---------------
26900 #### 3. multi-line html tag
26901 #### 4. extension tags
26902 #### -----------------------------------------
26908 <a href="http://google.com">google</a>
26910 <a href="http://google.com">google</a>
26918 <ul><li> <div>foo</div></li>
26919 <li> <div style="color:red">foo</div></li>
26920 <li> <td></li></ul>
26923 * <nowiki><div>foo</div></nowiki>
26924 * <nowiki><div style="color:red">foo</div></nowiki>
26925 * <nowiki><td></nowiki>
26929 3. multi-line html tag
26948 <p><ref>foo</ref>
26949 </p><p><ref>bar
26950 </p><p>baz</ref>
26953 <nowiki><ref>foo</ref></nowiki>
26955 <nowiki><ref>bar</nowiki>
26957 baz<nowiki></ref></nowiki>
26961 Parsoid: newline inducing block nodes don't suppress <nowiki>
26967 <nowiki> </nowiki>a
26972 #### --------------- Others ---------------
26978 <p><nowiki>foo</nowiki>
26981 <nowiki>foo</nowiki>
26984 ## The quote-char in the input is necessary for triggering the bug
26986 (T54035) Nowiki-escaping should not get tripped by " :" in text
26995 #----------- End of wikitext escaping tests --------------
26999 Tag-like HTML structures are passed through as text
27021 </p><p>1<d e>f
27026 HTML tag with necessary entities in attributes
27028 <span title="&amp;">foo</span>
27030 <p><span title="&amp;">foo</span>
27035 HTML tag with 'unnecessary' entity encoding in attributes
27037 <span title="&">foo</span>
27039 <p><span title="&">foo</span>
27044 HTML tag with broken attribute value quoting
27046 parsoid=wt2html,html2html
27048 <span title="Hello world>Foo</span>
27050 <p><span title="Hello world">Foo</span>
27053 <p><span title="Hello world">Foo</span></p>
27057 Self-closed tag with broken attribute value quoting
27059 parsoid=wt2html,html2html
27061 <div title="Hello world />Foo
27063 <div title="Hello world"></div><p>Foo
27066 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27070 Table with broken attribute value quoting
27072 parsoid=wt2html,html2html
27075 | title="Hello world|Foo
27080 <td title="Hello world">Foo
27086 <td title="Hello world">Foo
27092 Table with broken attribute value quoting on consecutive lines
27094 parsoid=wt2html,html2html
27097 | title="Hello world|Foo
27098 | style="color:red|Bar
27103 <td title="Hello world">Foo
27105 <td style="color:red">Bar
27111 <td title="Hello world">Foo
27112 </td><td style="color: red">Bar
27113 </td></tr></tbody></table>
27118 Accept empty td cell attribute
27121 | align="center" |foo|| |
27126 <td align="center">foo</td>
27133 Non-empty attributes in th-cells
27136 !Foo!! style="color: red" |Bar
27142 <th style="color: red">Bar
27148 Accept empty attributes in th-cells
27163 Empty table rows go away
27184 ### Parsoid-centric tests for testing RTing of inter-element separators
27185 ### Edge cases not tested by existing parser tests and specific to
27186 ### Parsoid-specific serialization strategies.
27190 RT-ed inter-element separators should be valid separators
27202 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27206 # Parsoid-only test of a DOM pass
27208 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27220 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27221 <p>bar</p></small></td></tr>
27225 <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>
27229 # Note that the "style" attribute is really a template parameter here.
27230 # The = would have to be {{=}} if you wanted the literal.
27232 Empty TD followed by TD with tpl-generated attribute
27237 |{{echo|style='color:red'}}|foo
27251 Indented table with an empty td
27269 ## We have some newline diffs RT-ing this edge case
27270 ## and it is not important enough -- we seem to be emitting
27271 ## at most 2 newlines after a </tr> and this is unrelated to
27272 ## the issue from T85627 that this is testing.
27274 Indented table with blank lines in between (T85627)
27293 Indented block & table
27307 <div data-parsoid='{"stx":"html"}'>foo</div>
27309 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27314 Indent and comment before table row
27329 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27330 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27334 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27336 Empty TR followed by a template-generated TR
27342 {{echo|<tr><td>foo</td></tr>}}
27347 <tr class='mw-empty-elt'></tr>
27348 <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}}]}'>
27353 ## PHP and parsoid output differ for this, and since this is primarily
27354 ## for testing Parsoid's serializer, marking this Parsoid only
27356 Empty TR followed by mixed-ws-comment line should RT correctly
27369 <tr class='mw-empty-elt'></tr>
27372 <!--c--> </tr><!--d-->
27378 Multi-line image caption generated by templates with/without trailing newlines
27380 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27381 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27383 <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>
27384 <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>
27388 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27392 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27394 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27396 <includeonly>foo</includeonly>
27404 ## PHP emits broken html for this, and since this is primarily
27405 ## a Parsoid serializer test, marking this Parsoid only
27407 Improperly nested inline or quotes tags with whitespace in between
27409 <span> <s>x</span> </s>
27412 <p><span> <s>x</s></span><s> </s>
27413 <b> <i>x</i></b><i> </i>
27418 Encapsulate protected attributes from wt
27420 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27422 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27426 <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>
27428 <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">
27429 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
27433 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27434 ## Having nested or stray pre tags results in the attempt to add duplicates,
27435 ## causing an assertion fail. This test tries to prevent that situation.
27437 Ensure ParagraphWrapper can deal with stray closing pre tags
27447 1. Ensure fostered text content is wrapped in element nodes
27451 <table>hi</table><table>ho</table>
27453 hi<table></table>ho<table></table>
27455 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>hi</span><table data-parsoid='{"stx":"html"}'></table><span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>ho</span><table data-parsoid='{"stx":"html"}'></table>
27459 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27461 parsoid=wt2html,wt2wt
27471 </td></tr></tbody></table>
27473 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||
27474 </span><table data-parsoid='{"stx":"html"}'>
27475 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
27476 </td></tr></tbody></table>
27480 Encapsulation properly handles null DSR information from foster box
27482 parsoid=wt2html,wt2wt
27484 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27486 <span 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</span><table><tbody><tr><td>bar</td></tr></tbody></table>
27490 1. Encapsulate foster-parented transclusion content
27492 parsoid=wt2wt,wt2html
27494 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27496 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
27498 <span 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</span><table about="#mwt2" data-parsoid='{"stx":"html}'><tbody><tr><td>bar</td></tr></tbody></table>
27502 2. Encapsulate foster-parented transclusion content
27504 parsoid=wt2wt,wt2html
27506 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27508 <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>
27519 3. Encapsulate foster-parented transclusion content
27521 parsoid=wt2wt,wt2html
27523 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27525 <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>"]}">
27538 4. Encapsulate foster-parented transclusion content
27540 parsoid=wt2wt,wt2html
27542 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27544 <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>"]}">
27557 5. Encapsulate foster-parented transclusion content
27559 parsoid=wt2wt,wt2html
27561 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27563 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27565 <span 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</span><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27569 6. Encapsulate foster-parented transclusion content
27571 parsoid=wt2wt,wt2html
27573 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27575 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
27577 <span 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</span><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>
27581 7. Encapsulate foster-parented transclusion content
27583 parsoid=wt2wt,wt2html
27585 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27587 <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>
27597 # Note that the wt is broken on purpose: the = should be {{=}} if you
27598 # don't want it to be a template parameter key.
27600 8. Encapsulate foster-parented transclusion content
27602 parsoid=wt2wt,wt2html
27605 }}{|{{echo|style='color:red'}}
27616 </td></tr></tbody></table>
27618 <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">
27619 </span><span 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}}}</span><table about="#mwt3">
27622 </td></tr></tbody></table>
27626 9. Encapsulate foster-parented transclusion content
27628 parsoid=wt2wt,wt2html
27630 <table>{{echo|hi</table>hello}}
27632 hi<table></table><p>hello
27635 <span 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</span><table about="#mwt2"></table><p about="#mwt2">hello</p>
27639 Table in fosterable position
27650 <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">
27652 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27658 # Parsoid only for T66747
27660 Properly encapsulate empty-content transclusions in fosterable positions
27668 <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"}]]}'>
27674 Always encapsulate foster box when template range is expanded to table
27687 T115289: Unclosed table
27689 {{echo|<table>}}<!--c-->[[Category:Two]]
27691 <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>
27695 T115289: Don't migrate newlines out of tables with fostered content
27697 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27699 <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>
27703 T73074: More fostering fun
27705 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27707 <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>
27711 Support <object> element with .data attribute
27715 <object data="test.swf"></object>
27717 <object data="test.swf"></object>
27721 Don't block XML namespace declaration
27723 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27725 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27728 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27731 # -----------------------------------------------------------------
27732 # The following section of tests are primarily to spec requirements
27733 # around Parsoid's serialization (old, new, edited content)
27735 # All these tests are marked Parsoid html2wt and html2html only
27736 # ----------------------------------------------------------------
27739 Ignore rel attribute in a-tags during serialization to url-links
27743 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27744 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27745 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27747 http://en.wikipedia.org/wiki/Foobar
27748 http://en.wikipedia.org/wiki/Foobar
27749 http://en.wikipedia.org/wiki/Foobar
27752 # 'mi' is a localinterwiki prefix as well as a language
27754 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27758 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27764 Parsoid should accept interwiki shortcuts
27768 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27769 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27770 <a href='./fr:Foo'>Foo</a></p>
27771 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27772 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27773 <a href='fr%3AFoo'>Foo</a></p>
27774 <p><a href='FR%3AFoo'>Foo</a>
27775 <a href='./FR:Foo'>Foo</a></p>
27790 Parsoid should not accept invalid interwiki shortcuts
27794 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27795 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27796 <a href='news:Foo'>Foo</a></p>
27805 New wikilinks should be serialized properly
27809 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27810 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27811 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27812 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27813 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27817 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27818 http://en.wikipedia.org/wiki/Foo
27819 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27823 New wiki links (href variations)
27827 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27828 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27829 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27830 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27835 [[Toxine bactérienne]]
27839 New wiki links (content string variations)
27843 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27844 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27845 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27849 [[Foo_bar|./Foo_bar]]
27853 New category links (href variations)
27857 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27858 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27859 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27861 [[Category:Toxine bactérienne]]
27862 [[Category:Toxine bactérienne]]
27863 [[Category:Toxine bactérienne]]
27867 New sol transparent links don't need indent-pre nowiki protection
27872 <link rel="mw:PageProp/redirect" href="./Main_Page">
27873 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27874 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27876 #WEITERLEITUNG [[Main Page]]
27877 <!-- this is good --> [[Category:Good]]
27878 <!-- this is great --> [[Kategorie:Great]]
27882 New interlanguage links (href variations)
27886 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27887 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27888 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27890 [[es:Toxine bactérienne]]
27891 [[es:Toxine_bactérienne]]
27892 [[es:Toxine_bactérienne]]
27896 Image: Modifying size of an image (1)
27899 "modes": ["wt2wt"],
27901 ["img[height]", "attr", "height", "22"],
27902 ["img[width]", "attr", "width", "200"]
27906 [[Image:Foobar.jpg|230x230px]]
27908 [[Image:Foobar.jpg|200x200px]]
27912 Image: Modifying size of an image (2)
27915 "modes": ["wt2wt"],
27917 ["img[height]", "attr", "height", "100"],
27918 ["img[width]", "attr", "width", "500"]
27922 [[Image:Foobar.jpg|230x230px]]
27924 [[Image:Foobar.jpg|500x500px]]
27927 # Change in size is ignored so long as class='mw-default-size'
27929 Image: Modifying size of an image (3)
27932 "modes": ["wt2wt"],
27934 ["figure[class]", "removeClass", "mw-default-size"],
27935 ["figure img", "attr", "height", "19"],
27936 ["figure img", "attr", "width", "170"]
27940 [[Image:Foobar.jpg|thumb]]
27942 [[Image:Foobar.jpg|thumb|170x170px]]
27946 Image: Modifying alignment of an image (T50665)
27949 "modes": ["wt2wt"],
27951 ["figure[class]", "removeClass", "mw-halign-right"],
27952 ["figure[class]", "addClass", "mw-halign-left"]
27956 [[Image:Foobar.jpg|thumb|caption|right]]
27958 [[Image:Foobar.jpg|thumb|caption|left]]
27962 Image: Modifying mw-default-size of an frameless image (T64805)
27965 "modes": ["wt2wt"],
27967 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27971 [[Image:Foobar.jpg|frameless|right]]
27973 [[Image:Foobar.jpg|frameless|right|220x220px]]
27977 Image: Modifying valign of an image (T51221)
27980 "modes": ["wt2wt"],
27982 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27983 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27987 [[File:Foobar.jpg|20px|middle]]
27989 [[File:Foobar.jpg|20px|text-top]]
27993 Image: Modifying alt attribute of an image (T58400)
27996 "modes": ["wt2wt"],
27998 ["img[alt]", "attr", "alt", "some alternate edited text"]
28002 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28004 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28008 Image: Modifying caption of an image
28011 "modes": ["wt2wt"],
28013 ["figcaption", "text", "new caption"]
28017 [[Image:Foobar.jpg|thumb|original caption]]
28019 [[Image:Foobar.jpg|thumb|new caption]]
28023 Image: empty alt attribute (T50924)
28027 [[File:Foobar.jpg|thumb|alt=|bar]]
28029 <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>
28033 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28039 <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>
28041 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28045 Image: Block level image should have \n before and after
28048 [[File:Foobar.jpg|right|thumb|150x150px]]
28052 <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>
28057 Image: New block level image should have \n before and after (existing content)
28060 [[File:Foobar.jpg|right|thumb|150x150px]]
28064 <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>
28069 Image: upright option (parsoid)
28071 [[File:Foobar.jpg|thumb|upright|caption]]
28072 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28073 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28075 <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>
28076 <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>
28077 <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>
28081 Image: upright option is ignored on inline and frame images (parsoid)
28083 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28085 <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>
28089 Image: in template parameter with empty parameter
28091 {{echo|[[File:Foobar.jpg|link=]]}}
28093 <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>
28097 Image: from basic HTML (1)
28101 <span typeof="mw:Image">
28102 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28105 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28109 Image: from basic HTML (2)
28113 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28115 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28119 Image: from basic HTML (3)
28123 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28125 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28129 Image: from basic HTML (4)
28133 <img src="./File:Foobar.jpg">
28135 [[File:Foobar.jpg|link=]]
28139 Image: Invalid title as link
28141 [[File:Foobar.jpg|link=<]]
28143 <p><a href="/wiki/File:Foobar.jpg" class="image" title="link=<"><img alt="link=<" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
28146 <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>
28150 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28155 <li><p>foo</p></li>
28162 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28166 <ul> <li>foo</li></ul>
28172 Don't strip leading whitespace when handling indent-pre suppressing tags
28177 <tr><td> indented row</td></tr>
28180 <b>This is very bold of you!</b>
28183 indented cell (no pre-wrapping!)
28193 '''This is very bold of you!'''
28197 indented cell (no pre-wrapping!)
28205 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28227 <nowiki> </nowiki></span>bar2
28230 <nowiki> </nowiki><span>bar</span>
28233 <nowiki> </nowiki><span>foo</span>
28238 Lists: Dont insert newlines in a serialized list item.
28242 <ul><li>a<br>b</li><li>c</li></ul>
28249 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28252 "modes": ["html2wt"],
28253 "scrubWikitext": false
28256 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28257 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28259 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28260 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28262 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28264 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28266 == hello there [[Category:A1]] ==
28268 == [[Category:A2]] hi pal ==
28270 == <!--foo--> [[Category:A3]] how goes it ==
28272 == it goes well [[Category:A4]] <!--bar--> ==
28274 ==howdy [[Category:A5]]==
28280 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28283 "modes": ["html2wt"],
28284 "scrubWikitext": true
28287 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28288 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28290 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28291 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28293 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28301 <!--foo-->[[Category:A3]]
28306 [[Category:A4]] <!--bar-->
28314 Headings: Don't hoist metas that come from templates
28317 "modes": ["html2wt"],
28318 "scrubWikitext": true
28321 <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>
28323 == {{echo|foo [[Category:Foo]]}} ==
28327 Headings: Category in ref isn't hoisted
28330 "modes": ["html2wt"],
28331 "scrubWikitext": true
28334 <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>
28336 <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>
28339 [[Category:Baz]] </ref> ==
28345 Parsoid: Serialize positional parameters with = in them as named parameter
28349 <p about="#mwt1" typeof="mw:Transclusion"
28350 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28352 <p about="#mwt1" typeof="mw:Transclusion"
28353 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28355 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28356 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28357 <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>
28361 {{echo|1=f=oo|2=bar}}
28363 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28364 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28365 {{echo|<nowiki>f=oo</nowiki>|bar}}
28369 Parsoid: Serialize positional parameters with = in extlink as named parameter
28373 <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>
28375 {{echo|1=http://stuff?is=ok}}
28379 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28383 <div>a<p>b</p></div>
28404 Substrings resembling wikitext in hrefs should not get nowiki escapes
28408 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28414 Enforce single-line context in the serializer
28421 <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">
28422 </span><span about="#mwt1">you</span> </h2>
28424 <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>
28426 <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
28427 there</span></li></ol>
28439 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28446 </tbody></table></dd></dl>
28450 == hi {{bogus|there
28461 * foo '''bar''' baz
28473 Serialize new placeholder space without spans
28477 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28479 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28481 <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>
28487 <ref>foo : bar</ref>ok
28491 #-----------------------
28492 # Tag minimization tests
28493 #-----------------------
28496 1. I/B quote minimization: wikitext-only tags should be combined
28500 <p><i>A</i><i>B</i></p>
28501 <p><b>A</b><b>B</b></p>
28502 <p><i>A</i><b><i>B</i></b></p>
28503 <p><b>A</b><i><b>B</b></i></p>
28504 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28505 <p><i><b>A</b></i><i><b>B</b></i></p>
28506 <p><i><b>A</b></i><b><i>B</i></b></p>
28507 <p><b><i>A</i></b><i><b>B</b></i></p>
28527 2. I/B quote minimization: wikitext and html tags should not be combined
28531 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28532 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28536 ''A''<nowiki/>'''<i>B</i>'''
28540 3. I/B quote minimization: templated content stops minimization
28544 <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>
28545 <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>
28547 ''A''{{echo|''B''}}
28549 ''A''{{echo|'''''B'''''}}
28553 4. I/B quote minimization: new content should be mimimized with adjacent old content
28557 <p><i>A</i><i>B</i></p>
28558 <p><b>A</b><b>B</b></p>
28559 <p><i>A</i><b><i>B</i></b></p>
28569 5a. Merge adjacent quote nodes if they've been edited
28572 "modes": ["wt2wt", "selser"],
28574 ["p", "contents", "remove", ":contains('b')"]
28584 5b. Merge adjacent quote nodes if they've been edited
28587 "modes": ["wt2wt", "selser"],
28593 ''a''<span id="x">b</span>''c''
28599 1. Merge adjacent link nodes as long as at least one element is new
28602 "modes": ["html2wt"],
28603 "scrubWikitext": true
28606 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28607 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28608 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28612 [[Football|Foot]][[Football|ball]]
28616 2. Merge adjacent link nodes and enable additional normalizations
28619 "modes": ["html2wt"],
28620 "scrubWikitext": true
28623 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28629 3. Don't merge adjacent link nodes if scrubWikitext is false
28632 "modes": ["html2wt"],
28633 "scrubWikitext": false
28636 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28638 [[Football|Foot]][[Football|ball]]
28642 1. Move format tags outside of WikiLink
28645 "modes": ["html2wt"],
28646 "scrubWikitext": true
28649 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
28650 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
28651 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
28654 '''''[[Football]]'''''
28655 <u>'''''[[Football]]'''''</u>
28659 2. Move format tags outside of WikiLink with mergable A tags
28662 "modes": ["html2wt"],
28663 "scrubWikitext": true
28666 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
28668 '''''[[Football]]'''''
28672 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
28675 "modes": ["html2wt"],
28676 "scrubWikitext": true
28679 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
28681 <font color="red"><u>'''[[Foo]]'''</u></font>
28685 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
28688 "modes": ["html2wt"],
28689 "scrubWikitext": true
28692 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
28693 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
28694 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
28696 [[Foo|<font color="red">Foo</font>]]
28697 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
28698 [[Foo|<span class="Bar">Foo</span>]]
28702 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
28705 "modes": ["selser"],
28706 "scrubWikitext": true,
28708 ["a", "html", "<i>Foo</i>"]
28718 6. Regression test: Manual edit test to ensure diff markers are not lost
28721 "modes": ["selser"],
28722 "scrubWikitext": true,
28724 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
28733 #------------------------------
28734 # End of tag minimization tests
28735 #------------------------------
28738 T56262: New entities
28742 <span typeof="mw:Entity"> </span>
28747 ## Note that there is no wikitext output for 'unknownproperty' ##
28748 ## Unknown magic words are silently dropped ##
28755 <meta property='mw:PageProp/toc' />
28756 <meta property='mw:PageProp/notoc' />
28757 <meta property='mw:PageProp/forcetoc' />
28758 <meta property='mw:PageProp/index' />
28759 <meta property='mw:PageProp/noindex' />
28760 <meta property='mw:PageProp/nogallery' />
28761 <meta property='mw:PageProp/noeditsection' />
28762 <meta property='mw:PageProp/notitleconvert' />
28763 <meta property='mw:PageProp/nocontentconvert' />
28764 <meta property='mw:PageProp/unknownproperty' />
28774 __NOCONTENTCONVERT__
28778 Consecutive <pre>s should not get merged
28780 parsoid=html2wt,html2html
28782 <pre>a</pre><pre>b</pre>
28810 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28814 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28816 [[Special:BookSources/1234567890|ISBN 1234567895]]
28820 Edited RFC links not serializable as RFC links should serialize as extlinks
28824 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28826 [https://tools.ietf.org/html/rfc123 New RFC]
28830 Edited PMID links not serializable as PMID links should serialize as extlinks
28834 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28836 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28840 WTS of autolinks with trailing/surrounding context
28844 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28845 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28846 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28847 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28848 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28849 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28851 http://cscott.net'''foo'''
28853 http://cscott.net<b>foo</b>
28855 '''http://cscott.net'''
28857 '''http://cscott.net '''
28859 '''http://cscott.net<nowiki/>x'''
28861 http://cscott.net<nowiki/>x
28865 WTS of autolinks with nowikis (round-trip)
28867 x<nowiki/>http://cscott.net<nowiki/>x
28869 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28872 # this is the "easy" test because it leaves in place all the
28873 # data-parsoid information indicating this is an autolink
28875 WTS of autolinks with escapes (editing)
28878 "modes": ["wt2wt"],
28880 [ "span", "remove" ]
28884 x<nowiki/>http://cscott.net<nowiki/>x
28886 x<nowiki/>http://cscott.net<nowiki/>x
28890 WTS of edited autolink-like text (T103364)
28893 "modes": ["wt2wt"],
28895 [ "span[typeof]", "removeAttr", "typeof" ]
28899 Not a link: <nowiki>http://example.com</nowiki>.
28901 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28905 WTS of newly-authored autolink-like text (T103364)
28909 <p>http://example.com is not a link.</p>
28911 <nowiki>http://example.com</nowiki> is not a link.
28915 WTS of autolink-like text after an autolink (T108563)
28919 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28921 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28925 Magic links inside links (not autolinked)
28927 [[Foo|http://example.com]]
28930 [[Foo|ISBN 123456789x]]
28932 [http://foo.com http://example.com]
28933 [http://foo.com RFC 1234]
28934 [http://foo.com PMID 1234]
28935 [http://foo.com ISBN 123456789x]
28937 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28938 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28939 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28940 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28941 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28942 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28943 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28944 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28947 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28948 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28949 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28950 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28952 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28953 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28954 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28955 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28959 Magic links inside image captions (autolinked)
28961 [[File:Foobar.jpg|thumb|http://example.com]]
28962 [[File:Foobar.jpg|thumb|RFC 1234]]
28963 [[File:Foobar.jpg|thumb|PMID 1234]]
28964 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28966 <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" 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>
28967 <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" 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>
28968 <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" 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>
28969 <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" 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>
28971 <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>
28972 <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>
28973 <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>
28974 <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>
28978 WTS of magic word text (T109371)
28983 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28984 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28986 <nowiki>RFC 1234</nowiki>
28988 [http://foo.com RFC 1234]
28994 Edited Redirect link should emit a non-piped wikitext link
28998 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29004 T75121: Infer extension name from typeOf if data-mw is not present
29006 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29008 <div typeOf="mw:Extension/foo"></div>
29013 # Note that the <p> wrapping isn't present in PHP parser output
29014 # The important thing for this test is that P-wrapping doesn't
29015 # interfere with the <nowiki> protection for leading - in <td>
29016 # (which isn't necessary for <th>).
29018 T88318: p-wrapped dash in table.
29020 parsoid=html2wt,wt2wt
29023 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29024 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29025 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
29032 |<nowiki>-</nowiki>
29033 |<nowiki>- </nowiki>
29053 <td><small>-</small>
29060 </td></tr></tbody></table>
29064 T149209: WTS: Handle newlines in table cells properly
29072 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29074 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29080 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29082 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29104 T149209: Selser: Handle newlines in table cells properly
29107 "modes": ["selser"],
29109 [ "#h1", "html", "a\nb\n" ],
29110 [ "#h2", "html", "a\nb\n" ],
29111 [ "#c1", "html", "a\nb\n" ],
29112 [ "#c2", "html", "<p>a</p>" ],
29113 [ "#c3", "html", "<p>a</p>" ],
29114 [ "#c4", "html", "edit-me<p>a</p>" ]
29119 ! id="h1" |edit-me!!1
29121 ! id="h2" |edit-me||2
29123 | id="c1" |edit-me||3
29125 | id="c2" |edit-me||4
29127 | id="c3" |edit-me||p||q||r
29129 | id="c4" |edit-me||p||q||r
29158 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29163 <td id='mwAc'>foo</td>
29164 <td id='serialize-this'>bar</td>
29169 | id="serialize-this" |bar
29174 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29178 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29180 <div id="hello">ok</div>
29184 Testing serialization after deletion in references
29187 "modes": ["wt2wt"],
29193 hi <ref><div id="x">ho</div></ref>
29203 Testing serialization after deletion of table cells
29206 "modes": ["wt2wt", "selser"],
29214 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29224 Testing selser after addition of new row before first row (T125419)
29227 "modes": ["wt2wt", "selser"],
29229 [ "tr", "before", "<tr><td>X</td></tr>" ]
29245 Serialize new table rows in a HTML table using HTML tags
29248 "modes": ["wt2wt", "selser"],
29250 [ "tr", "before", "<tr><td>X</td></tr>" ]
29254 <table><tr><td>a</td></tr></table>
29256 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29260 Serialize new table cells in a HTML row using HTML tags
29263 "modes": ["wt2wt", "selser"],
29265 [ "td", "before", "<td>X</td>" ]
29269 <table><tr><td>a</td></tr></table>
29271 <table><tr><td>X</td><td>a</td></tr></table>
29275 Serialize wikitext list items as HTML list items when embedded in a HTML list
29279 <ul data-parsoid='{"stx": "html"}'>
29280 <li data-parsoid='{}'>a</li>
29290 # SSS FIXME: Is this actually a good thing given the
29291 # odd nested list output that is generated by MW?
29292 # <ul><li>foo<ul>..</ul></li></ul> instead of
29293 # <ul><li>foo</li><ul>..</ul></ul>
29295 Wikitext lists can be nested inside HTML lists
29299 <ul data-parsoid='{"stx": "html"}'>
29300 <li data-parsoid='{"stx": "html"}'>a
29301 <ul><li>b</li></ul>
29305 <ul data-parsoid='{"stx": "html"}'>
29307 <ul><li>y</li></ul>
29328 "modes": ["wt2wt"],
29330 [ "#xyz", "before", "<b>before</b> stuff " ],
29331 [ "#xyz", "after", " stuff <i>after</i>" ],
29332 [ "#xyz", "html", "x <b>y</b> z" ]
29336 <span id="xyz">hello</span>
29338 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29342 Never serialize a-tag as html, regardless of what data-parsoid has to say
29344 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29346 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29351 ## SSS FIXME: This is broken output nevertheless.
29352 ## What might be a reasonable non-broken output for this?
29353 ## This is an edge case unlikely to be seen in production
29354 ## that I am not wasting more time on this right now.
29356 Never serialize a-tag as html, no matter what attributes it has
29358 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29360 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29362 [http://boo.org http://boohoo.org]
29365 # Misnested is an indication that selser can reuse the source but these have
29366 # shown to sneak through on occasion. See T101768.
29367 # The original wikitext here is: [http://test.com [[one]] two three]
29369 Strip span tags added to mark misnested links
29373 <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>
29375 [http://test.com][[one]] two three
29379 Catch regression when unpacking misnested links
29383 {{echo|hi}}[http://example.com [[ho]]]
29385 <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>
29389 Catch regression when unpacking with trailing content
29391 {{echo|Foo <references/> bar}}
29393 <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>
29397 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29401 <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|}"]}'>
29413 ## This test verifies the presence and computation of this attribute indirectly
29414 ## by making an edit and ensuring that the serialization is correct (which it would be
29415 ## only if firstWikitextNode is properly set).
29417 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
29420 "modes": ["wt2wt"],
29422 [ "div#x", "remove" ],
29423 [ "div", "before", "<div>new</div>" ]
29427 <div id="x">foo</div>
29429 {{echo|<div>boo</div>
29437 {{echo|<div>boo</div>
29443 # --------------------------------------------
29444 # Tests spec'ing wikitext serialization norms |
29445 # --------------------------------------------
29448 Serialize multi-line indent-pre starting with wikitext syntax
29462 1. Categories should always be serialized on their own line
29466 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
29474 2. Categories that are part of templates should not introduce a line break
29476 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
29478 <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>
29481 # Careful while editing these next 2 tests. There are \u200f characters
29482 # before and after the <link> tags in the HTML and following some
29483 # of the categories in wikitext
29484 # Do not remove these characters in edits.
29486 # As part of the serialization, these bidi characters will get stripped.
29488 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
29491 "modes": ["html2wt"],
29492 "scrubWikitext": true
29495 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
29496 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
29499 [[קטגוריה: שיטות משפט]]
29503 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
29506 "modes": ["html2wt"],
29507 "scrubWikitext": true
29510 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
29517 Lists: Add space after bullets
29524 <li><span> baz</span></li>
29529 * <span> baz</span>
29533 1. Headings: Add space before/after == (T53744)
29540 <h2><span> baz</span></h2>
29548 == <span> baz</span> ==
29552 2. Headings: Add space before/after == even after hoisted content
29555 "modes": ["html2wt"],
29556 "scrubWikitext": true
29559 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29567 1. Headings: suppress newly created empty headings
29570 "modes": ["html2wt"],
29571 "scrubWikitext": true
29579 2. Headings: don't suppress empty headings if scrubWikitext is false
29589 3. Headings: suppress empty headings on edits
29592 "modes": ["selser"],
29593 "scrubWikitext": true,
29599 ==<span id="x">foo</span>==
29604 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29607 "modes": ["html2wt"],
29608 "scrubWikitext": true
29611 <h2>foo<br/>bar</h2>
29612 <h2>foo <span><br/>bar</span> baz</h2>
29616 == foo <span> bar</span> baz ==
29620 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29623 "modes": ["html2wt"],
29624 "scrubWikitext": false
29627 <h2>foo<br/>bar</h2>
29633 1. WT Quote Tags: suppress newly created empty style tags
29636 "modes": ["html2wt"],
29637 "scrubWikitext": true
29645 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29651 ''<nowiki/>'''''<nowiki/>'''
29655 3. WT Quote Tags: suppress empty style tags on edits
29658 "modes": ["selser"],
29659 "scrubWikitext": true,
29665 '''<span id="x">foo</span>'''
29670 1. Anchors: suppress newly created empty anchors
29673 "modes": ["html2wt"],
29674 "scrubWikitext": true
29677 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29682 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29685 "modes": ["html2wt"],
29686 "scrubWikitext": false
29689 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29695 3. Anchors: suppress empty anchors on edits
29698 "modes": ["selser"],
29699 "scrubWikitext": true,
29705 [[Test|<span id="x">foo</span>]]
29710 3a. Anchors: do not suppress numbered extlinks
29713 "modes": ["wt2wt"],
29714 "scrubWikitext": true
29719 <a rel="mw:ExtLink" href="http://foo.com"></a>
29723 3b. Anchors: do not suppress numbered extlinks
29726 "modes": ["wt2wt"],
29727 "scrubWikitext": true,
29733 [http://foo.com <span id="x">foo</span>]
29739 Normalizations should be restricted to edited content
29742 "modes": ["selser"],
29743 "scrubWikitext": true,
29745 [ "h1", "before", "<i></i>"]
29759 1. Multiple normalizations (html2wt)
29762 "modes": ["html2wt"],
29763 "scrubWikitext": true
29767 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29768 </a><b><i></i></b>x</p>
29777 2. Multiple normalizations (selser)
29780 "modes": ["selser"],
29781 "scrubWikitext": true,
29783 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29787 <span id="x">foo</span>
29789 <span id="x">foo</span>
29795 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29798 "modes": ["html2wt"],
29799 "scrubWikitext": true
29811 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29818 <nowiki> </nowiki>hi
29820 <nowiki> </nowiki> hello
29824 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29827 "modes": ["html2wt"],
29828 "scrubWikitext": true
29837 baz bang</td></tr></table>
29843 bar<span>boo</span></p>
29859 bar<span>boo</span>
29863 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29866 "modes": ["selser"],
29867 "scrubWikitext": true,
29869 [ "p", "html", " a\n b" ]
29880 1. New links that end in spaces
29883 "modes": ["html2wt"],
29884 "scrubWikitext": false
29887 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29888 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29889 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29891 [[Berlin ]]<nowiki/>is the capital of Germany.
29895 [[Boston ]] is a city.
29899 2. New links that end in spaces
29902 "modes": ["html2wt"],
29903 "scrubWikitext": true
29906 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29907 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29908 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29910 [[Berlin]] is the capital of Germany.
29914 [[Boston]] is a city.
29918 1. Table cells with escapable prefixes
29921 "modes": ["html2wt"],
29922 "scrubWikitext": false
29926 <tr><td>a</td></tr>
29927 <tr><td>-</td></tr>
29928 <tr><td>+</td></tr>
29934 |<nowiki>-</nowiki>
29936 |<nowiki>+</nowiki>
29941 2. Table cells with escapable prefixes
29944 "modes": ["html2wt"],
29945 "scrubWikitext": true
29949 <tr><td>a</td></tr>
29950 <tr><td>-</td></tr>
29951 <tr><td>+</td></tr>
29964 3a. Table cells with escapable prefixes after edits
29967 "modes": ["selser"],
29968 "scrubWikitext": true,
29970 [ "table tbody tr:first-child td:first-child", "remove"]
29984 3b. Table cells with escapable prefixes after edits
29987 "modes": ["selser"],
29988 "scrubWikitext": true,
29990 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29997 |<span id="x">foo</span>+
30006 # FIXME: This test will fail because
30007 # normalization doesn't realize that the id attribute
30008 # will eliminate the escapable scenario
30010 4a. Table cells without escapable prefixes after edits
30013 "modes": ["selser"],
30014 "scrubWikitext": true,
30016 [ "#x", "html", "-" ]
30029 ## This tests normalizer's ability to discriminate between
30030 ## cells having identical content.
30032 4b. Table cells without escapable prefixes after edits
30035 "modes": ["selser"],
30036 "scrubWikitext": true,
30038 [ "td", "html", "-" ]
30051 ## This tests normalizer's ability to not be tripped by
30052 ## comments (and whitespace)
30054 4c. Table cells without escapable prefixes after edits
30057 "modes": ["selser"],
30058 "scrubWikitext": true,
30060 [ "table tbody tr td:first-child", "remove" ]
30075 ## This tests normalizer's ability to handle HTML cells
30077 4d. Table cells without escapable prefixes after edits
30080 "modes": ["selser"],
30081 "scrubWikitext": true,
30083 [ "td", "html", "-" ]
30088 <tr><td>a</td></tr>
30092 <tr><td>-</td></tr>
30096 ## T111151 Remove font elements without attributes
30098 5a. font tags without attributes should be dropped in scrubWikitext mode
30101 "modes": ["html2wt"],
30102 "scrubWikitext": true
30106 <font><font>bar</font></font>
30107 <font class="x">boo</font>
30111 <font class="x">boo</font>
30115 5b. font tags should not be dropped without scrubWikitext being enabled
30118 "modes": ["html2wt"],
30119 "scrubWikitext": false
30128 Escape nowiki DOM elements
30132 <nowiki><i>foo</i></nowiki>
30134 <nowiki>''foo''</nowiki>
30137 # This is meant to be an interim fix while we go about figuring out
30138 # how to not introduce these trailing <nowiki/>s in the first place.
30140 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30144 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30146 <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>
30147 <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>
30161 New list is serialized on newlines
30165 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30169 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30171 The quick brown fox jumps over the lazy dog.
30177 The quick onyx goblin jumps over the lazy dwarf.
30181 New lists in formatting elements serialized w/o newlines
30193 <small><ul><li>hi</li></ul></small>
30205 New list in table doesn't need newlines
30209 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30218 # ---------------------------------------------------
30219 # End of tests spec'ing wikitext serialization norms |
30220 # ---------------------------------------------------
30224 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30232 <td><b>c</b><p>d</p></td>
30251 Anchor without href scenarios
30253 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30256 <a class="no">dice</a>
30261 <span name="foo"></span>
30265 New transclusion added after a list should be serialized after the list
30269 <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>
30275 # -----------------------------------------------------------------
30276 # End of section for Parsoid-only html2wt tests for serialization
30278 # -----------------------------------------------------------------
30280 # -----------------------------------------------------------------
30281 # The following section of tests are primarily to spec behavior of
30282 # the selective serializer. All these tests have manual selser
30283 # changes. The automated selser changes for all tests handle the
30284 # wide variation of changes, but these tests here capture specs
30285 # deterministically.
30286 # ----------------------------------------------------------------
30290 Selser: New comments should not be lost
30293 "modes": ["selser"],
30295 [ "#a", "after", "<!--c1-->" ],
30296 [ "#b", "before", "<!--c2-->" ]
30300 <span id="a">a</span>
30302 <span id="b">b</span>
30304 <span id="a">a</span><!--c1-->
30306 <!--c2--><span id="b">b</span>
30311 Selser: Check for validity of DSR before using it
30314 "modes": ["selser"],
30316 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30320 <span id="a">a</span>
30322 {{DISPLAYTITLE:foo}}
30323 <span id="a">a</span>
30327 1. DOMDiff: Changes to <ref> content should be looked up using id
30330 "modes": ["selser"],
30332 ["#X", "after", "bar"],
30333 ["#Y", "after", "baz"]
30337 X <ref><span id="X">foo</span></ref>
30340 <ref name="a"><span id="Y">foo</span></ref>
30343 X <ref><span id="X">foo</span>bar</ref>
30346 <ref name="a"><span id="Y">foo</span>baz</ref>
30351 2. DOMDiff: Changes to <ref> content should be looked up using id
30354 "modes": ["selser"],
30356 ["#Z", "after", "bar"]
30360 A <ref>foo bar for a</ref>
30361 B <ref group="X" name="b" />
30365 <references group="X">
30366 <ref name="b"><span id="Z">foo</span></ref>
30369 A <ref>foo bar for a</ref>
30370 B <ref group="X" name="b" />
30374 <references group="X">
30375 <ref name="b"><span id="Z">foo</span>bar</ref>
30380 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30383 "modes": ["selser"],
30385 [ "div:first-child", "text", "bar" ]
30389 <div style="{{1x|color:red;}}%">foo</div>
30391 <div style="{{1x|color:red;}}%">bar</div>
30403 <li class="mw-empty-elt"></li>
30404 <li class="mw-empty-elt"></li>
30411 [[File:Thumb.png|thumb]]
30413 <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" 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>
30415 <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>
30419 unclosed internal link XSS (T137264)
30421 [[#%3Cscript%3Ealert(1)%3C/script%3E|
30423 <p>[[#<script>alert(1)</script>|
30426 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
30430 Validating that <style> isn't eaten by tidy (T167349)
30435 <style>.foo::before { content: "<foo>"; }</style>
30436 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30440 <style>.foo::before { content: "<foo>"; }</style>
30441 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30446 Validating that <style> isn't wrapped in a paragraph (T186965)
30450 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30452 <style>.foo::before { content: "<foo>"; }</style>
30454 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30456 But if it's on a line with other content, let it be wrapped.
30458 <style>.foo::before { content: "<foo>"; }</style> bar
30460 foo <style>.foo::before { content: "<foo>"; }</style>
30462 foo <style>.foo::before { content: "<foo>"; }</style> bar
30464 And the same if we have non-paragraph-breaking whitespace
30467 <style>.foo::before { content: "<foo>"; }</style>
30470 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30472 <style>.foo::before { content: "<foo>"; }</style>
30473 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30474 <p>But if it's on a line with other content, let it be wrapped.
30475 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
30476 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
30477 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
30478 </p><p>And the same if we have non-paragraph-breaking whitespace
30480 <style>.foo::before { content: "<foo>"; }</style>
30486 Validating that <link> isn't wrapped in a paragraph (T186965)
30490 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30492 <link rel="foo" href="bar"/>
30494 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30496 But if it's on a line with other content, let it be wrapped.
30498 <link rel="foo" href="bar"/> bar
30500 foo <link rel="foo" href="bar"/>
30502 foo <link rel="foo" href="bar"/> bar
30504 And the same if we have non-paragraph-breaking whitespace
30507 <link rel="foo" href="bar"/>
30510 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30512 <link rel="foo" href="bar"/>
30513 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30514 <p>But if it's on a line with other content, let it be wrapped.
30515 </p><p><link rel="foo" href="bar"/> bar
30516 </p><p>foo <link rel="foo" href="bar"/>
30517 </p><p>foo <link rel="foo" href="bar"/> bar
30518 </p><p>And the same if we have non-paragraph-breaking whitespace
30520 <link rel="foo" href="bar"/>
30526 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
30528 wgFragmentMode=[ 'html5', 'legacy' ]
30530 ==A&B&C&amp;D&amp;amp;E==
30531 [[#A&B&C&amp;D&amp;amp;E]]
30533 <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>
30534 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
30537 <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>
30538 <p><a rel="mw:WikiLink" href="./Main_Page#A&B&C&amp;D&amp;amp;E" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#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>
30542 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
30544 wgFragmentMode=[ 'legacy' ]
30546 ==A&B&C&amp;D&amp;amp;E==
30547 [[#A&B&C&amp;D&amp;amp;E]]
30549 <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>
30550 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
30555 Decoding of HTML entities in embedded HTML tags
30557 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30559 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30562 <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>
30566 Decoding of HTML entities in indicator names for IDs (T104196)
30568 parsoid=wt2html,html2html
30571 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30573 1&2&3&4&amp;5=Indicator
30576 <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>
30579 # this version of the test strips out the ambiguity so Parsoid rts cleanly
30581 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
30585 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30587 1&2&3&4&amp;5=Indicator
30590 <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>
30593 # This fragment mode is what Parsoid supports.
30595 HTML5 ids: fallback to legacy
30597 wgFragmentMode=[ 'html5', 'legacy' ]
30609 ==Hey < # " > % : '==
30610 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30612 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30614 <!-- These two links should produce identical HTML -->
30615 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30618 <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>
30620 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30621 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30622 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30623 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30624 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30625 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30629 <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>
30630 <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>
30631 <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>
30632 <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>
30633 <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>
30634 <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>
30635 <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>
30636 </p><p>💩 <span id="💩"></span>
30637 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30640 <h2 id="Foo_bar">Foo bar</h2>
30642 <h2 id="foo_Bar_2">foo Bar</h2>
30644 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30646 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30648 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30650 <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>
30651 <p><a rel="mw:WikiLink" href="./Main_Page#Foo_bar">#Foo bar</a> <a rel="mw:WikiLink" href="./Main_Page#foo_Bar">#foo Bar</a> <a rel="mw:WikiLink" href="./Main_Page#Тест">#Тест</a> <a rel="mw:WikiLink" href="./Main_Page#тест">#тест</a> <a rel="mw:WikiLink" href="./Main_Page#Hey_<_#_"_>_%_:_'" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Hey_<_#_\"_>_%_:_'"},"sa":{"href":"#Hey < # \" > % : '"}}'>#Hey < # " > % : '</a></p>
30653 <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>
30655 <!-- These two links should produce identical HTML -->
30656 <p><a rel="mw:WikiLink" href="./Main_Page#啤酒">#啤酒</a> <a rel="mw:WikiLink" href="./Main_Page#啤酒" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#啤酒"},"sa":{"href":"#%E5%95%A4%E9%85%92"}}'>#啤酒</a></p>
30659 # Parsoid doesn't support this mode
30661 HTML5 ids: legacy with a fallback to modern
30663 wgFragmentMode=[ 'legacy', 'html5' ]
30675 ==Hey < # " > % : '==
30676 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30678 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30680 <!-- These two links should produce identical HTML -->
30681 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30684 <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>
30686 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30687 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30688 <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>
30689 <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>
30690 <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>
30691 <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>
30695 <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>
30696 <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>
30697 <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>
30698 <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>
30699 <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>
30700 <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>
30701 <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>
30702 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30703 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30707 # Parsoid doesn't support this mode.
30709 HTML5 ids: no legacy
30711 wgFragmentMode=[ 'html5' ]
30723 ==Hey < # " > % : '==
30724 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30726 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30728 <!-- These two links should produce identical HTML -->
30729 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30732 <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>
30734 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30735 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30736 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30737 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30738 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30739 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30743 <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>
30744 <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>
30745 <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>
30746 <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>
30747 <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>
30748 <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>
30749 <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>
30750 </p><p>💩 <span id="💩"></span>
30751 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30756 T90902: Normalize weird characters in section IDs
30758 wgFragmentMode=[ 'html5', 'legacy' ]
30764 <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>
30765 <p><a href="#Foo_bar">#Foo bar</a>
30768 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30769 <p><a rel="mw:WikiLink" href="./Main_Page#Foo_bar" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Foo_bar"},"sa":{"href":"#Foo&nbsp;bar"}}'>#Foo bar</a></p>
30773 T51672: Test for brackets in attributes of elements in external link texts
30775 [http://example.com/ link <span title="title with [brackets]">span</span>]
30776 [http://example.com/ link <span title="title with [brackets]">span</span>]
30779 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30780 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30783 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30784 <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>
30788 T72875: Test for brackets in attributes of elements in internal link texts
30790 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30791 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30794 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30795 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30798 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30799 <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>
30803 T179544: {{anchorencode:}} output should be always usable in links
30805 wgFragmentMode=[ 'html5' ]
30807 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30809 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30812 <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="./Main_Page#[foo]" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#[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>
30815 ## ------------------------------
30816 ## Parsoid section-wrapping tests
30817 ## ------------------------------
30819 Section wrapping for well-nested sections (no leading content)
30822 "wrapSections": true
30843 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30846 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30849 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30852 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30855 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30858 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30865 Section wrapping for well-nested sections (with leading content)
30868 "wrapSections": true
30873 Para 2 with a <div>nested in it</div>
30886 <section data-mw-section-id="0"><p>Para 1.</p>
30888 <p>Para 2 with a </p><div>nested in it</div>
30892 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30895 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30898 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30901 </section></section>
30905 Section wrapping with template-generated sections (good nesting 1)
30908 "wrapSections": true
30925 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30928 <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">
30929 </span><p about="#mwt1">b</p>
30930 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30933 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30937 # In this example, the template scope is mildly expanded to incorporate the
30938 # trailing newline after the transclusion since that is part of section 1.1.1
30940 Section wrapping with template-generated sections (good nesting 2)
30943 "wrapSections": true,
30944 "modes": ["wt2html", "wt2wt"]
30959 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30962 <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">
30963 </span><p about="#mwt1">b</p><span about="#mwt1">
30964 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30965 </span><p about="#mwt1">d</p><span about="#mwt1">
30966 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30970 # In this example, the template scope is mildly expanded to incorporate the
30971 # trailing newline after the transclusion since that is part of section 1.2.1
30973 Section wrapping with template-generated sections (good nesting 3)
30976 "wrapSections": true,
30977 "modes": ["wt2html", "wt2wt"]
30995 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30998 <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">
30999 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
31000 </span><p about="#mwt1">b</p><span about="#mwt1">
31001 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
31002 </span><p about="#mwt1">c</p><span about="#mwt1">
31003 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
31004 </span><p about="#mwt1">d</p><span about="#mwt1">
31005 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
31009 # Because of section-wrapping and template-wrapping interactions,
31010 # the scope of the template is expanded so that the template markup
31011 # is valid in the presence of <section> tags.
31012 # This exercises the s1 is null scenario in the wrapSections code
31014 Section wrapping with template-generated sections (bad nesting 1)
31017 "wrapSections": true
31031 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
31034 <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"]}'>
31035 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
31036 </span><p about="#mwt1">b
31037 </p><span about="#mwt1">
31039 </span><p about="#mwt1">c</p><span about="#mwt1">
31040 </span></section></div></section>
31043 # Because of section-wrapping and template-wrapping interactions,
31044 # the scope of the template is expanded so that the template markup
31045 # is valid in the presence of <section> tags.
31046 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
31048 Section wrapping with template-generated sections (bad nesting 2)
31051 "wrapSections": true
31069 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31072 </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">
31073 </span><p about="#mwt1">b</p><span about="#mwt1">
31074 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
31075 </span><p about="#mwt1">c</p><span about="#mwt1">
31077 </span><p about="#mwt1">d</p><span about="#mwt1">
31079 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
31083 # Because of section-wrapping and template-wrapping interactions,
31084 # additional template wrappers are added to <section> tags
31085 # so that template wrapping semantics are valid whether section
31086 # tags are retained or stripped. But, the template scope can expand
31087 # greatly when accounting for section tags.
31088 # This exercises the s1 and s2 are in different subtrees scenario
31090 Section wrapping with template-generated sections (bad nesting 3)
31093 "wrapSections": true,
31094 "modes": ["wt2html", "wt2wt"]
31112 <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>
31115 <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">
31116 </span><p about="#mwt1">b</p><span about="#mwt1">
31117 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
31118 </span><p about="#mwt1">c</p>
31121 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
31126 Section wrapping with uneditable lead section + div wrapping multiple sections
31129 "wrapSections": true
31134 <div style="border:1px solid red;">
31151 <section data-mw-section-id="-1"><p>foo</p>
31153 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31154 <section data-mw-section-id="1"><h1 id="1">1</h1>
31157 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31160 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31164 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31167 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31169 </section></section>
31173 Section wrapping with editable lead section + div overlapping multiple sections
31176 "wrapSections": true
31183 <div style="border:1px solid red;">
31200 <section data-mw-section-id="0"><p>foo</p>
31202 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31204 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31207 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31210 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31215 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31218 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31220 </section></section>
31224 HTML header tags should not be wrapped in section tags
31227 "wrapSections": true
31240 <section data-mw-section-id="0"><p>foo</p>
31242 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31244 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31246 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31248 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31252 Lead section containing only whitespace and comments.
31255 "wrapSections": true
31259 <!-- this is a comment, presumably significant to editors -->
31266 <section data-mw-section-id="0" data-parsoid="{}">
31267 <!-- this is a comment, presumably significant to editors -->
31268 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31271 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31276 Pseudo-sections emitted by templates should have id -2
31279 "wrapSections": true
31289 <section data-mw-section-id="-1"><p>foo</p>
31290 </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}}]}'>
31291 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31292 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31293 </section></div><span about="#mwt1">
31297 ##########################################################################
31298 Tests demonstrating white-space insensitivity in input wikitext
31299 for wikitext headings, wikitext list items, and wikitext table captions,
31300 headings, and cells. HTML versions of the same should preserve whitespace.
31301 ##########################################################################
31303 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31306 "modes": ["wt2html"],
31307 "preserveIEW": true
31311 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31312 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31313 == <!--Headings with fallback ids--> Личная жизнь ==
31314 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31315 ; <!--term to define--> term : <!--term's definition--> definition
31317 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31319 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31321 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31323 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
31325 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
31328 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31331 <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>
31332 <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>
31333 <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>
31334 <ul><li>List item</li></ul>
31335 <dl><dt>term </dt>
31336 <dd>definition</dd></dl>
31338 <caption>Table Caption
31341 <th>Table Heading 1</th>
31342 <th>Table Heading 2
31345 <td>Table Cell 1</td>
31349 <td>class="foo"</td>
31353 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
31354 </td></tr></tbody></table>
31357 <td>Table Cell 1</td>
31359 </td></tr></tbody></table> foo</dd></dl>
31361 <meta property="mw:PageProp/notoc">
31362 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
31363 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
31364 <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>
31365 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
31366 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
31368 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
31370 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
31372 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31374 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
31376 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
31379 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31380 </tbody></table><p> foo </p><!--c1--></dd></dl>
31383 # Looks like <caption> is not accepted in HTML
31385 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
31388 "modes": ["wt2html"],
31389 "preserveIEW": true
31393 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31394 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31396 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
31397 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
31400 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
31401 <ul><li> List item </li></ul>
31403 <tbody><tr><th> Table Heading </th><th></th></tr>
31404 <tr><td> Table Cell </td><th></th></tr>
31407 <meta property="mw:PageProp/notoc"/>
31408 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31409 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31411 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
31412 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
31417 Do not trim whitespace in links and quotes
31420 "modes": ["wt2html"],
31421 "preserveIEW": true
31424 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
31425 [[Foo| some text ]]
31427 <p>foo <i> italic </i> and <b> bold </b>
31428 <a href="/wiki/Foo" title="Foo"> some text </a>
31431 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
31432 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
31436 Remove p tags surrounding a single element in a figcaption
31440 [[File:Foobar.jpg|right|200x200px|Caption]]
31442 <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>
31446 Selser preserves lack of newline before list and allows newline after the list
31449 "modes": ["selser"],
31450 "scrubWikitext": true,
31452 [ "ul", "after", "<p>footer</p>" ]
31469 Selser does not introduce newlines between unedited paragraph preceding the list
31472 "modes": ["selser"],
31474 [ "table tbody tr td p:last-child", "empty" ]
31496 Selser does not introduce newlines between unedited paragraph following the list
31499 "modes": ["selser"],
31501 [ "table tbody tr td p:first-child", "empty" ]
31523 Remove a list item but do not insert newline above list
31526 "modes": ["selser"],
31528 [ "ul li:last-child", "remove" ]