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
2502 T17491: <ins>/<del> in blockquote (2)
2504 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2507 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2511 <blockquote><p>Foo </p><del>bar</del> <ins>baz</ins><p> quux
2516 <pre> with attributes (T5202)
2518 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2520 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2525 <pre> with width attribute (T5202)
2527 <pre width="8">Narrow screen goodies</pre>
2529 <pre width="8">Narrow screen goodies</pre>
2534 <pre> with forbidden attribute (T5202)
2536 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2538 <pre width="8">Narrow screen goodies</pre>
2543 Entities inside <pre>
2552 <pre> with forbidden attribute values (T5202)
2554 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2556 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2561 <nowiki> inside <pre> (T15238)
2569 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2577 <pre><nowiki>Foo</nowiki></pre>
2582 <nowiki> inside of #tag:pre
2584 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2586 <pre>Foo →bar</pre>
2589 <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>
2592 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2593 ## aren't enclosed in nowikis.
2595 <nowiki> and <pre> preference (first one wins)
2626 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2631 <p><span typeof="mw:Nowiki">
2639 </pre> inside nowiki
2641 <nowiki></pre></nowiki>
2648 Empty pre; pre inside other HTML tags (T56946)
2665 <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
2667 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2671 HTML pre followed by indent-pre
2684 <p><pre>foo</pre></p>
2686 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2688 <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>
2692 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2700 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2710 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2722 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2743 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2747 {{echo| foo}}{{echo| bar}}
2752 {{echo|<!--cmt--> foo}}
2754 <!--cmt-->{{echo| foo}}
2756 {{echo|{{echo| }}bar}}
2774 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2810 ## Hmm, should Parsoid rt this?
2812 Pres with newline attributes
2814 parsoid=wt2html,html2html
2819 <pre class="one two">hi</pre>
2822 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2826 Things that look like <pre> tags aren't treated as such
2828 Barack Obama <President> of the United States
2829 <President></President>
2831 <p>Barack Obama <President> of the United States
2832 <President></President>
2837 Handle broken pre-like tags (T66025)
2841 {{echo|<pre <pre>x</pre>}}
2843 <table><pre </table>
2846 <table><pre </table>
2850 <pre <table></table>
2852 <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>
2854 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'><pre </span><table data-parsoid='{"stx":"html"}'></table>
2858 Parsoid: handle pre with space after attribute
2862 <pre style="width:50%;" >{{echo|foo}}</pre>
2864 <pre style="width:50%;">{{echo|foo}}</pre>
2867 <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>
2870 # TODO / maybe: fix wt2wt for this
2872 Parsoid: Don't paragraph-wrap fosterable content
2905 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2909 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2937 #--------------------------------------------------------------------
2938 # Transclusion parameter whitespace stripping tests
2939 # Behavior is different for positional and named parameters
2940 #--------------------------------------------------------------------
2942 Templates: Strip leading and trailing whitespace from named-param values
2946 {{echo|1= {{echo|b}} }}
2964 Templates: Don't strip whitespace from positional-param values
2968 {{echo|{{echo|b}} }}
3008 Templates: Don't recognize targets split by newlines
3024 Templates: Recognize targets when newlines and comments don't split the target
3029 <!--X--> ech<!--X-->o<!--X-->
3037 <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>
3041 Templates: Handle empty comment-and-ws-only lines correctly
3044 <!--should be ignored-->
3045 <!--should be ignored as well-->
3052 <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>
3056 Templates: Handle comments in the target
3059 <!-- should be ignored -->
3063 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3066 {{echo<!-- should be ignored -->
3069 {{echo<!-- should be ignored -->|foo}}
3071 {{<!-- should be ignored -->echo|foo}}
3080 <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>
3082 <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>
3084 <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>
3086 <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>
3088 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3092 Templates: Handle comments in parameter names (T69657)
3095 <!-- should be ignored -->
3099 <!-- should be ignored -->
3102 {{echo|1<!-- should be ignored -->=foo}}
3104 {{echo|<!-- should be ignored -->1=foo}}
3112 <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>
3114 <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>
3116 <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>
3118 <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>
3122 Templates: Other wikitext in parameter names (T69657)
3129 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3133 Templates: With colons
3137 <p>Template with colon
3140 <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>
3143 #--------------------------------------------------------------------
3144 # Transclusion parameter escaping tests
3145 #--------------------------------------------------------------------
3148 Templates: Parsoid parameter escaping test 1
3150 {{echo|[foo]|{{echo|[bar]}}}}
3155 <p about="#mwt1" typeof="mw:Transclusion"
3156 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3160 Parsoid: Pipes in external links in template parameter
3162 {{echo|[{{echo|http://example.com}} link]}}
3164 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3167 <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>
3171 Parsoid: pipe in transclusion parameter
3173 {{echo|http://foo.com/a|b}}
3175 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3178 <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>
3182 Parsoid: Pipe in external link target and content in template parameter
3184 parsoid=html2wt,wt2wt
3186 {{echo|[http://foo.com/a|b a|b]}}
3188 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3191 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3192 typeof="mw:Transclusion"
3193 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3194 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3198 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3202 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3204 <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>
3208 Templates: Don't escape already nowiki-escaped text in template parameters
3210 parsoid=html2wt,wt2wt
3212 {{echo|foo<nowiki>|</nowiki>bar}}
3213 {{echo|<nowiki><div></nowiki>}}
3214 {{echo|<nowiki></nowiki>}}
3221 <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>
3222 <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>
3223 <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>
3229 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3231 parsoid=html2wt,wt2wt
3233 {{echo|{{echo|1=bar}}}}
3238 <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>
3243 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3250 <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>
3255 Templates: Preserve blank parameter names
3262 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3266 Templates: Preserve blank parameter names in other positions
3268 {{blank_param|bar|=foo}}
3274 <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
3279 ### Parsoid-centric tests for testing RT edge cases for pre
3283 1a. Indent-Pre and Comments
3296 1b. Indent-Pre and Comments
3309 1c. Indent-Pre and Comments
3322 1d. Indent-Pre and Comments
3323 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3336 2a. Indent-Pre and tables
3357 2b. Indent-Pre and tables
3373 2c. Indent-Pre and tables (T44252)
3390 2d. Indent-Pre and tables
3407 <tbody><tr><td> b</td></tr>
3412 2e. Indent-Pre and table-line syntax
3425 2f. Indent-pre started by table-line syntax
3444 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3449 Text that should be rendered preformatted
3457 <pre>Text that should be rendered preformatted
3466 2h. Indent pre in tables
3468 parsoid=wt2html,html2html
3511 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3513 </td></tr></tbody></table>
3517 3a. Indent-Pre and block tags (single-line html)
3521 c <blockquote> foo </blockquote>
3526 c <blockquote> foo </blockquote>
3527 <pre><span> foo </span>
3530 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3531 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3532 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3533 <pre><span> foo </span>
3536 <p> a </p><p> foo </p><p>
3537 b </p><div> foo </div><p>
3538 c </p><blockquote><p> foo </p></blockquote>
3539 <pre><span> foo </span>
3544 3b. Indent-Pre and block tags (multi-line html)
3547 <!-- comment --> b <div> foo </div>
3549 <pre>a <span>foo</span>
3554 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3555 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3557 <pre>a <span>foo</span>
3559 b </p><div> foo </div>
3563 3c. Indent-Pre and block tags (pre-content on separate line)
3627 4. Indent-Pre and extension tags
3638 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3642 5. Indent-Pre and html pre
3644 <pre class="123">hi</pre>
3646 <pre class="123">hi</pre>
3649 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3653 Render paragraphs when indent-pre is suppressed in blocklevels
3670 4. Multiple spaces at start-of-line
3688 ## NOTE: the leading white-space chars on empty line are significant
3690 5a. White-space in indent-pre
3702 ## NOTE: the leading white-space chars on empty line are significant
3704 5b. White-space in indent-pre
3723 5c. White-space in indent-pre
3736 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3759 7a. Indent-pre and category links
3761 parsoid=wt2html,wt2wt
3763 [[Category:foo]] <!-- No pre-wrapping -->
3764 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3767 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3768 <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 -->
3771 ## We used to, but no longer wt2wt this test since the default serializer
3772 ## will normalize all categories to serialize on their own line.
3773 ## This wikitext usage is going to be fairly uncommon in production and
3774 ## selser will take care of preserving formatting in those scenarios.
3776 7b. Indent-pre and category links
3781 [[Category:foo]] {{echo|b}}
3783 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3784 <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>
3788 Indent-Pre: Newlines in comments shouldn't affect sol state
3803 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3807 HTML-pre: 1. embedded newlines
3839 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3841 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3844 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3849 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3857 HTML-pre: big spaces
3893 <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"}}'>
3912 HTML-pre: 2: indented text
3925 HTML-pre: 3: other wikitext
3944 <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
3953 ### Definition lists
3960 <dl><dt>name </dt>
3961 <dd>Definition</dd></dl>
3966 Definition list for indentation only
3970 <dl><dd>Indented text</dd></dl>
3975 Definition list with no space
3980 <dd>Definition</dd></dl>
3985 Definition list with URL link
3987 ;http://example.com/ :definition
3989 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3990 <dd>definition</dd></dl>
3995 Definition list with bracketed URL link
3997 ;[http://www.example.com/ Example]:Something about it
3999 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4000 <dd>Something about it</dd></dl>
4005 Definition list with wikilink containing colon
4007 ;[[Help:FAQ]]:The least-read page on Wikipedia
4009 <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>
4010 <dd>The least-read page on Wikipedia</dd></dl>
4014 # At Brion's and JeLuF's insistence... :)
4016 Definition list with news link containing colon
4018 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4020 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> </dt>
4021 <dd>This isn't even a real newsgroup!</dd></dl>
4024 <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>
4028 Malformed definition list with colon
4030 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4032 <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>
4037 Definition lists: colon in external link text
4039 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4041 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a> </dt>
4042 <dd>OK, I made that up</dd></dl>
4047 Definition lists: colon in HTML attribute
4049 ;<b style="display: inline">bold</b>
4051 <dl><dt><b style="display: inline">bold</b></dt></dl>
4056 Definition lists: self-closed tag
4058 ;one<br/>two :two-line fun
4060 <dl><dt>one<br />two </dt>
4061 <dd>two-line fun</dd></dl>
4066 Definition lists: ignore colons inside tags
4068 ;one <b>two : tag <i>fun:</i>:</b>:def
4070 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4076 Definition lists: excess closed tags
4078 ;one</b>two :bad tag fun
4080 <dl><dt>onetwo </dt>
4081 <dd>bad tag fun</dd></dl>
4085 <dd>bad tag fun</dd>
4090 T13748: Literal closing tags
4094 <dd>test test test test test</dd>
4096 <dd>test test test test test</dd>
4101 <dd>test test test test test</dd>
4103 <dd>test test test test test</dd>
4109 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4117 <dl><dt>term </dt>
4118 <dd>description</dd></dl>
4119 <ul><li>unordered</li></ul>
4125 Definition list with empty definition and following paragraph
4138 Nested definition lists using html syntax
4151 Definition Lists: No nesting: Multiple dd's
4164 Definition Lists: Indentation: Regular
4172 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4177 Definition Lists: Indentation: Missing 1st level
4183 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4188 Definition Lists: Indentation: Multi-level indent
4192 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4197 Definition Lists: Hacky use to indent tables
4204 should be left alone
4206 <dl><dd><dl><dd><table>
4211 </td></tr></table></dd></dl></dd></dl>
4213 should be left alone
4218 Definition Lists: Hacky use to indent tables (with content following table)
4223 |} <!--c1--> this text should be part of the dl
4230 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4237 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4241 Definition Lists: Hacky use to indent tables, with comments (T65979)
4249 should be left alone
4252 <dl><dd><dl><dd><table><tr>
4255 </tr></table><!-- bar --></dd></dl></dd></dl>
4257 should be left alone</p>
4261 Definition Lists: Hacky use to indent tables, with comment before table
4269 <dl><dd><dl><dd><!-- foo --><table><tr>
4271 </tr></table></dd></dl></dd></dl>
4274 # The trailing whitespace in this test is to catch a regression in
4275 # Parsoid after T54473.
4277 Definition Lists: Hacky use to indent tables (WS-insensitive)
4286 </td></tr></table></dd></dl>
4290 <tbody><tr><td>a</td></tr>
4291 </tbody></table></dd></dl>
4294 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4295 ## as an empty dt item. It also ignores all but the last ";" when followed
4296 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4297 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4300 ## Ex: ";;t2 ::d2" is transformed into:
4312 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4313 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4324 ## All Parsoid only definition list tests have this difference.
4326 ## See also: https://phabricator.wikimedia.org/T8569
4327 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4330 Table / list interaction: indented table with lists in table contents
4352 </td></tr></table></dd></dl>
4357 Table / list interaction: lists nested in tables nested in indented lists
4380 </td></tr></table></dd></dl>
4387 Definition Lists: Nesting: Multi-level (Parsoid only)
4415 Definition Lists: Nesting: Test 2
4422 <dl><dd>d2</dd></dl></dd></dl>
4427 Definition Lists: Nesting: Test 3
4432 <dl><dd><dl><dt>t1</dt>
4434 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4439 Definition Lists: Nesting: Test 4
4444 <dl><dd><dl><dd><dl><dt>t3</dt>
4445 <dd>d3</dd></dl></dd></dl></dd></dl>
4450 ## The Parsoid team believes the following three test exposes a
4451 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4452 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4453 ## It also exposes a "misfeature" in tidy, which doesn't like
4454 ## <dl> tags with a single <dt> child; it converts the <dt> into
4455 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4457 Definition Lists: Mixed Lists: Test 1
4463 <dl><dd><dl><dt><ul><li>foo</li>
4464 <li>bar</li></ul></dt></dl>
4465 <dl><dt>baz</dt></dl></dd></dl>
4468 <dl><dd><dl><dt><ul><li>foo</li>
4469 <li>bar</li></ul></dt></dl>
4470 <dl><dt>baz</dt></dl></dd></dl>
4488 Definition Lists: Mixed Lists: Test 2
4493 <ul><li><dl><dd>d1</dd>
4494 <dd>d2</dd></dl></li></ul>
4500 Definition Lists: Mixed Lists: Test 3
4505 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4506 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4512 Definition Lists: Mixed Lists: Test 4
4517 <ul><li><dl><dt>d1 </dt>
4520 <dd>d4</dd></dl></li></ul>
4526 Definition Lists: Mixed Lists: Test 5
4532 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4538 Definition Lists: Mixed Lists: Test 6
4543 <ol><li><ul><li><dl><dd>d1
4544 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4550 Definition Lists: Mixed Lists: Test 7
4555 <dl><dd><ul><li>d1</li>
4556 <li>d2</li></ul></dd></dl>
4562 Definition Lists: Mixed Lists: Test 8
4567 <dl><dd><ul><li>d1</li></ul>
4568 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4574 Definition Lists: Mixed Lists: Test 9
4578 <ul><li><dl><dt>foo </dt>
4579 <dd>bar</dd></dl></li></ul>
4585 Definition Lists: Mixed Lists: Test 10
4589 <ul><li><ol><li><dl><dt>foo </dt>
4590 <dd>bar</dd></dl></li></ol></li></ul>
4594 # The Parsoid team disagrees with the PHP parser's seemingly-random
4595 # rules regarding dd/dt on the next few tests. Parsoid is more
4596 # consistent, and recognizes the shared nesting and keeps the
4597 # still-open tags around until the nesting is complete.
4599 # This is a regression test for T175099
4601 Definition Lists: Mixed Lists: Test 11
4608 <ul><li>b</li></ul></dd></dl>
4612 <dd><ul><li>b</li></ul></dd></dl>
4615 # FIXME: Maybe get rid of this test?
4617 Definition Lists: Mixed Lists: Test 12
4622 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4623 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4624 <dl><dt>boo </dt>
4625 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4628 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4629 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4630 <dl><dt>boo </dt>
4631 <dd>baz</dd></dl></li></ol></li></ul>
4648 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4649 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4653 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4654 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4662 # FIXME: Maybe get rid of this test?
4664 # * The test is wrong, there are two colons where there should be :;
4665 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4667 Definition Lists: Weird Ones: Test 1
4669 *#;*::;;foo :bar (who uses this?)
4671 <ul><li><ol><li><dl><dt>foo </dt>
4672 <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>
4689 <dt>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4690 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4702 Definition Lists: colons occurring in tags
4719 <dt><span>a:b</span></dt>
4720 <dt><div>a:b</div></dt>
4721 <dt><div>a</div></dt>
4725 <dt><i>a:b</i></dt></dl>
4726 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4728 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4730 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4731 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4732 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4733 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4735 <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>
4736 <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>
4737 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4740 # Parsoid's output differs here again because it shares
4741 # nesting between the two lists unlike the PHP parser.
4742 # Unsure which is more desirable.
4744 Definition Lists: colons and tables 1
4756 </td></tr></table></dd></dl>
4760 </td></tr></table></dd></dl>
4766 </td></tr></table></dd>
4770 </td></tr></table></dd></dl>
4773 # FIXME: Does this need a html/php section?
4775 Definition Lists: template interaction
4777 ::{{definition_list}}
4780 ::{{definition_list}}
4785 <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">
4786 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4788 <dl><dd data-parsoid='{}'>one
4789 <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">
4790 </span><dd about="#mwt2">two
4792 <dd>three</dd></dl></dd>
4793 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4801 External links: non-bracketed
4803 Non-bracketed: http://example.com
4805 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4809 # parsoid doesn't explicitly mark autonumbered links, see T55505
4811 External links: numbered
4813 Numbered: [http://example.com]
4814 Numbered: [http://example.net]
4815 Numbered: [http://example.com]
4817 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4818 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4819 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4822 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4823 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4824 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4828 External links: specified text
4830 Specified text: [http://example.com link]
4832 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4837 External links: trail
4839 Linktrails should not work for external links: [http://example.com link]s
4841 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4846 External links: dollar sign in URL
4848 http://example.com/1$2345
4850 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4854 # parsoid doesn't explicitly mark autonumbered links, see T55505
4856 External links: dollar sign in URL (autonumber)
4858 [http://example.com/1$2345]
4860 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4863 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4867 External links: open square bracket forbidden in URL (T6377)
4869 parsoid=wt2html,wt2wt,html2html
4871 http://example.com/1[2345
4873 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4876 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4880 External links: open square bracket forbidden in URL (named) (T6377)
4882 parsoid=wt2html,html2html
4884 [http://example.com/1[2345]
4886 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4889 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4892 # parsoid adds a space before the link name
4894 External links: open square bracket forbidden in URL (named) (T6377)
4897 [http://example.com/1 [2345]
4899 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4904 External links: nowiki in URL link text (T8230)
4906 [http://example.com/ <nowiki>''example site''</nowiki>]
4908 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4913 External links: newline forbidden in text (T8230 regression check)
4915 [http://example.com/ first
4918 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4924 External links: Pipe char between url and text
4926 [http://example.com | link]
4928 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4933 External links: protocol-relative URL in brackets
4935 [//example.com/ Test]
4937 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4941 # parsoid doesn't explicitly mark autonumbered links, see T55505
4943 External links: protocol-relative URL in brackets without text
4947 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4950 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4954 External links: protocol-relative URL in free text is left alone
4958 <p>//example.com/Foo
4963 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4965 foo//example.com/Foo
4967 <p>foo//example.com/Foo
4971 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4973 External links: with no contents
4975 parsoid=wt2html,wt2wt
4977 [http://en.wikipedia.org/wiki/Foo]
4979 [[wikipedia:Foo|Bar]]
4981 [[wikipedia:Foo|<span>Bar</span>]]
4983 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4984 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4985 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4988 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4989 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4990 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4994 External links: Free with trailing punctuation
5004 http://example.com/url_with_(brackets)
5005 (http://example.com/url_without_brackets)
5006 http://example.com/url_with_entity&
5007 http://example.com/url_with_entity&
5008 http://example.com/url_with_entity&
5009 http://example.com/url_with_entity
5010 http://example.com/url_with_entity 
5011 http://example.com/url_with_entity 
5012 http://example.com/url_with_entity<
5013 http://example.com/url_with_entity<
5014 http://example.com/url_with_entity<
5016 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5017 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5018 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5019 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5020 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5021 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5022 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5023 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5024 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5025 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5026 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5027 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5028 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5029 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5030 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5031 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5032 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5033 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5034 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5037 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5038 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5039 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5040 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5041 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5042 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5043 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5044 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5045 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5046 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5047 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5048 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5049 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5050 <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>
5051 <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>
5052 <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>
5053 <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>
5054 <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>
5055 <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>
5059 External links: tricky Parsoid html2html case
5061 parsoid=wt2html,wt2wt,html2html
5063 http://example.com/url_with_entity&amp;
5065 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5068 <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>
5072 External links: Free with trailing quotes (T113666)
5074 '''News:''' Stuff here
5078 <p><b>News:</b> Stuff here
5079 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5082 <p><b>News:</b> Stuff here</p>
5083 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5087 External links: with entity
5089 [http:// www.librarieswithoutborders.org Libraries without borders]
5091 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5094 <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>
5098 External links: Lone protocols are never linked (T105697)
5117 External links: No preceding word characters allowed (T67278)
5119 NOPEhttp://example.com
5120 N0http://example.com
5121 ok:http://example.com
5122 ok-http://example.com
5124 <p>NOPEhttp://example.com
5125 N0http://example.com
5126 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5127 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5132 External links: nofollow domain exception
5134 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5136 <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>.
5143 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5145 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5150 External image from https
5152 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5154 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5159 External image (when not allowed)
5161 wgAllowExternalImages=0
5163 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5165 <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>
5170 Link to non-http image, no img tag
5172 Link to non-http image, no img tag: ftp://example.com/test.jpg
5174 <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>
5179 External links: terminating separator
5181 Terminating separator: http://example.com/thing,
5183 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5188 External links: intervening separator
5190 Intervening separator: http://example.com/1,2,3
5192 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5197 External links: old bug with URL in query
5199 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5201 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5206 External links: old URL-in-URL bug, mixed protocols
5208 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5210 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5214 # Since Parsoid is starting to emit canonical wikitext for links,
5215 # [http://example.com http://example.com] will not RT back to that
5218 External links: URL in text
5222 URL in text: [http://example.com http://example.com]
5224 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5227 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5231 External links: Clickable images
5233 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5235 <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>
5238 <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>
5242 External links: raw ampersand
5244 Old & use: http://x&y
5246 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5251 External links: encoded ampersand
5253 Old & use: http://x&y
5255 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5258 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5262 External links: encoded equals (T8102)
5264 http://example.com/?foo=bar
5266 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5269 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5273 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5274 ## does it number them. As discussed in T55505, we can identify
5275 ## autonumbered links via CSS.
5279 External links: [raw ampersand]
5281 Old & use: [http://x&y]
5283 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5286 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5289 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5290 # mode will return the [raw ampersand] wikitext
5292 External links: [encoded ampersand]
5294 parsoid=wt2html,wt2wt,html2html
5296 Old & use: [http://x&y]
5298 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5301 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5305 External links: [raw equals]
5307 [http://example.com/?foo=bar]
5309 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5312 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5315 # note that parsoid html is identical to [raw equals] case; so html2wt
5316 # mode will return the [raw equals] wikitext
5318 External links: [encoded equals] (T8102)
5320 parsoid=wt2html,wt2wt,html2html
5322 [http://example.com/?foo=bar]
5324 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5327 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5330 # xxx parsoid strips the IDN character, so the round-trip tests will
5331 # obviously fail and are disabled. --cscott
5333 External links: [IDN ignored character reference in hostname; strip it right off]
5335 parsoid=wt2html,wt2wt,html2html
5337 [http://e‌xample.com/]
5339 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5342 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5345 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5346 # Where an external link could easily circumvent the sanitization of the text of
5347 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5348 # test demands a higher standard. That's a bit strange.
5352 # http://example.com -> [http://example.com|http://example.com]
5353 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5355 # The first example is sanitized, but the second is not. Any security benefits
5356 # from this production are trivial to circumvent. Either remove this test and
5357 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5358 # the test accordingly.
5362 # xxx parsoid strips the IDN character, so the round-trip tests will
5363 # obviously fail and are disabled. --cscott
5365 External links: IDN ignored character reference in hostname; strip it right off
5367 parsoid=wt2html,html2html
5369 http://e‌xample.com/
5371 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5374 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5378 External links: www.jpeg.org (T2554)
5382 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5386 # parsoid doesn't explicitly mark autonumbered links, see T55505
5388 External links: URL within URL (T2002)
5390 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5392 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5395 <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>
5399 T2361: URL inside bracketed URL
5401 [http://www.example.com/foo http://www.example.com/bar]
5403 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5408 T2361: URL within URL, not bracketed
5410 http://www.example.com/foo?=http://www.example.com/bar
5412 <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>
5417 T2289: ">"-token in URL-tail
5419 http://www.example.com/<hello>
5421 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5426 T2289: literal ">"-token in URL-tail
5428 http://www.example.com/<b>html</b>
5430 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5433 <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>
5437 T2289: ">"-token in bracketed URL
5439 [http://www.example.com/<hello> stuff]
5441 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5446 T2289: literal ">"-token in bracketed URL
5448 [http://www.example.com/<b>html</b> stuff]
5450 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5455 T2289: literal double quote at end of URL
5457 http://www.example.com/"hello"
5459 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5464 T2289: literal double quote in bracketed URL
5466 [http://www.example.com/"hello" stuff]
5468 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5473 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5475 [http://www.example.com test]
5477 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5482 External links: link text with spaces
5484 [http://www.example.com a b c]
5485 [http://www.example.com ''a'' ''b'']
5487 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5488 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5492 # Note edge case difference between PHP and Parsoid here.
5494 External links: wiki links within external link (T5695)
5496 parsoid=wt2html,html2html
5498 [http://example.com [[wikilink]] embedded in ext link]
5500 [http://example.com test [[wikilink]] embedded in ext link]
5502 <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>
5503 </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>
5506 <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>
5507 <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>
5511 T2787: Links with one slash after the url protocol are invalid
5515 [http:/example.com title]
5517 <p>http:/example.com
5518 </p><p>[http:/example.com title]
5523 Bracketed external links with template-generated invalid target
5525 [{{echo|http:/example.com}} title]
5527 <p>[http:/example.com title]
5531 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5533 Broken wikilinks (but not external links) prevent templates from closing
5537 [http://example.com x
5539 {{echo|[http://example.com x}}
5545 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5546 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5548 </p><p>{{echo|[[Foo}}
5551 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5552 <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>
5554 <p>{{echo|[[Foo}}</p>
5558 Wikilinks with embedded newlines are not broken
5569 <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>
5581 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5585 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5586 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5590 T4702: Mismatched <i>, <b> and <a> tags are invalid
5592 ''[http://example.com text'']
5593 [http://example.com '''text]'''
5594 ''Something [http://example.com in italic'']
5595 ''Something [http://example.com mixed''''', even bold]'''
5596 '''''Now [http://example.com both''''']
5598 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5599 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5600 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5601 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5602 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5610 http://www.example.com/?title=AT%26T
5612 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5615 <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>
5618 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5619 # % is actually legal in HTML5. Any change in output would need testing though.
5621 T6781, T7267: %25 in URL
5623 http://www.example.com/?title=100%25_Bran
5625 <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>
5628 <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>
5632 T6781, T7267: %28, %29 in URL
5634 http://www.example.com/?title=Ben-Hur_%281959_film%29
5636 <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>
5639 <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>
5644 T6781: %26 in autonumber URL
5646 [http://www.example.com/?title=AT%26T]
5648 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5651 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5655 T6781, T7267: %26 in autonumber URL
5657 [http://www.example.com/?title=100%25_Bran]
5659 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5662 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5666 T6781, T7267: %28, %29 in autonumber URL
5668 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5670 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5673 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5678 T6781: %26 in bracketed URL
5680 [http://www.example.com/?title=AT%26T link]
5682 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5685 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5689 T6781, T7267: %25 in bracketed URL
5691 [http://www.example.com/?title=100%25_Bran link]
5693 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5698 T6781, T7267: %28, %29 in bracketed URL
5700 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5702 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5705 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5709 External link containing a period in the anchor. (T65947)
5711 [//foo.org/bar#baz. bang]
5713 [//foo.org/bar. bang]
5715 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5716 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5719 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5720 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5724 External link containing a single quote. (T65947)
5728 [//foo.org/bar'baz bang]
5730 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5731 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5734 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5735 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5739 External link containing double-single-quotes in text '' (T6598 sanity check)
5741 Some [http://example.com/ pretty ''italics'' and stuff]!
5743 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5748 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5750 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5752 <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>
5756 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5758 External link containing double-single-quotes with no space separating the url from text in italics
5760 [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]].]
5762 <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>.
5765 <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>
5769 External link with comments in link text
5771 [http://www.google.com Google <!-- comment -->]
5773 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5776 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5780 External link to bare IPv4 address
5782 [http://192.168.0.1 Link]
5784 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5787 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5791 URL-encoding in URL functions (single parameter)
5793 {{localurl:Some page|amp=&}}
5795 <p>/index.php?title=Some_page&amp=&
5800 URL-encoding in URL functions (multiple parameters)
5802 {{localurl:Some page|q=?&=&}}
5804 <p>/index.php?title=Some_page&q=?&amp=&
5811 http://example.com/index.php?foozoid%5B%5D=bar
5813 http://example.com/index.php?foozoid[]=bar
5815 <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>
5816 </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>
5819 <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>
5821 <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>
5825 IPv6 urls, autolink format (T23261)
5827 http://[2404:130:0:1000::187:2]/index.php
5829 Examples from RFC 2373, section 2.2:
5831 *http://[1080::8:800:200C:417A]/unicast
5832 *http://[FF01::101]/multicast
5833 *http://[::1]/loopback
5834 *http://[::]/unspecified
5835 *http://[::13.1.68.3]/ipv4compat
5836 *http://[::FFFF:129.144.52.38]/ipv4compat
5838 Examples from RFC 2732, section 2:
5840 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5841 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5842 *http://[3ffe:2a00:100:7031::1]
5843 *http://[1080::8:800:200C:417A]/foo
5844 *http://[::192.9.5.5]/ipng
5845 *http://[::FFFF:129.144.52.38]:80/index.html
5846 *http://[2010:836B:4179::836B:4179]
5848 <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>
5849 </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:
5851 <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>
5852 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5853 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5854 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5855 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5856 <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>
5857 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5859 <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>
5860 <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>
5861 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5862 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5863 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5864 <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>
5865 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5868 <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>
5870 <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>
5871 <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>
5872 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5873 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5874 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5875 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5876 <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>
5878 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5879 <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>
5880 <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>
5881 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5882 <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>
5883 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5884 <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>
5885 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5889 IPv6 urls, bracketed format (T23261)
5891 [http://[2404:130:0:1000::187:2]/index.php test]
5893 Examples from RFC 2373, section 2.2:
5895 *[http://[1080::8:800:200C:417A] unicast]
5896 *[http://[FF01::101] multicast]
5897 *[http://[::1]/ loopback]
5898 *[http://[::] unspecified]
5899 *[http://[::13.1.68.3] ipv4compat]
5900 *[http://[::FFFF:129.144.52.38] ipv4compat]
5902 Examples from RFC 2732, section 2:
5904 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5905 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5906 *[http://[3ffe:2a00:100:7031::1] 3]
5907 *[http://[1080::8:800:200C:417A]/foo 4]
5908 *[http://[::192.9.5.5]/ipng 5]
5909 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5910 *[http://[2010:836B:4179::836B:4179] 7]
5912 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5913 </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:
5915 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5916 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5917 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5918 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5919 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5920 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5921 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5923 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5924 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5925 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5926 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5927 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5928 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5929 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5932 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5934 <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>
5935 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5936 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5937 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5938 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5939 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5940 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5942 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5943 <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>
5944 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5945 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5946 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5947 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5948 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5949 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5953 Non-extlinks in brackets
5962 [{{echo|foo}} ''bar'']
5963 [{{echo|foo}}l's] errand
5964 [{{echo|foo}}l's errand]
5966 [url=http://example.com]
5967 [http:// bare protocols don't count]
5980 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5981 [http:// bare protocols don't count]
5989 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5990 [<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]
5991 [<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>]
5992 [<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
5993 [<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]
5994 [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>]
5995 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
5996 [http:// bare protocols don't count]</p>
6000 Percent encoding in external links
6002 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6004 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6007 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6011 Use url link syntax for links where the content is equal the link target
6015 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6018 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6022 Parenthesis in external links, especially URL links
6026 http://example.com/test)
6028 http://example.com/(test)
6030 http://example.com/((test)
6032 (http://example.com/(test))
6034 (http://example.com/(test)))))
6036 http://example.com/a)b
6038 [http://example.com) foo]
6040 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6041 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6042 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6043 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6044 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6045 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6046 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6047 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6050 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6051 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6052 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6053 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6054 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6055 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6056 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6057 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6061 Parenthesis in external links, w/ transclusion or comment
6063 (http://example.com/{{echo|hi}})
6065 (http://example.com<!-- hi -->)
6067 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6068 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6071 <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>
6073 <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>
6077 Serialize <a> tags with invalid link targets as plain text
6079 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6081 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6082 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6083 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6084 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6087 <nowiki>*</nowiki>text
6088 <nowiki>[[foo]]</nowiki>
6089 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6093 mw:ExtLink -vs- mw:WikiLink (T94723)
6097 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6098 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6099 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6100 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6102 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6103 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6111 [[:en:European_Robin|European Robin]]
6112 [[:en:European_Robin|European Robin]]
6116 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6120 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6122 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6133 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6135 Normal text. '''''Bold italic text.''''' Normal text.
6137 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6138 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6143 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6144 # parser strips. The wikitext contains just the first half of the bold
6147 Unclosed and unmatched quotes
6149 '''''Bold italic text '''with bold deactivated''' in between.'''''
6151 '''''Bold italic text ''with italic deactivated'' in between.'''''
6155 ..spanning two paragraphs (should not work).'''
6157 '''Bold tag left open
6159 ''Italic tag left open
6163 <!-- Unmatching number of opening, closing tags: -->
6164 '''This year''''s election ''should'' beat '''last year''''s.
6166 ''Tom'''s car is bigger than ''Susan'''s.
6168 Plain ''italic'''s plain
6170 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6171 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6172 </p><p><b>Bold text..</b>
6173 </p><p>..spanning two paragraphs (should not work).
6174 </p><p><b>Bold tag left open</b>
6175 </p><p><i>Italic tag left open</i>
6177 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6178 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6179 </p><p>Plain <i>italic'</i>s plain
6182 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6183 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6184 </p><p><b>Bold text..</b>
6185 </p><p>..spanning two paragraphs (should not work).<b></b>
6186 </p><p><b>Bold tag left open</b>
6187 </p><p><i>Italic tag left open</i>
6190 <!-- Unmatching number of opening, closing tags: -->
6191 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6192 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6193 </p><p>Plain <i>italic'</i>s plain
6200 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6203 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6204 # is the bare minimum required by the spec, see:
6205 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6206 # Parsoid team replies: empty table tags are legal in HTML5
6208 A table with no data.
6221 A table with stray table end tags on start tag line (wt2html)
6225 {|style="color: red;"|}
6227 {|style="color: red;" |}
6231 {|style="color: red;"|} id="foo"
6235 {|style="color: red;" |} id="foo"
6239 <table style="color: red;"></table>
6241 <table style="color: red;">
6247 <table style="color: red;" id="foo">
6253 <table style="color: red;" id="foo">
6262 A table with no data (take 2)
6270 # A table with nothing but a caption is invalid XHTML, we might want to render
6271 # this as <p>caption</p>
6272 # Parsoid team replies: table with only a caption is legal in HTML5
6274 A table with nothing but a caption
6282 </caption><tr><td></td></tr></table>
6285 <table><caption>caption</caption></table>
6289 A table with caption with default-spaced attributes and a table row
6292 |+ style="color: red;" |caption1
6298 <caption style="color: red;">caption1
6307 A table with captions with non-default spaced attributes and a table row
6310 |+style="color: red;"|caption2
6311 |+ style="color: red;"|caption3
6317 <caption style="color: red;">caption2
6319 <caption style="color: red;">caption3
6328 Table td-cell syntax variations
6333 |style='color:red;'|baz
6334 |style='color:red;'||baz
6341 <td>foo bar foo</td>
6344 <td style="color:red;">baz
6346 <td>style='color:red;'</td>
6374 Simple table but with multiple dashes for row wikitext
6393 Multiplication table
6395 {| border="1" cellpadding="2"
6396 |+Multiplication table
6416 <table border="1" cellpadding="2">
6417 <caption>Multiplication table
6464 Accept "||" in table headings
6479 Accept "!!" in table data
6493 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6498 Accept "||" in indented table headings
6508 </th></tr></table></dd></dl>
6513 Accept "!!" in templates
6527 <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>
6531 Accept "!!" in table headings after newline
6548 <p>b!!c</p></th></tr>
6553 Accept "!!" in table data of mixed wikitext / html syntax
6557 <tr><td>b!!c</td></tr>
6563 </th></tr><tr><td>b!!c</td></tr>
6567 <tbody><tr><th>a</th></tr>
6568 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6573 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6590 Accept "| !" at start of line in tables (ignore !-attribute)
6594 |!style="color:red"|bar
6606 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 +/-
6610 |style='color:red;'|+1
6611 |style='color:blue;'|-1
6623 <td style="color:red;">+1
6625 <td style="color:blue;">-1
6649 |rowspan=2|Cell 2, row 1 (and 2)
6660 <td rowspan="2">Cell 2, row 1 (and 2)
6678 {| bgcolor=#ABCDEF border=2
6683 |the original table again
6691 <table bgcolor="#ABCDEF" border="2">
6699 <td>the original table again
6705 Invalid attributes in table cell (T3830)
6719 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6723 |title="foo<nowiki>|</nowiki>" |bar
6724 |title="foo<nowiki>|</nowiki>" bar
6731 <td title="foo|">bar
6733 <td>title="foo|" bar
6738 <tbody><tr><td title="foo">bar</td>
6739 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6740 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6744 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6745 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6746 # *2wt modes will fail.
6748 Table security: embedded pipes
6750 parsoid=wt2html,html2html
6753 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6757 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6758 <td>]" onmouseover="alert(document.cookie)">test
6766 <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>
6770 Element attributes with double ! should not be broken up by <th>
6773 !hi <div class="!!">ha</div> ho
6778 <th>hi <div class="!!">ha</div> ho
6783 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6788 ! and || in element attributes should not be parsed as <th>/<td>
6791 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6796 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6801 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6805 # FIXME: The output seems broken. Filed as T110268.
6807 ! and || in td attributes should not be parsed as <th>/<td>
6812 |style="color: red !important;" data-contrived="put this here ||"|foo
6817 <td>style="color: red !important;" data-contrived="put this here</td>
6823 <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>
6828 Break on | in element attribute in template
6830 parsoid=wt2html,html2html
6832 {{echo|1=<div class="hi|ho">ha</div>}}
6834 <p>ho">ha</div>
6837 <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>
6841 Break on | in element attribute name in template
6843 {{echo|<div cla|ss="hiho">ha</div>}}
6845 <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>
6849 Don't break on | in extension attribute in template
6851 {{echo|<ref name="hi|ho">ha</ref>}}
6855 <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>
6857 <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>
6860 ## We don't support roundtripping of these attributes in Parsoid.
6861 ## Selective serialization takes care of preventing dirty diffs.
6862 ## But, on edits, we dirty-diff the invalid attribute text.
6864 Invalid text in table attributes should be discarded
6868 {| <span>boo</span> style='border:1px solid black'
6869 | <span>boo</span> style='color:blue' |1
6870 |<span>boo</span> style='color:blue'|2
6873 <table style="border:1px solid black">
6875 <td style="color:blue">1
6877 <td style="color:blue">2
6881 <table style="border:1px solid black">
6883 <td style="color:blue">1</td>
6884 <td style="color:blue">2</td>
6890 Invalid text in table attributes should be preserved by selective serializer
6893 "modes": ["selser"],
6895 ["td:first-child", "text", "abc"],
6896 ["td + td", "text", "xyz"]
6900 {| <span>boo</span> style='border:1px solid black'
6901 | <span>boo</span> style='color:blue' | 1
6902 |<span>boo</span> style='color:blue'| 2
6905 {| <span>boo</span> style='border:1px solid black'
6906 | <span>boo</span> style='color:blue' | abc
6907 |<span>boo</span> style='color:blue'| xyz
6912 1. Template-generated table cell attributes and cell content
6917 || {{table_attribs_5}}
6918 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6919 |align=center {{table_attribs}}
6920 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6925 <td style="color:red;">Foo
6927 <td style="color:red;">Foo
6929 <td>style="color:red;"</td>
6932 <td style="color:red;">Foo
6934 <td align="center" style="color:red;">Foo
6936 <td align="center" style="color:red;">Foo
6942 2. Template-generated table cell attributes and cell content
6945 |{{table_attribs_2}}
6950 <td style="color:red;">Foo
6958 <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>
6959 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6964 3. Template-generated table cell attributes and cell content
6967 !align=center {{table_header_cells}}
6969 |align=center {{table_cells}}
6974 <th align="center" style="color:red;">Foo</th>
6975 <th style="color:red;"><i>Bar</i></th>
6976 <th style="color:brown;"><i>Foo</i> and Baz
6979 <td align="center" style="color:red;">Foo</td>
6980 <td style="color:red;"><i>Bar</i></td>
6981 <td style="color:brown;"><i>Foo</i> and Baz
6986 <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>
6987 <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>
6992 4. Template-generated table cell attributes and cell content inside a templated table
6995 !align=center {{table_header_cells}}
6997 |align=center {{table_cells}}
7002 <th align="center" style="color:red;">Foo</th>
7003 <th style="color:red;"><i>Bar</i></th>
7004 <th style="color:brown;"><i>Foo</i> and Baz
7007 <td align="center" style="color:red;">Foo</td>
7008 <td style="color:red;"><i>Bar</i></td>
7009 <td style="color:brown;"><i>Foo</i> and Baz
7013 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":1}},"\n|-\n|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":2}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":3}}]}'>
7014 <tbody><tr><th align="center" style="color:red;">Foo</th><th style="color:red;"><i>Bar</i></th><th style="color:brown;"><i>Foo</i> and Baz</th></tr>
7016 <td align="center" style="color:red;">Foo</td><td style="color:red;"><i>Bar</i></td><td style="color:brown;"><i>Foo</i> and Baz</td></tr>
7020 ## Edge case fix to prevent future regressions
7022 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7025 |{{table_attribs_7}}
7030 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","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>
7032 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./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>
7036 Table with row followed by newlines and table heading
7038 parsoid=wt2html,html2html
7056 Table with empty line following the start tag
7058 parsoid=wt2html,html2html
7076 Table attributes with empty value
7078 parsoid=wt2html,html2html
7091 <tbody><tr><td style="">hello</td></tr>
7096 Wikitext table with a lot of comments
7119 Wikitext table comments represented in parsoid dom
7121 {|<!--c1--><!--c2-->
7130 </td></tr></tbody></table>
7132 <table><!--c1--><!--c2-->
7133 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7134 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7139 Wikitext table with double-line table cell
7156 Table cell with a single comment
7173 Table-cell after a comment-only-empty-line
7190 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7192 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7198 Build table with {{!}}
7200 {{{!}} class="wikitable"
7203 {{!}}- style="color:red;"
7204 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7207 <table class="wikitable">
7213 <tr style="color:red;">
7215 <td style="color:red;">second data
7221 Build table with pipe as data
7223 {| class="wikitable"
7226 |- style="color:red;"
7227 |data|| style="color:red;" |second data
7229 | style="color:red;" |data with | || style="color:red;" | second data with |
7231 ||data with | |||second data with |
7234 <table class="wikitable">
7240 <tr style="color:red;">
7242 <td style="color:red;">second data
7245 <td style="color:red;">data with |</td>
7246 <td style="color:red;">second data with |
7249 <td>data with |</td>
7250 <td>second data with |
7256 Build table with wikilink
7258 {| class="wikitable"
7259 !header||second header
7260 |- style="color:red;"
7261 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7263 |data||second data [[Main Page|link|text with pipe]]
7266 <table class="wikitable">
7271 <tr style="color:red;">
7272 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7273 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7277 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7282 # The expected HTML structure in this test is debatable. The PHP parser does
7283 # not parse this kind of table at all. The main focus for Parsoid is on
7284 # round-tripping, so this output is ok for now. TODO: revisit!
7286 Wikitext table with html-syntax row
7296 <td>foo</td></tr></tbody></table>
7300 Fostered content in tables: Plain text
7302 parsoid=wt2html,html2html
7320 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7323 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7327 Fostered content in tables: Lists
7329 parsoid=wt2html,html2html
7342 <ul><li>a</li></ul><table>
7347 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7348 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7350 </tr></tbody></table>
7354 Template generated table cell with attributes
7358 {{table_attribs_4}} ||a||b
7364 <td style="background-color:#DC241f;" width="10px"></td>
7367 </td></tr></tbody></table>
7370 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7371 <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>
7375 Parsoid: Round-trip tables directly followed by content (T53219)
7377 parsoid=wt2html,wt2wt
7390 </td></tr></tbody></table><p> bar
7394 </td></tr></tbody></table><p><b>quux</b>
7399 Parsoid: Default to a newline after tables in new content (T53219)
7404 <tr><td>foo</td></tr></tbody></table> bar
7406 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7411 <nowiki> </nowiki>bar
7419 Parsoid: Row-syntax table headings followed by comment & table cells
7421 parsoid=wt2html,wt2wt
7425 <!-- foo --> ||baz||quux
7439 <tbody><tr><th>foo</th><th>bar
7440 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7445 Parsoid: Recover better from broken table attributes
7459 </td></tr></tbody></table>
7464 <p>foo</p></td></tr>
7469 Tables: Digest broken attributes on table and tr tag
7480 <tr class='mw-empty-elt'></tr>
7481 <tr class='mw-empty-elt'></tr>
7486 Table with missing opening <tr> tag
7488 parsoid=wt2html,wt2wt
7496 <tbody><tr><td>foo</td>
7501 # T137406: Whitespace in the HTML
7503 1. Generate correct wikitext for tables with thead/tbody/tfoot
7508 <caption>Test</caption>
7570 </td></tr></tbody></table>
7573 # T137406: No whitespace in the HTML
7575 2. Generate correct wikitext for tables with thead/tbody/tfoot
7579 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7589 Wikitext tables can be nested inside HTML tables
7593 <table data-parsoid='{"stx":"html"}'>
7596 <tr><td>foo</td></tr>
7614 Plain link, capitalized
7618 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7623 Plain link, uncapitalized
7627 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7634 [[Main Page|The Main Page]]
7636 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7641 Piped link with comment in link text
7643 [[Main Page|The Main<!--front--> Page]]
7645 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7650 Piped link with multiple pipe characters in link text
7652 [[Main Page||The|Main|Page|]]
7654 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7657 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7661 Piped link with no link text
7663 [[Thomas Bek (bishop of St David's)|]]
7665 <p>[[Thomas Bek (bishop of St David's)|]]
7668 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7672 Piped link with empty link text
7674 [[Main Page|<nowiki/>]] - empty nowiki
7675 [[Main Page| ]] - empty space
7676 [[Main Page| ]] - empty non breaking space
7678 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7679 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7680 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7683 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7684 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7685 <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>
7693 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7698 Broken link with fragment
7700 [[Zigzagzogzagzig#zug]]
7702 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7707 Special page link with fragment
7709 [[Special:Version#anchor]]
7711 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7716 Nonexistent special page link with fragment
7718 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7720 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7727 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7729 <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>
7736 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7738 <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>!!!
7749 T45661: Piped links with identical prefixes
7751 [[prefixed article|prefixed articles with spaces]]
7753 [[prefixed article|prefixed articlesaoeu]]
7755 [[Main Page|Main Page test]]
7757 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7758 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7759 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7765 Link with HTML entity in suffix / tail
7767 [[Main Page]]", [[Main Page]]a
7769 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7772 <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>
7776 Link with 3 brackets
7787 Link with 4 brackets
7791 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7796 Piped link with 3 brackets
7798 [[[main page|the main page]]]
7800 <p>[[[main page|the main page]]]
7805 Piped link with extlink-like text
7808 [[Main Page|This is a [bar]]]
7811 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7812 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7813 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7816 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7817 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7818 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7822 Link with multiple pipes
7824 [[Main Page|The|Main|Page]]
7826 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7831 Anchor containing a #. (T65430)
7833 wgFragmentMode=[ 'html5', 'legacy' ]
7835 [[Main Page#And#Link]]
7837 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7840 <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>
7846 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7848 <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>
7853 Link with space in namespace
7855 [[User talk:Foo bar]]
7857 <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>
7862 MemoryAlpha:AlphaTest
7864 This is an article in the MemoryAlpha namespace
7865 (which shadows the memoryalpha interwiki link).
7869 Namespace takes precedence over interwiki link (T53680)
7871 [[MemoryAlpha:AlphaTest]]
7873 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7877 # The previous test doesn't work correctly in html2*, due to not recognizing the
7878 # link as an internal one. This one checks for the correct behavior.
7880 Link to namespace preferred over interwiki with correct rel attribute
7882 parsoid=html2wt,html2html
7884 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7886 [[MemoryAlpha:AlphaTest]]
7890 Piped link to namespace
7892 [[Meta:Disclaimers|The disclaimers]]
7894 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7901 [[Usually caused by a typo (oops}]]
7903 <p>[[Usually caused by a typo (oops}]]
7910 Just a test of an article title containing a percent.
7914 Link containing % (not as a hex sequence)
7917 [[7% Solution|7%25 Solution]]
7919 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7920 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7923 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7924 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7927 # note that the parsoid HTML is identical to the previous test output,
7928 # so the previous test ensures that the html2wt mode will generate the
7929 # "not as a hex sequence" wikitext.
7931 Link containing % as a single hex sequence interpreted to char
7933 parsoid=wt2wt,wt2html,html2html
7936 [[7%25 Solution|7%25 Solution]]
7938 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7939 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7942 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7943 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7947 Link containing % as a double hex sequence interpreted to hex sequence
7951 <p>[[7%2525 Solution]]
7955 ## Example for such a section: == < ==
7957 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7959 wgFragmentMode=[ 'html5', 'legacy' ]
7961 [[%23%3c]][[%23%3e]]
7963 <p><a href="#<">#<</a><a href="#>">#></a>
7966 <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>
7969 ## Example for such a section: == < ==
7971 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7973 wgFragmentMode=[ 'legacy' ]
7975 [[%23%3c]][[%23%3e]]
7977 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7982 Link containing "<#" and ">#" as a hex sequences
7984 [[%3c%23]][[%3e%23]]
7986 <p>[[%3c%23]][[%3e%23]]
7991 Link containing an equals sign
7993 [[Special:BookSources/isbn=4-00-026157-6]]
7995 <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>
7998 <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>
8004 Just a test of an article title containing a tilde.
8007 # note that links containing signatures, like [[Foo~~~~]], are
8008 # massaged by the pre-save transform (PST) and so the tildes are never
8009 # seen by the parser.
8011 Link containing a tilde
8015 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8018 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8022 Link containing double-single-quotes '' (T6598)
8024 [[Lista d''e paise d''o munno]]
8026 <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>
8029 <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>
8033 Link containing double quotes and spaces
8037 <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>
8040 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8044 File containing double quotes and spaces
8046 [[File:Cool "Gator".png]]
8048 <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>
8052 Redirect containing double quotes and spaces
8054 #REDIRECT [[Cool "Gator"]]
8056 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8060 Link containing double-single-quotes '' in text (T6598 sanity check)
8062 Some [[Link|pretty ''italics'' and stuff]]!
8064 <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>!
8067 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8071 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8073 ''Some [[Link|pretty ''italics'' and stuff]]!''
8075 <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>
8080 Link with double quotes in title part (literal) and alternate part (interpreted)
8082 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8086 [[''Pentecoste''|Pentecoste]]
8088 [[''Pentecoste''|''Pentecoste'']]
8090 <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>
8091 </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>
8092 </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>
8093 </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>
8096 <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>
8097 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8098 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8099 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8103 Broken image links with HTML captions (T41700)
8105 [[File:Nonexistent|<script></script>]]
8106 [[File:Nonexistent|100x100px|<script></script>]]
8107 [[File:Nonexistent|<]]
8108 [[File:Nonexistent|a<i>b</i>c]]
8110 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8111 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8112 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8113 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8116 <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>
8117 <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>
8118 <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>
8119 <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>
8125 [[http://www.example.com]]
8127 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8130 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8134 Plain link to URL with link text
8136 [[http://www.example.com Link text]]
8138 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8143 Plain link to protocol-relative URL
8145 [[//www.example.com]]
8147 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8150 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8154 Plain link to protocol-relative URL with link text
8156 [[//www.example.com Link text]]
8158 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8163 Plain link to page with question mark in title
8169 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8170 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8174 # I'm fairly sure the expected result here is wrong.
8175 # We want these to be URL links, not pseudo-pages with URLs for titles....
8176 # However the current output is also pretty screwy.
8179 # I'm changing it to match the current output--it arguably makes more
8180 # sense in the light of the test above. Old expected result was:
8181 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8183 # But I think this test is bordering on "garbage in, garbage out" anyway.
8188 Piped link to URL: [[http://www.example.com|an example URL]]
8190 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8193 <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>
8197 Plain link in template argument
8201 {{echo|[http://www.example.com |123]}}
8203 {{echo|[[http://www.example.com |123]]}}
8205 {{echo|[[http://www.example.com |123]}}
8207 {{echo|[http://www.example.com |123]]}}
8209 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8210 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8211 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8212 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8215 <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>
8217 <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>
8219 <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>
8221 <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>
8225 T2002: [[page|http://url/]] should link to page, not http://url/
8227 [[Main Page|http://url/]]
8229 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8232 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8235 # Parsoid does not mark self-links, by design.
8237 T2337: Escaped self-links should be bold
8241 [[Bug462]] [[Bug462]]
8243 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8246 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8250 Self-link to section should not be bold
8254 [[Main Page#section]]
8256 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8267 Self-link to numeric title
8273 <p><a class="mw-selflink selflink">0</a>
8278 Link to numeric-equivalent title
8284 <p><a href="/wiki/00" title="00">00</a>
8289 <nowiki> inside a link
8291 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8293 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8298 Non-breaking spaces in title
8300 [[ Main Page ]]
8302 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8306 # Add new article for the test below so that it doesn't red-link
8314 Multiple spaces in titles should normalize to a single underscore
8316 parsoid=wt2html,wt2wt
8322 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8323 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8324 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8327 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8328 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8329 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8334 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8340 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8345 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8351 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8356 Internal link with en linktrail: no apostrophes (T29473)
8362 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8367 Internal link with ca linktrail with apostrophes (T29473)
8373 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8378 Internal link with kaa linktrail with apostrophes (T29473)
8384 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8389 Link with multiple ":" in a subpage-supporting namespace (T65636)
8391 [[User:Foo/Test/63636:Bar|Test]]
8393 <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>
8396 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8399 ## Mainly a sanity check for Parsoid
8401 Handle title parsing for subpages
8421 Link to a subpage from a namespace other than main
8428 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8431 <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>
8435 Ensure that transclusion titles are not url-decoded
8437 subpage title=[[Test]]
8440 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8442 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8445 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8449 Purely hash wikilink
8451 title=[[User:Test/123]]
8456 <p><a href="#a">b</a>
8459 <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>
8463 Serialization of purely hash wikilink
8465 title=[[User:Test/123]]
8469 <p><a href="#a">[[</a></p>
8471 [[#a|<nowiki>[[</nowiki>]]
8473 <p><a href="#a">[[</a>
8478 1. Interaction of linktrail and template encapsulation
8482 <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>
8486 2. Interaction of linktrail and template encapsulation
8490 {{echo|Some [[Fool]]}}s
8492 <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>
8496 3. Interaction of linktrail and template encapsulation
8500 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8502 <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>
8512 Internal link with is link prefix
8516 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8518 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8529 Internal link with is link trail and link prefix
8533 [[mótmælendatrú|xxx]]ar
8535 mótmælenda[[söfnuður]]
8536 mótmælenda[[söfnuður|söfnuðir]]
8537 mótmælenda[[söfnuður|söfnuðir]]xxx
8539 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8540 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8541 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8542 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8543 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8548 Parsoid link trail escaping
8550 parsoid=html2wt,html2html
8552 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8558 Parsoid link prefix escaping
8561 parsoid=html2wt,html2html
8563 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8565 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8569 Parsoid link bracket escaping
8571 parsoid=html2wt,html2html
8573 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8574 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8575 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8576 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8577 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8578 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8586 [[[<nowiki/>[[Test]]]]]
8590 [[[[[<nowiki/>[[Test]]]]]]]
8594 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8602 [http://wp.org ''foo'']
8604 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8605 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8606 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8607 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8612 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8614 [[Foo|{{echo|a}} b {{echo|c}}]]
8616 <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>
8620 Link with angle bracket after anchor
8622 wgFragmentMode=[ 'html5', 'legacy' ]
8626 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8629 <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>
8633 Link with angle bracket after anchor (legacy)
8635 wgFragmentMode=[ 'legacy' ]
8639 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8644 ### Interwiki links (see maintenance/interwiki.sql)
8648 Inline interwiki link
8650 parsoid=wt2html,wt2wt,html2html
8652 [[MeatBall:SoftSecurity]]
8654 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8657 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8661 Inline interwiki link with empty title (T4372)
8663 parsoid=wt2html,wt2wt,html2html
8667 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8670 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8673 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8675 Interwiki link encoding conversion (T3636)
8677 parsoid=wt2html,wt2wt
8679 *[[Wikipedia:ro:Olteniţa]]
8680 *[[Wikipedia:ro:Olteniţa]]
8682 <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>
8683 <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>
8687 <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>
8688 <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>
8692 <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>
8693 <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>
8698 Interwiki link with fragment (T4130)
8700 [[MeatBall:SoftSecurity#foo]]
8702 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8707 Link scenarios with escaped fragments
8709 wgFragmentMode=[ 'html5', 'legacy' ]
8712 [[Foo#Is this great?]]
8713 [[meatball:Foo#Is this great?]]
8715 <p><a href="#Is_this_great?">#Is this great?</a>
8716 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8717 <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>
8720 <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>
8721 <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>
8722 <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>
8726 Link scenarios with escaped fragments (legacy)
8728 wgFragmentMode=[ 'legacy' ]
8731 [[Foo#Is this great?]]
8732 [[meatball:Foo#Is this great?]]
8734 <p><a href="#Is_this_great.3F">#Is this great?</a>
8735 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8736 <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>
8740 # Ideally the wikipedia: prefix here should be proto-relative too
8741 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8742 # define the 'en' prefix, and originally the test used 'wikipedia',
8743 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8746 Different interwiki prefixes mapping to the same URL
8754 [[:wikipedia:Foo|Foo]]
8756 [[wikipedia:en:Foo]]
8758 [[:wikipedia:en:Foo]]
8762 <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>
8764 <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>
8766 <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>
8768 <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>
8770 <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>
8772 <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>
8774 <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>
8778 Interwiki links that cannot be represented in wiki syntax
8781 [[meatball:ok#foo|ok with fragment]]
8782 [[meatball:ok_as_well?|ok ending with ? mark]]
8783 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8784 [http://de.wikipedia.org/wiki/#foo is just fragment]
8787 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8788 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8789 <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>
8790 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8791 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8794 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8795 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8796 <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>
8797 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8798 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8802 Interwiki links: trail
8804 [[wikipedia:Foo|Ba]]r
8806 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8809 <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>
8813 Local interwiki link
8815 parsoid=wt2html,wt2wt,html2html
8817 [[local:Template:Foo]]
8819 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8822 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8825 # Parsoid does not mark self-links, by design.
8827 Local interwiki link: self-link to current page
8830 parsoid=wt2html,wt2wt,html2html
8834 <p><a class="mw-selflink selflink">local:Main Page</a>
8837 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8841 Local interwiki link: prefix only (T66167)
8843 parsoid=wt2html,wt2wt,html2html
8847 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8850 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8854 Local interwiki link: with additional interwiki prefix (T63357)
8856 parsoid=wt2html,wt2wt,html2html
8858 [[local:meatball:Hello]]
8860 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8863 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8867 Multiple local interwiki link prefixes
8869 [[local:local:local:local:mi:local:Foo]]
8871 parsoid=wt2html,wt2wt,html2html
8873 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8876 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8880 ### Interlanguage links
8881 ### Language links (so that searching for '### language' matches..)
8893 <p>Blah blah blah</p>
8894 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8897 ## parsoid html2wt will lose the space variations
8899 Interlanguage link with spacing
8901 parsoid=wt2html,wt2wt,html2html
8909 <p>Blah blah blah</p>
8910 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8914 Double interlanguage link
8923 <p>Blah blah blah</p>
8924 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8925 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8928 ## parsoid html2wt will lose the space variations
8930 Interlanguage link variations
8932 parsoid=wt2html,wt2wt,html2html
8942 <p>Blah blah blah</p>
8943 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8944 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8945 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8949 Escaping of interlanguage links (T129218, T156308)
8953 [[ : zh : Chinese ]]
8956 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8957 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8961 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8962 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8966 Multiple colons escaping interlanguage links
8974 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8979 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8981 [[:::es:Spanish]]</p>
8984 ## parsoid html2wt will normalize the space to _
8986 Space and question mark encoding in interlanguage links (T95473)
8988 parsoid=wt2html,wt2wt,html2html
8996 <p>Blah blah blah</p>
8997 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9001 Interlanguage link, with prefix links
9011 <p>Blah blah blah</p>
9012 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9016 Double interlanguage link, with prefix links (T10897)
9027 <p>Blah blah blah</p>
9028 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9029 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9033 "Extra" interlanguage links (T34189 / gerrit 111390)
9041 <p>Blah blah blah</p>
9042 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9045 ## PHP parser tests script needs an update
9046 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9048 Language links render as inline links if $wgInterwikiMagic=false
9050 wgInterwikiMagic=false
9051 parsoid=wt2html,wt2wt,html2html
9056 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9059 ## PHP parser tests script needs an update
9060 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9062 Language links render as inline links in the Talk namespace
9065 parsoid=wt2html,wt2wt,html2html
9070 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9074 Parsoid-specific test: Wikilinks with should RT properly
9080 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9085 Parsoid T55221: Wikilinks should be properly entity-escaped
9087 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9089 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9090 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9092 He&nbsp;llo [[Foo|He&nbsp;llo]]
9094 He&nbsp;llo He&nbsp;llo
9096 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9097 </p><p>He&nbsp;llo He&nbsp;llo
9101 # html2wt will fail because of title normalization without data-parsoid
9103 Parsoid: handle constructor well
9105 parsoid=wt2html,wt2wt
9111 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9112 </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>
9115 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9117 <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>
9121 Template parameter named "constructor"
9123 {{echo| constructor = |hi}}
9125 <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>
9134 # Note that `ko` isn't a known interlanguage prefix
9136 Parsoid: recognize interlanguage links without a target page
9146 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9148 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9151 # Note that `ko` isn't a known interwiki prefix
9153 Parsoid: recognize interwiki links without a target page
9155 parsoid=wt2html,wt2wt,html2html
9161 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9162 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9165 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9166 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9170 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9174 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9177 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9181 Interlanguage link with preceding local interwiki link (T70085)
9183 parsoid=wt2html,wt2wt,html2html
9186 [[local:es:Spanish]]
9189 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9193 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9197 Looks like an interlanguage link, but is actually a local interwiki
9199 parsoid=wt2html,wt2wt,html2html
9205 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9209 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9213 ### Redirects, Parsoid-only
9217 1. Simple redirect to page
9219 #REDIRECT [[Main Page]]
9221 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9225 2. Other redirect variants
9227 #REDIRECT [[Main_Page]]
9229 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9232 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9233 # This tests the Parsoid bail-out code.
9235 3. Other redirect variants
9239 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9241 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9245 4. Redirect to a templated destination
9247 #REDIRECT [[{{echo|Foo}}bar]]
9249 <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"}]]}'/>
9255 parsoid=wt2html,wt2wt
9260 <li>REDIRECT [[]]</li></ol>
9264 Optional colon in #REDIRECT
9266 # the colon is archaic syntax. we support it for wt2html, but we
9267 # don't care that it roundtrips back to the modern syntax.
9268 parsoid=wt2html,html2html
9270 #REDIRECT:[[Main Page]]
9272 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9276 Whitespace in #REDIRECT with optional colon
9278 # the colon and gratuitous whitespace is archaic syntax. we support
9279 # it for wt2html, but we don't care that it roundtrips back to the
9280 # modern syntax (without extra whitespace)
9281 parsoid=wt2html,html2html
9288 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9292 Piped link in #REDIRECT
9294 # content after piped link is ignored. we support this syntax,
9295 # but don't care that the piped link is lost when we roundtrip this.
9298 #REDIRECT [[Main Page|bar]]
9300 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9304 Redirect to category (T104502)
9306 parsoid=wt2html,wt2wt
9308 #REDIRECT [[Category:Foo]]
9310 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9314 Redirect to category with URL encoding (T104502)
9318 #REDIRECT [[Category%3AFoo]]
9320 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9324 Redirect to category page
9326 #REDIRECT [[:Category:Foo]]
9328 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9332 Redirect to image page (1)
9334 #REDIRECT [[File:Wiki.png]]
9336 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9340 Redirect to image page (2)
9342 #REDIRECT [[Image:Wiki.png]]
9344 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9347 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9348 # Next test confirms this.
9350 Redirect to language (1) (T104918)
9352 parsoid=wt2html,wt2wt,html2html
9354 #REDIRECT [[en:File:Wiki.png]]
9356 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9360 Redirect to language (2) (T104918)
9362 #REDIRECT [[:en:File:Wiki.png]]
9364 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9368 Redirect to interwiki (T104918)
9370 #REDIRECT [[meatball:File:Wiki.png]]
9372 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9376 Non-English #REDIRECT
9380 #TILVÍSUN [[Main Page]]
9382 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9386 Redirect syntax under text isn't considered a redirect
9390 #redirect [[Main Page]]
9393 <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>
9401 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9408 Redirect followed by block on the same line
9412 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9414 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9418 Redirect followed by a newline
9420 #REDIRECT [[Main Page]]
9423 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9428 Redirect followed by multiple newlines
9430 #REDIRECT [[Main Page]]
9435 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9442 Drop duplicate redirects
9446 <link rel="mw:PageProp/redirect" href="./Foo"/>
9447 <link rel="mw:PageProp/redirect" href="./Bar"/>
9448 <link rel="mw:PageProp/redirect" href="./Baz"/>
9467 Broken br tag sanitization
9475 # TODO: Fix html2html mode (T53055)!
9477 Parsoid: Broken br tag recognition
9491 Incorrecly removing closing slashes from correctly formed XHTML
9493 <br style="clear:both;" />
9495 <p><br style="clear:both;" />
9500 Failing to transform badly formed HTML into correct XHTML
9502 <br style="clear: left;">
9503 <br style="clear: right;">
9504 <br style="clear: both;">
9506 <p><br style="clear: left;" />
9507 <br style="clear: right;" />
9508 <br style="clear: both;" />
9512 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9513 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9515 Handling html with a div self-closing tag
9524 <p><div title />
9528 <p><div title=bar />
9529 <div title=bar/>
9531 <div title="bar/"></div>
9535 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9536 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9537 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9538 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9539 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9540 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9544 Handling html with a br self-closing tag
9571 Horizontal ruler (should it add that extra space?)
9580 foo </p><hr /><p> bar
9585 Horizontal ruler -- 4+ dashes render hr
9594 Horizontal ruler -- eats additional dashes on the same line
9603 Horizontal ruler -- does not collapse dashes on consecutive lines
9614 Horizontal ruler -- <4 dashes render as plain text
9623 Horizontal ruler -- Supports content following dashes on same line
9635 ### Block-level elements
9644 <ul><li>Common list</li>
9646 <li>item 3</li></ul>
9657 <ol><li>Numbered list</li>
9659 <li>item 3</li></ol>
9663 # the switch from level 3 to ordered should not introduce a newline between
9674 ***#Number on level 4
9676 **#Number on level 3
9677 **#Number on level 3
9681 #**Level 3, but ordered
9684 <ol><li>with numbers</li></ol>
9685 <ul><li>and bullets</li></ul>
9686 <ol><li>and numbers</li></ol></li>
9688 <ul><li>bullet level 2
9689 <ul><li>bullet level 3
9690 <ol><li>Number on level 4</li></ol></li></ul></li>
9692 <ol><li>Number on level 3</li>
9693 <li>Number on level 3</li></ol></li></ul>
9694 <ol><li>number level 2</li></ol></li>
9696 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9697 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9702 1. Nested mixed wikitext and html list
9705 *<ul><li>ho</li></ul>
9710 <li><ul><li>ho</li></ul></li>
9712 <ul><li>ho</li></ul></li></ul>
9716 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9718 <ul><li>ho</li></ul></li></ul>
9722 2. Nested mixed wikitext and html list (incompatible)
9725 :{{echo|<li>ho</li>}}
9728 <dd><li>ho</li></dd></dl>
9732 <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>
9742 <ul><li>bar</li></ul></li></ul>
9752 <ul><li><ul><li>foo</li></ul></li>
9758 Nested lists 3 (first element empty)
9764 <ul><li>bar</li></ul></li></ul>
9769 Nested lists 4 (first element empty)
9774 <ul><li><ul><li></li></ul></li>
9780 Nested lists 5 (both elements empty)
9785 <ul><li><ul><li></li></ul></li>
9791 Nested lists 6 (both elements empty)
9797 <ul><li></li></ul></li></ul>
9802 Nested lists 7 (skip initial nesting levels)
9806 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9811 Nested lists 8 (multiple nesting transitions)
9819 <ul><li><ul><li>bar</li></ul></li>
9820 <li>baz</li></ul></li>
9826 Nested lists 9 (extension interaction)
9832 <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>
9836 1. Lists with start-of-line-transparent tokens before bullets: Comments
9849 Nested lists 10 (list and span siblings: wt2wt regression)
9854 <ul><li>a <span>x</span>
9855 <ul><li>b <span>y</span></li></ul></li></ul>
9859 2. Lists with start-of-line-transparent tokens before bullets: Template close
9864 <ul><li>foo bar</li>
9870 List items are not parsed correctly following a <pre> block (T2785)
9876 <ul><li><pre>foo</pre></li>
9877 <li><pre>bar</pre></li>
9881 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9882 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9886 # FIXME: Might benefit from a html/parsoid since this has a template
9888 List items from template
9899 *notSOL{{inner list}}
9903 <li>item 2</li></ul>
9906 <li>item 2</li></ul>
9910 <li>item 2</li></ul>
9915 List interrupted by empty line or heading
9923 <ul><li>foo</li></ul>
9924 <ul><li><ul><li>bar</li></ul></li></ul>
9925 <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>
9926 <ul><li>Another list item</li></ul>
9931 Multiple list tags generated by templates
9949 <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
9950 </li><li about="#mwt1">b
9951 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9955 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9958 <!--This line will NOT split the list-->
9960 <!--This line will NOT split the list either-->
9962 <!--foo--> <!----> <!--This line NOT split the list either-->
9973 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9976 <!--This line will NOT split the list-->
9978 <!--This line will NOT split the list either-->
9980 <!--foo--> <!----> <!--This line NOT split the list
9991 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
9992 # That pass could possibly be removed.
9994 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
9996 parsoid=wt2html,wt2wt
10000 *{{echo|<li>templated li-hack}}
10001 *<!--foo--><li> unsupported li-hack with preceding comments
10004 <li><li>not a li-hack
10009 <li class="mw-empty-elt"></li><li>li-hack</li>
10010 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10011 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10013 <li class="mw-empty-elt"></li><li>not a li-hack
10018 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10019 <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>
10020 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10022 <ul data-parsoid='{"stx":"html"}'>
10023 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10030 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10059 Parsoid: Test of whitespace serialization with Templated bullets
10066 <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>
10070 # ------------------------------------------------------------------------
10071 # The next set of tests are about Parsoid's ability to handle badly nested
10072 # tags (parse, minimize scope of fixup, and roundtrip back)
10073 # ------------------------------------------------------------------------
10075 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10076 # Parsoid's list handling is more aware of block structure.
10078 Unbalanced closing block tags break a list
10085 <ul><li>a</li></ul></div><div>
10097 Unbalanced closing non-block tags don't break a list
10105 <ul><li>a<span></span></li>
10110 <li>a<span></span></li>
10116 # Parsoid does some post-dom-building cleanup
10117 # which is why its output differs from Remex.
10119 Unclosed formatting tags that straddle lists are closed and reopened
10121 parsoid=wt2html,wt2wt,html2html
10126 <ol><li><s> a</s></li><s>
10127 </s><li><s>b </s></li></ol>
10129 <ol><li><s> a</s></li>
10130 <li><s>b </s></li></ol>
10133 # Output is ugly because of all the misnested tag fixups.
10134 # Remex is wrapping p-tags around empty elements.
10135 # Parsoid has special-case handling of this pattern of
10136 # wrapping lists in formatting tags.
10137 # FIXME: Should we remove this code from Parsoid? Or add
10138 # special support in Remex? If the latter, maybe just wait
10139 # for Parsoid to become the default parser.
10142 1. List embedded in a formatting tag
10149 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10159 # Output is ugly because of all the misnested tag fixups
10160 # Remex is wrapping p-tags around empty elements.
10161 # Parsoid has code that strips useless p-tags.
10163 2. List embedded in a formatting tag in a misnested way
10170 </small></p><small></small><ul><small><li>a</li>
10171 </small><li><small>b</small></li></ul>
10177 <li><small>b</small></li>
10185 # Note that the current date is hard-coded as
10186 # 1970-01-01T00:02:03Z (a Thursday)
10187 # when running parser tests. The timezone is also fixed to GMT, so
10188 # local date will be identical to current date.
10191 Magic Word: {{CURRENTDAY}}
10200 Magic Word: {{CURRENTDAY2}}
10209 Magic Word: {{CURRENTDAYNAME}}
10218 Magic Word: {{CURRENTDOW}}
10227 Magic Word: {{CURRENTMONTH}}
10236 Magic Word: {{CURRENTMONTH1}}
10245 Magic Word: {{CURRENTMONTHABBREV}}
10247 {{CURRENTMONTHABBREV}}
10254 Magic Word: {{CURRENTMONTHNAME}}
10256 {{CURRENTMONTHNAME}}
10263 Magic Word: {{CURRENTMONTHNAMEGEN}}
10265 {{CURRENTMONTHNAMEGEN}}
10272 Magic Word: {{CURRENTTIME}}
10281 Magic Word: {{CURRENTHOUR}}
10290 Magic Word: {{CURRENTWEEK}} (T6594)
10299 Magic Word: {{CURRENTYEAR}}
10308 Magic Word: {{CURRENTTIMESTAMP}}
10310 {{CURRENTTIMESTAMP}}
10317 Magic Words LOCAL (UTC)
10321 *{{LOCALMONTHNAME}}
10322 *{{LOCALMONTHNAMEGEN}}
10323 *{{LOCALMONTHABBREV}}
10332 *{{LOCALTIMESTAMP}}
10347 <li>19700101000203</li></ul>
10352 Magic Word: {{FULLPAGENAME}}
10354 title=[[User:Ævar Arnfjörð Bjarmason]]
10355 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10359 <p>User:Ævar Arnfjörð Bjarmason
10364 Magic Word: {{FULLPAGENAMEE}}
10366 title=[[User:Ævar Arnfjörð Bjarmason]]
10367 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10371 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10376 Magic Word: {{TALKSPACE}}
10378 title=[[User:Ævar Arnfjörð Bjarmason]]
10379 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10388 Magic Word: {{TALKSPACE}}, same namespace
10390 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10391 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10400 Magic Word: {{TALKSPACE}}, main namespace
10402 title=[[Parser Test]]
10403 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10412 Magic Word: {{TALKSPACEE}}
10414 title=[[User:Ævar Arnfjörð Bjarmason]]
10415 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10424 Magic Word: {{SUBJECTSPACE}}
10426 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10427 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10436 Magic Word: {{SUBJECTSPACE}}, same namespace
10438 title=[[User:Ævar Arnfjörð Bjarmason]]
10439 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10448 Magic Word: {{SUBJECTSPACE}}, main namespace
10450 title=[[Parser Test]]
10451 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10459 Magic Word: {{SUBJECTSPACEE}}
10461 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10462 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10471 Magic Word: {{NAMESPACE}}
10473 title=[[User:Ævar Arnfjörð Bjarmason]]
10474 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10483 Magic Word: {{NAMESPACEE}}
10485 title=[[User:Ævar Arnfjörð Bjarmason]]
10486 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10495 Magic Word: {{NAMESPACENUMBER}}
10497 title=[[User:Ævar Arnfjörð Bjarmason]]
10498 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10500 {{NAMESPACENUMBER}}
10507 Magic Word: {{SUBPAGENAME}}
10509 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10510 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10519 Magic Word: {{SUBPAGENAMEE}}
10521 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10522 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10531 Magic Word: {{ROOTPAGENAME}}
10533 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10534 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10538 <p>Ævar Arnfjörð Bjarmason
10543 Magic Word: {{ROOTPAGENAMEE}}
10545 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10546 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10550 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10555 Magic Word: {{BASEPAGENAME}}
10557 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10558 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10562 <p>Ævar Arnfjörð Bjarmason
10567 Magic Word: {{BASEPAGENAMEE}}
10569 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10570 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10574 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10579 Magic Word: {{TALKPAGENAME}}
10581 title=[[User:Ævar Arnfjörð Bjarmason]]
10582 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10586 <p>User talk:Ævar Arnfjörð Bjarmason
10591 Magic Word: {{TALKPAGENAMEE}}
10593 title=[[User:Ævar Arnfjörð Bjarmason]]
10594 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10598 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10603 Magic Word: {{SUBJECTPAGENAME}}
10605 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10606 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10608 {{SUBJECTPAGENAME}}
10610 <p>User:Ævar Arnfjörð Bjarmason
10615 Magic Word: {{SUBJECTPAGENAMEE}}
10617 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10618 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10620 {{SUBJECTPAGENAMEE}}
10622 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10627 Magic Word: {{NUMBEROFFILES}}
10629 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10638 Magic Word: {{PAGENAME}}
10640 title=[[User:Ævar Arnfjörð Bjarmason]]
10641 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10645 <p>Ævar Arnfjörð Bjarmason
10650 Magic Word: {{PAGENAME}} with metacharacters
10652 title=[['foo & bar = baz']]
10653 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10657 <p><i>'foo & bar = baz'</i>
10662 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10664 title=[[*RFC 1234 http://example.com/]]
10665 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10669 <p>*RFC 1234 http://example.com/
10674 Magic Word: {{PAGENAMEE}}
10676 title=[[User:Ævar Arnfjörð Bjarmason]]
10677 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10681 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10686 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10688 title=[[*RFC 1234 http://example.com/]]
10689 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10693 <p>*RFC_1234_http://example.com/
10698 Magic Word: {{REVISIONID}}
10700 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10707 flags=vary-revision-id
10711 Magic Word: {{SCRIPTPATH}}
10713 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10721 Magic Word: {{STYLEPATH}}
10723 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10732 Magic Word: {{SERVER}}
10734 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10738 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10743 Magic Word: {{SERVERNAME}}
10745 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10754 Magic Word: {{SITENAME}}
10756 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10765 Magic Word: {{PAGELANGUAGE}}
10768 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10777 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10779 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10788 Case-sensitive magic words, when cased differently, should just be template transclusions
10795 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10796 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10797 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10798 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10803 Case-insensitive magic words should still work with weird casing.
10813 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10817 # From plwiki:PLOS_ONE
10819 Parsoid: Page property magic word with magic word contents
10821 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10823 <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>"}]]}'/>
10826 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10827 # But, this is a limitation of our representation and is documented in
10828 # TemplateHandler.js in processSpecialMagicWord
10830 Parsoid: Template-generated DISPLAYTITLE
10832 {{{{echo|DISPLAYTITLE}}:Foo}}
10836 wgAllowDisplayTitle=true
10837 wgRestrictDisplayTitle=false
10842 <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"}]]}'/>
10846 Namespace 1 {{ns:1}}
10855 Namespace 1 {{ns:01}}
10864 Namespace 0 {{ns:0}} (T6783)
10872 Namespace 0 {{ns:00}} (T6783)
10880 Namespace -1 {{ns:-1}}
10889 Namespace User {{ns:User}}
10898 Namespace User talk {{ns:User_talk}}
10907 Namespace User talk {{ns:uSeR tAlK}}
10916 Namespace File {{ns:File}}
10925 Namespace File {{ns:Image}}
10934 Namespace (lang=de) Benutzer {{ns:User}}
10945 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10951 <p>Benutzer Diskussion
10958 {{urlencode:hi world?!}}
10959 {{urlencode:hi world?!|WIKI}}
10960 {{urlencode:hi world?!|PATH}}
10961 {{urlencode:hi world?!|QUERY}}
10971 Magic Word: prioritize type info over data-parsoid
10975 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10981 Magic Word: serialize on separate line (parsoid)
10983 parsoid=wt2wt,html2wt
10989 foo<meta property="mw:PageProp/notoc"/>bar
10993 Magic Word: rt non-english wikis
11000 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11004 __proto__ is treated as normal wikitext (T105997)
11016 Magic links: internal link to RFC (T2479)
11020 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11023 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11027 Magic links: RFC (T2479)
11031 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11034 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11038 Magic links: RFC (T67278)
11040 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11042 <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.
11045 <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>
11049 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11051 RFC      822
11055 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11060 <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>
11066 Magic links: ISBN (T3937)
11070 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11073 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11077 Magic links: ISBN (T67278)
11079 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11081 <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.
11084 <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>
11088 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11090 ISBN      978 0 316 09811 3
11096 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11103 <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>
11111 Magic links: PMID incorrectly converts space to underscore
11115 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11118 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11122 Magic links: PMID (T67278)
11124 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11126 <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.
11129 <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>
11133 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11135 PMID      1234
11139 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11144 <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>
11149 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11150 # since these are ExtLinkText, not MagicLinkText
11152 Magic links: use appropriate serialization for "almost" magic links.
11154 X[[Special:BookSources/0978739256|foo]]
11156 X[https://tools.ietf.org/html/rfc1234 foo]
11158 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11159 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11162 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11163 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11167 Magic links: All disabled (T47942)
11169 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11175 <p>ISBN 0-306-40615-2
11186 Nonexistent template
11188 {{thistemplatedoesnotexist}}
11190 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11195 Template with invalid target containing tags
11197 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11199 <p>{{a<b>b</b>|foo|a=b|a = b}}
11204 Template with invalid target containing unclosed tag
11206 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11208 <p>{{a<b>|foo|a=b|a = b}}</b>
11213 Template with invalid target containing wikilink
11217 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11220 <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>
11224 Template with just whitespace in it, T70421
11228 <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>
11234 This is a test template
11242 <p>This is a test template
11247 Template with explicit namespace
11251 <p>This is a test template
11259 This is a test template with parameter {{{param}}}
11265 {{paramtest|param=foo}}
11267 <p>This is a test template with parameter foo
11272 Template:paramtestnum
11274 [[{{{1}}}|{{{2}}}]]
11278 Template unnamed parameter
11280 {{paramtestnum|Main Page|the main page}}
11282 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11287 Template:templatesimple
11293 Template:templateredirect
11295 #redirect [[Template:templatesimple]]
11299 Template:templateasargtestnum
11305 Template:templateasargtest
11307 {{template{{{templ}}}}}
11311 Template:templateasargtest2
11317 Template with template name as unnamed argument
11319 {{templateasargtestnum|templatesimple}}
11326 Template with template name as argument
11328 {{templateasargtest|templ=simple}}
11335 Template with template name as argument (2)
11337 {{templateasargtest2|templ=templatesimple}}
11344 Template:templateasargtestdefault
11346 {{{{{templ|templatesimple}}}}}
11356 Template with default value
11358 {{templateasargtestdefault}}
11365 Template with default value (value set)
11367 {{templateasargtestdefault|templ=templa}}
11376 {{templateredirect}}
11381 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11385 Template with argument in separate line
11387 {{ templateasargtest |
11395 Template with complex template as argument
11398 param ={{ templateasargtest |
11399 templ = simple }}}}
11401 <p>This is a test template with parameter (test)
11406 Templates with templated name
11408 {{{{echo|echo}}|foo}}
11409 {{{{echo|inner list}} }}
11413 <ul><li>item 1</li></ul>
11416 <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>
11417 <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>
11420 ## Regression test; the output here isn't really that interesting.
11422 Templates with templated name and top level template args
11424 {{1{{2{{{3}}}|4=5}}}}
11426 <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>
11429 # Parsoid markup is deliberate "broken". This is an edge case.
11430 # See long comment in TemplateHandler.js:convertAttribsToString.
11432 Templates with invalid templated targets
11443 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11448 Template with thumb image (with link in description)
11450 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11452 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>
11455 <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>
11457 <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>
11461 Template:complextemplate
11463 {{{1}}} {{paramtest|
11464 param ={{{param}}}}}
11468 Template with complex arguments
11471 param ={{ templateasargtest |
11472 templ = simple }}|[[Template:complextemplate|link]]}}
11474 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11479 T2553: link with two variables in a piped link
11482 |[[{{{1}}}|{{{2}}}]]
11487 <td>[[{{{1}}}|{{{2}}}]]
11492 <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>
11498 Abort table cell attribute parsing on wikilink
11501 |testing [[one|two]] |three||four
11502 |testing one two |three||four
11503 |testing="[[one|two]]" |three||four
11508 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11514 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11520 <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>
11521 <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>
11522 <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>
11527 Don't abort table cell attribute parsing if wikilink is found in template arg
11530 |Test {{#tag:ref|One two "[[three]]" four}}
11534 <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>
11539 Magic variable as template parameter
11541 {{paramtest|param={{SITENAME}}}}
11543 <p>This is a test template with parameter MediaWiki
11550 [[{{{param}}}|link]]
11554 Template parameter as link source
11556 {{linktest|param=Main Page}}
11558 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11563 Template:paramtest2
11565 including another template, {{paramtest|param={{{arg}}}}}
11569 Template passing argument to another template
11571 {{paramtest2|arg='hmm'}}
11573 <p>including another template, This is a test template with parameter 'hmm'
11584 Template as link source
11588 [[{{linktest2}}|Main Page]]
11590 [[{{linktest2}}]]Page
11592 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11593 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11594 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11612 Template infinite loop
11616 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11621 Template from main namespace
11630 Template from non-includable namespace
11632 wgNonincludableNamespaces=10
11636 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11651 T2529: Template with table, not included at beginning of line
11670 T2523: Template shouldn't eat newline (or add an extra one before table)
11690 T2041: Template parameters shown as broken links
11699 Template with targets containing wikilinks
11705 {{[[{{echo|foo}}]]}}
11707 {{{{echo|[[foo}}]]}}
11709 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11710 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11714 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11715 <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>
11716 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11726 Templates: Double quotes as template target
11733 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11737 ## This test is about making sure Parsoid's data-mw is well formed in the
11738 ## face of multiple templates with intersecting and overlapping ranges. The
11739 ## wikitext itself is wretched.
11741 Templates with intersecting and overlapping ranges
11752 </table><p>ho</p><table>
11756 </td></tr></tbody></table>
11758 <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":""}]]}'>
11760 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11762 <tbody><tr><td>hi</td></tr>
11767 Template:MSGNW test
11769 ''None'' of '''this''' should be
11771 but rather passed unmodified
11779 # hmm, fix this or just deprecate msgnw and document its behavior?
11783 {{msgnw:MSGNW test}}
11785 <p>''None'' of '''this''' should be
11787  but rather passed unmodified
11788 {{test}}
11792 <!-- comment -->
11799 {{int:youhavenewmessages|lots of money|not!}}
11801 <p>You have lots of money (not!).
11806 int keyword - non-existing message
11817 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11821 <includeonly> and <noinclude> being included
11832 <onlyinclude>Foo</onlyinclude>bar
11836 <onlyinclude> being included
11848 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11852 <onlyinclude> and <includeonly> being included
11861 <includeonly> and <noinclude> on a page
11863 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11870 Un-closed <noinclude>
11877 <onlyinclude> on a page
11879 <onlyinclude>Foo</onlyinclude>bar
11886 Un-closed <onlyinclude>
11893 Self-closed noinclude, includeonly, onlyinclude tags
11904 Unbalanced includeonly and noinclude tags
11908 |b</noinclude></noinclude>
11909 |c</noinclude></includeonly>
11910 |d</includeonly></includeonly>
11919 <td>c</includeonly>
11921 <td>d</includeonly></includeonly>
11927 Template:Includeonly section
11930 ==Includeonly section==
11936 T8563: Edit link generation for section shown by <includeonly>
11938 {{includeonly section}}
11940 <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>
11941 <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>
11945 # Uses same input as the contents of [[Template:Includeonly section]]
11947 T8563: Section extraction for section shown by <includeonly>
11952 ==Includeonly section==
11960 T8563: Edit link generation for section suppressed by <includeonly>
11963 ==Includeonly section==
11967 <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>
11972 T8563: Section extraction for section suppressed by <includeonly>
11977 ==Includeonly section==
11985 Un-closed <includeonly>
11990 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11993 ## We used to, but no longer wt2wt this test since the default serializer
11994 ## will normalize the include directives to serialize on their own line.
11995 ## Selser will take care of preserving formatting in scenarios where they
11996 ## intermingled with other wikitext.
11998 Includes and comments at SOL
12000 parsoid=wt2html,html2html
12002 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12009 <includeonly>can have stuff</includeonly>===here===
12012 <h2><span class="mw-headline" id="hu">hu</span></h2>
12017 <h3><span class="mw-headline" id="here">here</span></h3>
12020 <!-- 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>
12022 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12024 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12027 <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>
12031 # TODO: test with DOM fragment reuse!
12033 Parsoid: DOM fragment reuse
12035 parsoid=wt2wt,wt2html
12037 a{{echo|b<table></table>c}}d
12049 <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>
12051 <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">
12052 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12053 </span><p about="#mwt2">cd</p>
12055 <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">
12057 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12059 </span><p about="#mwt3">b</p>
12063 Parsoid: Merge double tds (T52603)
12068 |{{echo|{{!}} foo}}
12072 <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>
12077 Parsoid: Merge double tds in nested transclusion content (T52603)
12083 |{{echo|{{!}} foo}}
12087 <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}}]}'>
12089 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12095 ### <includeonly> and <noinclude> in attributes
12098 0. includeonly around the entire attribute
12100 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12102 <p><span id="v2">bar</span>
12107 1. includeonly in html attr key
12109 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12111 <p><span id="foo">bar</span>
12116 2. includeonly in html attr value
12118 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12119 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12121 <p><span id="v1">bar</span>
12122 <span id="v1">bar</span>
12127 3. includeonly in part of an attr value
12129 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12131 <p><span style="color:red;">bar</span>
12136 4. includeonly in table attributes
12160 ### Preprocessor precedence tests
12161 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12163 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12165 Preprocessor precedence 1: link is rightmost opening
12171 But close-brace is not a valid character in a link title:
12174 However, we can still tell this was handled as a link in the preprocessor:
12175 {{echo|[[Foo}}|bar]]|bat}}
12177 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12178 </p><p>But close-brace is not a valid character in a link title:
12180 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12184 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12185 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12186 <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>
12190 Preprocessor precedence 2: template is rightmost opening
12199 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12203 Preprocessor precedence 3: language converter is rightmost opening
12219 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12220 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12221 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12225 Preprocessor precedence 4: left-most angle bracket
12236 Template:Precedence5
12242 Preprocessor precedence 5: tplarg takes precedence over template
12244 {{Precedence5|Bullet}}
12246 <ul><li>Bar</li></ul>
12249 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12253 Preprocessor precedence 6: broken link is rightmost opening
12259 {{echo|[[Foo|bar|bat=baz}}
12262 </p><p>{{echo|[[Foo|bar|bat=baz}}
12265 <p>{{echo|[[Foo}}</p>
12266 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12269 # This next test exposes a difference between PHP and Parsoid:
12270 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12271 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12272 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12273 # outer `[[Foo` extends until the `y]]`
12274 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12275 # intermediate result (after template expansion), and link processing
12276 # happens on this intermediate result, which moves the wikilink
12277 # boundary leftward to `[[Foo|Bar]]`
12278 # 2b) Parsoid works in a single step, so it's going to keep the
12279 # wikilink as extending to the `y]]`
12280 # 3a) Then PHP does linktrail processing which slurps up the trailing
12281 # `xy` inside the link.
12282 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12283 # `z` inside the link.
12284 # This is "correct" behavior. Parsoid's basic worldview is that the
12285 # `]]` inside the template shouldn't be allowed to leak out to affect
12286 # the surrounding wikilink. PHP may match Parsoid (in the future)
12287 # if you use {{#balance}} (T114445).
12290 Preprocessor precedence 7: broken template is rightmost opening
12296 [[Foo|{{echo|Bar]]-x}}-y]]-z
12298 Careful: linktrails can move the end of the wikilink:
12299 [[Foo|{{echo|y']]a}}l]]l
12301 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12302 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12303 </p><p>Careful: linktrails can move the end of the wikilink:
12304 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12307 <p>[[Foo|{{echo|Bar]]</p>
12308 <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>
12309 <p>Careful: linktrails can move the end of the wikilink:
12310 <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>
12314 Preprocessor precedence 8: broken language converter is rightmost opening
12325 Template:Preprocessor_precedence_9
12330 ;7: {{{{{{{4}}}}}}}
12334 Preprocessor precedence 9: groups of braces
12336 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12342 <ul><li>Bar</li></ul>
12346 <dd>{Bullet}</dd></dl>
12349 <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}}]}'>
12354 </dl><ul about="#mwt1">
12356 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12365 Template:Preprocessor_precedence_10
12372 ;6: -{{{{{{4}}}}}}-
12373 ;7: -{{{{{{{5}}}}}}}-
12377 Preprocessor precedence 10: groups of braces with leading dash
12381 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12387 <ul><li>Bar-</li></ul>
12394 <ul><li>Bar-</li></ul>
12401 <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}}]}'>
12403 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12406 </dl><ul about="#mwt1">
12408 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12412 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12415 </dl><ul about="#mwt1">
12417 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12421 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12426 Preprocessor precedence 11: found during visual diff testing
12428 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12430 {{echo|-{{echo|-{{echo|x}}}}}}
12432 {{echo|-{{echo|x}}}}
12434 <p><span>-<span>-x</span></span>
12439 <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>
12441 <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>
12443 <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>
12447 Preprocessor precedence 12: broken language converter closed by brace.
12451 This form breaks the template, which is unfortunate:
12452 *{{echo|foo-{bar}bat}}
12454 But if the broken language converter markup is inside an extension
12455 tag, nothing bad happens:
12456 *<nowiki>foo-{bar}bat</nowiki>
12457 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12458 *<pre>foo-{bar}bat</pre>
12459 *{{echo|<pre>foo-{bar}bat</pre>}}
12461 <tag>foo-{bar}bat</tag>
12462 {{echo|<tag>foo-{bar}bat</tag>}}
12465 <p>This form breaks the template, which is unfortunate:
12467 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12468 <p>But if the broken language converter markup is inside an extension
12469 tag, nothing bad happens:
12471 <ul><li>foo-{bar}bat</li>
12472 <li>foo-{bar}bat</li>
12473 <li><pre>foo-{bar}bat</pre></li>
12474 <li><pre>foo-{bar}bat</pre></li></ul>
12475 <pre>'foo-{bar}bat'
12479 <pre>'foo-{bar}bat'
12484 <p>This form breaks the template, which is unfortunate:</p>
12486 <li>{{echo|foo-{bar}bat}}</li>
12488 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12490 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12491 <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>
12492 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12493 <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>
12495 <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>
12499 Preprocessor precedence 13: broken language converter in external link
12503 *[http://example.com/-{foo Example in URL]
12504 *[http://example.com Example in -{link} description]
12505 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12507 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12508 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12509 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12512 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12513 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12514 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12519 Preprocessor precedence 14: broken language converter in comment
12521 *<!--{{foo}}-->...should be ok
12522 *<!---{{foo}}-->...extra dashes
12523 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12525 <ul><li>...should be ok</li>
12526 <li>...extra dashes</li>
12527 <li>foobat...should be ok</li></ul>
12530 <li><!--{{foo}}-->...should be ok</li>
12531 <li><!---{{foo}}-->...extra dashes</li>
12532 <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>
12537 Preprocessor precedence 15: broken brace markup in headings
12539 wgFragmentMode=[ 'html5', 'legacy' ]
12543 __NOTOC__ __NOEDITSECTION__
12552 ===5 foo{{{bar 5===
12557 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12560 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12563 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12566 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12569 <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>
12572 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12576 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12577 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12579 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12581 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12583 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12585 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12587 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12592 Preprocessor precedence 16: matching closing braces to opening braces
12597 -{{{echo|foo}}bar}-
12602 <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>
12606 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12615 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12619 Preprocessor precedence 18: another rightmost wins scenario
12623 {{ -{{{{1|tplarg}}} }} }-
12625 <p>{{ -{tplarg }} }-
12628 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12632 Preprocessor precedence 19: break syntax
12645 ### Token Stream Patcher tests
12647 ### These tests won't always pass wt2wt and other modes because
12648 ### on serialization, the table will be output on a new line.
12649 ### For now, we are blacklisting them, and using this to test selser.
12653 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12655 parsoid=wt2html,wt2wt
12657 {{echo|}}{| width = '100%'
12661 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12662 <tbody><tr><td>foo</td></tr>
12666 ## We used to, but no longer wt2wt this test since the default serializer
12667 ## will normalize the include directives to serialize on their own line.
12668 ## Selser will take care of preserving formatting in scenarios where they
12669 ## intermingled with other wikitext.
12671 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12675 <includeonly>a</includeonly>{| {{{b}}}
12679 <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":""}]]}'>
12680 <tbody><tr><td>c</td></tr>
12685 Table wikitext syntax outside wiki-tables
12689 ! not a table heading
12692 | class="foo bar" | baz
12700 ! not a table heading
12703 | class="foo bar" | baz
12712 ### Testing parsing of templates where a template arg
12713 ### has the same name as the template itself.
12719 {{{quote|{{{1}}}}}}
12723 Templates: Template Name/Arg clash: 1. Use of positional param
12732 Templates: Template Name/Arg clash: 2. Use of named param
12734 {{quote|quote=foo}}
12741 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12750 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12754 Templates: 1. Simple use
12763 Templates: 2. Inside a block tag
12765 <div>{{echo|Foo}}</div>
12766 <blockquote>{{echo|Foo}}</blockquote>
12769 <blockquote>Foo</blockquote>
12773 <blockquote><p>Foo</p></blockquote>
12777 Templates: P-wrapping: 1a. Templates on consecutive lines
12788 Templates: P-wrapping: 1b. Templates on consecutive lines
12802 Templates: P-wrapping: 1c. Templates on consecutive lines
12805 {{echo|bar}} <div>baz</div>
12814 bar </p><div>baz</div>
12818 Templates: P-wrapping: 1d. Template preceded by comment-only line
12827 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12831 Templates: Inline Text: 1. Multiple template uses
12833 {{echo|Foo}}bar{{echo|baz}}
12840 Templates: Inline Text: 2. Back-to-back template uses
12842 {{echo|Foo}}{{echo|bar}}
12849 Templates: Block Tags: 1. Multiple template uses
12851 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12853 <div>Foo</div><div>bar</div><div>baz</div>
12858 Templates: Block Tags: 2. Back-to-back template uses
12860 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12862 <div>Foo</div><div>bar</div>
12866 ## This is an edge case relating to paragraph wrapping.
12867 ## Note that Parsoid fails to match Remex because it's using the closing tag
12868 ## as a heuristic to determine if it's in a block, rather than SAX based events.
12869 ## And Parsoid drops empty elements in templates.
12871 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12878 b</p><p class="mw-empty-elt"></p>
12880 <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">
12881 </span><span about="#mwt1">b</span>
12885 Templates: Links: 1. Simple example
12887 {{echo|[[Foo|bar]]}}
12889 <p><a href="/wiki/Foo" title="Foo">bar</a>
12894 Templates: Links: 2. Generation of link href
12896 [[{{echo|Foo}}|bar]]
12898 <p><a href="/wiki/Foo" title="Foo">bar</a>
12903 Templates: Links: 3. Generation of part of a link href
12905 [[Fo{{echo|o}}|bar]]
12907 [[Foo{{echo|bar}}]]
12909 [[Foo{{echo|bar}}baz]]
12911 [[Foo{{echo|bar}}|bar]]
12913 [[:Foo{{echo|bar}}]]
12915 [[:Foo{{echo|bar}}|bar]]
12917 <p><a href="/wiki/Foo" title="Foo">bar</a>
12918 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12919 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12920 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12921 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12922 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12927 Templates: Links: 4. Multiple templates generating link href
12929 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12931 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12936 Templates: Links: 5. Generation of link text
12938 [[Foo|{{echo|bar}}]]
12940 <p><a href="/wiki/Foo" title="Foo">bar</a>
12945 Templates: Links: 5. Nested templates (only outermost template should be marked)
12947 {{echo|[[{{echo|Foo}}|bar]]}}
12949 <p><a href="/wiki/Foo" title="Foo">bar</a>
12954 Templates: HTML Tag: 1. Generation of HTML attr. key
12956 <div {{echo|style}}="color:red;">foo</div>
12958 <div style="color:red;">foo</div>
12963 Templates: HTML Tag: 2. Generation of HTML attr. value
12965 <div style={{echo|'color:red;'}}>foo</div>
12967 <div style="color:red;">foo</div>
12972 Templates: HTML Tag: 3. Generation of HTML attr key and value
12974 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12976 <div style="color:red;">foo</div>
12981 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12983 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12985 <div title="This is a long title with just one piece templated">foo</div>
12990 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12992 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12994 <div title="This is a long title with just one piece templated">foo</div>
12999 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13001 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13003 <div title="This is a long title with just one piece templated">foo</div>
13007 # SSS FIXME: While it is great we added support for all this,
13008 # do we want to make this part of the spec? Maybe we want to
13009 # deprecate this kind of usage in the future?
13011 Templates: HTML Tag: 7. Generation of partial attribute key string
13013 <div st{{echo|yle}}="color:red;">foo</div>
13015 <div style="color:red;">foo</div>
13020 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13022 <div {{echo|1=id="v1"}}>bar</div>
13024 <div id="v1">bar</div>
13029 Templates: HTML Tag: 9. Multiple template-generated attributes
13031 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13033 <div id="v1" title="foo">bar</div>
13038 Templates: Support for templates generating attributes and content
13040 {| {{mixed_attr_content_template}}
13045 <table style="color:red;" title="T48811">
13055 <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|}"]}'>
13064 Template:attribute_from_template
13070 Table cell with attribute before expanded attribute
13073 | align="center" {{attribute_from_template}} |456
13077 <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>
13082 1. Entities and nowikis inside templated attributes should be handled correctly
13084 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13086 <div style="background:#f9f9f9;">foo</div>
13089 <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>
13093 2. Entities and nowikis inside templated attributes should be handled correctly
13096 |{{table_attribs_3}}
13101 <td style="background:#f9f9f9;">Foo
13106 <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>
13111 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13114 |{{table_attribs_3}}
13119 <td style="background:#f9f9f9;">Foo
13123 <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}}]}'>
13124 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13130 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13133 |{{table_attribs_6}} hi
13138 <td style="background: red;">hi
13143 <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>
13148 Templates: HTML Tables: 1. Generating start of a HTML table
13150 {{echo|<table><tr><td>foo</td>}}</tr></table>
13152 <table><tr><td>foo</td></tr></table>
13157 Templates: HTML Tables: 2a. Generating middle of a HTML table
13159 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13161 <table><tr><td>foo</td></tr></table>
13166 Templates: HTML Tables: 2b. Generating middle of a HTML table
13168 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13170 <table><tr><td>foo</td></tr></table>
13175 Templates: HTML Tables: 3. Generating end of a HTML table
13177 <table><tr>{{echo|<td>foo</td></tr></table>}}
13179 <table><tr><td>foo</td></tr></table>
13184 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13186 {{echo|<table>}}<tr><td>foo</td></tr></table>
13188 <table><tr><td>foo</td></tr></table>
13193 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13195 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13197 <table><tr><td>foo</td></tr></table>
13202 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13204 <table><tr>{{echo|<td>}}foo</td></tr></table>
13206 <table><tr><td>foo</td></tr></table>
13211 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13213 <table><tr><td>foo{{echo|</td>}}</tr></table>
13215 <table><tr><td>foo</td></tr></table>
13220 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13222 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13224 <table><tr><td>foo</td></tr></table>
13229 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13231 <table><tr><td>foo</td></tr>{{echo|</table>}}
13233 <table><tr><td>foo</td></tr></table>
13238 Templates: HTML Tables: 5. Proper fostering of categories from inside
13240 parsoid=wt2html,wt2wt
13242 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13243 <!--Two categories (T52330)-->
13244 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13246 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13247 <!--Two categories (T52330)-->
13248 <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>
13252 Templates: Wiki Tables: 1a. Fostering of entire template content
13260 <tr><td></td></tr></table>
13265 <table><tbody><tr><td></td></tr></tbody></table>
13267 <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">
13273 Templates: Wiki Tables: 1b. Fostering of entire template content
13286 <tr><td></td></tr></table>
13294 <tbody><tr><td></td></tr></tbody></table>
13296 <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|}"]}'>
13298 </div><table about="#mwt3">
13304 Templates: Wiki Tables: 2. Fostering of partial template content
13314 <tr><td></td></tr></table>
13319 <div>b</div><table>
13320 <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\n<div>b</div>"}},"i":0}},"\n|}"]}'>a</span><div about="#mwt2">b</div><table about="#mwt2">
13329 Templates: Wiki Tables: 3. td-content via multiple templates
13332 {{echo|{{pipe}}a}}{{echo|b}}
13343 Templates: Wiki Tables: 4. Templated tags, no content
13349 <tr><td></td></tr></table>
13354 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13368 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13381 ## This test case is very specific to Parsoid's internals
13382 ## and is hence only tested for Parsoid's code. Parsoid uses
13383 ## a <meta> marker tag for <ref> tags and they are expanded
13384 ## much later. We are verifying that this <meta> tag usage
13385 ## doesn't prevent foster parenting.
13387 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13389 {{PartialTable}}<ref>foo</ref>
13394 <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">
13398 <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>
13402 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13412 <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{{!}}}"]}'>
13413 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13417 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13422 Templates: Lists: Multi-line list-items via templates
13424 *{{echo|a {{nonexistent|
13426 *{{echo|b {{nonexistent|
13429 <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>
13430 <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>
13435 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13437 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13439 <p><i>ab</i>c<i>d</i>e
13444 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13445 (PHP parser generates misnested html)
13447 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13449 <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>
13453 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13454 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13456 parsoid=wt2html,wt2wt
13458 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13460 <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>
13461 <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>
13462 <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>
13466 Templates: Ugly nesting: 4. Divs opened/closed across templates
13468 a<div>b{{echo|c</div>d}}e
13473 <p>a</p><div>bc</div><p>de
13478 Templates: Ugly templates: 3. newline-only template parameter
13487 # This looks like a bug: a single newline triggers p/br for some reason.
13489 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13498 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13499 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13501 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13507 <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
13508 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13512 # T66017 -- ugly wikitext with fostered content generates two template ranges
13513 # that are "identical" and generate nesting cycles in the algorithm
13515 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13517 {{echo|<table><tr><td><table>}}
13521 <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"}'>
13522 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13523 </table></td></tr></tbody></table>
13527 Templates: Parameters substituted at the top-level
13529 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13533 <p><i>who</i> me? <b>never!</b>
13537 <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>
13539 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13543 Templates: Param with empty arg in the final position
13547 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13551 Parser Functions: 1. Simple example
13560 Parser Functions: 2. Nested use (only outermost should be marked up)
13568 ## Note that the templates inside the references are not wrapped
13570 Template nested in extension tag in template
13572 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13573 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13576 <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>
13577 <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>
13578 <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>
13582 ### Pre-save transform tests
13585 pre-save transform: subst:
13591 This is a test template
13595 pre-save transform: normal template
13605 pre-save transform: nonexistent template
13609 {{thistemplatedoesnotexist}}
13611 {{thistemplatedoesnotexist}}
13615 pre-save transform: subst magic variables
13624 # This is T2089, which I fixed. -- wtm
13626 pre-save transform: subst: templates with parameters
13630 {{subst:paramtest|param="something else"}}
13632 This is a test template with parameter "something else"
13636 Template:nowikitest
13638 <nowiki>'''not wiki'''</nowiki>
13642 pre-save transform: nowiki in subst (T3188)
13646 {{subst:nowikitest}}
13648 <nowiki>'''not wiki'''</nowiki>
13652 Template:commenttest
13654 This template has <!-- a comment --> in it.
13658 pre-save transform: comment in subst (T3936)
13662 {{subst:commenttest}}
13664 This template has <!-- a comment --> in it.
13668 pre-save transform: unclosed tag
13672 <nowiki>'''not wiki'''
13674 <nowiki>'''not wiki'''
13678 pre-save transform: mixed tag case
13682 <NOwiki>'''not wiki'''</noWIKI>
13684 <NOwiki>'''not wiki'''</noWIKI>
13688 pre-save transform: unclosed comment in <nowiki>
13692 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13694 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13697 # Leading @ in this template definition works around a limitation
13698 # in parsoid's parserTests which otherwise strips the <span> from the
13699 # result (confusing it for a template wrapper)
13703 @<span onmouseover="alert('crap')">Oh no</span>
13707 (confirming safety of fix for subst T3936)
13709 {{Template:dangerous}}
13711 <p>@<span>Oh no</span>
13716 pre-save transform: comment containing gallery (T7024)
13720 <!-- <gallery>data</gallery> -->
13722 <!-- <gallery>data</gallery> -->
13726 pre-save transform: comment containing extension
13730 <!-- <tag>data</tag> -->
13732 <!-- <tag>data</tag> -->
13736 pre-save transform: comment containing nowiki
13740 <!-- <nowiki>data</nowiki> -->
13742 <!-- <nowiki>data</nowiki> -->
13746 pre-save transform: <noinclude> in subst (T5298)
13756 pre-save transform: <onlyinclude> in subst (T5298)
13760 {{subst:Includes2}}
13768 {{<includeonly>subst:</includeonly>Includes}}
13772 Template:SafeSubstTest
13774 {{<includeonly>safesubst:</includeonly>Includes}}
13778 T24297: safesubst: works during PST
13782 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13788 T24297: safesubst: works during normal parse
13797 subst: does not work during normal parse
13801 <p>{{subst:Includes}}
13806 pre-save transform: context links ("pipe trick")
13810 [[Article (context)|]]
13813 [[Bar:Article (context)|]]
13814 [[:Bar:Article (context)|]]
13816 [[|Article (context)]]
13820 [[Article (context)|Article]]
13821 [[Bar:Article|Article]]
13822 [[:Bar:Article|Article]]
13823 [[Bar:Article (context)|Article]]
13824 [[:Bar:Article (context)|Article]]
13826 [[Article (context)]]
13827 [[Bar:X (Y) Z|X (Y) Z]]
13828 [[:Bar:X (Y) Z|X (Y) Z]]
13832 pre-save transform: context links ("pipe trick") with interwiki prefix
13836 [[interwiki:Article|]]
13837 [[:interwiki:Article|]]
13838 [[interwiki:Bar:Article|]]
13839 [[:interwiki:Bar:Article|]]
13841 [[interwiki:Article|Article]]
13842 [[:interwiki:Article|Article]]
13843 [[interwiki:Bar:Article|Bar:Article]]
13844 [[:interwiki:Bar:Article|Bar:Article]]
13848 pre-save transform: context links ("pipe trick") with parens in title
13850 pst title=[[Somearticle (context)]]
13854 [[Article (context)|Article]]
13858 pre-save transform: context links ("pipe trick") with comma in title
13860 pst title=[[Someplace, Somewhere]]
13863 [[Otherplace, Elsewhere|]]
13864 [[Otherplace, Elsewhere, Anywhere|]]
13866 [[Otherplace, Somewhere|Otherplace]]
13867 [[Otherplace, Elsewhere|Otherplace]]
13868 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13872 pre-save transform: context links ("pipe trick") with parens and comma
13874 pst title=[[Someplace (IGNORED), Somewhere]]
13877 [[Otherplace (place), Elsewhere|]]
13879 [[Otherplace, Somewhere|Otherplace]]
13880 [[Otherplace (place), Elsewhere|Otherplace]]
13884 pre-save transform: context links ("pipe trick") with comma and parens
13886 pst title=[[Who, me? (context)]]
13889 [[Me, Myself, and I (1937 song)|]]
13891 [[Yes, you. (context)|Yes, you.]]
13892 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13896 pre-save transform: context links ("pipe trick") with namespace
13898 pst title=[[Ns:Somearticle]]
13902 [[Ns:Article|Article]]
13906 pre-save transform: context links ("pipe trick") with namespace and parens
13908 pst title=[[Ns:Somearticle (context)]]
13912 [[Ns:Article (context)|Article]]
13916 pre-save transform: context links ("pipe trick") with namespace and comma
13918 pst title=[[Ns:Somearticle, Context, Whatever]]
13922 [[Ns:Article, Context, Whatever|Article]]
13926 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13928 pst title=[[Ns:Somearticle, Context (context)]]
13932 [[Ns:Article (context)|Article]]
13936 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13938 pst title=[[Ns:Somearticle (IGNORED), Context]]
13942 [[Ns:Article, Context|Article]]
13946 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13950 [[Article(context)|]]
13951 [[Bar:Article(context)|]]
13952 [[:Bar:Article(context)|]]
13953 [[|Article(context)]]
13957 [[Article(context)|Article]]
13958 [[Bar:Article(context)|Article]]
13959 [[:Bar:Article(context)|Article]]
13960 [[Article(context)]]
13961 [[Bar:X(Y)Z|X(Y)Z]]
13962 [[:Bar:X(Y)Z|X(Y)Z]]
13966 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13970 [[Article (context)|]]
13971 [[Bar:Article (context)|]]
13972 [[:Bar:Article (context)|]]
13973 [[|Article (context)]]
13977 [[Article (context)|Article]]
13978 [[Bar:Article (context)|Article]]
13979 [[:Bar:Article (context)|Article]]
13980 [[Article (context)]]
13981 [[Bar:X (Y) Z|X (Y) Z]]
13982 [[:Bar:X (Y) Z|X (Y) Z]]
13986 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13990 [[Article(context)|]]
13991 [[Bar:Article(context)|]]
13992 [[:Bar:Article(context)|]]
13993 [[|Article(context)]]
13997 [[Article(context)|Article]]
13998 [[Bar:Article(context)|Article]]
13999 [[:Bar:Article(context)|Article]]
14000 [[Article(context)]]
14001 [[Bar:X(Y)Z|X(Y)Z]]
14002 [[:Bar:X(Y)Z|X(Y)Z]]
14006 pre-save transform: context links ("pipe trick") with commas (T23660)
14010 [[Article (context), context|]]
14011 [[Article (context),context|]]
14012 [[Bar:Article (context), context|]]
14013 [[Bar:Article (context),context|]]
14014 [[:Bar:Article (context), context|]]
14015 [[:Bar:Article (context),context|]]
14017 [[Article (context), context|Article]]
14018 [[Article (context),context|Article]]
14019 [[Bar:Article (context), context|Article]]
14020 [[Bar:Article (context),context|Article]]
14021 [[:Bar:Article (context), context|Article]]
14022 [[:Bar:Article (context),context|Article]]
14026 Parsoid: backwards pipe trick
14033 <p>[[|<b>bar</b>]]</p>
14037 pre-save transform: trim trailing empty lines
14041 Empty lines are trimmed
14047 Empty lines are trimmed
14051 pre-save transform: Signature expansion
14058 * <noinclude>~~~</noinclude>
14059 * <includeonly>~~~</includeonly>
14060 * <onlyinclude>~~~</onlyinclude>
14062 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14063 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14064 * 00:02, 1 January 1970 (UTC)
14065 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14066 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14067 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14072 ParserOutput flags from signature expansion (T84843)
14079 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14080 flags=user-signature
14085 pre-save transform: Signature expansion in nowiki tags (T2093)
14091 <nowiki>~~~~</nowiki>
14093 <includeonly><nowiki>~~~~</nowiki></includeonly>
14095 <noinclude><nowiki>~~~~</nowiki></noinclude>
14097 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14099 {{subst:Foo}} shall be converted to FOO
14101 As well as inside noinclude/onlyinclude
14102 <noinclude>{{subst:Foo}}</noinclude>
14103 <onlyinclude>{{subst:Foo}}</onlyinclude>
14105 But not inside includeonly
14106 <includeonly>{{subst:Foo}}</includeonly>
14110 <nowiki>~~~~</nowiki>
14112 <includeonly><nowiki>~~~~</nowiki></includeonly>
14114 <noinclude><nowiki>~~~~</nowiki></noinclude>
14116 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14118 FOO shall be converted to FOO
14120 As well as inside noinclude/onlyinclude
14121 <noinclude>FOO</noinclude>
14122 <onlyinclude>FOO</onlyinclude>
14124 But not inside includeonly
14125 <includeonly>{{subst:Foo}}</includeonly>
14129 Parsoid: Recognize nowiki with trailing space in tags
14133 <nowiki ><div>[[foo]]</nowiki >
14141 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14148 Parsoid: Recognize nowiki with odd capitalization
14152 <noWikI ><div>[[foo]]</Nowiki >
14154 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14159 Parsoid: Escape nowiki with trailing space in tags
14163 <p><nowiki > foo </nowiki ></p>
14164 <p>a<nowiki />b</p>
14165 <p>c<nowiki/ >d</p>
14167 <nowiki > foo </nowiki >
14175 Parsoid: Escape weird noWikI capitalizations
14179 <p><noWikI > foo </NoWikI ></p>
14181 <noWikI > foo </NoWikI >
14185 ### Message transform tests
14188 message transform: magic variables
14198 message transform: should not transform wiki markup
14208 message transform: <noinclude> in transcluded template (T6926)
14218 message transform: <onlyinclude> in transcluded template (T6926)
14228 {{#special:}} page name, known
14232 {{#special:Recentchanges}}
14234 Special:RecentChanges
14238 {{#special:}} page name with subpage, known
14242 {{#special:Recentchanges/param}}
14244 Special:RecentChanges/param
14248 {{#special:}} page name, unknown
14252 {{#special:foobar nonexistent}}
14254 Special:Foobar nonexistent
14258 {{#speciale:}} page name, known
14262 {{#speciale:Recentchanges}}
14264 Special:RecentChanges
14268 {{#speciale:}} page name with subpage, known
14272 {{#speciale:Recentchanges/param}}
14274 Special:RecentChanges/param
14278 {{#speciale:}} page name, unknown
14282 {{#speciale:foobar nonexistent}}
14284 Special:Foobar_nonexistent
14290 ### For Parsoid-specific tests, see
14291 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14296 parsoid=wt2html,wt2wt,html2html
14298 [[Image:foobar.jpg]]
14300 <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>
14303 <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>
14307 Serialize simple image with span wrapper
14311 <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>
14313 [[File:Foobar.jpg]]
14317 Simple image (using File: namespace, now canonical)
14319 [[File:Foobar.jpg]]
14321 <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>
14324 <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>
14328 Right-aligned image
14330 [[File:Foobar.jpg|right]]
14332 <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>
14335 <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>
14341 [[File:Foobar.jpg|right|Caption text]]
14343 <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>
14346 <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>
14350 Image with caption, T55312 #1
14352 [[File:Foobar.jpg|right|Caption page stuff]]
14354 <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>
14357 <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>
14361 Image with caption, T55312 #2
14363 [[File:Foobar.jpg|right|Caption page=]]
14365 <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>
14368 <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>
14372 Image with caption, T55312 #3
14374 [[File:Foobar.jpg|right|Caption page=stuff]]
14376 <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>
14379 <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>
14383 Image caption with pipe entity
14385 [[File:Foobar.jpg|thumb|one | two]]
14386 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14388 <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>
14389 <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>
14392 <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>
14393 <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>
14397 Allow empty links in image captions (T62753)
14401 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14406 <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>
14409 <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>
14411 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14412 </figcaption></figure>
14416 Titles in unlinked images (T23454)
14418 [[File:Foobar.jpg|link=|stuff]]
14420 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14423 <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>
14427 Link with empty target
14436 Image with link trail
14438 Linktrails should not work for images: [[File:Foobar.jpg]]s
14440 <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
14443 <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>
14447 Image with empty attribute
14449 parsoid=wt2html,wt2wt,html2html
14451 [[File:Foobar.jpg|right||Caption text]]
14453 <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>
14456 <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>
14460 1. Block image with individual attributes from templates
14462 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14464 <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>
14467 <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>
14471 2. Block Image with individual attributes from templates
14473 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14475 <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>
14478 <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>
14482 3. Inline image with individual attributes from templates
14484 [[File:Foobar.jpg|{{echo|50px}}]]
14486 <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>
14489 <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>
14492 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14493 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14495 Image with multiple attributes from the same template
14497 [[File:Foobar.jpg|{{image_attribs}}]]
14499 <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>
14502 <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>
14506 Image with link tails
14510 123[[File:Foobar.jpg]]456
14511 123[[File:Foobar.jpg|right]]456
14512 123[[File:Foobar.jpg|thumb]]456
14514 <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
14516 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
14517 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
14520 <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
14522 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
14523 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
14526 <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>
14527 <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>
14528 <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>
14532 Image with multiple captions -- only last one is accepted
14534 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14536 <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>
14539 <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>
14543 Image with multiple widths -- use last
14545 [[File:Foobar.jpg|200px|300px|caption]]
14547 <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>
14550 <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>
14554 Image with multiple alignments -- use first (T50664)
14558 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14560 [[File:Foobar.jpg|middle|text-top|caption]]
14562 <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>
14563 <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>
14566 <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>
14567 <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>
14571 Image with width attribute at different positions
14573 [[File:Foobar.jpg|200px|right|Caption]]
14574 [[File:Foobar.jpg|right|200px|Caption]]
14575 [[File:Foobar.jpg|right|Caption|200px]]
14577 <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>
14578 <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>
14579 <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>
14582 <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>
14583 <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>
14584 <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>
14587 # a sad bit of backward-compatibility
14589 Image with size specified with pxpx (T15500, T53628)
14591 parsoid=wt2html,wt2wt,html2html
14593 [[File:Foobar.jpg|20pxpx]]
14594 [[File:Foobar.jpg|200x20pxpx]]
14596 <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>
14597 <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>
14600 <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>
14604 Image with link parameter, wiki target
14606 [[File:Foobar.jpg|link=Main Page]]
14608 <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>
14611 <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>
14614 # parsoid T51293 (part 1)
14616 Image with link parameter, URL target
14618 [[File:Foobar.jpg|link=http://example.com/]]
14620 <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>
14623 <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>
14626 # parsoid T51293 (part 2)
14628 Image with link parameter, protocol-less URL target
14630 [[File:Foobar.jpg|link=//example.com/]]
14632 <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>
14635 <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>
14639 Escaping non-block captions (T107435)
14642 "modes": ["wt2wt"],
14644 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14648 [[Image:Foobar.jpg|caption]]
14650 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14653 # wgExternalLinkTarget not supported by Parsoid
14655 Image with link parameter, wgExternalLinkTarget
14657 [[Image:foobar.jpg|link=http://example.com/]]
14659 wgExternalLinkTarget='foobar'
14661 <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>
14666 Image with link parameter, wgNoFollowLinks set to false
14668 [[Image:foobar.jpg|link=http://example.com/]]
14670 wgNoFollowLinks=false
14672 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14677 Image with link parameter, wgNoFollowDomainExceptions
14679 [[Image:foobar.jpg|link=http://example.com/]]
14681 wgNoFollowDomainExceptions='example.com'
14683 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14687 # wgExternalLinkTarget not supported by Parsoid
14689 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14691 [[Image:foobar.jpg|link=http://example.com/|Title]]
14693 wgExternalLinkTarget='foobar'
14695 <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>
14700 Image with empty link parameter
14702 [[File:Foobar.jpg|link=]]
14704 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14707 <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>
14711 Image with link parameter (wiki target) and unnamed parameter
14713 [[File:Foobar.jpg|link=Main_Page|Title]]
14715 <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>
14718 <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>
14722 Image with link parameter (URL target) and unnamed parameter
14724 [[File:Foobar.jpg|link=http://example.com/|Title]]
14726 <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>
14729 <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>
14733 Thumbnail image with link parameter
14736 parsoid=wt2html,wt2wt,html2html
14738 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14740 <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>
14743 <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>
14747 Manually-specified thumbnail image
14751 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14753 <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>
14756 <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>
14760 Manually-specified thumbnail image with explicit link to wiki page
14763 parsoid=wt2html,wt2wt,html2html
14765 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14767 <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>
14770 <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>
14774 Manually-specified thumbnail image with explicit link to url
14777 parsoid=wt2html,wt2wt,html2html
14779 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14781 <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>
14784 <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>
14788 Manually-specified thumbnail image with explicit no link
14791 parsoid=wt2html,wt2wt,html2html
14793 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14795 <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>
14798 <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>
14802 Manually-specified thumbnail image with explicit link and alt text
14805 parsoid=wt2html,wt2wt,html2html
14807 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14809 <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>
14812 <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>
14816 Image with frame and link
14818 parsoid=wt2html,wt2wt,html2html
14820 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14822 <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>
14825 <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>
14829 Image with frame and link and explicit alt
14831 parsoid=wt2html,wt2wt,html2html
14833 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14835 <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>
14838 <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>
14842 Image with wiki markup in implicit alt
14844 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14846 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14848 <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>
14849 </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>
14852 <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>
14854 <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>
14858 Alt image option should handle most kinds of wikitext without barfing
14860 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14862 <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>
14865 <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>
14869 Image with table with attributes in caption
14871 parsoid=wt2html,html2html
14873 [[File:Foobar.jpg|thumb|
14880 <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>
14881 <table class="123">
14882 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14885 </figcaption></figure>
14889 Image with table with rows from templates in caption
14891 [[File:Foobar.jpg|thumb|
14897 <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>
14899 <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>
14901 </figcaption></figure>
14905 Image with nested tables in caption
14907 [[File:Foobar.jpg|thumb|Foo<br />
14916 <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}'/>
14920 <tbody><tr><td>z</td></tr>
14921 </tbody></table></td></tr>
14923 </figcaption></figure>
14927 Image with heading and horizontal rule in caption
14929 [[File:Foobar.jpg|thumb|
14935 <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>
14938 <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>
14939 <h3 id="Testing">Testing</h3>
14941 <hr data-parsoid='{"extra_dashes":10}'/>
14942 </figcaption></figure>
14945 ###################
14946 # Conflicting image format options.
14947 # First option specified should 'win'.
14948 # All three cases in each test should be identical.
14951 Image with 'frameless' first.
14953 parsoid=wt2html,wt2wt,html2html
14955 [[File:Foobar.jpg|frameless|caption]]
14957 [[File:Foobar.jpg|frameless|frame|caption]]
14959 [[File:Foobar.jpg|frameless|thumb|caption]]
14961 <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>
14962 </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>
14963 </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>
14966 <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>
14967 <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>
14968 <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>
14972 Image with 'frame' first.
14974 parsoid=wt2html,wt2wt,html2html
14976 [[File:Foobar.jpg|frame|caption]]
14977 [[File:Foobar.jpg|frame|frameless|caption]]
14978 [[File:Foobar.jpg|frame|thumb|caption]]
14980 <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>
14981 <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>
14982 <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>
14985 <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>
14986 <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>
14987 <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>
14991 Image with 'thumb' first.
14993 parsoid=wt2html,wt2wt,html2html
14995 [[File:Foobar.jpg|thumb|caption]]
14996 [[File:Foobar.jpg|thumb|frameless|caption]]
14997 [[File:Foobar.jpg|thumb|frame|caption]]
14999 <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>
15000 <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>
15001 <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>
15004 <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>
15005 <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>
15006 <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>
15009 ###################
15011 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15012 # and https://phabricator.wikimedia.org/T64258
15013 # Foobar has actual size of 1941x220
15014 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15015 # a scalable format.
15016 # 2. Framed images always ignore size options; always render at default size.
15017 # 3. "Unspecified format" and border are the only types which can be
15021 Image: unspecified format and border enlarge
15023 parsoid=wt2html,wt2wt,html2html
15025 [[File:Foobar.jpg|2000px]]
15027 [[File:Foobar.jpg|border|2000px]]
15029 <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>
15030 </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>
15033 <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>
15034 <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>
15038 Image: "unspecified format" and border reduce
15040 parsoid=wt2html,wt2wt,html2html
15042 [[File:Foobar.jpg|1000px]]
15044 [[File:Foobar.jpg|border|1000px]]
15046 <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>
15047 </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>
15050 <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>
15051 <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>
15055 Image: thumbs reduce
15057 parsoid=wt2html,wt2wt,html2html
15059 [[File:Foobar.jpg|thumb|50px]]
15061 <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>
15064 <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>
15068 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15070 parsoid=wt2html,wt2wt,html2html
15072 [[File:Foobar.jpg|thumb|2000px]]
15074 [[File:Foobar.svg|thumb|2000px]]
15076 <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>
15077 <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>
15080 <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>
15081 <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>
15085 Image: frameless can reduce in size
15087 parsoid=wt2html,wt2wt,html2html
15089 [[File:Foobar.jpg|frameless|50px]]
15091 <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>
15094 <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>
15098 Image: bitmap frameless can't be enlarged past original size, but vector can
15100 parsoid=wt2html,wt2wt,html2html
15102 [[File:Foobar.jpg|frameless|2000px]]
15104 [[File:Foobar.svg|frameless|2000px]]
15106 <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>
15107 </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>
15110 <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>
15111 <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>
15115 Image: framed images are always unscaled.
15117 parsoid=wt2html,wt2wt,html2html
15119 [[File:Foobar.jpg|frame]]
15121 [[File:Foobar.jpg|frame|50px]]
15123 [[File:Foobar.jpg|frame|50x50px]]
15125 [[File:Foobar.jpg|frame|2000px]]
15127 <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>
15128 <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>
15129 <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>
15130 <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>
15133 <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>
15134 <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>
15135 <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>
15136 <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>
15139 ###################
15142 Link to image page- image page normally doesn't exists, hence edit link
15143 Add test with existing image page
15144 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15148 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15153 T20784 Link to non-existent image page with caption should use caption as link text
15155 [[:Image:test|caption]]
15157 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15162 Frameless image caption with a free URL
15164 [[File:Foobar.jpg|http://example.com]]
15166 <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>
15169 <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>
15173 Thumbnail image caption with a free URL
15177 [[File:Foobar.jpg|thumb|http://example.com]]
15179 <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>
15182 <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>
15186 Thumbnail image caption with a free URL and explicit alt
15189 parsoid=wt2html,wt2wt,html2html
15191 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15193 <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>
15196 <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>
15200 SVG thumbnails with no language set
15203 [[File:Foobar.svg|thumb|caption]]
15205 <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>
15208 <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>
15212 SVG thumbnails with language de
15214 parsoid=wt2html,wt2wt,html2html
15216 [[File:Foobar.svg|thumb|caption|lang=de]]
15218 <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>
15221 <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>
15225 SVG thumbnails with invalid language code
15227 parsoid=wt2html,wt2wt,html2html
15229 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15231 <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>
15234 <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>
15238 T3887: A ISBN with a thumbnail
15240 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15242 <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>
15245 <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>
15249 T3887: A RFC with a thumbnail
15251 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15253 <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>
15256 <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>
15260 T3887: A mailto link with a thumbnail
15262 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15264 <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>
15267 <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>
15270 # Pending resolution to T2368
15272 T2648: Frameless image caption with a link
15274 [[File:Foobar.jpg|text with a [[link]] in it]]
15276 <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>
15279 <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>
15283 T2648: Frameless image caption with a link (suffix)
15285 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15287 <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>
15290 <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>
15294 T2648: Frameless image caption with an interwiki link
15296 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15298 <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>
15301 <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>
15305 T2648: Frameless image caption with a piped interwiki link
15307 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15309 <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>
15312 <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>
15316 T107474: Frameless image caption with <nowiki>
15318 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15320 <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>
15324 Escape HTML special chars in image alt text
15326 [[File:Foobar.jpg|& < > "]]
15328 <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>
15331 <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>
15335 Escape HTML special chars in image alt text with LanguageConverter
15339 [[File:Foobar.jpg|& < > "]]
15341 <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>
15344 <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>
15348 Entities in file name and attributes
15350 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15352 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15355 <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>
15359 T2499: Alt text should have Ӓ, not &1234;
15361 [[File:Foobar.jpg|♀]]
15363 <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>
15366 <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>
15370 Broken image caption with link
15372 parsoid=wt2html,wt2wt,html2html
15374 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15376 <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.
15379 <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>
15383 Image caption containing another image
15385 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15387 <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>
15390 <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>
15394 Image: caption containing a newline
15396 [[File:Foobar.jpg|This
15399 <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>
15402 <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>
15406 Image: caption containing leading space
15407 (The leading space should not trigger nowiki escaping in wt2wt mode)
15409 [[File:Foobar.jpg|thumb| bar]]
15411 <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>
15414 <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>
15417 # html/php output not have newlines after table, td, th, etc. because
15418 # Linker::makeThumbLink2() replaces the newlines with spaces since
15419 # the table is inside a caption.
15420 # FIXME: Verify if that circa 2004 fix is still required.
15422 Image: caption containing a table
15424 parsoid=wt2html,wt2wt,html2html
15426 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15432 and some more text.]]
15434 <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>
15437 <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
15440 <tr><th>Foo</th><th>Bar</th></tr>
15443 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15447 T5090: External links other than http: in image captions
15449 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15451 <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>
15454 <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>
15460 parsoid=wt2html,wt2wt,html2html
15462 [[Image:foobar.jpg|a|class=b]]
15464 <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>
15467 <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>
15471 Localized image handling (1).
15473 parsoid=wt2html,wt2wt,html2html
15476 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15478 <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>
15481 <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>
15485 Localized image handling (2).
15488 parsoid=wt2html,wt2wt,html2html
15491 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15493 <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>
15496 <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>
15500 Localized image handling (3).
15505 <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>
15507 [[File:Foobar.jpg|بندانگشتی]]
15511 "border", "frameless" and "class" attributes on an image.
15514 parsoid=wt2html,wt2wt,html2html
15516 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15518 <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>
15521 <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>
15524 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15526 Invalid image attributes (T64500)
15529 parsoid=wt2html,wt2wt,html2html
15531 [[File:Foobar.jpg|thumb|float|left|caption]]
15533 [[File:Foobar.jpg|thumb|righ|caption]]
15535 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15537 <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>
15538 <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>
15539 <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>
15542 <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>
15543 <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>
15544 <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>
15550 #REDIRECT [[File:Barfoo.jpg]]
15553 # FIXME: Parsoid should run this test -- but we'd need to teach the
15554 # mockAPI about the redirected Barfoo.jpg image.
15558 [[Image:Barfoo.jpg]]
15560 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15565 Missing image with uploads disabled
15569 [[File:Foobaz.jpg]]
15571 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15574 <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>
15577 # Parsoid-specific testing for images
15578 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15579 # Currently imperfect due to a flaw in the Parsoid testrunner
15581 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15585 Parsoid-specific image handling - simple image with size and middle alignment
15587 [[File:Foobar.jpg|middle|50px]]
15589 <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>
15593 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
15595 parsoid=wt2wt,wt2html,html2html
15597 [[Image:Foobar.jpg|middle|50px]]
15599 <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>
15603 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
15605 [[File:Foobar.jpg|50px|middle]]
15607 <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>
15611 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
15613 parsoid=wt2html,wt2wt,html2html
15615 [[Image:Foobar.jpg|50px|middle]]
15617 <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>
15621 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15623 [[File:Foobar.jpg|500x10px|baseline|caption]]
15625 <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>
15629 Parsoid-specific image handling - simple image with border and size spec
15631 [[File:Foobar.jpg|50px|border|caption]]
15633 <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>
15637 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15639 parsoid=wt2html,html2html
15641 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15643 <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>
15647 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
15649 parsoid=wt2html,html2html
15651 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15653 <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>
15657 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15659 parsoid=wt2html,html2html
15661 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15663 <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>
15667 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
15669 parsoid=wt2html,html2html
15671 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15673 <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>
15677 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
15679 parsoid=wt2html,wt2wt,html2html
15681 [[File:Foobar.jpg|frame|500x50px|caption]]
15683 <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>
15687 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
15689 parsoid=wt2html,html2html
15691 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15693 <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>
15697 Parsoid-specific image handling - frameless image with specific size, border, and caption
15699 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15701 <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>
15705 Parsoid-specific image handling - simple image with a formatted caption
15707 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15709 <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>
15713 Parsoid-specific image handling - caption with a template in it
15715 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15717 <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>
15721 Parsoid-specific image handling - caption with unbalanced tags in it
15723 parsoid=wt2html,wt2wt,html2html
15726 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15730 <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>
15735 Parsoid-specific image handling - empty caption (1)
15737 parsoid=wt2html,wt2wt
15739 [[File:Foobar.jpg|thumb|]]
15741 <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>
15744 # empty captions don't get serialized unless we're in the "round trip" case
15746 Parsoid-specific image handling - empty caption (2)
15750 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15751 <a href="./File:Foobar.jpg">
15752 <img resource="./File:Foobar.jpg"
15753 src="//example.com/images/3/3a/Foobar.jpg"
15754 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15755 height="25" width="220"/>
15757 <figcaption></figcaption>
15760 [[File:Foobar.jpg|thumb]]
15764 Parsoid-specific image handling - whitespace caption
15766 [[File:Foobar.jpg|thumb| ]]
15768 <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>
15772 Parsoid-specific image handling - lang option
15775 [[File:Foobar.svg|lang=de|caption]]
15779 <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>
15783 ## Edge case bugs in Parsoid from T93580
15785 T93580: 1. Templated <ref> inside block images
15787 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15791 <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>
15793 <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>
15797 T93580: 2. <ref> inside inline images
15799 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15803 <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>
15805 <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>
15809 T93580: 3. Templated <ref> inside inline images
15811 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15815 <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>
15817 <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>
15824 Subpage test/subpage
15832 subpage title=[[Subpage test]]
15836 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15841 Subpage noslash link
15843 subpage title=[[Subpage test]]
15847 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15852 Subpage test/1/2/subpage
15858 Relative subpage noslash link
15860 parsoid=wt2wt,wt2html,html2html
15861 subpage title=[[Subpage test/1/2/3/4]]
15867 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15868 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15871 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15872 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15876 Parsoid: dot-slash prefixed wikilinks
15886 </p><p>[[././baz/]]
15891 </p><p>[[././baz/]]
15896 Render invalid page names as plain text (T53090)
15908 [[foo[http://example.com]xyz]]
15910 [[{{echo|./../foo}}|bar]]
15911 [[{{echo|foo/.}}|bar]]
15912 [[{{echo|foo/..}}|bar]]
15913 [[{{echo|foo~~~~bar}}]]
15914 [[{{echo|foo>bar}}]]
15915 [[{{echo|foo././bar}}]]
15916 [[{{echo|foo{bar}}]]
15917 [[{{echo|foo}bar}}]]
15918 [[{{echo|foo[bar}}]]
15919 [[{{echo|foo]bar}}]]
15920 [[{{echo|foo<bar}}]]
15922 <p>[[./../foo|bar]]
15932 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15933 </p><p>[[./../foo|bar]]
15946 <p>[[./../foo|bar]]
15956 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
15958 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15959 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15960 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15961 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15962 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15963 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15964 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15965 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15966 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15967 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15968 [[<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>
15976 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15981 T2561: {{/Subpage}}
15983 subpage title=[[Page]]
15987 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15995 Category:MediaWiki User's Guide
16003 [[:Category:MediaWiki User's Guide]]
16005 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16014 [[Category:MediaWiki User's Guide]]
16016 cat=MediaWiki_User's_Guide sort=
16018 <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"}}'/>
16022 PAGESINCATEGORY invalid title fatal (r33546 fix)
16024 {{PAGESINCATEGORY:<bogus>}}
16031 Category with different sort key
16035 [[Category:MediaWiki User's Guide|Foo]]
16037 cat=MediaWiki_User's_Guide sort=Foo
16039 <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"}}'/>
16043 Category with identical sort key
16047 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16049 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16051 <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"}}'/>
16055 Category with empty sort key
16060 [[Category:MediaWiki User's Guide|]]
16062 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16066 Category with empty sort key and parentheses
16071 [[Category:Foo (bar)|]]
16073 [[Category:Foo (bar)|Foo]]
16077 Category with link tail
16082 123[[Category:Foo]]456
16084 123[[Category:Foo]]456
16088 Category with template
16093 [[Category:{{echo|Foo}}]]
16095 [[Category:{{echo|Foo}}]]
16099 Category with template in sort key
16104 [[Category:Foo|{{echo|Bar}}]]
16106 [[Category:Foo|{{echo|Bar}}]]
16110 Category with template in sort key and title
16115 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16117 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16120 ## We used to, but no longer wt2wt this test since the default serializer
16121 ## will normalize all categories to serialize on their own line.
16122 ## This wikitext usage is going to be fairly uncommon in production and
16123 ## selser will take care of preserving formatting in those scenarios.
16125 Category / paragraph interactions
16129 Foo [[Category:Baz]] Bar
16131 Foo [[Category:Baz]]
16139 [[Category:Baz]] Bar
16152 {{echo|[[Category:Baz]]}}
16165 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16166 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16167 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16168 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16169 <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>
16170 <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}}]}'/>
16171 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16174 ## We used to, but no longer wt2wt this test since the default serializer
16175 ## will normalize all categories to serialize on their own line.
16176 ## This wikitext usage is going to be fairly uncommon in production and
16177 ## selser will take care of preserving formatting in those scenarios.
16179 ## The whitespace on the empty line is part of the test. Please do not delete
16181 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16187 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16189 {{echo|[[Category:Foo]] and so should this!}}
16191 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16196 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16198 <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>
16201 ## Parsoid will not try to wt2wt this while preserving newlines because
16202 ## it suppresses excess newlines within list items -- and we don't want to
16203 ## introduce a special case just for categories, which is, in reality somewhat
16204 ## odd behavior -- categories are unlikely to be used in list items like this
16205 ## in top-level pages and are only likely to show up in template-generated
16206 ## list items where this RT-ing is a non-issue.
16208 ## The whitespace on the empty line is part of the test. Please do not delete
16210 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16216 [[Category:Foo]] and this should be part of the same list item
16219 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16221 <ul><li>This and this should be part of the same list item</li>
16222 <li>So should this and this should be part of the same list item</li></ul>
16225 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16226 <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>
16230 ## Newlines and categories that follow the last item of a list
16231 ## are treated differently because this (list followed by categories)
16232 ## is an extremely common pattern on wikis.
16234 3. Categories and newlines: newline suppression for last list item should RT properly
16255 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16257 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16258 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16260 <dl><dd>c</dd></dl>
16262 <link rel="mw:PageProp/Category" href="./Category:C"/>
16264 <dl><dt>d</dt></dl>
16266 <link rel="mw:PageProp/Category" href="./Category:D"/>
16270 4. Categories and newlines: newline suppression for last list item should RT properly
16278 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16280 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16283 ## only wt2html for this to make sure the algo only applies to the rightmost path
16285 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16298 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16300 <ul><li>d</li></ul></li></ul>
16301 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16304 ## We used to, but no longer wt2wt this test since the default serializer
16305 ## will normalize all categories to serialize on their own line.
16306 ## This wikitext usage is going to be fairly uncommon in production and
16307 ## selser will take care of preserving formatting in those scenarios.
16309 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16313 *a [[Category:Foo]]
16315 <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>
16318 # This test also demonstrates because of newline+category tunneling
16319 # through the list hander, template wrapping doesn't expand to the
16320 # containing list when the list item swallows the category.
16322 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16327 <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
16328 </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>
16332 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16336 {{echo|[[Category:Foo]]
16340 <ul><li>a</li></ul>
16342 <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">
16343 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16344 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16348 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16352 [[Category:Bar]]<!--boo1--> <!--boo2-->
16353 [[Category:Baz]]<!--boo3--> <!--boo4-->
16355 <ul><li>a</li></ul>
16357 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16358 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16362 Categories and newlines: should behave properly with linkprefix (T87753)
16377 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16378 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16382 No regressions on internal links following category (T174639)
16384 parsoid=wt2html,html2html
16386 [[Category:Foo]]<div>a
16391 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16394 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16396 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16399 # Note that Parsoid differs slightly from PHP due to T175421
16401 11. Special case where only newlines separate links (T175416)
16403 parsoid=wt2html,html2html
16407 [[Foo]][[es:Alimento]]
16412 <a href="/wiki/Foo" title="Foo">Foo</a>
16413 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16416 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16418 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16420 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16424 Category links with multiple namespaces
16426 [[Category:Project:Foo]]
16428 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16432 Parsoid: Serialize link to category page with colon escape
16438 [[:Category:Foo|Bar]]
16441 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16442 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16446 # We used to, but no longer wt2wt this test since the default serializer
16447 # will normalize all categories to serialize on their own line.
16448 # This wikitext usage is going to be fairly uncommon in production and
16449 # selser will take care of preventing whitespace insertion if this
16450 # occurs in an article.
16452 # html2html disabled for the same reason (whitespace insertion between
16455 # html2wt disabled because it localizes the "Category" namespace.
16457 Link prefix/suffixes aren't applied to category links
16467 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16471 Link prefix/suffixes aren't applied to language links
16481 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16485 Parsoid: Serialize link to file page with colon escape
16491 [[:File:Foo.png|Bar]]
16494 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16495 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16500 Parsoid: Serialize a genuine category link without colon escape
16505 [[Category:Foo|Bar]]
16507 <link rel="mw:PageProp/Category" href="./Category:Foo">
16508 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16512 Normalize hrefs properly before testing for invalid link targets (T72894)
16516 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16518 [[Category:Toxine bactérienne]]
16522 Parsoid: Defaultsort
16524 {{DEFAULTSORT:Foo}}
16526 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16529 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16530 # But, this is a limitation of our representation and is documented in
16531 # TemplateHandler.js in processSpecialMagicWord
16533 Parsoid: Defaultsort (template-generated)
16535 {{{{echo|DEFAULTSORT}}:Foo}}
16537 <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"}]]}'/>
16541 ### Inter-language links
16544 Interlanguage links
16552 es:Alimento fr:Nourriture zh:食品
16554 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16555 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16556 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16560 Duplicate interlanguage links (T26502)
16571 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16572 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16573 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16574 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16581 Basic section headings
16588 ===Smaller headline===
16591 <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>
16594 <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>
16597 <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>
16603 Section headings with TOC
16606 ===Subheadline 1===
16607 =====Skipping a level=====
16608 ======Skipping a level======
16612 ===Another headline===
16614 <div id="toc" class="toc"><input type="checkbox" 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>
16616 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16618 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16620 <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>
16622 <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>
16629 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16631 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16637 <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>
16638 <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>
16639 <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>
16640 <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>
16641 <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>
16644 <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>
16649 TOC anchors don't collide
16657 <div id="toc" class="toc"><input type="checkbox" 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>
16659 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16660 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16661 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16662 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16666 <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>
16667 <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>
16668 <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>
16669 <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>
16673 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16674 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16676 Handling of sections up to level 6 and beyond
16681 ==Level 2 Heading==
16682 ===Level 3 Heading===
16683 ====Level 4 Heading====
16684 =====Level 5 Heading=====
16685 ======Level 6 Heading======
16686 =======Level 7 Heading=======
16687 ========Level 8 Heading========
16688 =========Level 9 Heading=========
16689 ==========Level 10 Heading==========
16691 <div id="toc" class="toc"><input type="checkbox" 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>
16693 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16695 <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>
16697 <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>
16699 <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>
16701 <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>
16703 <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>
16704 <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>
16705 <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>
16706 <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>
16707 <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>
16721 <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>
16722 <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>
16723 <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>
16724 <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>
16725 <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>
16726 <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>
16727 <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>
16728 <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>
16729 <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>
16730 <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>
16733 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16734 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16735 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16736 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16737 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16738 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16739 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16740 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16741 <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>
16742 <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>
16746 TOC regression (T11764)
16750 ====title 1.1.1====
16755 <div id="toc" class="toc"><input type="checkbox" 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>
16757 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16759 <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>
16761 <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>
16764 <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>
16767 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16769 <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>
16775 <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>
16776 <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>
16777 <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>
16778 <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>
16779 <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>
16780 <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>
16785 TOC for heading containing <span id="..."></span> (T96153)
16788 ==<span id="old-anchor"></span>New title==
16790 <div id="toc" class="toc"><input type="checkbox" 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>
16792 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16796 <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>
16801 TOC with wgMaxTocLevel=3 (T8204)
16807 ====title 1.1.1====
16812 <div id="toc" class="toc"><input type="checkbox" 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>
16814 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16816 <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>
16817 <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>
16820 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16822 <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>
16828 <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>
16829 <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>
16830 <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>
16831 <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>
16832 <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>
16833 <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>
16838 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16844 ====Section 1.1.1====
16845 ====Section 1.1.1.1====
16848 <div id="toc" class="toc"><input type="checkbox" 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>
16850 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16852 <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>
16855 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16859 <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>
16860 <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>
16861 <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>
16862 <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>
16863 <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>
16869 Resolving duplicate section names
16874 <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>
16875 <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>
16880 Resolving duplicate section names with differing case (T12721)
16885 <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>
16886 <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>
16898 Template with sections, __NOTOC__
16905 <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>
16906 <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>
16907 <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>
16908 <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>
16913 __NOEDITSECTION__ keyword
16919 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16920 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16925 Link inside a section heading
16927 ==Section with a [[Main Page|link]] in it==
16929 <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>
16934 TOC regression (T14077)
16941 <div id="toc" class="toc"><input type="checkbox" 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>
16943 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16945 <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>
16948 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16952 <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>
16953 <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>
16954 <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>
16959 T3219 URL next to image (good)
16961 http://example.com [[File:Foobar.jpg]]
16963 <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>
16966 <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>
16969 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16971 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16973 parsoid=wt2html,html2html
16976 The line above must have a trailing space!
16979 But just in case it doesn't...
16981 <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>
16982 <p>The line above must have a trailing space!
16984 <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>
16985 <p>But just in case it doesn't...
16988 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16989 <p>The line above must have a trailing space!</p>
16990 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16992 <p>But just in case it doesn't...</p>
16996 Header with special characters (T27462)
16998 The tooltips shall not show entities to the user (ie. be double escaped)
17015 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17017 <div id="toc" class="toc"><input type="checkbox" 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>
17019 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17020 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17021 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17022 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17023 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17027 <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>
17030 <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>
17033 <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>
17036 <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>
17039 <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>
17043 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17045 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17048 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17051 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17054 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17057 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17062 Header with space, plus and underscore as entity
17064 Id should not contain + for spaces
17066 ==Space between Text==
17069 ==Space-Entity between Text==
17072 ==Plus+between+Text==
17075 ==Plus-Entity+between+Text==
17078 ==Underscore_between_Text==
17081 ==Underscore-Entity_between_Text==
17084 [[#Space between Text]]
17085 [[#Space-Entity between Text]]
17086 [[#Plus+between+Text]]
17087 [[#Plus-Entity+between+Text]]
17088 [[#Underscore_between_Text]]
17089 [[#Underscore-Entity_between_Text]]
17091 <p>Id should not contain + for spaces
17093 <div id="toc" class="toc"><input type="checkbox" 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>
17095 <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>
17096 <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>
17097 <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>
17098 <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>
17099 <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>
17100 <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>
17104 <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>
17107 <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>
17110 <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>
17113 <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>
17116 <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>
17119 <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>
17121 </p><p><a href="#Space_between_Text">#Space between Text</a>
17122 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17123 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17124 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17125 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17126 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17129 <p>Id should not contain + for spaces</p>
17131 <h2 id="Space_between_Text">Space between Text</h2>
17134 <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>
17137 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17140 <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>
17143 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17146 <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>
17149 <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>
17150 <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>
17151 <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>
17152 <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>
17153 <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>
17154 <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>
17157 # Parsoid html2wt disabled because it adds padding spaces around =
17159 Headers with excess '=' characters
17160 (Are similar tests necessary beyond the 1st level?)
17162 parsoid=wt2html,wt2wt,html2html
17166 =''italic'' heading==
17167 ==''italic'' heading=
17169 <div id="toc" class="toc"><input type="checkbox" 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>
17171 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17172 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17173 <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>
17174 <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>
17178 <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>
17179 <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>
17180 <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>
17181 <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>
17184 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17185 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17186 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17187 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17191 HTML headers vs TOC (T25393)
17192 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17204 <div id="toc" class="toc"><input type="checkbox" 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>
17206 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17208 <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>
17209 <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>
17212 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17214 <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>
17215 <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>
17221 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17222 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17223 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17224 <h1><span class="mw-headline" id="Header_2">Header 2
17226 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17227 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17230 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17231 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17232 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17234 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17236 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17237 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17238 <meta property="mw:PageProp/noeditsection"/>
17242 Single-line or multiline-comments can follow headings
17244 parsoid=wt2html,wt2wt
17252 <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>
17253 <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>
17254 <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>
17257 <h2 id="foo">foo</h2><!---->
17258 <h2 id="bar">bar</h2><!--c1-->
17259 <h2 id="baz">baz</h2><!--
17265 T3219 URL next to image (broken)
17267 http://example.com[[File:Foobar.jpg]]
17269 <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>
17272 <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>
17276 T3186 news: in the middle of text
17278 http://en.wikinews.org/wiki/Wikinews:Workplace
17280 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17286 Namespaced link must have a title
17295 Namespaced link must have a title (bad fragment version)
17297 [[Project:#fragment]]
17299 <p>[[Project:#fragment]]
17305 ### HTML tags and HTML attributes
17309 div with no attributes
17311 <div>HTML rocks</div>
17313 <div>HTML rocks</div>
17318 div with double-quoted attribute
17320 <div id="rock">HTML rocks</div>
17322 <div id="rock">HTML rocks</div>
17327 div with single-quoted attribute
17329 <div id='rock'>HTML rocks</div>
17331 <div id="rock">HTML rocks</div>
17336 div with unquoted attribute
17338 <div id=rock>HTML rocks</div>
17340 <div id="rock">HTML rocks</div>
17345 div with illegal double attributes
17347 <div id="a" id="b">HTML rocks</div>
17349 <div id="b">HTML rocks</div>
17354 div with empty attribute value, space before equals
17356 parsoid=wt2html,html2html
17358 <div class =>HTML rocks</div>
17360 <div class="">HTML rocks</div>
17363 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17367 div with multiple empty attribute values
17369 wgFragmentMode=[ 'html5', 'legacy' ]
17371 parsoid=wt2html,html2html
17373 <div id= title=>HTML rocks</div>
17375 <div id="title=">HTML rocks</div>
17378 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17381 # FIXME Parsoid doesn't actually match PHP here.
17382 # Probably we should use the synthetic <foo /> or <indicator>
17383 # extensions for this test, which are enabled when running parser tests.
17385 Extension tag in attribute value
17387 <span title="<translate>123</translate>">ok</span>
17388 !! html/php+disabled
17389 <p><span title="<translate>123</translate>">ok</span>
17392 <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>
17396 table with multiple empty attribute values
17398 parsoid=wt2html,html2html
17404 <table title="id=">
17410 <table title="id=">
17411 <tbody><tr><td>hi</td></tr>
17416 div with braces in attribute value
17418 <div title="{}">Foo</div>
17420 <div title="{}">Foo</div>
17423 <div title="{}">Foo</div>
17427 div with empty attribute value, no space before equals
17429 parsoid=wt2html,html2html
17431 <div class=>HTML rocks</div>
17433 <div class="">HTML rocks</div>
17436 <div class="">HTML rocks</div>
17440 HTML multiple attributes correction
17442 <p class="error" class="awesome">Awesome!</p>
17444 <p class="awesome">Awesome!</p>
17449 Table multiple attributes correction
17452 !+ class="error" class="awesome"|status
17457 <th class="awesome">status
17465 <DIV ID="x">HTML ROCKS</DIV>
17467 <div id="x">HTML ROCKS</div>
17472 Non-ASCII pseudo-tags are rendered as text
17481 Pseudo-tag with URL 'name' renders as url link
17483 <http://example.com/>
17485 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17490 text with amp in the middle of nowhere
17494 <p>Remember AT&T?
17499 text with character entity: eacute
17501 I always thought é was a cute letter.
17503 <p>I always thought é was a cute letter.
17508 text with entity-escaped character entity-like string: eacute
17510 I always thought &eacute; was a cute letter.
17512 <p>I always thought &eacute; was a cute letter.
17517 text with undefined character entity: xacute
17519 I always thought &xacute; was a cute letter.
17521 <p>I always thought &xacute; was a cute letter.
17528 <data value="5">five</data>
17529 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17530 <mark>This highlighted text</mark>
17532 <p><data value="5">five</data>
17533 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17534 <mark>This highlighted text</mark>
17539 HTML tag with leading space is parsed as text
17543 <p>< div>foo< /div>
17547 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17548 ## the HTML5 parsing spec.
17550 Element with broken attribute syntax
17554 <div style=" style="123">hi</div>
17557 <div style="123">hi</div>
17561 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17562 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17566 ### Nesting tests (see T43545, T52604, T53081)
17569 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17570 # Note that html2wt is considerably more difficult if we use <b> in
17571 # the test case, instead of <small>
17573 Ensure that HTML adoption agency algorithm is properly implemented.
17575 <small>X<small>Y</small>Z</small>
17577 <p><small>X<small>Y</small>Z</small>
17581 # This was T43545 in the PHP parser.
17585 <kbd>X<kbd>Y</kbd>Z</kbd>
17587 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17591 # The following cases were T53081 in the PHP parser.
17592 # Note that there are some other nestable tags (b, i, etc) which are
17593 # not covered; see T53081 for discussion.
17598 <em>X<em>Y</em>Z</em>
17600 <p><em>X<em>Y</em>Z</em>
17605 Nesting of <strong>
17607 <strong>X<strong>Y</strong>Z</strong>
17609 <p><strong>X<strong>Y</strong>Z</strong>
17618 <p><q>X<q>Y</q>Z</q>
17625 <ruby>X<ruby>Y</ruby>Z</ruby>
17627 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17634 <bdo>X<bdo>Y</bdo>Z</bdo>
17636 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17648 [[Media:Foobar.jpg]]
17649 [[Media:Video.ogv]]
17650 [[:Media:Video.ogv]]
17652 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17653 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17654 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17657 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17658 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17659 <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>
17663 Media link with text
17665 [[Media:Foobar.jpg|A neat file to look at]]
17667 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17670 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17673 # FIXME: this is still bad HTML tag nesting
17674 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17675 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17677 Media link with nasty text
17679 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17681 <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>
17684 <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>
17686 <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>
17691 Media link to nonexistent file (T3702)
17693 [[Media:No such.jpg]]
17694 [[Media:No_such file.jpg]]
17696 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17697 <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>
17700 <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>
17701 <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>
17705 Image link to nonexistent file (T3850 - good)
17707 [[File:No_such.jpg]]
17709 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17712 <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>
17716 :Image link to nonexistent file (T3850 - bad)
17718 [[:Image:No such.jpg]]
17720 <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>
17723 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17727 Character reference normalization in link text (T3938)
17729 [[Main Page|this&that]]
17731 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17738 Test for unicode normalization
17740 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17744 (T21451) Links should refer to the normalized form.
17752 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17753 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17754 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17755 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17756 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17761 Empty attribute crash test (T4067)
17763 <font color="">foo</font>
17765 <p><font color="">foo</font>
17770 Empty attribute crash test single-quotes (T4067)
17772 <font color=''>foo</font>
17774 <p><font color="">foo</font>
17779 Attribute test: equals, then nothing
17781 parsoid=wt2html,html2html
17783 <font color=>foo</font>
17785 <p><font color="">foo</font>
17788 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17792 Attribute test: unquoted value
17794 parsoid=wt2html,html2html
17796 <font color=x>foo</font>
17798 <p><font color="x">foo</font>
17801 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17805 Attribute test: unquoted but illegal value (hash)
17807 <font color=#x>foo</font>
17809 <p><font color="#x">foo</font>
17813 # Parsoid does not serialize to empty attribute syntax,
17814 # so wt2wt and html2wt cases are skipped
17816 Attribute test: no value (T54330)
17818 parsoid=wt2html,html2html
17820 <font color>foo</font>
17822 <p><font color="">foo</font>
17825 <p><font color="">foo</font></p>
17829 T4095: link with three closing brackets
17833 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17836 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17840 T4095: link with pipe and three closing brackets
17842 [[Main Page|link]]]
17844 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17847 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17851 T4095: link with pipe and three closing brackets, version 2
17853 [[Main Page|[http://example.com/]]]
17855 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17858 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17867 Template:Dangerous attribute
17869 " onmouseover="alert(document.cookie)
17873 Template:Dangerous style attribute
17875 border-size: expression(alert(document.cookie))
17881 <div style="float: right; {{{1}}}">Magic div</div>
17885 T4304: HTML attribute safety (safe template; regression T4309)
17887 <div title="{{test}}"></div>
17889 <div title="This is a test template"></div>
17892 <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>
17895 # Parsoid has enough context to handle this case
17897 T4304: HTML attribute safety (dangerous template; 2309)
17899 <div title="{{dangerous attribute}}"></div>
17901 <div title=""></div>
17904 <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>
17908 T4304: HTML attribute safety (dangerous style template; 2309)
17910 <div style="{{dangerous style attribute}}"></div>
17912 <div style="/* insecure input */"></div>
17915 <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>
17919 T4304: HTML attribute safety (safe parameter; 2309)
17921 {{div style|width: 200px}}
17923 <div style="float: right; width: 200px">Magic div</div>
17926 <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>
17930 T4304: HTML attribute safety (unsafe parameter; 2309)
17932 {{div style|width: expression(alert(document.cookie))}}
17934 <div style="/* insecure input */">Magic div</div>
17937 <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>
17940 ## Parsoid output here differs; needs investigation.
17942 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17944 {{div style|"><script>alert(document.cookie)</script>}}
17946 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17950 ## Parsoid output here differs; needs investigation.
17952 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17954 {{div style|" ><script>alert(document.cookie)</script>}}
17956 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17961 T4304: HTML attribute safety (link)
17963 <div title="[[Main Page]]"></div>
17965 <div title="[[Main Page]]"></div>
17968 <div title="[[Main Page]]"></div>
17972 T4304: HTML attribute safety (italics)
17974 <div title="''foobar''"></div>
17976 <div title="''foobar''"></div>
17981 T4304: HTML attribute safety (bold)
17983 <div title="'''foobar'''"></div>
17985 <div title="'''foobar'''"></div>
17990 T4304: HTML attribute safety (ISBN)
17992 <div title="ISBN 1234567890"></div>
17994 <div title="ISBN 1234567890"></div>
17999 T4304: HTML attribute safety (RFC)
18001 <div title="RFC 1234"></div>
18003 <div title="RFC 1234"></div>
18008 T4304: HTML attribute safety (PMID)
18010 <div title="PMID 1234567890"></div>
18012 <div title="PMID 1234567890"></div>
18017 T4304: HTML attribute safety (web link)
18019 <div title="http://example.com/"></div>
18021 <div title="http://example.com/"></div>
18026 T4304: HTML attribute safety (named web link)
18028 <div title="[http://example.com/ link]"></div>
18030 <div title="[http://example.com/ link]"></div>
18033 <div title="[http://example.com/ link]"></div>
18037 T5244: HTML attribute safety (extension; safe)
18039 <div style="<nowiki>background:blue</nowiki>"></div>
18041 <div style="background:blue"></div>
18044 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18048 T5244: HTML attribute safety (extension; unsafe)
18050 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18052 <div style="/* insecure input */"></div>
18055 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18058 # More MSIE fun discovered by Tom Gilder
18061 MSIE CSS safety test: spurious slash
18063 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18065 <div style="/* insecure input */">evil</div>
18068 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18072 MSIE CSS safety test: hex code
18074 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18076 <div style="/* insecure input */">evil</div>
18079 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18083 MSIE CSS safety test: comment in url
18085 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18087 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18090 <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>
18094 MSIE CSS safety test: comment in expression
18096 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18098 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18101 <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>
18105 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18107 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18109 <p style="/* invalid control char */">A</p>
18112 <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>
18116 MSIE 6 CSS safety test: Fullwidth (T57332)
18118 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18119 <div style="top:EXPRESSION(alert())">B</div>
18121 <p style="/* insecure input */">A</p>
18122 <div style="/* insecure input */">B</div>
18125 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18126 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18130 MSIE 6 CSS safety test: IPA extensions (T57332)
18132 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18133 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18135 <div style="/* insecure input */">A</div>
18136 <p style="/* insecure input */">B</p>
18139 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18140 <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>
18144 MSIE 6 CSS safety test: sup/sub script (T57332)
18146 <div style="background-image:url⁽javascript:alert())">A</div>
18147 <div style="background-image:url₍javascript:alert())">B</div>
18148 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18150 <div style="/* insecure input */">A</div>
18151 <div style="/* insecure input */">B</div>
18152 <p style="/* insecure input */">C</p>
18155 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18156 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18157 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18163 parsoid=wt2html,html2html
18166 title="data:text/html,<img src=1 onerror=alert(1)>"
18167 style="-o-link:attr(title);-o-link-source:current">X</div>
18169 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18172 <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>
18176 MSIE 6 CSS safety test: Repetition markers (T57332)
18178 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18179 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18180 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18181 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18182 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18183 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18184 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18186 <p style="/* insecure input */">A</p>
18187 <p style="/* insecure input */">B</p>
18188 <p style="/* insecure input */">C</p>
18189 <p style="/* insecure input */">D</p>
18190 <p style="/* insecure input */">E</p>
18191 <p style="/* insecure input */">F</p>
18192 <p style="/* insecure input */">G</p>
18195 <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>
18196 <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>
18197 <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>
18198 <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>
18199 <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>
18200 <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>
18201 <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>
18205 Table attribute legitimate extension
18208 !+ style="<nowiki>color:blue</nowiki>"|status
18213 <th style="color:blue">status
18219 Table attribute safety
18222 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18227 <th style="/* insecure input */">status
18233 CSS line continuation 1
18235 <div style="background-image: u\ rl(test.jpg);"></div>
18237 <div style="/* insecure input */"></div>
18242 CSS line continuation 2
18244 <div style="background-image: u\ rl(test.jpg); "></div>
18246 <div style="/* invalid control char */"></div>
18257 Expansion of multi-line templates in attribute values (T8255)
18259 <div style="background: {{identity|#00FF00}}">-</div>
18261 <div style="background: #00FF00">-</div>
18266 Expansion of multi-line templates in attribute values (T8255 sanity check)
18268 <div style="background:
18271 <div style="background: #00FF00">-</div>
18274 <div style="background:
18279 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18281 <div style="background: #00FF00">-</div>
18283 <div style="background: #00FF00">-</div>
18288 Tags which are hidden from tidiers cannot pass through the Sanitizer
18290 <mw:toc><script>alert();</script></mw:toc>
18292 <p><mw:toc><script>alert();</script></mw:toc>
18297 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18301 Parser hook: empty input
18312 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18315 ## Don't expect parsoid to rt this form.
18317 Parser hook: empty input using terminated empty elements
18319 parsoid=wt2html,html2html
18330 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18334 Parser hook: empty input using terminated empty elements (space before)
18345 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18349 Parser hook: basic input
18360 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18363 ## Don't expect parsoid to rt this form.
18365 Parser hook: case insensitive
18367 parsoid=wt2html,html2html
18378 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18381 ## Don't expect parsoid to rt this form.
18383 Parser hook: case insensitive, redux
18385 parsoid=wt2html,html2html
18396 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18400 Parser hook: nested tags
18402 <tag><tag></tag></tag>
18411 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18415 Parser hook: basic arguments
18417 <tag width="200" height="100" depth="50" square=""></tag>
18430 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18433 ## Don't expect parsoid to rt this form.
18435 Parser hook: basic arguments, variations
18437 parsoid=wt2html,html2html
18439 <tag width=200 height = "100" depth = '50' square></tag>
18452 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18456 Parser hook: argument containing a forward slash (T7344)
18458 <tag filename="/tmp/bla"></tag>
18463 'filename' => '/tmp/bla',
18468 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18471 ## Don't expect parsoid to rt this form.
18473 Parser hook: empty input using terminated empty elements (T4374)
18475 parsoid=wt2html,html2html
18487 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18490 ## </tag> should be output literally since there is no matching tag that begins it
18491 ## Don't expect parsoid to rt this form.
18493 Parser hook: basic arguments using terminated empty elements (T4374)
18497 <tag width=200 height = "100" depth = '50' square/>
18514 <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
18518 ## Don't expect parsoid to rt this form.
18520 Parser hook: Don't allow unclosed extension tags
18526 this is a '''test'''
18528 <p>test <tag>123
18529 </p><p>this is a <b>test</b>
18532 <p>test <tag>123</p>
18534 <p>this is a <b>test</b></p>
18538 Parser hook: horizontal rule inside extension tag that outputs <pre>
18559 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18563 Parser hook: static parser hook not inside a comment
18565 <statictag>hello, world</statictag>
18567 <statictag action="flush" />
18573 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18574 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18578 Parser hook: static parser hook inside a comment
18580 <!-- <statictag>hello, world</statictag> -->
18581 <statictag action="flush" />
18586 <!-- <statictag>hello, world</statictag> -->
18587 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18590 # Nested template calls; this case was broken by Parser.php rev 1.506,
18594 Template:One-parameter
18596 (My parameter is: {{{1}}})
18600 Template:Map-one-parameter
18602 {{{{{1}}}|{{{2}}}}}
18606 Nested template calls
18608 {{Map-one-parameter|One-parameter|param}}
18610 <p>(My parameter is: param)
18619 # Remex wraps empty tag runs with p-tags.
18620 # Parsoid strips them out during p-wrapping.
18622 Sanitizer: Closing of open tags
18624 <s></s><table></table>
18626 <p><s></s></p><table></table>
18628 <s></s><table></table>
18632 Sanitizer: Closing of open but not closed tags
18641 Sanitizer: Closing of closed but not open tags
18647 <p class="mw-empty-elt">
18653 Sanitizer: Closing of closed but not open table tags
18657 Table not started</td></tr></table>
18659 <p>Table not started
18664 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18666 wgFragmentMode=[ 'html5', 'legacy' ]
18668 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18670 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18673 <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>
18677 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18679 wgFragmentMode=[ 'legacy' ]
18681 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18683 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18687 # In HTML5, the restrictions are that id must contain at least one character,
18688 # and must not contain any space characters.
18690 Sanitizer: Validating the contents of the id attribute (T6515)
18694 <br id="" /><br id="a space" />
18699 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18701 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18705 <br id="foo" /><br id="foo" />
18707 Something need to be done. foo-2 ?
18711 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18714 <meta itemprop="hello" content="world">
18715 <meta http-equiv="refresh" content="5">
18716 <meta itemprop="hello" http-equiv="refresh" content="5">
18717 <link itemprop="hello" href="{{SERVER}}">
18718 <link rel="stylesheet" href="{{SERVER}}">
18719 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18723 <p> <meta itemprop="hello" content="world" />
18724 <meta http-equiv="refresh" content="5">
18725 <meta itemprop="hello" content="5" />
18726 <link itemprop="hello" href="http://example.org" />
18727 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18728 <link itemprop="hello" href="http://example.org" />
18735 Sanitizer: Strip comments from CSS attributes
18737 parsoid=wt2html,wt2wt
18739 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18741 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18744 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18748 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18750 [[meatball:Soft"Security]]
18752 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18755 <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>
18759 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18761 [[meatball:Foo<Bar]]
18762 [[meatball:Foo>Bar]]
18763 [[meatball:Foo<bar]]
18764 [[meatball:Foo>bar]]
18766 <p>[[meatball:Foo<Bar]]
18767 [[meatball:Foo>Bar]]
18768 [[meatball:Foo<bar]]
18769 [[meatball:Foo>bar]]
18772 <p>[[meatball:Foo<Bar]]
18773 [[meatball:Foo>Bar]]
18774 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18775 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18779 Language converter: output gets cut off unexpectedly (T7757)
18783 this bit is safe: }-
18785 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18787 then we get cut off here: }-
18789 all additional text is vanished
18791 <p>this bit is safe: }-
18792 </p><p>but if we add a conversion instance: xxx
18793 </p><p>then we get cut off here: }-
18794 </p><p>all additional text is vanished
18797 <p>this bit is safe: }-</p>
18798 <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>
18799 <p>then we get cut off here: }-</p>
18800 <p>all additional text is vanished</p>
18804 Language converter glossary rules inside attributes (T119158)
18806 language=sr variant=sr-el
18808 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18810 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18813 </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>
18816 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18818 <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>
18822 Self closed html pairs (T7487)
18824 <center><font id="bug" />Centered text</center>
18825 <div><font id="bug2" />In div text</div>
18827 <center><font id="bug"></font>Centered text</center>
18828 <div><font id="bug2"></font>In div text</div>
18832 Punctuation: nbsp before exclamation
18836 <p>C'est grave !
18841 Punctuation: CSS !important (T13874)
18843 <div style="width:50% !important">important</div>
18845 <div style="width:50% !important">important</div>
18850 Punctuation: CSS ! important (T13874; with space after)
18852 <div style="width:50% ! important">important</div>
18854 <div style="width:50% ! important">important</div>
18859 HTML bullet list, closed tags (T7497)
18872 <ul data-parsoid='{"stx":"html"}'>
18873 <li data-parsoid='{"stx":"html"}'>One</li>
18874 <li data-parsoid='{"stx":"html"}'>Two</li>
18880 HTML bullet list, unclosed tags (T7497)
18892 <ul data-parsoid='{"stx":"html"}'>
18893 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18894 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18900 HTML ordered list, closed tags (T7497)
18913 <ol data-parsoid='{"stx":"html"}'>
18914 <li data-parsoid='{"stx":"html"}'>One</li>
18915 <li data-parsoid='{"stx":"html"}'>Two</li>
18921 HTML ordered list, unclosed tags (T7497)
18934 <ol data-parsoid='{"stx":"html"}'>
18935 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18936 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18942 HTML nested bullet list, closed tags (T7497)
18965 <ul data-parsoid='{"stx":"html"}'>
18966 <li data-parsoid='{"stx":"html"}'>One</li>
18967 <li data-parsoid='{"stx":"html"}'>Two:
18968 <ul data-parsoid='{"stx":"html"}'>
18969 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18970 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18977 HTML nested bullet list, open tags (T7497)
18999 HTML nested ordered list, closed tags (T7497)
19024 HTML nested ordered list, open tags (T7497)
19061 HTML ordered list item with parameters oddity
19063 <ol><li id="fragment">One</li>
19066 <ol><li id="fragment">One</li>
19071 # parsoid doesn't explicitly mark autonumbered links, see T55505
19073 T7918: autonumbering
19075 [http://first/] [http://second] [ftp://ftp]
19079 [mailto:enclosed@mail.tld With target]
19081 [mailto:enclosed@mail.tld]
19083 mailto:inline@mail.tld
19085 <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>
19086 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19087 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19088 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19089 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19092 <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>
19093 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19094 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19095 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19096 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19101 # Security and HTML correctness
19102 # From Nick Jenkins' fuzz testing
19106 Fuzz testing: Parser13
19120 # Note that Parsoid output differs from the PHP parser here: the PHP
19121 # parser breaks the URL for the magic word, while in Parsoid the URL
19122 # production takes precedence.
19124 Fuzz testing: Parser14
19129 <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>
19130 http://<div id="toc" class="toc"><input type="checkbox" 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>
19132 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19138 <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>
19139 http://</p><div id="toc" class="toc"><input type="checkbox" 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>
19141 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19145 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19146 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19150 Fuzz testing: Parser14-table
19152 parsoid=wt2html,html2html
19157 <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>
19158 <table style="__TOC__">
19163 <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>
19164 <table style="__TOC__">
19171 <table style="__TOC__"></table>
19174 # Known to produce bogus xml (extra </td>)
19175 # Don't add the html/php section since it generates broken HTML
19177 Fuzz testing: Parser16
19194 Fuzz testing: Parser21
19197 !irc://{{ftp://a" onmouseover="alert('hello world');"
19202 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19212 Fuzz testing: Parser22
19214 http://===r:::https://b
19218 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19226 # Known to produce bad XML for now
19228 Fuzz testing: Parser24
19235 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19236 <br style="onmouseover='alert(document.cookie);' " />
19238 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19243 <u class="|">}}}} >
19244 <br style="onmouseover='alert(document.cookie);'" />
19246 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19254 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19255 <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>"}'/>}}}} >
19256 <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}'>
19260 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19263 # Note: the current result listed for this is not what the original one was,
19264 # but the original bug was JavaScript injection, which is fixed in any case.
19265 # It's not clear that the original result listed was any more correct than the
19266 # current one. Original result:
19269 # <li class="||">
19270 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19272 Fuzz testing: Parser25 (T8055)
19278 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19280 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19283 <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"]}'>
19284 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19288 Fuzz testing: URL adjacent extension (with space, clean)
19290 http://example.com <nowiki>junk</nowiki>
19292 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19295 <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>
19299 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19301 http://example.com<nowiki>junk</nowiki>
19303 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19306 <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>
19310 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19312 http://example.com<pre>junk</pre>
19314 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19317 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19319 <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>
19323 Fuzz testing: image with bogus manual thumbnail
19325 [[Image:foobar.jpg|thumbnail= ]]
19327 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19330 <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>
19333 # Parsoid will emit the newline literally in wt2wt; see next test case.
19335 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19339 <pre dir=" "></pre>
19341 <pre dir=" "></pre>
19344 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19345 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19349 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19353 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19354 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19364 Templates in extension attributes are not expanded
19366 <pre dir="{{echo|ltr}}"></pre>
19368 <pre dir="{{echo|ltr}}"></pre>
19371 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19375 Parsing optional HTML elements (T8171)
19380 <td> Some tabular data</td>
19381 <td> More tabular data ...
19382 <td> And yet som tabular data</td>
19388 <td> Some tabular data</td>
19389 <td> More tabular data ...
19390 </td><td> And yet som tabular data</td>
19397 Correct handling of <td>, <tr> (T8171)
19402 <td> Some tabular data</td>
19403 <td> More tabular data ...</td>
19404 <td> And yet som tabular data</td>
19410 <td> Some tabular data</td>
19411 <td> More tabular data ...</td>
19412 <td> And yet som tabular data</td>
19420 Parsing crashing regression (fr:JavaScript)
19424 <p></body></x>
19429 Inline wiki vs wiki block nesting
19435 <p><b>Bold paragraph</b>
19436 </p><p>New wiki paragraph
19440 # FIXME: The current php output is documented
19441 # and desired output is the parsoid target.
19443 Inline HTML vs wiki block nesting
19449 <p><b>Bold paragraph
19450 </p><p>New wiki paragraph</b>
19453 <p><b>Bold paragraph</b>
19454 </p><p>New wiki paragraph
19458 # Original result was this:
19459 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19461 # While that might be marginally more intuitive, maybe, the six-apostrophe
19462 # construct is clearly pathological and the result stated here (which is what
19463 # the parser actually does) is about as reasonable as anything.
19465 Mixing markup for italics and bold
19468 '''bold''''''bold''bolditalics'''''
19470 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19478 Article for special page transclusion test
19482 Special page transclusion
19485 {{Special:Prefixindex/Xyzzyx}}
19487 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19493 Special page transclusion twice (T7021)
19496 {{Special:Prefixindex/Xyzzyx}}
19497 {{Special:Prefixindex/Xyzzyx}}
19499 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19501 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19507 Transclusion of default MediaWiki message
19509 {{MediaWiki:Mainpage}}
19516 Transclusion of nonexistent MediaWiki message
19518 {{MediaWiki:Mainpagexxx}}
19520 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19525 Transclusion of MediaWiki message with underscore
19527 {{MediaWiki:history_short}}
19534 Transclusion of MediaWiki message with space
19536 {{MediaWiki:history short}}
19543 Invalid header with following text
19553 Section extraction test (section 0)
19573 Section extraction test (section 1)
19595 Section extraction test (section 2)
19616 Section extraction test (section 3)
19636 Section extraction test (section 4)
19660 Section extraction test (section 5)
19680 Section extraction test (section 6)
19701 Section extraction test (section 7)
19721 Section extraction test (section 8)
19741 Section extraction test (section 9)
19762 Section extraction test (section 10)
19782 Section extraction test (nonexistent section 11)
19801 Section extraction test with bogus heading (section 1)
19806 ==bogus== not a legal section
19810 ==bogus== not a legal section
19814 Section extraction test with bogus heading (section 2)
19819 ==bogus== not a legal section
19826 Section extraction test with comment after heading (section 1)
19838 Section extraction test with comment after heading (section 2)
19850 Section extraction test with bogus <nowiki> heading (section 1)
19855 ==bogus== <nowiki>not a legal section</nowiki>
19859 ==bogus== <nowiki>not a legal section</nowiki>
19863 Section extraction test with bogus <nowiki> heading (section 2)
19868 ==bogus== <nowiki>not a legal section</nowiki>
19874 # Formerly testing for T4587, now resolved by the use of unmarked sections
19875 # instead of respecting commented sections
19877 Section extraction prefixed by comment (section 1)
19888 Section extraction prefixed by comment (section 2)
19898 # Formerly testing for T4607, now resolved by the use of unmarked sections
19899 # instead of respecting HTML-style headings
19901 Section extraction, mixed wiki and html (section 1)
19917 Section extraction, mixed wiki and html (section 2)
19933 # Formerly testing for T5342
19935 Section extraction, heading surrounded by <noinclude>
19939 <noinclude>==unmarked==</noinclude>
19945 # Test behavior of T21910
19947 Sectiion with all-equals
19952 The line above must have a trailing space
19955 But just in case it doesn't...
19959 But just in case it doesn't...
19963 Section replacement test (section 0)
19994 Section replacement test (section 1)
20023 Section replacement test (section 2)
20053 Section replacement test (section 3)
20084 Section replacement test (section 4)
20111 Section replacement test (section 5)
20142 Section replacement test (section 6)
20172 Section replacement test (section 7)
20203 Section replacement test (section 8)
20234 Section replacement test (section 9)
20263 Section replacement test (section 10)
20293 Section replacement test with initial whitespace (T15728)
20297 Preformatted initial line
20301 Preformatted initial line
20308 Section extraction, heading followed by pre with 20 spaces (T8398)
20320 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20333 Section extraction, <pre> around bogus header (T12309)
20350 Section replacement, <pre> around bogus header (T12309)
20371 Handling of 
 in URLs
20375 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20378 <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>
20382 Handling of %0A in URLs
20386 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20389 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20392 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20394 5 quotes, code coverage +1 line
20404 # same html as previous, but wikitext adjusted to match parsoid html2wt
20405 # note that wt2html and html2html will put the <i> before the <b>
20407 5 quotes, code coverage +1 line w/ nowiki (1)
20409 parsoid=wt2wt,html2wt
20411 '''''<nowiki/>'''''
20416 <p><b><i></i></b></p>
20419 # same as previous, just swapping the <i> and <b>
20421 5 quotes, code coverage +1 line w/ nowiki (2)
20423 '''''<nowiki/>'''''
20428 <p><i><b></b></i></p>
20432 Special:Search page linking.
20436 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20441 {{!}} is a magic word
20443 {{!}} is a magic word there and {{!}} is still a magic word here
20444 | is not a magic word here but {{!}} is still a magic word here
20446 <p>| is a magic word there and | is still a magic word here
20447 | is not a magic word here but | is still a magic word here
20450 <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
20451 | 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>
20457 title=[[Parser test]]
20471 *{{SUBJECTPAGENAME}}
20472 *{{SUBJECTPAGENAMEE}}
20475 *{{NAMESPACENUMBER}}
20480 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20482 <ul><li>Parser test</li>
20483 <li>Parser_test</li>
20484 <li>Parser test</li>
20485 <li>Parser_test</li>
20486 <li>Parser test</li>
20487 <li>Parser_test</li>
20488 <li>Parser test</li>
20489 <li>Parser_test</li>
20490 <li>Parser test</li>
20491 <li>Parser_test</li>
20492 <li>Talk:Parser test</li>
20493 <li>Talk:Parser_test</li>
20494 <li>Parser test</li>
20495 <li>Parser_test</li>
20503 <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>
20506 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20509 Gallery with valid attributes
20511 <gallery type="123" summary="345">
20512 File:File:Foobar.jpg
20515 <ul class="gallery mw-gallery-traditional" type="123">
20516 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20517 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20518 <div class="gallerytext">
20524 <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"}}'>
20525 <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>
20529 ## Parsoid thinks the "centre" here is a property, not a caption.
20534 "modes": ["wt2html"],
20535 "nativeGallery": true
20543 image4 |300px| centre
20544 image5.svg| http://///////
20549 <ul class="gallery mw-gallery-traditional">
20550 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20551 <div class="thumb" style="height: 150px;">Image1.png</div>
20552 <div class="gallerytext">
20555 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20556 <div class="thumb" style="height: 150px;">Image2.gif</div>
20557 <div class="gallerytext">
20560 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20561 <div class="thumb" style="height: 150px;">Image3</div>
20562 <div class="gallerytext">
20565 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20566 <div class="thumb" style="height: 150px;">Image4</div>
20567 <div class="gallerytext">
20572 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20573 <div class="thumb" style="height: 150px;">Image5.svg</div>
20574 <div class="gallerytext">
20575 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20579 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20580 <div class="thumb" style="height: 150px;">* image6</div>
20581 <div class="gallerytext">
20587 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20588 <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>
20589 <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>
20590 <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>
20591 <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>
20592 <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>
20593 <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>
20598 Gallery (with options, html)
20601 "modes": ["wt2html", "html2html"],
20602 "nativeGallery": true
20605 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20606 File:Nonexistent.jpg|caption
20607 File:Nonexistent.jpg
20608 image:foobar.jpg|some '''caption''' [[Main Page]]
20610 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20613 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20614 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20615 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20616 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20617 <div class="gallerytext">
20622 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20623 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20624 <div class="gallerytext">
20627 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20628 <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>
20629 <div class="gallerytext">
20630 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20634 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20635 <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>
20636 <div class="gallerytext">
20639 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20640 <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>
20641 <div class="gallerytext">
20649 <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":{}}'>
20650 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20651 <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>
20652 <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>
20653 <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>
20654 <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>
20655 <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>
20660 Gallery (with options, extsrc)
20663 "nativeGallery": false
20666 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20667 File:Nonexistent.jpg|caption
20668 File:Nonexistent.jpg
20669 image:foobar.jpg|some '''caption''' [[Main Page]]
20671 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20674 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20675 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20676 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20677 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20678 <div class="gallerytext">
20683 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20684 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20685 <div class="gallerytext">
20688 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20689 <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>
20690 <div class="gallerytext">
20691 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20695 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20696 <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>
20697 <div class="gallerytext">
20700 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20701 <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>
20702 <div class="gallerytext">
20710 <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"}}'>
20711 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20712 <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>
20713 <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>
20714 <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>
20715 <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>
20716 <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>
20721 Gallery (without px units)
20723 <gallery widths="70" heights="40">
20727 <ul class="gallery mw-gallery-traditional">
20728 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20729 <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>
20730 <div class="gallerytext">
20736 <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"}}'>
20737 <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>
20742 Gallery (with invalid units)
20744 <gallery widths="70em" heights="40em">
20748 <ul class="gallery mw-gallery-traditional">
20749 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20750 <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>
20751 <div class="gallerytext">
20757 <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"}}'>
20758 <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>
20763 Gallery with link that has fragment
20766 "modes": ["wt2html", "html2html"],
20767 "nativeGallery": true
20771 image:foobar.jpg|link=Main_Page
20772 image:foobar.jpg|link=Main_Page#section
20773 image:foobar.jpg|link=Main Page#section|caption
20776 <ul class="gallery mw-gallery-traditional">
20777 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20778 <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>
20779 <div class="gallerytext">
20782 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20783 <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>
20784 <div class="gallerytext">
20787 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20788 <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>
20789 <div class="gallerytext">
20797 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20798 <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>
20799 <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>
20800 <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>
20804 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20806 Gallery with template inside caption
20809 "nativeGallery": true
20812 <gallery caption="{{echo|hi}}">
20813 File:Foobar.jpg|{{echo|ho}}
20816 <ul class="gallery mw-gallery-traditional">
20817 <li class='gallerycaption'>{{echo|hi}}</li>
20818 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20819 <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>
20820 <div class="gallerytext">
20828 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20829 <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>
20830 <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>
20835 Gallery with wikitext inside caption
20838 "nativeGallery": true
20842 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20843 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20846 <ul class="gallery mw-gallery-traditional">
20847 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20848 <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>
20849 <div class="gallerytext">
20850 <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>
20854 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20855 <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>
20856 <div class="gallerytext">
20857 <p>This is a test template
20864 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20865 <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>
20866 <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>
20871 Gallery (with showfilename option)
20874 "nativeGallery": true
20877 <gallery showfilename="">
20878 File:Nonexistent.jpg|caption
20879 File:Nonexistent.jpg
20880 File:Foobar.jpg|some '''caption''' [[Main Page]]
20884 <ul class="gallery mw-gallery-traditional">
20885 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20886 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20887 <div class="gallerytext">
20888 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20893 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20894 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20895 <div class="gallerytext">
20896 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20900 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20901 <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>
20902 <div class="gallerytext">
20903 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20904 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20908 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20909 <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>
20910 <div class="gallerytext">
20911 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20918 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20919 <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>
20920 <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>
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 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>
20922 <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>
20926 ## Should Parsoid be preserving these variations? See T151367
20928 Gallery (with namespace-less filenames)
20931 "modes": ["wt2html", "html2html"],
20932 "nativeGallery": true
20936 File:Nonexistent.jpg
20942 <ul class="gallery mw-gallery-traditional">
20943 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20944 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20945 <div class="gallerytext">
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">
20953 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20954 <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>
20955 <div class="gallerytext">
20958 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20959 <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>
20960 <div class="gallerytext">
20966 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20967 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File: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>
20968 <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>
20969 <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>
20970 <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>
20975 Gallery override link with wikilink (T36852)
20978 "nativeGallery": true
20982 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20985 <ul class="gallery mw-gallery-traditional">
20986 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20987 <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>
20988 <div class="gallerytext">
20994 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20995 <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>
21000 Gallery override link with absolute external link (T36852)
21003 "nativeGallery": true
21007 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21010 <ul class="gallery mw-gallery-traditional">
21011 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21012 <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>
21013 <div class="gallerytext">
21019 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21020 <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>
21025 Gallery override link with absolute external link with LanguageConverter
21030 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21033 <ul class="gallery mw-gallery-traditional">
21034 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21035 <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>
21036 <div class="gallerytext">
21044 <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"}}'>
21045 <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>
21050 Gallery override link with malicious javascript (T36852)
21053 "modes": ["wt2html", "html2html"],
21054 "nativeGallery": true
21058 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21061 <ul class="gallery mw-gallery-traditional">
21062 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21063 <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>
21064 <div class="gallerytext">
21070 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21071 <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>
21075 # Note that parsoid uses the invalid link as a caption, PHP does not.
21077 Gallery with invalid title as link (T45964)
21080 "modes": ["wt2html", "html2html"],
21081 "nativeGallery": true
21085 File:Foobar.jpg|link=<
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="/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>
21091 <div class="gallerytext">
21097 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21098 <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>
21103 Serialize gallery without attrs in data-mw
21106 "modes": ["html2wt"],
21107 "nativeGallery": true
21110 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21111 <li class="gallerycaption">123</li>
21112 <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>
21115 <gallery caption="123">
21121 Gallery with class and style attributes
21124 "nativeGallery": true
21127 <gallery class="center" style="text-align: center;">
21131 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21132 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21133 <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>
21134 <div class="gallerytext">
21140 <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":{}}'>
21141 <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>
21146 Gallery in slideshow mode
21149 "nativeGallery": true
21152 <gallery mode="slideshow" showthumbnails="">
21156 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21157 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21158 <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>
21159 <div class="gallerytext">
21165 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21166 <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>
21171 Serialize gallery image captions on a line
21174 "modes": ["html2wt"],
21175 "nativeGallery": true
21178 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21179 <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>
21180 <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>
21184 File:Foobar.jpg| hi ho
21185 File:Foobar.jpg|hi<br />ho
21190 HTML Hex character encoding (spells the word "JavaScript")
21192 parsoid=wt2html,wt2wt,html2html
21194 JavaScript
21196 <p>JavaScript
21199 <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>
21203 HTML Hex character encoding bogus encoding (T28437 regression check)
21207 <p>&#xsee;&#XSEE;
21212 HTML Hex character encoding mixed case
21214 parsoid=wt2html,wt2wt,html2html
21221 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21224 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21225 # Note that U+000C (form feed) is not a valid XML character, so
21226 # it is banned even though allowed in HTML5.
21228 Illegal character references (T106578)
21233 ; Control (low): 
21234 ; Control (high):  Ÿ
21235 ; Surrogate: ��
21236 ; This is an okay astral character: 💩
21244 <dt>Control (low)</dt>
21246 <dt>Control (high)</dt>
21247 <dd>&#x7F; &#x9F;</dd>
21249 <dd>&#xD83D;&#xDCA9;</dd>
21250 <dt>This is an okay astral character</dt>
21251 <dd>💩</dd></dl>
21255 __FORCETOC__ override
21267 ISBN 978-0-1234-56 789
21269 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21272 <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>
21276 ISBN followed by 5 spaces
21287 ISBN ISBN 1234567890
21289 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21292 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21295 # Uppercase X and lowercase x as well
21306 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21307 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21308 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21309 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21310 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21311 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21314 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21315 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21316 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21317 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21318 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21319 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21323 ISBN with empty prefix (parsoid test)
21327 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21330 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21334 T24905: <abbr> followed by ISBN followed by </a>
21336 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21338 <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>
21341 <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>
21349 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21352 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21356 Double RFC with a wiki link
21360 <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>
21363 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21371 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21374 <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>
21378 Centre-aligned image
21380 [[Image:foobar.jpg|centre]]
21382 <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>
21385 <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>
21391 [[Image:foobar.jpg|none]]
21393 <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>
21396 <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>
21400 Width + Height sized image (using px) (height is ignored)
21402 [[Image:foobar.jpg|640x480px]]
21404 <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>
21407 <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>
21411 Width-sized image (using px, no following whitespace)
21413 [[Image:foobar.jpg|640px]]
21415 <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>
21418 <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>
21422 Width-sized image (using px, with following whitespace - test regression from r39467)
21424 [[Image:foobar.jpg|640px ]]
21426 <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>
21429 <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>
21433 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21435 [[Image:foobar.jpg| 640px]]
21437 <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>
21440 <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>
21444 Image with page parameter
21448 [[File:LoremIpsum.djvu|page=2]]
21450 <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>
21453 <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>
21457 Another italics / bold test
21465 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21471 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21474 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21478 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21480 Images with the "|" character in the comment
21482 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21484 <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>
21487 <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>
21491 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21493 <html><script>alert(1);</script></html>
21495 <p><html><script>alert(1);</script></html>
21500 HTML with raw HTML ($wgRawHtml==true)
21504 <html><script>alert(1);</script></html>
21506 <p><script>alert(1);</script>
21511 Parents of subpages, one level up
21513 subpage title=[[Subpage test/L1/L2/L3]]
21517 <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>
21523 Parents of subpages, one level up, not named
21525 subpage title=[[Subpage test/L1/L2/L3]]
21529 <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>
21536 Parents of subpages, two levels up
21538 subpage title=[[Subpage test/L1/L2/L3]]
21544 <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
21545 </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>
21550 Parents of subpages, two levels up, without trailing slash or name.
21552 subpage title=[[Subpage test/L1/L2/L3]]
21561 Parents of subpages, two levels up, with lots of extra trailing slashes.
21563 subpage title=[[Subpage test/L1/L2/L3]]
21567 <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>
21572 Subpage test/L1/L2/L3Sibling
21578 Transclusion of a sibling page (one level up)
21580 subpage title=[[Subpage test/L1/L2/L3]]
21589 Transclusion of a child page
21591 subpage title=[[Subpage test/L1/L2]]
21599 # This is wt2html only in Parsoid because we add <nowiki>
21600 # because of {{..}} and we don't expect to fix that to
21601 # eliminate the nowikis selective for {{..}} markup.
21603 Non-transclusion because of too many up levels
21605 subpage title=[[Subpage test/L1/L2/L3]]
21608 {{../../../../More than parent}}
21610 <p>{{../../../../More than parent}}
21613 <p>{{../../../../More than parent}}</p>
21617 Definition list code coverage
21623 <dl><dt>title  </dt>
21625 <dt>title </dt>
21631 <dl><dt>title <span typeof="mw:Placeholder"> </span></dt><dd>def</dd>
21632 <dt>title<span typeof="mw:Placeholder"> </span></dt><dd>def</dd>
21633 <dt>title</dt><dd>def</dd></dl>
21637 Don't fall for the self-closing div
21639 <div>hello world</div/>
21641 <div>hello world</div>
21650 <p>[[:Template:Msg]]
21659 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21663 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21665 Always escape literal '>' in output, not just after '<'
21679 <p>This is a test template
21680 This is a test template
21692 Inclusion of !userCanEdit() content
21696 <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>
21702 Out-of-order TOC heading levels
21711 <div id="toc" class="toc"><input type="checkbox" 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>
21713 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21715 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21716 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21719 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21721 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21722 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21728 <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>
21729 <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>
21730 <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>
21731 <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>
21732 <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>
21733 <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>
21739 ISBN with a dummy number
21749 ISBN with space-delimited number
21753 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21756 <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>
21761 ISBN with multiple spaces, no number
21780 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21781 </p><p>ISBN 12345678901
21784 <p>ISBN 123456789</p>
21786 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21788 <p>ISBN 12345678901</p>
21793 ISBN with trailing year (T9110)
21795 ISBN 1-234-56789-0 - 2006
21797 ISBN 1 234 56789 0 - 2006
21799 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21800 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21803 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21805 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21812 wgFragmentMode=[ 'html5', 'legacy' ]
21814 {{anchorencode:foo bar©#%n}}
21819 <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>
21823 anchorencode (legacy)
21825 wgFragmentMode=[ 'legacy' ]
21827 {{anchorencode:foo bar©#%n}}
21829 <p>foo_bar.C2.A9.23.25n
21834 anchorencode trims spaces
21836 wgFragmentMode=[ 'html5', 'legacy' ]
21838 {{anchorencode: __pretty__please__}}
21843 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21847 anchorencode deals with links
21849 wgFragmentMode=[ 'html5', 'legacy' ]
21851 {{anchorencode: [[hello|world]] [[hi]]}}
21856 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21860 anchorencode deals with templates
21862 wgFragmentMode=[ 'html5', 'legacy' ]
21864 {{anchorencode: {{Foo}} x}}
21869 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21873 anchorencode encodes like the TOC generator: (T20431)
21875 wgFragmentMode=[ 'html5', 'legacy' ]
21877 ===_ +:.3A%3A _ &&]] x===
21878 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21881 <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>
21882 <p>+:.3A%3A_&&]]_x
21885 <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>
21886 <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>
21887 <meta property="mw:PageProp/noeditsection"/>
21891 anchorencode encodes like the TOC generator: (T20431) (legacy)
21893 wgFragmentMode=[ 'legacy' ]
21895 ===_ +:.3A%3A&&]]===
21896 {{anchorencode: _ +:.3A%3A&&]] }}
21899 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21900 <p>.2B:.3A.253A.26.26.5D.5D
21905 T8200: blockquotes and paragraph formatting
21926 T10293: Use of center tag ruins paragraph formatting
21947 Parsing of overlapping (improperly nested) inline html tags
21949 <span><s>x</span></s>
21951 <p><span><s>x</span></s></span>
21954 <p><span><s>x</s></span>
21959 ### Language variants related tests
21962 # Parsoid does not mark self-links.
21963 # Parsoid does not convert links; PHP will do any necessary redirects.
21966 Self-link in language variants
21968 title=[[Dunav]] language=sr
21970 Both [[Dunav]] and [[Дунав]] are names for this river.
21972 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21975 <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>
21985 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21987 title=[[Duna]] language=sr
21989 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21991 <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.
21994 <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>
21998 Link to a section of a variant of this title shouldn't be parsed as self-link
22000 title=[[Duna]] language=sr
22002 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22004 <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.
22007 <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>
22011 Link to pages in language variants
22015 Main Page can be written as [[Маин Паге]]
22017 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22020 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22025 Multiple links to pages in language variants
22029 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22031 <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>.
22034 <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>
22039 Simple template in language variants
22045 <p>This is a test template
22051 Template with explicit namespace in language variants
22057 <p>This is a test template
22063 Basic test for template parameter in language variants
22067 {{парамтест|param=foo}}
22069 <p>This is a test template with parameter foo
22074 Simple category in language variants
22078 [[Category:МедиаWики Усер'с Гуиде]]
22080 cat=МедиаWики_Усер'с_Гуиде sort=
22082 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22097 ## We used to, but no longer wt2wt this test since the default serializer
22098 ## will normalize all categories to serialize on their own line.
22099 ## This wikitext usage is going to be fairly uncommon in production and
22100 ## selser will take care of preserving formatting in those scenarios.
22102 Don't convert blue categorylinks to another variant (T35210)
22108 [[A]][[Category:分类]]
22112 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22113 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22117 Stripping -{}- tags (language variants)
22121 Latin proverb: -{Ne nuntium necare}-
22123 <p>Latin proverb: Ne nuntium necare
22126 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22131 Prevent conversion with -{}- tags (language variants)
22133 language=sr variant=sr-ec
22135 Latinski: -{Ne nuntium necare}-
22137 <p>Латински: Ne nuntium necare
22140 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22145 Prevent conversion of text with -{}- tags (language variants)
22147 language=sr variant=sr-ec
22149 Latinski: -{Ne nuntium necare}-
22151 <p>Латински: Ne nuntium necare
22154 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22159 Prevent conversion of links with -{}- tags (language variants)
22161 language=sr variant=sr-ec
22165 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22168 <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>
22173 -{}- tags within headlines (within html for parserConvert())
22175 wgFragmentMode=[ 'html5', 'legacy' ]
22177 language=sr variant=sr-ec
22181 Note that even an unprotected headline ID is not affected by language
22186 <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>
22187 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22190 <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>
22193 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22195 <p>Note that even an unprotected headline ID is not affected by language
22198 <h2 id="Latinski">Latinski</h2>
22202 Explicit definition of language variant alternatives
22204 language=zh variant=zh-tw
22206 -{zh:China;zh-tw:Taiwan}-, not China
22208 <p>Taiwan, not China
22211 <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>
22215 Filter syntax for language variants
22217 language=zh variant=zh-tw
22219 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22221 <p>fooblog, WEBJOURNAL, WEBLOGquux
22224 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22227 # Note that Parsoid post-processing for language variants needs to
22228 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22230 Conversion around HTML tags
22232 language=sr variant=sr-ec
22234 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22235 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22238 <span title="ЛаCтин">ски</span>
22241 <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"}]}'/>
22242 <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>
22246 Explicit session-wise two-way language variant mapping (A flag and - flag)
22248 language=zh variant=zh-tw
22250 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22252 Taiwan is not China.
22254 But -{A|zh:China; zh-tw:Taiwan}- is China,
22256 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22258 and -{China}- is China.
22260 <p>This is Taiwan, but we'll forget that now.
22261 </p><p>Taiwan is not China.
22262 </p><p>But Taiwan is Taiwan,
22263 </p><p>(This should be stripped!)
22264 </p><p>and China is China.
22267 <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>
22268 <p>Taiwan is not China.</p>
22269 <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>
22270 <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>
22271 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22275 Explicit session-wise one-way language variant mapping (A flag and - flag)
22277 language=zh variant=zh-tw
22279 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22281 COUNTRY is China or Taiwan.
22283 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22285 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22287 and -{COUNTRY}- is COUNTRY.
22289 <p>This is Taiwan, but we'll forget that now.
22290 </p><p>COUNTRY is China or Taiwan.
22291 </p><p>But Taiwan is Taiwan,
22292 </p><p>(This should be stripped!)
22293 </p><p>and COUNTRY is COUNTRY.
22296 <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>
22297 <p>COUNTRY is China or Taiwan.</p>
22298 <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>
22299 <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>
22300 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22304 Explicit session-wise two-way language variant mapping (H flag for hide)
22306 language=zh variant=zh-tw
22308 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22312 <p>(This should be stripped!)
22313 </p><p>Taiwan is Taiwan.
22316 <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>
22317 <p>Taiwan is China.</p>
22321 Explicit session-wise one-way language variant mapping (H flag for hide)
22323 language=zh variant=zh-tw
22325 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22327 COUNTRY is Taiwan or China.
22329 <p>(This should be stripped!)
22330 </p><p>Taiwan is Taiwan or China.
22333 <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>
22334 <p>COUNTRY is Taiwan or China.</p>
22337 ## Note that parsoid test runner does not support 'showtitle' option.
22339 Adding explicit conversion rule for title (T flag)
22341 language=zh variant=zh-tw showtitle
22343 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22348 <p>Should be stripped!
22349 </p><p>Taiwan is China.
22352 <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>
22353 <p>Taiwan is China.</p>
22357 Code coverage: T combined with H flag
22359 language=zh variant=zh-tw showtitle
22361 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22366 <p>Should be stripped!
22367 </p><p>Taiwan is Taiwan.
22370 <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>
22371 <p>Taiwan is China.</p>
22375 Code coverage: T with no variants
22377 language=zh variant=zh-tw showtitle
22379 -{H|zh:China; zh-tw:Taiwan}-
22380 Taiwan is China.-{T|Taiwan is China}-
22387 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22388 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22392 Code coverage: rules with no variants
22394 language=zh variant=zh-tw
22396 -{H|zh:China; zh-tw:Taiwan}-
22407 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22409 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22410 Taiwan is China.</p>
22415 Code coverage: D flag for conversion rule
22417 language=zh variant=zh-tw
22419 -{D|zh-cn:XA; zh-tw:YA}-
22420 -{A;D|zh-cn:XB; zh-tw:YB}-
22421 -{D;H|zh-cn:XC; zh-tw:YC}-
22423 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22429 XA XB XC YA YB YC FOO BAR BAT 012345
22434 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22438 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22441 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22442 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22443 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22444 <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>
22445 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22446 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22447 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22448 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22452 Code coverage: N flag for conversion rule
22454 language=zh variant=zh-cn
22464 </p><p>српски (ћирилица)
22467 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22468 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22469 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22472 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22474 Code coverage: N flag for conversion rule (wt2html only)
22476 language=zh variant=zh-cn
22477 parsoid=wt2html,html2html
22484 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22488 Testing that changing the language variant here in the tests actually works
22490 language=zh variant=zh showtitle
22492 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22495 <p>Should be stripped!
22498 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22502 Recursive conversion of alt and title attrs shouldn't clear converter state
22504 language=zh variant=zh-cn
22507 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22508 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22512 Should be stripped<span title="Exclamation">!</span>
22515 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22516 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>
22520 T26072: more test on conversion rule for title
22522 language=zh variant=zh-tw showtitle
22524 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22526 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22529 <p>This should be stripped!
22530 </p><p>This won't take interferes with the title rule.
22533 <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>
22534 <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>
22538 Partly disable title conversion if variant == main language code
22540 language=zh variant=zh title=[[ZH]] showtitle
22542 -{T|zh-cn:CN;zh-tw:TW}-
22548 <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>
22552 Partly disable title conversion if variant == main language code, more
22554 language=zh variant=zh title=[[ZH]] showtitle
22562 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22566 Raw output of variant escape tags (R flag)
22568 language=zh variant=zh-tw
22570 Raw: -{R|zh:China;zh-tw:Taiwan}-
22572 <p>Raw: zh:China;zh-tw:Taiwan
22575 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22578 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22580 Raw output of variant escape tags (R flag) (wt2html only)
22582 language=zh variant=zh-tw
22583 parsoid=wt2html,html2html
22585 -{Variant}- -{D|syntax}- -{D;R|options}-
22587 <p>Variant syntax options
22590 <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>
22594 Nested markup inside raw output of variant escape tags (R flag)
22596 language=zh variant=zh-tw
22598 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22600 <p>Nested raw: nested Taiwan nested
22603 <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>
22607 Nested markup and spaces inside raw output of variant escape tags (R flag)
22609 language=zh variant=zh-tw
22611 X-{ outer -{ inner }- outer }-X
22613 <p>X outer inner outer X
22616 <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>
22620 Templates inside raw output of variant escape tags (R flag)
22622 language=zh variant=zh-tw
22624 Nested raw: -{R|nested {{echo|hi}} templates}-
22626 <p>Nested raw: nested hi templates
22629 <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>
22633 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22635 language=zh variant=zh-cn
22637 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22642 <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>
22646 Conversion rules from [numeric-only string] to [something else] (T48634)
22648 language=zh variant=zh-cn
22650 -{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
22655 <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>
22659 Two-way converter rule entries with an empty value should be ignored (T53551)
22661 language=zh variant=zh-cn
22663 -{H|zh-cn:foo;zh-tw:;}-foobar
22668 <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>
22672 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22674 language=zh variant=zh-cn
22676 -{H|=>zh-cn:foo;}-foobar
22681 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22685 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22687 language=zh variant=zh-cn
22694 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22698 Nested using of manual convert syntax
22700 language=zh variant=zh-hk
22702 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22704 <p>Nested: Hello Hong Kong!
22707 <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>
22711 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22713 language=zh variant=zh-cn
22715 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22717 <p><span title="X">A</span>
22720 <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>
22724 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22726 language=zh variant=zh-cn
22728 -{<span title="-{X}-">A</span>}-
22729 !! html/php+disabled
22730 <p><span title="X">A</span>
22733 <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>
22736 # Parsoid and PHP disagree on how to parse this example: Parsoid
22737 # insists that the content of a language converter element be a valid
22738 # DOM fragment or attribute string
22740 Language converter markup with block content
22742 language=zh variant=zh-cn
22744 <span>a-{b<div>c}-d
22746 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22748 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22753 </span></div></span></div></span>
22755 <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>
22757 <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>
22759 <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>
22763 LanguageConverter selser (1)
22765 language=zh variant=zh-cn
22767 "modes": ["wt2wt", "selser"],
22769 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22779 LanguageConverter selser (2)
22781 language=zh variant=zh-cn
22783 "modes": ["wt2wt", "selser"],
22785 ["span[class='x']", "contents", "text", "-{foo}-"],
22786 ["a", "contents", "text", "-{"],
22787 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22791 <span class="x">TEXT1</span>
22792 [http://example.com TEXT2]
22796 <span class="x"><nowiki>-{foo}-</nowiki></span>
22797 [http://example.com -{]
22798 [[Foo|<nowiki>-{</nowiki>]]
22799 {{1x|<nowiki>-{</nowiki>}}
22802 # Tests LanguageVariantText in ConstrainedText
22804 LanguageConverter selser (3)
22806 language=zh variant=zh-cn
22808 "modes": ["wt2wt", "selser"],
22810 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22811 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22822 |<nowiki/>-{edited}-
22826 # Tests LanguageVariantText._fromSelSer
22828 LanguageConverter selser (4)
22830 language=zh variant=zh-cn
22832 "modes": ["wt2wt", "selser"],
22834 ["td > span.x", "remove"]
22840 |<span class="x">Foo</span>-{Bar}-
22841 ||<span class="x">Foo</span>-{Bar}-
22851 # Since Parsoid is starting to emit canonical wikitext for links,
22852 # [http://example.com http://example.com] will not RT back to that
22854 # Parsoid does not language-convert links (it is done in a
22855 # post-processing step)
22857 Proper conversion of text in external links
22859 language=sr variant=sr-ec
22862 http://www.google.com
22863 gopher://www.google.com
22864 [http://www.google.com http://www.google.com]
22865 [gopher://www.google.com gopher://www.google.com]
22866 [https://www.google.com irc://www.google.com]
22867 [ftp://www.google.com www.google.com/ftp://dir]
22868 [//www.google.com www.google.com]
22870 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22871 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22872 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22873 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22874 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22875 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22876 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22879 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22880 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22881 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
22882 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22883 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22884 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22885 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22889 Do not convert roman numbers to language variants
22891 language=sr variant=sr-ec
22895 <p>Фридрих IV је цар.
22898 <p>Fridrih IV je car.</p>
22902 Unclosed language converter markup "-{"
22913 Don't convert raw rule "-{R|=>}-" to "=>"
22922 <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>
22926 Don't break link parsing if language converter markup is in the caption.
22928 language=sr variant=sr-ec
22930 [[Main Page|-{R|main page}-]]
22932 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22935 <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>
22939 T146304: Don't break template parsing if language converter markup is in the parameter.
22941 language=sr variant=sr-ec
22948 <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>
22952 T146305: Don't break image parsing if language converter markup is in the caption.
22956 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22958 <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>
22961 <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>
22965 T146305: Don't break image parsing if nested language converter markup is in the caption.
22967 language=zh variant=zh-cn
22969 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22971 <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>
22974 <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>
22977 # XXX html2wt disabled because rich markup in alt is not preserved.
22979 Don't break gallery if language converter markup is inside.
22984 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22985 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22988 <ul class="gallery mw-gallery-traditional">
22989 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22990 <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>
22991 <div class="gallerytext">
22992 <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>
22996 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22997 <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>
22998 <div class="gallerytext">
22999 <p>This is a test template
23006 <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"}}'>
23007 <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>
23008 <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>
23013 T153135: Don't break list handling if language converter markup is in the item.
23015 language=zh variant=zh-cn
23017 ;-{zh-cn:AAA;zh-tw:BBB}-
23021 <dt>foo:bar</dt></dl>
23024 <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>
23025 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23029 // Note that parsoid does not protect colons unless language converter
23030 // markup is properly nested, because it is a backtracking parser.
23032 T153135: Unclosed markup in definition list (code coverage)
23034 language=zh variant=zh-cn
23039 <dl><dt><b>foo:bar</b></dt><b>
23040 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23043 <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}'>
23044 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
23045 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
23050 T153135: Nested language converter markup in definition list (code coverage)
23052 language=zh variant=zh-cn
23054 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23056 <dl><dt>AAA foo:bar bat:baz</dt>
23060 <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>
23061 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23065 # html2wt mode disabled due to <nowiki> insertion.
23067 T153140: Don't break table handling if language converter markup is in the cell.
23069 language=sr variant=sr-ec
23070 parsoid=wt2html,wt2wt,html2html
23087 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23094 Language converter tricky html2wt cases (1)
23097 parsoid=html2wt,wt2wt
23099 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23101 -{<nowiki>}-</nowiki>}-
23108 Language converter tricky html2wt cases (2)
23111 parsoid=html2wt,wt2wt
23115 <nowiki>-{foo}-</nowiki>
23117 <p>-{foo}-
23122 Language converter tricky html2wt cases (3)
23125 parsoid=html2wt,wt2wt
23127 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23128 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23129 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23135 -{<nowiki>-{foo}-</nowiki>}-
23139 </p><p>-{foo}-
23144 Language converter tricky html2wt cases (4)
23147 parsoid=html2wt,wt2wt
23149 <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>
23157 # Note that the <nowiki> escaping added by parsoid for source text,
23158 # destination text, and language names only works on the PHP side
23159 # for *destination text*. (HTML entity escaping wouldn't work
23160 # any better.) This is probably a bug, at least for source texts.
23161 # (For language names PHP uses a precise regexp based on the languages
23162 # it currently knows have variants, which is fragile since this set
23163 # can grow/shrink over time.)
23165 Language converter tricky html2wt cases (5)
23167 language=zh variant=zh-cn
23169 <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>
23170 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23171 <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>
23172 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23175 -{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
23177 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23179 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23181 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23184 !! html/php+disabled
23185 <p>foobat;xyz=>zh-cn:abc
23189 </p><p>a:b=>c 0;zh-tw:bar
23194 T179579: Nowiki and lc interaction
23201 -{123<nowiki>|</nowiki>456}-
23203 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23205 <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>
23209 T2529: Uncovered bullet
23219 T2529: Uncovered bullet in a deeply nested list
23221 *******Foo {{bullet}}
23223 <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>
23229 T2529: Uncovered table already at line-start
23252 T2529: Uncovered bullet in parser function result
23254 *Foo {{lc:{{bullet}} }}
23262 T7678: Double-parsed template argument
23264 {{lc:{{{1}}}|hello}}
23271 T7678: Double-parsed template invocation
23273 {{lc:{{paramtest {{!}} param = hello }} }}
23275 <p>{{paramtest | param = hello }}
23280 Case insensitivity of parser functions for non-ASCII characters (T10143)
23283 title=[[Main Page]]
23285 {{PRVNÍVELKÉ:ěščř}}
23286 {{prvnívelké:ěščř}}
23306 Morwen/13: Unclosed link followed by heading
23313 <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>
23318 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23325 <h1><span class="mw-headline" id="heading">heading</span></h1>
23330 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23337 <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>
23352 Paragraphs inside divs (no extra line breaks)
23364 Paragraphs inside divs (extra line break on open)
23379 Paragraphs inside divs (extra line break on close)
23394 Paragraphs inside divs (extra line break on open and close)
23410 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23411 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23413 Nesting tags, paragraphs on lines which begin with <div>
23415 <div></div><strong>A
23418 <div></div><p><strong>A
23419 </strong></p><strong></strong><p><strong>B</strong>
23428 # T8200: <blockquote> should behave like <div> with respect to line breaks
23430 T8200: paragraphs inside blockquotes (no extra line breaks)
23432 <blockquote>Line one
23434 Line two</blockquote>
23436 <blockquote>Line one
23437 Line two</blockquote>
23440 <blockquote><p>Line one
23441 Line two</p></blockquote>
23445 T8200: paragraphs inside blockquotes (extra line break on open)
23450 Line two</blockquote>
23455 Line two</blockquote>
23461 Line two</p></blockquote>
23464 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23466 T8200: paragraphs inside blockquotes (extra line break on close)
23468 <blockquote>Line one
23473 <blockquote>Line one
23479 <blockquote><p>Line one
23486 T8200: paragraphs inside blockquotes (extra line break on open and close)
23502 ## This is a corner case interaction between the paragraph wrapping in the
23503 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
23504 ## some tags which close paragraphs (and thus prevent wrapping on their line),
23505 ## of which "div" is one, but do p-wrapping inside them. These are referred
23506 ## to as "never suppressing". Remex, for its part, doesn't traverse into
23507 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
23509 Paragraphs inside blockquotes/divs (no extra line breaks)
23511 <blockquote><div>Line one
23513 Line two</div></blockquote>
23515 <blockquote><div>Line one
23516 Line two</div></blockquote>
23521 Paragraphs inside blockquotes/divs (extra line break on open)
23526 Line two</div></blockquote>
23531 Line two</div></blockquote>
23536 Paragraphs inside blockquotes/divs (extra line break on close)
23538 <blockquote><div>Line one
23541 </div></blockquote>
23543 <blockquote><div>Line one
23546 </div></blockquote>
23551 Paragraphs inside blockquotes/divs (extra line break on open and close)
23557 </div></blockquote>
23563 </div></blockquote>
23568 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23570 wgLinkHolderBatchSize=0
23576 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23577 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23578 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23583 Free external link invading image caption
23585 [[Image:Foobar.jpg|thumb|http://x|hello]]
23587 <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>
23590 <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>
23594 T17196: localised external link numbers
23598 [http://en.wikipedia.org/]
23600 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23603 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23607 Multibyte character in padleft
23609 {{padleft:-Hello|7|Æ}}
23614 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23618 Multibyte character in padright
23620 {{padright:Hello-|7|Æ}}
23625 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23629 formatdate parser function
23631 {{#formatdate:2009-03-24}}
23633 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23638 formatdate parser function, with default format
23640 {{#formatdate:2009-03-24|mdy}}
23642 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23647 Spacing of numbers in formatted dates
23649 {{#formatdate:January 15}}
23651 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23656 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
23658 language=nl title=[[MediaWiki:Common.css]]
23660 {{#formatdate:2009-03-24|dmy}}
23662 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23675 Edit comment with link
23679 I like the [[Main Page]] a lot
23681 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23685 Edit comment with link and link text
23689 I like the [[Main Page|best pages]] a lot
23691 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23695 Edit comment with link and link text with suffix
23699 I like the [[Main Page|best page]]s a lot
23701 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23705 Edit comment with section link (non-local, eg in history list)
23707 comment title=[[Main Page]]
23709 /* External links */ removed bogus entries
23711 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23715 Edit comment with section link and text before it (non-local, eg in history list)
23717 comment title=[[Main Page]]
23719 pre-comment text /* External links */ removed bogus entries
23721 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>
23725 Edit comment with section link (local, eg in diff view)
23727 comment local title=[[Main Page]]
23729 /* External links */ removed bogus entries
23731 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23735 Edit comment with subpage link (T16080)
23739 title=[[Subpage test]]
23741 Poked at a [[/subpage]] here...
23743 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23747 Edit comment with subpage link and link text (T16080)
23751 title=[[Subpage test]]
23753 Poked at a [[/subpage|neat little page]] here...
23755 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23759 Edit comment with bogus subpage link in non-subpage NS (T16080)
23762 title=[[Subpage test]]
23764 Poked at a [[/subpage]] here...
23766 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23770 Edit comment with bare anchor link (local, as on diff)
23774 title=[[Main Page]]
23778 <a href="#section">#section</a>
23782 Edit comment with bare anchor link (non-local, as on history)
23785 title=[[Main Page]]
23789 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23793 Anchor starting with underscore
23799 <p><a href="#_ref">One</a>
23802 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23806 Id starting with underscore
23808 <div id="_ref"></div>
23810 <div id="_ref"></div>
23815 Edit comment with link with more than one pipe (T99346)
23819 [[Main Page|Many|pipes]]
23821 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23825 Complex edit comment with link with more than one pipe (T99346)
23829 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23831 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..."
23835 Space normalisation on autocomment (T24784)
23838 title=[[Main Page]]
23840 /* __hello__world__ */
23842 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23846 percent-encoding and + signs in comments (T28410)
23850 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23852 <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>
23855 # Parsoid doesn't support this yet: see T75581
23856 # but it *should* omit the 'src' attribute if the image is bad.
23857 # PHP side of tests was disabled in
23858 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23859 # because of issues in the PHP parserTests infrastructure
23860 # (but the output below is indeed what the PHP side emits)
23862 Bad images - basic functionality
23865 !! html/php+disabled
23867 <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>
23871 Bad images - T18039: text after bad image disappears
23876 !! html/php+disabled
23882 <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>
23887 Verify that displaytitle works (T24501) no displaytitle
23891 wgAllowDisplayTitle=true
23892 wgRestrictDisplayTitle=false
23894 this is not the the title
23897 <p>this is not the the title
23902 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23907 wgAllowDisplayTitle=true
23908 wgRestrictDisplayTitle=false
23910 this is not the the title
23911 {{DISPLAYTITLE:whatever}}
23914 <p>this is not the the title
23919 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23924 wgAllowDisplayTitle=true
23925 wgRestrictDisplayTitle=true
23927 this is not the the title
23928 {{DISPLAYTITLE:whatever}}
23931 <p>this is not the the title
23936 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23941 wgAllowDisplayTitle=true
23942 wgRestrictDisplayTitle=true
23944 this is not the the title
23945 {{DISPLAYTITLE:screen}}
23948 <p>this is not the the title
23953 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23958 wgAllowDisplayTitle=false
23960 this is not the the title
23961 {{DISPLAYTITLE:screen}}
23964 <p>this is not the the title
23965 <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>
23970 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23975 wgAllowDisplayTitle=false
23977 this is not the the title
23980 <p>this is not the the title
23985 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23990 wgAllowDisplayTitle=true
23991 wgRestrictDisplayTitle=true
23993 this is not the the title
23994 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23996 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23997 <p>this is not the the title
24002 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24007 wgAllowDisplayTitle=true
24008 wgRestrictDisplayTitle=true
24010 this is not the the title
24011 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24013 <span style="color: red;">s</span>creen
24014 <p>this is not the the title
24019 Page status indicators: Empty name is invalid
24023 <indicator name=" "></indicator>
24024 <indicator></indicator>
24026 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24027 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24032 Page status indicators: Weird syntaxes that are okay
24036 <indicator name="empty" />
24037 <indicator name="name"></indicator>
24046 Page status indicators: Torture test
24050 <indicator name="01">hello world</indicator>
24051 <indicator name="02">[[Main Page]]</indicator>
24052 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24053 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24054 <indicator name="05">*foo
24056 <indicator name="06"><nowiki>foo</nowiki></indicator>
24057 <indicator name="07"> Preformatted</indicator>
24058 <indicator name="08"><div>Broken tag</indicator>
24059 <indicator name="09">{| class=wikitable
24062 <indicator name="10">Two
24064 paragraphs</indicator>
24067 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24068 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" />
24069 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>
24070 05=<ul><li>foo</li>
24074 07=<pre>Preformatted
24076 08=<div>Broken tag</div>
24078 09=<table class="wikitable">
24095 preload: check <noinclude> and <includeonly>
24099 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24105 preload: check <onlyinclude>
24109 Goodbye <onlyinclude>Hello world</onlyinclude>
24115 preload: can pass tags through if we want to
24119 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24121 <includeonly>Hello world</includeonly>
24125 preload: check that it doesn't try to do tricks
24129 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24131 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24135 Play a bit with r67090 and T5158
24137 <div style="width:50% !important"> </div>
24138 <div style="width:50% !important"> </div>
24139 <div style="width:50% !important"> </div>
24140 <div style="border : solid;"> </div>
24142 <div style="width:50% !important"> </div>
24143 <div style="width:50% !important"> </div>
24144 <div style="width:50% !important"> </div>
24145 <div style="border : solid;"> </div>
24148 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24149 <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>
24150 <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>
24151 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24156 T5158: Test for French spaces in attributes
24158 <br style=" clear : both ; " />
24160 <p><br style="clear : both ;" />
24165 HTML5 data attributes
24167 <span data-foo="bar">Baz</span>
24168 <p data-abc-def_hij="">Quuz</p>
24170 <p><span data-foo="bar">Baz</span>
24172 <p data-abc-def_hij="">Quuz</p>
24175 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24176 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24180 Strip reserved data attributes
24182 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24184 <div data-ok="fred">d</div>
24187 <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>
24191 percent-encoding and + signs in internal links (T28410)
24193 [[User:+%]] [[Page+title%]]
24194 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24195 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24196 [[%33%45]] [[%33%45+]]
24198 <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>
24199 <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>
24200 <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>
24201 <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>
24204 <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>
24205 <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>
24206 <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>
24207 <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>
24211 Special characters in embedded file links (T29679)
24213 [[File:Contains & ampersand.jpg]]
24214 [[File:Does not exist.jpg|Title with & ampersand]]
24216 <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>
24217 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24220 <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>
24221 <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>
24225 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24227 Text's been normalized?
24229 <p>Text's been normalized?
24234 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24236 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24238 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24243 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24245 [http://www.example.org/ ideograms]
24247 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24252 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24254 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24256 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24280 T33098 Template which includes system messages which includes the template
24284 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24285 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24290 T33490 Turkish: ucfirst 'blah'
24301 T33490 Turkish: ucfirst 'ix'
24312 T33490 Turkish: lcfirst 'BLAH'
24323 T33490 Turkish: ucfırst (with a dotless i)
24329 <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>
24334 T33490 ucfırst (with a dotless i) with English language
24340 <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>
24344 # Note that Parsoid doesn't emit an explicit TOC.
24345 # Note also that the html2wt direction tends to emit an extra newline
24346 # between the __TOC__ magicword and the first heading unless *both*
24347 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24351 T28375: TOC with italics
24353 title=[[Main Page]]
24356 ==''Lost'' episodes==
24358 <div id="toc" class="toc"><input type="checkbox" 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>
24360 <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>
24364 <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>
24367 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24368 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24372 T28375: TOC with bold
24374 title=[[Main Page]]
24377 =='''should be bold''' then normal text==
24379 <div id="toc" class="toc"><input type="checkbox" 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>
24381 <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>
24385 <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>
24388 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24389 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24393 T35845: Headings become cursive in TOC when they contain an image
24395 title=[[Main Page]]
24398 ==Image [[Image:foobar.jpg]]==
24400 <div id="toc" class="toc"><input type="checkbox" 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>
24402 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24406 <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>
24409 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24410 <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>
24414 T35845 (2): Headings become bold in TOC when they contain a blockquote
24416 title=[[Main Page]]
24419 ==<blockquote>Quote</blockquote>==
24421 <div id="toc" class="toc"><input type="checkbox" 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>
24423 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24427 <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>
24430 <div id="toc" class="toc"><input type="checkbox" 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>
24432 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24436 <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>
24438 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24439 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24443 Unclosed tags in TOC
24445 wgFragmentMode=[ 'html5', 'legacy' ]
24447 title=[[Main Page]]
24451 <small>Hanc marginis exiguitas non caperet.</small>
24454 <div id="toc" class="toc"><input type="checkbox" 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>
24456 <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>
24460 <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>
24461 <p><small>Hanc marginis exiguitas non caperet.</small>
24465 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24466 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24467 <p><small>Hanc marginis exiguitas non caperet.</small>
24472 Multiple tags in TOC
24475 ==<i>Foo</i> <b>Bar</b>==
24477 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24479 <div id="toc" class="toc"><input type="checkbox" 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>
24481 <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>
24482 <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>
24486 <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>
24487 <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>
24490 <div id="toc" class="toc"><input type="checkbox" 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>
24492 <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>
24493 <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>
24497 <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>
24498 <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>
24500 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24501 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24503 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24506 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24507 # html5 tag parsing.
24509 Tags with parameters in TOC
24514 ==<sup class="in-h2">Hello</sup>==
24516 ==<sup class="a > b">Evilbye</sup>==
24518 <div id="toc" class="toc"><input type="checkbox" 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>
24520 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24521 <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>
24525 <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>
24526 <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>
24529 <meta property="mw:PageProp/toc" />
24530 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24532 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24536 span tags with directionality in TOC
24539 ==<span dir="ltr">C++</span>==
24541 ==<span dir="rtl">זבנג!</span>==
24543 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24545 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24547 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24549 <div id="toc" class="toc"><input type="checkbox" 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>
24551 <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>
24552 <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>
24553 <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>
24554 <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>
24555 <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>
24559 <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>
24560 <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>
24561 <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>
24562 <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>
24563 <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>
24566 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24567 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24568 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24569 <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>
24570 <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>
24571 <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>
24575 T74884: bdi element in ToC
24578 ==<bdi>test</bdi>==
24580 <div id="toc" class="toc"><input type="checkbox" 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>
24582 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24586 <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>
24589 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24590 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24594 T35715: s/strike element in ToC
24597 ==<s>test</s> test <strike>test</strike>==
24599 <div id="toc" class="toc"><input type="checkbox" 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>
24601 <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>
24605 <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>
24608 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24609 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24613 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24618 <div id="toc" class="toc"><input type="checkbox" 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>
24620 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24624 <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>
24627 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24628 <h2 id="x" data-parsoid='{}'>x</h2>
24634 == {{int:headline_sample}} ==
24638 T34057: Title needed when expanding <h> nodes.
24640 title=[[Main Page]]
24644 <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>
24649 Strip marker in urlencode
24651 {{urlencode:x<nowiki/>y}}
24652 {{urlencode:x<nowiki/>y|wiki}}
24653 {{urlencode:x<nowiki/>y|path}}
24654 {{urlencode:x<pre id="one">two</pre>y}}
24682 Strip marker in formatNum
24684 {{formatnum:1<nowiki/>2}}
24685 {{formatnum:1<nowiki/>2|R}}
24693 Check noCommafy in formatNum
24697 {{formatnum:123456.78}}
24698 {{formatnum:123456.78|NOSEP}}
24706 Wrong option for formatNum (T58199)
24708 {{formatnum:1,234.56|Random}}
24709 {{formatnum:1,234.56|EVERYTHING}}
24710 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24719 Strip marker in grammar
24723 {{grammar:elative|foo<nowiki/>bar}}
24730 Strip marker in padleft
24732 {{padleft:|2|x<nowiki/>y}}
24739 Strip marker in padright
24741 {{padright:|2|x<nowiki/>y}}
24748 Strip marker in anchorencode
24750 {{anchorencode:x<nowiki/>y}}
24755 <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>
24759 nowiki inside link inside heading (T20295)
24761 ==[[foo|x<nowiki>y</nowiki>z]]==
24763 <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>
24768 new support for bdi element (T33817)
24770 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24772 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24777 Ignore pipe between table row attributes
24781 |- id=foo | style='color: red'
24789 <tr id="foo" style="color: red">
24796 Language parser function
24805 Padleft and padright (default 0-padding)
24814 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24815 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24819 Padleft and padright (partial fill)
24821 {{padleft:xyz|6|ab}}
24822 {{padright:xyz|6|ab}}
24828 <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>
24829 <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>
24833 Padleft and padright as substr
24835 {{padleft:|3|abcde}}
24836 {{padright:|3|abcde}}
24842 <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>
24843 <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>
24847 Padleft and padright with non-numerical length (T180403)
24849 {{padleft:abcdef|junk}}
24850 {{padright:abcdef|junk}}
24858 Special parser function
24860 {{#special:RandomPage}}
24861 {{#special:BaDtItLe}}
24862 {{#special:Foobar}}
24871 T36939 - Case insensitive link parsing ([HttP://])
24873 [HttP://MediaWiki.Org/]
24875 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24878 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24882 T36939 - Case insensitive link parsing ([HttP:// title])
24884 [HttP://MediaWiki.Org/ MediaWiki]
24886 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24891 T36939 - Case insensitive link parsing (HttP://)
24893 HttP://MediaWiki.Org/
24895 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24898 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24916 <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>
24917 <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>
24918 <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>
24919 <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>
24920 <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>
24926 ### Parsoid-specific tests
24927 ### Parsoid-PHP parser incompatibilities
24930 1. SOL-sensitive wikitext tokens as template-args
24932 parsoid=wt2html,wt2wt
24938 <span about="#mwt1" typeof="mw:Transclusion">
24939 </span><ul about="#mwt1"><li>a</li>
24941 <span about="#mwt2" typeof="mw:Transclusion">
24942 </span><ol about="#mwt2"><li>a</li>
24944 <span about="#mwt3" typeof="mw:Transclusion">
24945 </span><dl about="#mwt3"><dd>a</dd>
24949 #### -----------------------------------------------------------------
24950 #### Parsoid-specific functionality tests
24951 #### -----------------------------------------------------------------
24953 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24954 # We know wt2wt will fail, but we expect selser to pass.
24955 # Due to the nature of our testing, wt2wt and selser tests will enter the
24956 # blacklist and we'll catch selser regressions based on changes to the
24957 # blacklist entries for selser tests.
24959 1. Bad treebuilder fixup of formatting elt is cleaned up
24961 parsoid=wt2html,wt2wt
24966 [[Image:Foobar.jpg|right|Test]]
24973 <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>
24980 2. Bad treebuilder fixup of formatting elt is cleaned up
24982 parsoid=wt2html,wt2wt
24984 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24986 <small>[[Image:Foobar.jpg|right|300px]]</small>
24990 <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>
24992 <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>
24996 3. Bad treebuilder fixup of formatting elt is cleaned up
24998 parsoid=wt2html,wt2wt
25000 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25002 <p><small><b>foo</b></small></p>
25003 <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>
25004 <p><small><b>bar</b></small></p>
25008 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
25010 parsoid=wt2html,wt2wt
25012 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25014 <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>
25017 #### ----------------------------------------------------------------
25018 #### Parsoid-only testing of Parsoid's impl of LST
25019 #### Not implemented yet, see
25020 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25021 #### ----------------------------------------------------------------
25023 ## We still need to support serializing the older format while content is stored.
25025 LST Sections: Backwards compatibility
25028 "suppressErrors": true,
25029 "modes": ["html2wt"]
25032 <section begin="2011-05-16" />
25033 <section end="2014-04-10 (MW 1.23wmf22)" />
25035 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25036 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25040 LST Sections: Newfangled approach
25042 <section begin="2011-05-16" />
25043 <section end="2014-04-10 (MW 1.23wmf22)" />
25045 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
25047 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
25051 #--------- Test stripping of empty nodes in template content ----------
25054 Empty LI and TR nodes should be stripped from template content
25059 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25063 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25076 Empty LI and TR nodes should not be stripped from top-level content
25090 <li class='mw-empty-elt'></li>
25095 <tr class='mw-empty-elt'></tr>
25104 Empty TR nodes should not be stripped if they have any attributes set
25106 {{EmptyTRWithHTMLAttrTest}}
25108 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25109 <tr align='center'></tr>
25110 <tr><td>foo</td></tr>
25111 <tr align='center'></tr>
25112 <tr><td>bar</td></tr>
25116 #### ----------------------------------------------------------------
25117 #### The following section of tests are primarily to test
25118 #### wikitext escaping capabilities of Parsoid. Given that
25119 #### escaping can be done any number of ways, the wikitext (input)
25120 #### is always adjusted to reflect how Parsoid adds nowiki
25123 #### We are marking several tests as parsoid-only since the
25124 #### HTML in the result section is different from what the
25125 #### PHP parser generates for it.
25126 #### ----------------------------------------------------------------
25129 #### --------------- Headings ---------------
25131 #### 1. Nested inside html <h1>=foo=</h1>
25132 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25133 #### 3. Nested inside html with wikitext split by html tags
25134 #### 4. No escape needed
25135 #### 5. Empty headings <h1></h1>
25136 #### 6. Heading chars in SOL context
25137 #### ----------------------------------------
25139 Headings: 0. Unnested
25149 <p>=foo<i>a</i>=</p>
25151 <nowiki>=foo=</nowiki>
25153 <nowiki> </nowiki>=foo=
25155 <nowiki>=foo=</nowiki>
25157 =foo''a''<nowiki>=</nowiki>
25160 # New headings and existing headings are handled differently
25162 Headings: 1. Nested inside html
25170 <h1 data-parsoid=''>=foo=</h1>
25171 <h2 data-parsoid=''>=foo=</h2>
25172 <h3 data-parsoid=''>=foo=</h3>
25173 <h4 data-parsoid=''>=foo=</h4>
25174 <h5 data-parsoid=''>=foo=</h5>
25175 <h6 data-parsoid=''>=foo=</h6>
25183 =<nowiki>=foo=</nowiki>=
25184 ==<nowiki>=foo=</nowiki>==
25185 ===<nowiki>=foo=</nowiki>===
25186 ====<nowiki>=foo=</nowiki>====
25187 =====<nowiki>=foo=</nowiki>=====
25188 ======<nowiki>=foo=</nowiki>======
25193 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25202 <nowiki>*</nowiki>bar
25208 <nowiki>=bar=</nowiki>
25212 Headings: 3. Nested inside html with wikitext split by html tags
25216 <h1>=<b>bold</b>foo=</h1>
25218 = ='''bold'''foo= =
25222 Headings: 4a. No escaping needed (testing just h1 and h2)
25233 <h1><i>=</i>foo=</h1>
25253 Headings: 4b. No escaping needed (inside p-tags)
25270 Headings: 4c. Short headings (1)
25277 <nowiki>===</nowiki>
25283 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25285 Headings: 4d. Short headings (2)
25287 parsoid=wt2html,html2html
25298 <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>
25299 <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>
25300 <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>
25305 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25306 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25307 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25311 Headings: 5. Empty headings
25315 <h1 data-parsoid='{}'></h1>
25317 <h2 data-parsoid='{}'></h2>
25319 <h3 data-parsoid='{}'></h3>
25321 <h4 data-parsoid='{}'></h4>
25323 <h5 data-parsoid='{}'></h5>
25325 <h6 data-parsoid='{}'></h6>
25335 =====<nowiki/>=====
25337 ======<nowiki/>======
25341 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25351 <nowiki>=a=</nowiki>
25353 <nowiki>=a=</nowiki>
25355 <nowiki>=a=</nowiki>
25359 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25372 <nowiki>=a=</nowiki>
25375 <nowiki>=a=</nowiki>
25378 <nowiki>=a=</nowiki>
25383 Headings: 6c. Heading chars in SOL context (leading newline break)
25391 <nowiki>=b=</nowiki>
25395 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25399 <!--c0--><p>=a=</p>
25401 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25403 <!--c0--><nowiki>=a=</nowiki>
25405 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25409 Headings: 6d. Heading chars in SOL context (No escaping needed)
25419 Headings: 7. Insert a newline between new content and headings
25425 <h2 data-parsoid='{}'>A</h2>
25426 <p data-parsoid='{}'>a</p>
25437 Headings: Used as horizontal rule
25439 wgFragmentMode=[ 'html5', 'legacy' ]
25445 <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>
25448 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25451 #### --------------- Lists ---------------
25452 #### 0. Outside nests (*foo, etc.)
25453 #### 1. Nested inside html <ul><li>*foo</li></ul>
25454 #### 2. Inside definition lists
25455 #### 3. Only bullets at start should be escaped
25456 #### 4. No escapes needed
25457 #### 5. No unnecessary escapes
25458 #### 6. Escape bullets in SOL position
25459 #### 7. Escape bullets in a multi-line context
25460 #### ----------------------------------------
25463 Lists: 0. Outside nests
25473 <nowiki>*</nowiki>foo
25475 <nowiki>#</nowiki>foo
25477 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25480 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25481 ## to test wikitext escaping, and insignificant whitespace diffs
25482 ## cause PHP parser tests to barf
25484 Lists: 1. Nested inside html (No unnecessary escapes)
25493 <li data-parsoid='{}'>*foo</li>
25494 <li data-parsoid='{}'>#foo</li>
25495 <li data-parsoid='{}'>:foo</li>
25496 <li data-parsoid='{}'>;foo</li>
25504 <li data-parsoid='{}'>*foo</li>
25505 <li data-parsoid='{}'>#foo</li>
25506 <li data-parsoid='{}'>:foo</li>
25507 <li data-parsoid='{}'>;foo</li>
25514 *<nowiki>*foo</nowiki>
25515 *<nowiki>#foo</nowiki>
25516 *<nowiki>:foo</nowiki>
25517 *<nowiki>;foo</nowiki>
25523 #<nowiki>*foo</nowiki>
25524 #<nowiki>#foo</nowiki>
25525 #<nowiki>:foo</nowiki>
25526 #<nowiki>;foo</nowiki>
25530 Lists: 2. Inside definition lists
25534 <dl><dt>;foo</dt></dl>
25535 <dl><dt>:foo</dt></dl>
25538 <dl><dd>:foo</dd></dl>
25542 ; <nowiki>:foo</nowiki>
25544 ; <nowiki>:foo</nowiki>
25551 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25557 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25561 *<nowiki>*foo</nowiki>''it''*bar
25565 Lists: 4. No escapes needed
25578 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25582 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25596 Lists: 5. No unnecessary escapes
25600 <ul><li> bar <span>[[foo]]</span></li></ul>
25601 <ul><li> =bar <span>[[foo]]</span></li></ul>
25602 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25603 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25604 <ul><li> =bar <span>foo]]</span>=</li></ul>
25605 <ul><li> <s></s>: a</li></ul>
25606 <ul><li> <i>* foo</i></li></ul>
25609 * bar <span><nowiki>[[foo]]</nowiki></span>
25611 * =bar <span><nowiki>[[foo]]</nowiki></span>
25613 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25615 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25617 * =bar <span>foo]]</span>=
25625 Lists: 6. Escape bullets in SOL position
25629 <p><!--cmt-->*foo</p>
25631 <!--cmt--><nowiki>*</nowiki>foo
25635 Lists: 7. Escape bullets in a multi-line context
25644 <nowiki>*</nowiki>b
25648 Lists: 8. Escape colons only if not present in tags
25652 <dl><dt>a:b<i>c:d</i></dt></dl>
25654 ; <nowiki>a:b</nowiki>''c:d''
25657 #### --------------- HRs ---------------
25658 #### 1. Single line
25659 #### -----------------------------------
25662 HRs: 1. Single line
25670 ----<nowiki>----</nowiki>
25675 #### --------------- Tables ---------------
25676 #### 1a. Simple example
25677 #### 1b. No escaping needed (!foo)
25678 #### 1c. No escaping needed (|foo)
25679 #### 1d. No escaping needed (|}foo)
25681 #### 2a. Nested in td (<td>foo|bar</td>)
25682 #### 2b. Nested in td (<td>foo||bar</td>)
25683 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25685 #### 3a. Nested in th (<th>foo!bar</th>)
25686 #### 3b. Nested in th (<th>foo!!bar</th>)
25687 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25691 #### 4c. No escaping needed
25692 #### --------------------------------------
25695 Tables: 1a. Simple example
25703 <nowiki>{|</nowiki>
25708 Tables: 1b. No escaping needed
25719 Tables: 1c. No escaping needed
25730 Tables: 1d. No escaping needed
25741 Tables: 2a. Nested in td
25746 <td>foo|bar</td></tr>
25747 <tr><td>x<div>a|b</div></td>
25751 |<nowiki>foo|bar</nowiki>
25753 |x<div><nowiki>a|b</nowiki></div>
25761 <td>x<div>a|b</div>
25762 </td></tr></tbody></table>
25766 Tables: 2b. Nested in td
25772 <td>a<i>b||c</i></td>
25773 <td>a<i><div>b||c</div></i></td>
25774 </tr></tbody></table>
25777 |<nowiki>foo||bar</nowiki>
25778 |a''<nowiki>b||c</nowiki>''
25779 |a''<div><nowiki>b||c</nowiki></div>''
25788 <td>a<i><div>b||c</div></i>
25794 Tables: 2c. Nested in td -- no escaping needed
25810 Tables: 3a. Nested in th
25826 Tables: 3b. Nested in th
25831 <tr><th>foo!!bar</th>
25832 <th><i>foo|bar</i></th>
25833 <th><i>foo!!bar</i></th>
25834 <th><i><span>foo!!bar</span></i></th>
25835 </tr></tbody></table>
25838 !<nowiki>foo!!bar</nowiki>
25839 !''<nowiki>foo|bar</nowiki>''
25840 !''<nowiki>foo!!bar</nowiki>''
25841 !''<span><nowiki>foo!!bar</nowiki></span>''
25850 <th><i>foo!!bar</i>
25852 <th><i><span>foo!!bar</span></i>
25858 Tables: 3c. Nested in th
25863 <tr><th>foo||bar</th>
25864 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25865 </tr></tbody></table>
25868 !<nowiki>foo||bar</nowiki>
25869 !<nowiki>foo||bar</nowiki>
25882 Tables: 4a. Escape -
25898 |<nowiki>-bar</nowiki>
25903 Tables: 4b. Escape +
25919 |<nowiki>+bar</nowiki>
25924 Tables: 4c. No escaping needed
25929 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25930 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25936 <div>a|b</div></td>
25981 Tables: 4d. No escaping needed
25986 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25987 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25988 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25999 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26009 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26013 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26015 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26017 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26019 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26022 | || align="center" | ||
26032 | {{!}}{{!}} align="center" | ||
26036 ! !! align="center" | !!
26042 <td align="center"></td>
26044 </td></tr></tbody></table>
26049 <td align="center">
26052 </td></tr></tbody></table>
26056 <td align="center"></td>
26058 </td></tr></tbody></table>
26062 <th align="center"></th>
26064 </th></tr></tbody></table>
26068 T97430: Don't emit empty nowiki pairs around marker meta tags
26072 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26073 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26075 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26076 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26080 Unclosed xmlish element in table line shouldn't eat end delimiters
26085 <tbody><tr><td> <foo</td>
26086 <td> bar></td></tr>
26103 #### --------------- Links ----------------
26104 #### 1. Quote marks in link text
26105 #### 2. Wikilinks: Escapes needed
26106 #### 3. Wikilinks: No escapes needed
26107 #### 4. Extlinks: Escapes needed
26108 #### 5. Extlinks: No escapes needed
26109 #### --------------------------------------
26111 Links 1. WikiLinks: No escapes needed
26115 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26116 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26117 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26121 [[Foo|x [Foobar] x]]
26123 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26124 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26125 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26130 Links 2. WikiLinks: Escapes needed
26134 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26135 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26136 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26137 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26138 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26139 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26140 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26141 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26142 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26143 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26145 [[Foo|<nowiki>Foobar]</nowiki>]]
26146 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26147 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26148 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26149 [[Foo|<nowiki>|Bar</nowiki>]]
26150 [[Foo|<nowiki>]]bar</nowiki>]]
26151 [[Foo|<nowiki>[[bar</nowiki>]]
26152 [[Foo|<nowiki>x [[ y</nowiki>]]
26153 [[Foo|<nowiki>x ]] y</nowiki>]]
26154 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26156 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26157 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26158 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26159 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26160 <a href="/wiki/Foo" title="Foo">|Bar</a>
26161 <a href="/wiki/Foo" title="Foo">]]bar</a>
26162 <a href="/wiki/Foo" title="Foo">[[bar</a>
26163 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26164 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26165 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26170 Links 3. WikiLinks: No escapes needed
26174 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26175 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26180 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26181 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26186 Links 4. ExtLinks: Escapes needed
26190 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26191 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26192 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26193 <p>[http://google.com]</p>
26194 <p>[http://google.com google]</p>
26195 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26196 <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>
26198 [http://google.com <nowiki>[google]</nowiki>]
26199 [http://google.com <nowiki>google]</nowiki>]
26200 [http://google.com <nowiki>goog] le</nowiki>]
26202 <nowiki>[http://google.com]</nowiki>
26204 <nowiki>[http://google.com google]</nowiki>
26206 [http://google.com<nowiki>]</nowiki>
26208 [{{echo|http://google.com}}<nowiki>]</nowiki>
26210 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26211 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26212 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26213 </p><p>[http://google.com]
26214 </p><p>[http://google.com google]
26215 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26216 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26221 Links 5. ExtLinks: No escapes needed
26225 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26226 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26228 [http://google.com [google]
26230 [[http://google.com]]
26232 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26233 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26238 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26242 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26243 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26244 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26245 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26246 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26247 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26248 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26249 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26250 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26251 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26252 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26253 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26254 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26257 x<nowiki/>http://example.com<nowiki/>y
26258 http://example.com<nowiki/>?x
26259 http://example.com<nowiki/>&x
26260 http://example.com<nowiki/>'x
26261 http://example.com<nowiki/>,x
26262 http://example.com<nowiki/>.x
26263 http://example.com<nowiki/>;x
26264 http://example.com<nowiki/>:x
26265 http://example.com<nowiki/>;x
26266 http://example.com<nowiki/>!x
26267 http://example.com<nowiki/>=x
26268 http://example.com<nowiki/>(x)
26269 http://example.com(x<nowiki/>)
26273 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26278 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26280 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26281 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26282 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26283 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26284 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26290 "http://example.com"
26291 (http://example.com)
26292 (http://example.com) foo
26293 http://example.com,
26294 http://example.com, foo
26297 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26299 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26300 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26301 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26302 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26303 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26308 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26312 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26313 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26315 http://example.com.,;:!?\
26316 -http://example.com:
26318 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26319 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26324 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26328 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26329 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26330 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26334 X<nowiki/>RFC 123<nowiki/>y
26338 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26342 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26343 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26344 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26351 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26352 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26353 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26358 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26362 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26363 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26364 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26368 X<nowiki/>PMID 123<nowiki/>y
26372 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26376 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26377 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26378 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26385 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26386 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26387 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26392 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26396 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26397 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26398 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26401 ISBN 1234567890<nowiki/>1
26402 ISBN 1234567890<nowiki/>x
26403 a<nowiki/>ISBN 1234567890<nowiki/>b
26407 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26411 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26415 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26420 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26424 <p>this is not a link: http://example.com
26427 this is not a link: <nowiki>http://example.com</nowiki>
26431 Links 15. Link trails can't become link prefixes.
26436 <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>
26438 [[Söfnuður]]-[[00]]
26440 <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>
26444 #### --------------- Quotes ---------------
26445 #### 1. Quotes inside <b> and <i>
26446 #### 2. Link fragments separated by <i> and <b> tags
26447 #### 3. Link fragments inside <i> and <b>
26448 #### 4. No escaping needed
26449 #### --------------------------------------
26451 1a. Quotes inside <b> and <i>
26462 <b>foo'<i>bar'</i>baz</b>
26471 <i>fools'<span> errand</span></i>
26472 <i><span>fool</span>'s errand</i>
26473 '<i>foo</i> bar '<i>baz</i>
26474 a|!*#-:;+-~[]{}b'<i>x</i>
26478 ''<nowiki>''foo''</nowiki>''
26479 ''<nowiki>'''foo'''</nowiki>''
26481 '''<nowiki/>'foo''''
26482 '''<nowiki>''foo''</nowiki>'''
26483 '''<nowiki>'''foo'''</nowiki>'''
26484 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26485 '''foo'''<nowiki/>'s
26491 '''foo'''<nowiki/>'
26492 ''''foo'''<nowiki/>'
26493 ''fools'<span> errand</span>''
26494 ''<span>fool</span>'s errand''
26495 '<nowiki/>''foo'' bar '''baz''
26496 a|!*#-:;+-~[]{}b'''x''
26500 1b. Quotes inside <b> and <i> with other tags on same line
26504 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26505 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26506 <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>
26507 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26508 '<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>
26509 '<i>foo</i> <div title="name">test</div>
26510 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26511 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26512 <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>
26515 '''a'' foo ''[[bar]]''
26516 ''a''' foo ''[[bar]]''
26517 ''a''' foo '''{{echo|[[bar]]}}'''
26518 [[foo]] x'''[[bar]]''
26519 '''foo'' <ref>test</ref>
26520 '''foo'' <div title="name">test</div>
26521 '''foo'' and <br> bar
26526 2. Link fragments separated by <i> and <b> tags
26530 <p>[[<i>foo</i>hello]]</p>
26531 <p>[[<b>foo</b>hello]]</p>
26533 [[''foo''<nowiki>hello]]</nowiki>
26535 [['''foo'''<nowiki>hello]]</nowiki>
26538 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26539 # this is one of the shortcomings of this format
26541 3. Link fragments inside <i> and <b>
26545 <p><i>[[foo</i>]]</p>
26546 <p><b>[[foo</b>]]</p>
26548 ''[[foo''<nowiki>]]</nowiki>
26550 '''[[foo'''<nowiki>]]</nowiki>
26554 4. No escaping needed
26558 <p>'<span><i>bar</i></span>'
26559 '<span><b>bar</b></span>'
26563 '<span>''bar''</span>'
26564 '<span>'''bar'''</span>'
26568 #### ----------- Paragraphs ---------------
26569 #### 1. No unnecessary escapes
26570 #### --------------------------------------
26573 1. No unnecessary escapes
26577 <p>bar <span>[[foo]]</span>
26578 </p><p>=bar <span>[[foo]]</span>
26579 </p><p>[[bar <span>[[foo]]</span>
26580 </p><p>]]bar <span>[[foo]]</span>
26581 </p><p>=bar <span>foo]]</span>=
26584 bar <span><nowiki>[[foo]]</nowiki></span>
26586 =bar <span><nowiki>[[foo]]</nowiki></span>
26588 [[bar <span><nowiki>[[foo]]</nowiki></span>
26590 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26592 =bar <span>foo]]</span><nowiki>=</nowiki>
26595 #### ----------------------- PRE --------------------------
26597 1. Leading whitespace in SOL context should be escaped
26620 <nowiki> </nowiki>a
26622 <nowiki> </nowiki> a
26626 <nowiki> </nowiki> a
26628 <nowiki> </nowiki>a
26631 <nowiki> </nowiki>b
26654 2. Leading whitespace in non-indent-pre contexts should not be escaped
26658 <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>
26659 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26660 <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>
26670 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26689 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26693 <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>
26695 [[File:Foobar.jpg|thumb|caption]]
26699 5. Nowiki escaping should account for indent-pres
26709 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26723 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
26726 "modes": ["html2wt"],
26727 "scrubWikitext": true
26735 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
26736 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
26737 <p> <!--boo-->*foo</p>
26738 <p><!--boo--> *foo</p>
26739 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
26740 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
26756 <nowiki>*</nowiki>foo
26758 <nowiki/><!--boo-->*foo
26760 <!--boo--><nowiki/>*foo
26762 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
26764 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
26767 #### --------------- Behavior Switches --------------------
26770 1. Valid behavior switches should be escaped
26777 <nowiki>__TOC__</nowiki>
26778 ''<nowiki>__TOC__</nowiki>''
26782 2. Invalid behavior switches should not be escaped
26793 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26795 Behavior switches should be SOL-transparent
26799 <meta property="mw:PageProp/toc" />
26801 <!-- this one's bogus -->
26804 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26806 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26810 <!-- this one's bogus -->
26819 #### --------------- HTML tags ---------------
26822 #### 3. multi-line html tag
26823 #### 4. extension tags
26824 #### -----------------------------------------
26830 <a href="http://google.com">google</a>
26832 <a href="http://google.com">google</a>
26840 <ul><li> <div>foo</div></li>
26841 <li> <div style="color:red">foo</div></li>
26842 <li> <td></li></ul>
26845 * <nowiki><div>foo</div></nowiki>
26846 * <nowiki><div style="color:red">foo</div></nowiki>
26847 * <nowiki><td></nowiki>
26851 3. multi-line html tag
26870 <p><ref>foo</ref>
26871 </p><p><ref>bar
26872 </p><p>baz</ref>
26875 <nowiki><ref>foo</ref></nowiki>
26877 <nowiki><ref>bar</nowiki>
26879 baz<nowiki></ref></nowiki>
26883 Parsoid: newline inducing block nodes don't suppress <nowiki>
26889 <nowiki> </nowiki>a
26894 #### --------------- Others ---------------
26900 <p><nowiki>foo</nowiki>
26903 <nowiki>foo</nowiki>
26906 ## The quote-char in the input is necessary for triggering the bug
26908 (T54035) Nowiki-escaping should not get tripped by " :" in text
26917 #----------- End of wikitext escaping tests --------------
26921 Tag-like HTML structures are passed through as text
26943 </p><p>1<d e>f
26948 HTML tag with necessary entities in attributes
26950 <span title="&amp;">foo</span>
26952 <p><span title="&amp;">foo</span>
26957 HTML tag with 'unnecessary' entity encoding in attributes
26959 <span title="&">foo</span>
26961 <p><span title="&">foo</span>
26966 HTML tag with broken attribute value quoting
26968 parsoid=wt2html,html2html
26970 <span title="Hello world>Foo</span>
26972 <p><span title="Hello world">Foo</span>
26975 <p><span title="Hello world">Foo</span></p>
26979 Self-closed tag with broken attribute value quoting
26981 parsoid=wt2html,html2html
26983 <div title="Hello world />Foo
26985 <div title="Hello world"></div><p>Foo
26988 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26992 Table with broken attribute value quoting
26994 parsoid=wt2html,html2html
26997 | title="Hello world|Foo
27002 <td title="Hello world">Foo
27008 <td title="Hello world">Foo
27014 Table with broken attribute value quoting on consecutive lines
27016 parsoid=wt2html,html2html
27019 | title="Hello world|Foo
27020 | style="color:red|Bar
27025 <td title="Hello world">Foo
27027 <td style="color:red">Bar
27033 <td title="Hello world">Foo
27034 </td><td style="color: red">Bar
27035 </td></tr></tbody></table>
27040 Accept empty td cell attribute
27043 | align="center" |foo|| |
27048 <td align="center">foo</td>
27055 Non-empty attributes in th-cells
27058 !Foo!! style="color: red" |Bar
27064 <th style="color: red">Bar
27070 Accept empty attributes in th-cells
27085 Empty table rows go away
27106 ### Parsoid-centric tests for testing RTing of inter-element separators
27107 ### Edge cases not tested by existing parser tests and specific to
27108 ### Parsoid-specific serialization strategies.
27112 RT-ed inter-element separators should be valid separators
27124 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27128 # Parsoid-only test of a DOM pass
27130 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27142 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27143 <p>bar</p></small></td></tr>
27147 <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>
27151 # Note that the "style" attribute is really a template parameter here.
27152 # The = would have to be {{=}} if you wanted the literal.
27154 Empty TD followed by TD with tpl-generated attribute
27159 |{{echo|style='color:red'}}|foo
27173 Indented table with an empty td
27191 ## We have some newline diffs RT-ing this edge case
27192 ## and it is not important enough -- we seem to be emitting
27193 ## at most 2 newlines after a </tr> and this is unrelated to
27194 ## the issue from T85627 that this is testing.
27196 Indented table with blank lines in between (T85627)
27215 Indented block & table
27229 <div data-parsoid='{"stx":"html"}'>foo</div>
27231 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27236 Indent and comment before table row
27251 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27252 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27256 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27258 Empty TR followed by a template-generated TR
27264 {{echo|<tr><td>foo</td></tr>}}
27269 <tr class='mw-empty-elt'></tr>
27270 <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}}]}'>
27275 ## PHP and parsoid output differ for this, and since this is primarily
27276 ## for testing Parsoid's serializer, marking this Parsoid only
27278 Empty TR followed by mixed-ws-comment line should RT correctly
27291 <tr class='mw-empty-elt'></tr>
27294 <!--c--> </tr><!--d-->
27300 Multi-line image caption generated by templates with/without trailing newlines
27302 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27303 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27305 <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>
27306 <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>
27310 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27314 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27316 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27318 <includeonly>foo</includeonly>
27326 ## PHP emits broken html for this, and since this is primarily
27327 ## a Parsoid serializer test, marking this Parsoid only
27329 Improperly nested inline or quotes tags with whitespace in between
27331 <span> <s>x</span> </s>
27334 <p><span> <s>x</s></span><s> </s>
27335 <b> <i>x</i></b><i> </i>
27340 Encapsulate protected attributes from wt
27342 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27344 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27348 <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>
27350 <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">
27351 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
27355 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27356 ## Having nested or stray pre tags results in the attempt to add duplicates,
27357 ## causing an assertion fail. This test tries to prevent that situation.
27359 Ensure ParagraphWrapper can deal with stray closing pre tags
27369 1. Ensure fostered text content is wrapped in element nodes
27373 <table>hi</table><table>ho</table>
27375 hi<table></table>ho<table></table>
27377 <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>
27381 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27383 parsoid=wt2html,wt2wt
27393 </td></tr></tbody></table>
27395 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||
27396 </span><table data-parsoid='{"stx":"html"}'>
27397 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
27398 </td></tr></tbody></table>
27402 Encapsulation properly handles null DSR information from foster box
27404 parsoid=wt2html,wt2wt
27406 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27408 <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>
27412 1. Encapsulate foster-parented transclusion content
27414 parsoid=wt2wt,wt2html
27416 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27418 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
27420 <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>
27424 2. Encapsulate foster-parented transclusion content
27426 parsoid=wt2wt,wt2html
27428 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27430 <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>
27441 3. Encapsulate foster-parented transclusion content
27443 parsoid=wt2wt,wt2html
27445 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27447 <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>"]}">
27460 4. Encapsulate foster-parented transclusion content
27462 parsoid=wt2wt,wt2html
27464 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27466 <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>"]}">
27479 5. Encapsulate foster-parented transclusion content
27481 parsoid=wt2wt,wt2html
27483 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27485 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27487 <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>
27491 6. Encapsulate foster-parented transclusion content
27493 parsoid=wt2wt,wt2html
27495 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27497 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
27499 <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>
27503 7. Encapsulate foster-parented transclusion content
27505 parsoid=wt2wt,wt2html
27507 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27509 <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>
27519 # Note that the wt is broken on purpose: the = should be {{=}} if you
27520 # don't want it to be a template parameter key.
27522 8. Encapsulate foster-parented transclusion content
27524 parsoid=wt2wt,wt2html
27527 }}{|{{echo|style='color:red'}}
27538 </td></tr></tbody></table>
27540 <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">
27541 </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">
27544 </td></tr></tbody></table>
27548 9. Encapsulate foster-parented transclusion content
27550 parsoid=wt2wt,wt2html
27552 <table>{{echo|hi</table>hello}}
27554 hi<table></table><p>hello
27557 <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>
27561 Table in fosterable position
27572 <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">
27574 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27580 # Parsoid only for T66747
27582 Properly encapsulate empty-content transclusions in fosterable positions
27590 <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"}]]}'>
27596 Always encapsulate foster box when template range is expanded to table
27609 T115289: Unclosed table
27611 {{echo|<table>}}<!--c-->[[Category:Two]]
27613 <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>
27617 T115289: Don't migrate newlines out of tables with fostered content
27619 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27621 <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>
27625 T73074: More fostering fun
27627 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27629 <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>
27633 Support <object> element with .data attribute
27637 <object data="test.swf"></object>
27639 <object data="test.swf"></object>
27643 Don't block XML namespace declaration
27645 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27647 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27650 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27653 # -----------------------------------------------------------------
27654 # The following section of tests are primarily to spec requirements
27655 # around Parsoid's serialization (old, new, edited content)
27657 # All these tests are marked Parsoid html2wt and html2html only
27658 # ----------------------------------------------------------------
27661 Ignore rel attribute in a-tags during serialization to url-links
27665 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27666 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27667 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27669 http://en.wikipedia.org/wiki/Foobar
27670 http://en.wikipedia.org/wiki/Foobar
27671 http://en.wikipedia.org/wiki/Foobar
27674 # 'mi' is a localinterwiki prefix as well as a language
27676 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27680 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27686 Parsoid should accept interwiki shortcuts
27690 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27691 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27692 <a href='./fr:Foo'>Foo</a></p>
27693 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27694 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27695 <a href='fr%3AFoo'>Foo</a></p>
27696 <p><a href='FR%3AFoo'>Foo</a>
27697 <a href='./FR:Foo'>Foo</a></p>
27712 Parsoid should not accept invalid interwiki shortcuts
27716 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27717 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27718 <a href='news:Foo'>Foo</a></p>
27727 New wikilinks should be serialized properly
27731 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27732 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27733 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27734 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27735 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27739 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27740 http://en.wikipedia.org/wiki/Foo
27741 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27745 New wiki links (href variations)
27749 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27750 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27751 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27752 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27757 [[Toxine bactérienne]]
27761 New wiki links (content string variations)
27765 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27766 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27767 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27771 [[Foo_bar|./Foo_bar]]
27775 New category links (href variations)
27779 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27780 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27781 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27783 [[Category:Toxine bactérienne]]
27784 [[Category:Toxine bactérienne]]
27785 [[Category:Toxine bactérienne]]
27789 New sol transparent links don't need indent-pre nowiki protection
27794 <link rel="mw:PageProp/redirect" href="./Main_Page">
27795 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27796 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27798 #WEITERLEITUNG [[Main Page]]
27799 <!-- this is good --> [[Category:Good]]
27800 <!-- this is great --> [[Kategorie:Great]]
27804 New interlanguage links (href variations)
27808 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27809 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27810 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27812 [[es:Toxine bactérienne]]
27813 [[es:Toxine_bactérienne]]
27814 [[es:Toxine_bactérienne]]
27818 Image: Modifying size of an image (1)
27821 "modes": ["wt2wt"],
27823 ["img[height]", "attr", "height", "22"],
27824 ["img[width]", "attr", "width", "200"]
27828 [[Image:Foobar.jpg|230x230px]]
27830 [[Image:Foobar.jpg|200x200px]]
27834 Image: Modifying size of an image (2)
27837 "modes": ["wt2wt"],
27839 ["img[height]", "attr", "height", "100"],
27840 ["img[width]", "attr", "width", "500"]
27844 [[Image:Foobar.jpg|230x230px]]
27846 [[Image:Foobar.jpg|500x500px]]
27849 # Change in size is ignored so long as class='mw-default-size'
27851 Image: Modifying size of an image (3)
27854 "modes": ["wt2wt"],
27856 ["figure[class]", "removeClass", "mw-default-size"],
27857 ["figure img", "attr", "height", "19"],
27858 ["figure img", "attr", "width", "170"]
27862 [[Image:Foobar.jpg|thumb]]
27864 [[Image:Foobar.jpg|thumb|170x170px]]
27868 Image: Modifying alignment of an image (T50665)
27871 "modes": ["wt2wt"],
27873 ["figure[class]", "removeClass", "mw-halign-right"],
27874 ["figure[class]", "addClass", "mw-halign-left"]
27878 [[Image:Foobar.jpg|thumb|caption|right]]
27880 [[Image:Foobar.jpg|thumb|caption|left]]
27884 Image: Modifying mw-default-size of an frameless image (T64805)
27887 "modes": ["wt2wt"],
27889 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27893 [[Image:Foobar.jpg|frameless|right]]
27895 [[Image:Foobar.jpg|frameless|right|220x220px]]
27899 Image: Modifying valign of an image (T51221)
27902 "modes": ["wt2wt"],
27904 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27905 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27909 [[File:Foobar.jpg|20px|middle]]
27911 [[File:Foobar.jpg|20px|text-top]]
27915 Image: Modifying alt attribute of an image (T58400)
27918 "modes": ["wt2wt"],
27920 ["img[alt]", "attr", "alt", "some alternate edited text"]
27924 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27926 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27930 Image: Modifying caption of an image
27933 "modes": ["wt2wt"],
27935 ["figcaption", "text", "new caption"]
27939 [[Image:Foobar.jpg|thumb|original caption]]
27941 [[Image:Foobar.jpg|thumb|new caption]]
27945 Image: empty alt attribute (T50924)
27949 [[File:Foobar.jpg|thumb|alt=|bar]]
27951 <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>
27955 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27961 <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>
27963 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27967 Image: Block level image should have \n before and after
27970 [[File:Foobar.jpg|right|thumb|150x150px]]
27974 <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>
27979 Image: New block level image should have \n before and after (existing content)
27982 [[File:Foobar.jpg|right|thumb|150x150px]]
27986 <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>
27991 Image: upright option (parsoid)
27993 [[File:Foobar.jpg|thumb|upright|caption]]
27994 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27995 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27997 <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>
27998 <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>
27999 <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>
28003 Image: upright option is ignored on inline and frame images (parsoid)
28005 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28007 <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>
28011 Image: in template parameter with empty parameter
28013 {{echo|[[File:Foobar.jpg|link=]]}}
28015 <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>
28019 Image: from basic HTML (1)
28023 <span typeof="mw:Image">
28024 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28027 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28031 Image: from basic HTML (2)
28035 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28037 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28041 Image: from basic HTML (3)
28045 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28047 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28051 Image: from basic HTML (4)
28055 <img src="./File:Foobar.jpg">
28057 [[File:Foobar.jpg|link=]]
28061 Image: Invalid title as link
28063 [[File:Foobar.jpg|link=<]]
28065 <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>
28068 <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>
28072 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28077 <li><p>foo</p></li>
28084 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28088 <ul> <li>foo</li></ul>
28094 Don't strip leading whitespace when handling indent-pre suppressing tags
28099 <tr><td> indented row</td></tr>
28102 <b>This is very bold of you!</b>
28105 indented cell (no pre-wrapping!)
28115 '''This is very bold of you!'''
28119 indented cell (no pre-wrapping!)
28127 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28149 <nowiki> </nowiki></span>bar2
28152 <nowiki> </nowiki><span>bar</span>
28155 <nowiki> </nowiki><span>foo</span>
28160 Lists: Dont insert newlines in a serialized list item.
28164 <ul><li>a<br>b</li><li>c</li></ul>
28171 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28174 "modes": ["html2wt"],
28175 "scrubWikitext": false
28178 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28179 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28181 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28182 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28184 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28186 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28188 == hello there [[Category:A1]] ==
28190 == [[Category:A2]] hi pal ==
28192 == <!--foo--> [[Category:A3]] how goes it ==
28194 == it goes well [[Category:A4]] <!--bar--> ==
28196 ==howdy [[Category:A5]]==
28202 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28205 "modes": ["html2wt"],
28206 "scrubWikitext": true
28209 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28210 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28212 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28213 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28215 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28223 <!--foo-->[[Category:A3]]
28228 [[Category:A4]] <!--bar-->
28236 Headings: Don't hoist metas that come from templates
28239 "modes": ["html2wt"],
28240 "scrubWikitext": true
28243 <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>
28245 == {{echo|foo [[Category:Foo]]}} ==
28249 Headings: Category in ref isn't hoisted
28252 "modes": ["html2wt"],
28253 "scrubWikitext": true
28256 <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>
28258 <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>
28261 [[Category:Baz]] </ref> ==
28267 Parsoid: Serialize positional parameters with = in them as named parameter
28271 <p about="#mwt1" typeof="mw:Transclusion"
28272 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28274 <p about="#mwt1" typeof="mw:Transclusion"
28275 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28277 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28278 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28279 <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>
28283 {{echo|1=f=oo|2=bar}}
28285 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28286 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28287 {{echo|<nowiki>f=oo</nowiki>|bar}}
28291 Parsoid: Serialize positional parameters with = in extlink as named parameter
28295 <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>
28297 {{echo|1=http://stuff?is=ok}}
28301 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28305 <div>a<p>b</p></div>
28326 Substrings resembling wikitext in hrefs should not get nowiki escapes
28330 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28336 Enforce single-line context in the serializer
28343 <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">
28344 </span><span about="#mwt1">you</span> </h2>
28346 <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>
28348 <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
28349 there</span></li></ol>
28361 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28368 </tbody></table></dd></dl>
28372 == hi {{bogus|there
28383 * foo '''bar''' baz
28395 Serialize new placeholder space without spans
28399 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28401 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28403 <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>
28409 <ref>foo : bar</ref>ok
28413 #-----------------------
28414 # Tag minimization tests
28415 #-----------------------
28418 1. I/B quote minimization: wikitext-only tags should be combined
28422 <p><i>A</i><i>B</i></p>
28423 <p><b>A</b><b>B</b></p>
28424 <p><i>A</i><b><i>B</i></b></p>
28425 <p><b>A</b><i><b>B</b></i></p>
28426 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28427 <p><i><b>A</b></i><i><b>B</b></i></p>
28428 <p><i><b>A</b></i><b><i>B</i></b></p>
28429 <p><b><i>A</i></b><i><b>B</b></i></p>
28449 2. I/B quote minimization: wikitext and html tags should not be combined
28453 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28454 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28458 ''A''<nowiki/>'''<i>B</i>'''
28462 3. I/B quote minimization: templated content stops minimization
28466 <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>
28467 <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>
28469 ''A''{{echo|''B''}}
28471 ''A''{{echo|'''''B'''''}}
28475 4. I/B quote minimization: new content should be mimimized with adjacent old content
28479 <p><i>A</i><i>B</i></p>
28480 <p><b>A</b><b>B</b></p>
28481 <p><i>A</i><b><i>B</i></b></p>
28491 5a. Merge adjacent quote nodes if they've been edited
28494 "modes": ["wt2wt", "selser"],
28496 ["p", "contents", "remove", ":contains('b')"]
28506 5b. Merge adjacent quote nodes if they've been edited
28509 "modes": ["wt2wt", "selser"],
28515 ''a''<span id="x">b</span>''c''
28521 1. Merge adjacent link nodes as long as at least one element is new
28524 "modes": ["html2wt"],
28525 "scrubWikitext": true
28528 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28529 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28530 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28534 [[Football|Foot]][[Football|ball]]
28538 2. Merge adjacent link nodes and enable additional normalizations
28541 "modes": ["html2wt"],
28542 "scrubWikitext": true
28545 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28551 3. Don't merge adjacent link nodes if scrubWikitext is false
28554 "modes": ["html2wt"],
28555 "scrubWikitext": false
28558 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28560 [[Football|Foot]][[Football|ball]]
28564 1. Move format tags outside of WikiLink
28567 "modes": ["html2wt"],
28568 "scrubWikitext": true
28571 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
28572 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
28573 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
28576 '''''[[Football]]'''''
28577 <u>'''''[[Football]]'''''</u>
28581 2. Move format tags outside of WikiLink with mergable A tags
28584 "modes": ["html2wt"],
28585 "scrubWikitext": true
28588 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
28590 '''''[[Football]]'''''
28594 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
28597 "modes": ["html2wt"],
28598 "scrubWikitext": true
28601 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
28603 <font color="red"><u>'''[[Foo]]'''</u></font>
28607 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
28610 "modes": ["html2wt"],
28611 "scrubWikitext": true
28614 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
28615 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
28616 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
28618 [[Foo|<font color="red">Foo</font>]]
28619 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
28620 [[Foo|<span class="Bar">Foo</span>]]
28624 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
28627 "modes": ["selser"],
28628 "scrubWikitext": true,
28630 ["a", "html", "<i>Foo</i>"]
28640 6. Regression test: Manual edit test to ensure diff markers are not lost
28643 "modes": ["selser"],
28644 "scrubWikitext": true,
28646 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
28655 #------------------------------
28656 # End of tag minimization tests
28657 #------------------------------
28660 T56262: New entities
28664 <span typeof="mw:Entity"> </span>
28669 ## Note that there is no wikitext output for 'unknownproperty' ##
28670 ## Unknown magic words are silently dropped ##
28677 <meta property='mw:PageProp/toc' />
28678 <meta property='mw:PageProp/notoc' />
28679 <meta property='mw:PageProp/forcetoc' />
28680 <meta property='mw:PageProp/index' />
28681 <meta property='mw:PageProp/noindex' />
28682 <meta property='mw:PageProp/nogallery' />
28683 <meta property='mw:PageProp/noeditsection' />
28684 <meta property='mw:PageProp/notitleconvert' />
28685 <meta property='mw:PageProp/nocontentconvert' />
28686 <meta property='mw:PageProp/unknownproperty' />
28696 __NOCONTENTCONVERT__
28700 Consecutive <pre>s should not get merged
28702 parsoid=html2wt,html2html
28704 <pre>a</pre><pre>b</pre>
28732 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28736 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28738 [[Special:BookSources/1234567890|ISBN 1234567895]]
28742 Edited RFC links not serializable as RFC links should serialize as extlinks
28746 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28748 [https://tools.ietf.org/html/rfc123 New RFC]
28752 Edited PMID links not serializable as PMID links should serialize as extlinks
28756 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28758 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28762 WTS of autolinks with trailing/surrounding context
28766 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28767 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28768 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28769 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28770 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28771 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28773 http://cscott.net'''foo'''
28775 http://cscott.net<b>foo</b>
28777 '''http://cscott.net'''
28779 '''http://cscott.net '''
28781 '''http://cscott.net<nowiki/>x'''
28783 http://cscott.net<nowiki/>x
28787 WTS of autolinks with nowikis (round-trip)
28789 x<nowiki/>http://cscott.net<nowiki/>x
28791 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28794 # this is the "easy" test because it leaves in place all the
28795 # data-parsoid information indicating this is an autolink
28797 WTS of autolinks with escapes (editing)
28800 "modes": ["wt2wt"],
28802 [ "span", "remove" ]
28806 x<nowiki/>http://cscott.net<nowiki/>x
28808 x<nowiki/>http://cscott.net<nowiki/>x
28812 WTS of edited autolink-like text (T103364)
28815 "modes": ["wt2wt"],
28817 [ "span[typeof]", "removeAttr", "typeof" ]
28821 Not a link: <nowiki>http://example.com</nowiki>.
28823 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28827 WTS of newly-authored autolink-like text (T103364)
28831 <p>http://example.com is not a link.</p>
28833 <nowiki>http://example.com</nowiki> is not a link.
28837 WTS of autolink-like text after an autolink (T108563)
28841 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28843 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28847 Magic links inside links (not autolinked)
28849 [[Foo|http://example.com]]
28852 [[Foo|ISBN 123456789x]]
28854 [http://foo.com http://example.com]
28855 [http://foo.com RFC 1234]
28856 [http://foo.com PMID 1234]
28857 [http://foo.com ISBN 123456789x]
28859 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28860 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28861 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28862 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28863 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28864 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28865 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28866 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28869 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28870 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28871 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28872 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28874 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28875 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28876 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28877 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28881 Magic links inside image captions (autolinked)
28883 [[File:Foobar.jpg|thumb|http://example.com]]
28884 [[File:Foobar.jpg|thumb|RFC 1234]]
28885 [[File:Foobar.jpg|thumb|PMID 1234]]
28886 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28888 <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>
28889 <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>
28890 <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>
28891 <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>
28893 <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>
28894 <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>
28895 <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>
28896 <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>
28900 WTS of magic word text (T109371)
28905 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28906 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28908 <nowiki>RFC 1234</nowiki>
28910 [http://foo.com RFC 1234]
28916 Edited Redirect link should emit a non-piped wikitext link
28920 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28926 T75121: Infer extension name from typeOf if data-mw is not present
28928 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28930 <div typeOf="mw:Extension/foo"></div>
28935 # Note that the <p> wrapping isn't present in PHP parser output
28936 # The important thing for this test is that P-wrapping doesn't
28937 # interfere with the <nowiki> protection for leading - in <td>
28938 # (which isn't necessary for <th>).
28940 T88318: p-wrapped dash in table.
28942 parsoid=html2wt,wt2wt
28945 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28946 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28947 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28954 |<nowiki>-</nowiki>
28955 |<nowiki>- </nowiki>
28975 <td><small>-</small>
28982 </td></tr></tbody></table>
28986 T149209: WTS: Handle newlines in table cells properly
28994 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28996 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29002 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29004 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29026 T149209: Selser: Handle newlines in table cells properly
29029 "modes": ["selser"],
29031 [ "#h1", "html", "a\nb\n" ],
29032 [ "#h2", "html", "a\nb\n" ],
29033 [ "#c1", "html", "a\nb\n" ],
29034 [ "#c2", "html", "<p>a</p>" ],
29035 [ "#c3", "html", "<p>a</p>" ],
29036 [ "#c4", "html", "edit-me<p>a</p>" ]
29041 ! id="h1" |edit-me!!1
29043 ! id="h2" |edit-me||2
29045 | id="c1" |edit-me||3
29047 | id="c2" |edit-me||4
29049 | id="c3" |edit-me||p||q||r
29051 | id="c4" |edit-me||p||q||r
29080 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29085 <td id='mwAc'>foo</td>
29086 <td id='serialize-this'>bar</td>
29091 | id="serialize-this" |bar
29096 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29100 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29102 <div id="hello">ok</div>
29106 Testing serialization after deletion in references
29109 "modes": ["wt2wt"],
29115 hi <ref><div id="x">ho</div></ref>
29125 Testing serialization after deletion of table cells
29128 "modes": ["wt2wt", "selser"],
29136 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29146 Testing selser after addition of new row before first row (T125419)
29149 "modes": ["wt2wt", "selser"],
29151 [ "tr", "before", "<tr><td>X</td></tr>" ]
29167 Serialize new table rows in a HTML table using HTML tags
29170 "modes": ["wt2wt", "selser"],
29172 [ "tr", "before", "<tr><td>X</td></tr>" ]
29176 <table><tr><td>a</td></tr></table>
29178 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29182 Serialize new table cells in a HTML row using HTML tags
29185 "modes": ["wt2wt", "selser"],
29187 [ "td", "before", "<td>X</td>" ]
29191 <table><tr><td>a</td></tr></table>
29193 <table><tr><td>X</td><td>a</td></tr></table>
29197 Serialize wikitext list items as HTML list items when embedded in a HTML list
29201 <ul data-parsoid='{"stx": "html"}'>
29202 <li data-parsoid='{}'>a</li>
29212 # SSS FIXME: Is this actually a good thing given the
29213 # odd nested list output that is generated by MW?
29214 # <ul><li>foo<ul>..</ul></li></ul> instead of
29215 # <ul><li>foo</li><ul>..</ul></ul>
29217 Wikitext lists can be nested inside HTML lists
29221 <ul data-parsoid='{"stx": "html"}'>
29222 <li data-parsoid='{"stx": "html"}'>a
29223 <ul><li>b</li></ul>
29227 <ul data-parsoid='{"stx": "html"}'>
29229 <ul><li>y</li></ul>
29250 "modes": ["wt2wt"],
29252 [ "#xyz", "before", "<b>before</b> stuff " ],
29253 [ "#xyz", "after", " stuff <i>after</i>" ],
29254 [ "#xyz", "html", "x <b>y</b> z" ]
29258 <span id="xyz">hello</span>
29260 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29264 Never serialize a-tag as html, regardless of what data-parsoid has to say
29266 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29268 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29273 ## SSS FIXME: This is broken output nevertheless.
29274 ## What might be a reasonable non-broken output for this?
29275 ## This is an edge case unlikely to be seen in production
29276 ## that I am not wasting more time on this right now.
29278 Never serialize a-tag as html, no matter what attributes it has
29280 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29282 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29284 [http://boo.org http://boohoo.org]
29287 # Misnested is an indication that selser can reuse the source but these have
29288 # shown to sneak through on occasion. See T101768.
29289 # The original wikitext here is: [http://test.com [[one]] two three]
29291 Strip span tags added to mark misnested links
29295 <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>
29297 [http://test.com][[one]] two three
29301 Catch regression when unpacking misnested links
29305 {{echo|hi}}[http://example.com [[ho]]]
29307 <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>
29311 Catch regression when unpacking with trailing content
29313 {{echo|Foo <references/> bar}}
29315 <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>
29319 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29323 <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|}"]}'>
29335 ## This test verifies the presence and computation of this attribute indirectly
29336 ## by making an edit and ensuring that the serialization is correct (which it would be
29337 ## only if firstWikitextNode is properly set).
29339 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
29342 "modes": ["wt2wt"],
29344 [ "div#x", "remove" ],
29345 [ "div", "before", "<div>new</div>" ]
29349 <div id="x">foo</div>
29351 {{echo|<div>boo</div>
29359 {{echo|<div>boo</div>
29365 # --------------------------------------------
29366 # Tests spec'ing wikitext serialization norms |
29367 # --------------------------------------------
29370 Serialize multi-line indent-pre starting with wikitext syntax
29384 1. Categories should always be serialized on their own line
29388 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
29396 2. Categories that are part of templates should not introduce a line break
29398 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
29400 <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>
29403 # Careful while editing these next 2 tests. There are \u200f characters
29404 # before and after the <link> tags in the HTML and following some
29405 # of the categories in wikitext
29406 # Do not remove these characters in edits.
29408 # As part of the serialization, these bidi characters will get stripped.
29410 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
29413 "modes": ["html2wt"],
29414 "scrubWikitext": true
29417 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
29418 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
29421 [[קטגוריה: שיטות משפט]]
29425 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
29428 "modes": ["html2wt"],
29429 "scrubWikitext": true
29432 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
29439 Lists: Add space after bullets
29446 <li><span> baz</span></li>
29451 * <span> baz</span>
29455 1. Headings: Add space before/after == (T53744)
29462 <h2><span> baz</span></h2>
29470 == <span> baz</span> ==
29474 2. Headings: Add space before/after == even after hoisted content
29477 "modes": ["html2wt"],
29478 "scrubWikitext": true
29481 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29489 1. Headings: suppress newly created empty headings
29492 "modes": ["html2wt"],
29493 "scrubWikitext": true
29501 2. Headings: don't suppress empty headings if scrubWikitext is false
29511 3. Headings: suppress empty headings on edits
29514 "modes": ["selser"],
29515 "scrubWikitext": true,
29521 ==<span id="x">foo</span>==
29526 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29529 "modes": ["html2wt"],
29530 "scrubWikitext": true
29533 <h2>foo<br/>bar</h2>
29534 <h2>foo <span><br/>bar</span> baz</h2>
29538 == foo <span> bar</span> baz ==
29542 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29545 "modes": ["html2wt"],
29546 "scrubWikitext": false
29549 <h2>foo<br/>bar</h2>
29555 1. WT Quote Tags: suppress newly created empty style tags
29558 "modes": ["html2wt"],
29559 "scrubWikitext": true
29567 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29573 ''<nowiki/>'''''<nowiki/>'''
29577 3. WT Quote Tags: suppress empty style tags on edits
29580 "modes": ["selser"],
29581 "scrubWikitext": true,
29587 '''<span id="x">foo</span>'''
29592 1. Anchors: suppress newly created empty anchors
29595 "modes": ["html2wt"],
29596 "scrubWikitext": true
29599 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29604 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29607 "modes": ["html2wt"],
29608 "scrubWikitext": false
29611 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29617 3. Anchors: suppress empty anchors on edits
29620 "modes": ["selser"],
29621 "scrubWikitext": true,
29627 [[Test|<span id="x">foo</span>]]
29632 3a. Anchors: do not suppress numbered extlinks
29635 "modes": ["wt2wt"],
29636 "scrubWikitext": true
29641 <a rel="mw:ExtLink" href="http://foo.com"></a>
29645 3b. Anchors: do not suppress numbered extlinks
29648 "modes": ["wt2wt"],
29649 "scrubWikitext": true,
29655 [http://foo.com <span id="x">foo</span>]
29661 Normalizations should be restricted to edited content
29664 "modes": ["selser"],
29665 "scrubWikitext": true,
29667 [ "h1", "before", "<i></i>"]
29681 1. Multiple normalizations (html2wt)
29684 "modes": ["html2wt"],
29685 "scrubWikitext": true
29689 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29690 </a><b><i></i></b>x</p>
29699 2. Multiple normalizations (selser)
29702 "modes": ["selser"],
29703 "scrubWikitext": true,
29705 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29709 <span id="x">foo</span>
29711 <span id="x">foo</span>
29717 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29720 "modes": ["html2wt"],
29721 "scrubWikitext": true
29733 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29740 <nowiki> </nowiki>hi
29742 <nowiki> </nowiki> hello
29746 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29749 "modes": ["html2wt"],
29750 "scrubWikitext": true
29759 baz bang</td></tr></table>
29765 bar<span>boo</span></p>
29781 bar<span>boo</span>
29785 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29788 "modes": ["selser"],
29789 "scrubWikitext": true,
29791 [ "p", "html", " a\n b" ]
29802 1. New links that end in spaces
29805 "modes": ["html2wt"],
29806 "scrubWikitext": false
29809 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29810 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29811 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29813 [[Berlin ]]<nowiki/>is the capital of Germany.
29817 [[Boston ]] is a city.
29821 2. New links that end in spaces
29824 "modes": ["html2wt"],
29825 "scrubWikitext": true
29828 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29829 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29830 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29832 [[Berlin]] is the capital of Germany.
29836 [[Boston]] is a city.
29840 1. Table cells with escapable prefixes
29843 "modes": ["html2wt"],
29844 "scrubWikitext": false
29848 <tr><td>a</td></tr>
29849 <tr><td>-</td></tr>
29850 <tr><td>+</td></tr>
29856 |<nowiki>-</nowiki>
29858 |<nowiki>+</nowiki>
29863 2. Table cells with escapable prefixes
29866 "modes": ["html2wt"],
29867 "scrubWikitext": true
29871 <tr><td>a</td></tr>
29872 <tr><td>-</td></tr>
29873 <tr><td>+</td></tr>
29886 3a. Table cells with escapable prefixes after edits
29889 "modes": ["selser"],
29890 "scrubWikitext": true,
29892 [ "table tbody tr:first-child td:first-child", "remove"]
29906 3b. Table cells with escapable prefixes after edits
29909 "modes": ["selser"],
29910 "scrubWikitext": true,
29912 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29919 |<span id="x">foo</span>+
29928 # FIXME: This test will fail because
29929 # normalization doesn't realize that the id attribute
29930 # will eliminate the escapable scenario
29932 4a. Table cells without escapable prefixes after edits
29935 "modes": ["selser"],
29936 "scrubWikitext": true,
29938 [ "#x", "html", "-" ]
29951 ## This tests normalizer's ability to discriminate between
29952 ## cells having identical content.
29954 4b. Table cells without escapable prefixes after edits
29957 "modes": ["selser"],
29958 "scrubWikitext": true,
29960 [ "td", "html", "-" ]
29973 ## This tests normalizer's ability to not be tripped by
29974 ## comments (and whitespace)
29976 4c. Table cells without escapable prefixes after edits
29979 "modes": ["selser"],
29980 "scrubWikitext": true,
29982 [ "table tbody tr td:first-child", "remove" ]
29997 ## This tests normalizer's ability to handle HTML cells
29999 4d. Table cells without escapable prefixes after edits
30002 "modes": ["selser"],
30003 "scrubWikitext": true,
30005 [ "td", "html", "-" ]
30010 <tr><td>a</td></tr>
30014 <tr><td>-</td></tr>
30018 ## T111151 Remove font elements without attributes
30020 5a. font tags without attributes should be dropped in scrubWikitext mode
30023 "modes": ["html2wt"],
30024 "scrubWikitext": true
30028 <font><font>bar</font></font>
30029 <font class="x">boo</font>
30033 <font class="x">boo</font>
30037 5b. font tags should not be dropped without scrubWikitext being enabled
30040 "modes": ["html2wt"],
30041 "scrubWikitext": false
30050 Escape nowiki DOM elements
30054 <nowiki><i>foo</i></nowiki>
30056 <nowiki>''foo''</nowiki>
30059 # This is meant to be an interim fix while we go about figuring out
30060 # how to not introduce these trailing <nowiki/>s in the first place.
30062 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30066 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30068 <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>
30069 <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>
30083 New list is serialized on newlines
30087 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30091 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30093 The quick brown fox jumps over the lazy dog.
30099 The quick onyx goblin jumps over the lazy dwarf.
30103 New lists in formatting elements serialized w/o newlines
30115 <small><ul><li>hi</li></ul></small>
30127 New list in table doesn't need newlines
30131 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30140 # ---------------------------------------------------
30141 # End of tests spec'ing wikitext serialization norms |
30142 # ---------------------------------------------------
30146 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30154 <td><b>c</b><p>d</p></td>
30173 Anchor without href scenarios
30175 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30178 <a class="no">dice</a>
30183 <span name="foo"></span>
30187 New transclusion added after a list should be serialized after the list
30191 <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>
30197 # -----------------------------------------------------------------
30198 # End of section for Parsoid-only html2wt tests for serialization
30200 # -----------------------------------------------------------------
30202 # -----------------------------------------------------------------
30203 # The following section of tests are primarily to spec behavior of
30204 # the selective serializer. All these tests have manual selser
30205 # changes. The automated selser changes for all tests handle the
30206 # wide variation of changes, but these tests here capture specs
30207 # deterministically.
30208 # ----------------------------------------------------------------
30212 Selser: New comments should not be lost
30215 "modes": ["selser"],
30217 [ "#a", "after", "<!--c1-->" ],
30218 [ "#b", "before", "<!--c2-->" ]
30222 <span id="a">a</span>
30224 <span id="b">b</span>
30226 <span id="a">a</span><!--c1-->
30228 <!--c2--><span id="b">b</span>
30233 Selser: Check for validity of DSR before using it
30236 "modes": ["selser"],
30238 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30242 <span id="a">a</span>
30244 {{DISPLAYTITLE:foo}}
30245 <span id="a">a</span>
30249 1. DOMDiff: Changes to <ref> content should be looked up using id
30252 "modes": ["selser"],
30254 ["#X", "after", "bar"],
30255 ["#Y", "after", "baz"]
30259 X <ref><span id="X">foo</span></ref>
30262 <ref name="a"><span id="Y">foo</span></ref>
30265 X <ref><span id="X">foo</span>bar</ref>
30268 <ref name="a"><span id="Y">foo</span>baz</ref>
30273 2. DOMDiff: Changes to <ref> content should be looked up using id
30276 "modes": ["selser"],
30278 ["#Z", "after", "bar"]
30282 A <ref>foo bar for a</ref>
30283 B <ref group="X" name="b" />
30287 <references group="X">
30288 <ref name="b"><span id="Z">foo</span></ref>
30291 A <ref>foo bar for a</ref>
30292 B <ref group="X" name="b" />
30296 <references group="X">
30297 <ref name="b"><span id="Z">foo</span>bar</ref>
30302 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30305 "modes": ["selser"],
30307 [ "div:first-child", "text", "bar" ]
30311 <div style="{{1x|color:red;}}%">foo</div>
30313 <div style="{{1x|color:red;}}%">bar</div>
30325 <li class="mw-empty-elt"></li>
30326 <li class="mw-empty-elt"></li>
30333 [[File:Thumb.png|thumb]]
30335 <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>
30337 <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>
30341 unclosed internal link XSS (T137264)
30343 [[#%3Cscript%3Ealert(1)%3C/script%3E|
30345 <p>[[#<script>alert(1)</script>|
30348 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
30352 Validating that <style> isn't eaten by tidy (T167349)
30357 <style>.foo::before { content: "<foo>"; }</style>
30358 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30362 <style>.foo::before { content: "<foo>"; }</style>
30363 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30368 Validating that <style> isn't wrapped in a paragraph (T186965)
30372 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30374 <style>.foo::before { content: "<foo>"; }</style>
30376 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30378 But if it's on a line with other content, let it be wrapped.
30380 <style>.foo::before { content: "<foo>"; }</style> bar
30382 foo <style>.foo::before { content: "<foo>"; }</style>
30384 foo <style>.foo::before { content: "<foo>"; }</style> bar
30386 And the same if we have non-paragraph-breaking whitespace
30389 <style>.foo::before { content: "<foo>"; }</style>
30392 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30394 <style>.foo::before { content: "<foo>"; }</style>
30395 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30396 <p>But if it's on a line with other content, let it be wrapped.
30397 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
30398 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
30399 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
30400 </p><p>And the same if we have non-paragraph-breaking whitespace
30402 <style>.foo::before { content: "<foo>"; }</style>
30408 Validating that <link> isn't wrapped in a paragraph (T186965)
30412 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30414 <link rel="foo" href="bar"/>
30416 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30418 But if it's on a line with other content, let it be wrapped.
30420 <link rel="foo" href="bar"/> bar
30422 foo <link rel="foo" href="bar"/>
30424 foo <link rel="foo" href="bar"/> bar
30426 And the same if we have non-paragraph-breaking whitespace
30429 <link rel="foo" href="bar"/>
30432 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30434 <link rel="foo" href="bar"/>
30435 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30436 <p>But if it's on a line with other content, let it be wrapped.
30437 </p><p><link rel="foo" href="bar"/> bar
30438 </p><p>foo <link rel="foo" href="bar"/>
30439 </p><p>foo <link rel="foo" href="bar"/> bar
30440 </p><p>And the same if we have non-paragraph-breaking whitespace
30442 <link rel="foo" href="bar"/>
30448 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
30450 wgFragmentMode=[ 'html5', 'legacy' ]
30452 ==A&B&C&amp;D&amp;amp;E==
30453 [[#A&B&C&amp;D&amp;amp;E]]
30455 <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>
30456 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
30459 <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>
30460 <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>
30464 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
30466 wgFragmentMode=[ 'legacy' ]
30468 ==A&B&C&amp;D&amp;amp;E==
30469 [[#A&B&C&amp;D&amp;amp;E]]
30471 <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>
30472 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
30477 Decoding of HTML entities in embedded HTML tags
30479 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30481 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30484 <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>
30488 Decoding of HTML entities in indicator names for IDs (T104196)
30490 parsoid=wt2html,html2html
30493 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30495 1&2&3&4&amp;5=Indicator
30498 <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>
30501 # this version of the test strips out the ambiguity so Parsoid rts cleanly
30503 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
30507 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30509 1&2&3&4&amp;5=Indicator
30512 <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>
30515 # This fragment mode is what Parsoid supports.
30517 HTML5 ids: fallback to legacy
30519 wgFragmentMode=[ 'html5', 'legacy' ]
30531 ==Hey < # " > % : '==
30532 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30534 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30536 <!-- These two links should produce identical HTML -->
30537 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30540 <div id="toc" class="toc"><input type="checkbox" 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>
30542 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30543 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30544 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30545 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30546 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30547 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30551 <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>
30552 <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>
30553 <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>
30554 <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>
30555 <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>
30556 <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>
30557 <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>
30558 </p><p>💩 <span id="💩"></span>
30559 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30562 <h2 id="Foo_bar">Foo bar</h2>
30564 <h2 id="foo_Bar_2">foo Bar</h2>
30566 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30568 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30570 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30572 <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>
30573 <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>
30575 <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>
30577 <!-- These two links should produce identical HTML -->
30578 <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>
30581 # Parsoid doesn't support this mode
30583 HTML5 ids: legacy with a fallback to modern
30585 wgFragmentMode=[ 'legacy', 'html5' ]
30597 ==Hey < # " > % : '==
30598 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30600 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30602 <!-- These two links should produce identical HTML -->
30603 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30606 <div id="toc" class="toc"><input type="checkbox" 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>
30608 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30609 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30610 <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>
30611 <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>
30612 <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>
30613 <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>
30617 <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>
30618 <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>
30619 <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>
30620 <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>
30621 <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>
30622 <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>
30623 <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>
30624 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30625 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30629 # Parsoid doesn't support this mode.
30631 HTML5 ids: no legacy
30633 wgFragmentMode=[ 'html5' ]
30645 ==Hey < # " > % : '==
30646 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30648 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30650 <!-- These two links should produce identical HTML -->
30651 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30654 <div id="toc" class="toc"><input type="checkbox" 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>
30656 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30657 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30658 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30659 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30660 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30661 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30665 <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>
30666 <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>
30667 <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>
30668 <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>
30669 <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>
30670 <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>
30671 <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>
30672 </p><p>💩 <span id="💩"></span>
30673 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30678 T90902: Normalize weird characters in section IDs
30680 wgFragmentMode=[ 'html5', 'legacy' ]
30686 <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>
30687 <p><a href="#Foo_bar">#Foo bar</a>
30690 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30691 <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>
30695 T51672: Test for brackets in attributes of elements in external link texts
30697 [http://example.com/ link <span title="title with [brackets]">span</span>]
30698 [http://example.com/ link <span title="title with [brackets]">span</span>]
30701 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30702 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30705 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30706 <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>
30710 T72875: Test for brackets in attributes of elements in internal link texts
30712 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30713 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30716 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30717 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30720 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30721 <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>
30725 T179544: {{anchorencode:}} output should be always usable in links
30727 wgFragmentMode=[ 'html5' ]
30729 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30731 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30734 <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>
30737 ## ------------------------------
30738 ## Parsoid section-wrapping tests
30739 ## ------------------------------
30741 Section wrapping for well-nested sections (no leading content)
30744 "wrapSections": true
30765 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30768 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30771 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30774 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30777 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30780 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30787 Section wrapping for well-nested sections (with leading content)
30790 "wrapSections": true
30795 Para 2 with a <div>nested in it</div>
30808 <section data-mw-section-id="0"><p>Para 1.</p>
30810 <p>Para 2 with a </p><div>nested in it</div>
30814 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30817 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30820 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30823 </section></section>
30827 Section wrapping with template-generated sections (good nesting 1)
30830 "wrapSections": true
30847 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30850 <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">
30851 </span><p about="#mwt1">b</p>
30852 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30855 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30859 # In this example, the template scope is mildly expanded to incorporate the
30860 # trailing newline after the transclusion since that is part of section 1.1.1
30862 Section wrapping with template-generated sections (good nesting 2)
30865 "wrapSections": true,
30866 "modes": ["wt2html", "wt2wt"]
30881 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30884 <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">
30885 </span><p about="#mwt1">b</p><span about="#mwt1">
30886 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30887 </span><p about="#mwt1">d</p><span about="#mwt1">
30888 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30892 # In this example, the template scope is mildly expanded to incorporate the
30893 # trailing newline after the transclusion since that is part of section 1.2.1
30895 Section wrapping with template-generated sections (good nesting 3)
30898 "wrapSections": true,
30899 "modes": ["wt2html", "wt2wt"]
30917 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30920 <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">
30921 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
30922 </span><p about="#mwt1">b</p><span about="#mwt1">
30923 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30924 </span><p about="#mwt1">c</p><span about="#mwt1">
30925 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30926 </span><p about="#mwt1">d</p><span about="#mwt1">
30927 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
30931 # Because of section-wrapping and template-wrapping interactions,
30932 # the scope of the template is expanded so that the template markup
30933 # is valid in the presence of <section> tags.
30934 # This exercises the s1 is null scenario in the wrapSections code
30936 Section wrapping with template-generated sections (bad nesting 1)
30939 "wrapSections": true
30953 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30956 <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"]}'>
30957 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
30958 </span><p about="#mwt1">b
30959 </p><span about="#mwt1">
30961 </span><p about="#mwt1">c</p><span about="#mwt1">
30962 </span></section></div></section>
30965 # Because of section-wrapping and template-wrapping interactions,
30966 # the scope of the template is expanded so that the template markup
30967 # is valid in the presence of <section> tags.
30968 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30970 Section wrapping with template-generated sections (bad nesting 2)
30973 "wrapSections": true
30991 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30994 </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">
30995 </span><p about="#mwt1">b</p><span about="#mwt1">
30996 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
30997 </span><p about="#mwt1">c</p><span about="#mwt1">
30999 </span><p about="#mwt1">d</p><span about="#mwt1">
31001 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
31005 # Because of section-wrapping and template-wrapping interactions,
31006 # additional template wrappers are added to <section> tags
31007 # so that template wrapping semantics are valid whether section
31008 # tags are retained or stripped. But, the template scope can expand
31009 # greatly when accounting for section tags.
31010 # This exercises the s1 and s2 are in different subtrees scenario
31012 Section wrapping with template-generated sections (bad nesting 3)
31015 "wrapSections": true,
31016 "modes": ["wt2html", "wt2wt"]
31034 <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>
31037 <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">
31038 </span><p about="#mwt1">b</p><span about="#mwt1">
31039 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
31040 </span><p about="#mwt1">c</p>
31043 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
31048 Section wrapping with uneditable lead section + div wrapping multiple sections
31051 "wrapSections": true
31056 <div style="border:1px solid red;">
31073 <section data-mw-section-id="-1"><p>foo</p>
31075 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31076 <section data-mw-section-id="1"><h1 id="1">1</h1>
31079 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31082 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31086 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31089 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31091 </section></section>
31095 Section wrapping with editable lead section + div overlapping multiple sections
31098 "wrapSections": true
31105 <div style="border:1px solid red;">
31122 <section data-mw-section-id="0"><p>foo</p>
31124 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31126 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31129 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31132 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31137 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31140 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31142 </section></section>
31146 HTML header tags should not be wrapped in section tags
31149 "wrapSections": true
31162 <section data-mw-section-id="0"><p>foo</p>
31164 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31166 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31168 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31170 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31174 Lead section containing only whitespace and comments.
31177 "wrapSections": true
31181 <!-- this is a comment, presumably significant to editors -->
31188 <section data-mw-section-id="0" data-parsoid="{}">
31189 <!-- this is a comment, presumably significant to editors -->
31190 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31193 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31198 Pseudo-sections emitted by templates should have id -2
31201 "wrapSections": true
31211 <section data-mw-section-id="-1"><p>foo</p>
31212 </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}}]}'>
31213 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31214 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31215 </section></div><span about="#mwt1">
31219 ##########################################################################
31220 Tests demonstrating white-space insensitivity in input wikitext
31221 for wikitext headings, wikitext list items, and wikitext table captions,
31222 headings, and cells. HTML versions of the same should preserve whitespace.
31223 ##########################################################################
31225 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31228 "modes": ["wt2html"],
31229 "preserveIEW": true
31233 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31234 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31235 == <!--Headings with fallback ids--> Личная жизнь ==
31236 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31237 ; <!--term to define--> term : <!--term's definition--> definition
31239 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31241 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31243 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31245 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
31247 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
31250 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31253 <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>
31254 <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>
31255 <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>
31256 <ul><li>List item</li></ul>
31257 <dl><dt>term </dt>
31258 <dd>definition</dd></dl>
31260 <caption>Table Caption
31263 <th>Table Heading 1</th>
31264 <th>Table Heading 2
31267 <td>Table Cell 1</td>
31271 <td>class="foo"</td>
31275 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
31276 </td></tr></tbody></table>
31279 <td>Table Cell 1</td>
31281 </td></tr></tbody></table> foo</dd></dl>
31283 <meta property="mw:PageProp/notoc">
31284 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
31285 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
31286 <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>
31287 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
31288 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
31290 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
31292 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
31294 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31296 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
31298 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
31301 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31302 </tbody></table><p> foo </p><!--c1--></dd></dl>
31305 # Looks like <caption> is not accepted in HTML
31307 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
31310 "modes": ["wt2html"],
31311 "preserveIEW": true
31315 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31316 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31318 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
31319 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
31322 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
31323 <ul><li> List item </li></ul>
31325 <tbody><tr><th> Table Heading </th><th></th></tr>
31326 <tr><td> Table Cell </td><th></th></tr>
31329 <meta property="mw:PageProp/notoc"/>
31330 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31331 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31333 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
31334 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
31339 Do not trim whitespace in links and quotes
31342 "modes": ["wt2html"],
31343 "preserveIEW": true
31346 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
31347 [[Foo| some text ]]
31349 <p>foo <i> italic </i> and <b> bold </b>
31350 <a href="/wiki/Foo" title="Foo"> some text </a>
31353 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
31354 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
31358 Remove p tags surrounding a single element in a figcaption
31362 [[File:Foobar.jpg|right|200x200px|Caption]]
31364 <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>
31368 Selser preserves lack of newline before list and allows newline after the list
31371 "modes": ["selser"],
31372 "scrubWikitext": true,
31374 [ "ul", "after", "<p>footer</p>" ]
31391 Selser does not introduce newlines between unedited paragraph preceding the list
31394 "modes": ["selser"],
31396 [ "table tbody tr td p:last-child", "empty" ]
31418 Selser does not introduce newlines between unedited paragraph following the list
31421 "modes": ["selser"],
31423 [ "table tbody tr td p:first-child", "empty" ]
31445 Remove a list item but do not insert newline above list
31448 "modes": ["selser"],
31450 [ "ul li:last-child", "remove" ]