1 # MediaWiki Parser test cases
2 # Some taken from https://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
66 Template:redirect to foo
68 #REDIRECT [[Template:Foo]]
89 MediaWiki:bad image list
91 * [[File:Bad.jpg]] except [[Nasty page]]
126 // For Serbian; localize Template namespace
134 Template:echo_with_span
140 Template:echo_with_div
146 Template:echo with depth
159 Template:table_attribs
162 |</noinclude>style="color:red;"|Foo
166 Template:table_attribs_2
169 |</noinclude>style="color:red;"|Foo
174 Template:table_attribs_3
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
181 Template:table_attribs_4
183 | style="background-color:#DC241f;" width="10px" |
187 Template:table_attribs_5
190 |</noinclude>style="color:red;"||Bar
194 Template:table_attribs_6
196 style="background: <nowiki>
203 Template:table_attribs_7
206 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
210 Template:table_header_cells
212 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
218 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
222 Template:PartialTable
229 Template:image_attribs
232 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
235 ## See T48811 for details
237 Template:mixed_attr_content_template
239 style="color:red;" title="T48811"
245 Template:definition_list
292 Template:EmptyTRWithHTMLAttrTest
295 <tr align="center"></tr>
296 <tr><td>foo</td></tr>
297 <tr align="center"></tr>
298 <tr><td>bar</td></tr>
321 This is a simple paragraph.
323 <p>This is a simple paragraph.
328 Paragraphs with extra newline spacing
359 Paragraphs with newline spacing with comment lines in between
367 <!--foo--><!--More than 1 comment, still stripped-->
371 <!--foo--> <!----> <!-- bar -->
432 Paragraphs with newline spacing with non-empty white-space lines in between
459 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
467 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
506 Extra newlines: More paragraphs with indented comment
521 Extra newlines followed by heading
535 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
536 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
539 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
544 Extra newlines between heading and content are swallowed (Parsoid does not)
552 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
553 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
560 <p><a rel="mw:WikiLink" href="./A" title="A">a</a></p>
564 Extra new lines before and after lists are preserved
591 # Parsoid regression test
593 Multiple newlines after tables are converted to p-br-p tags
595 parsoid=wt2html,wt2wt
609 </td></tr></tbody></table>
613 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
628 Heading with line break in nowiki
632 wgFragmentMode=[ 'html5', 'legacy' ]
637 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
639 C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
643 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
650 http://fr.wikipedia.org/wiki/🍺
651 <!-- EasterEgg we love beer, better be able be able to link to it -->
653 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
672 *plain''italic''plain
673 *plain''italic''plain''italic''plain
674 *plain'''bold'''plain
675 *plain'''bold'''plain'''bold'''plain
676 *plain''italic''plain'''bold'''plain
677 *plain'''bold'''plain''italic''plain
678 *plain''italic'''bold-italic'''italic''plain
679 *plain'''bold''bold-italic''bold'''plain
680 *plain'''''bold-italic'''italic''plain
681 *plain'''''bold-italic''bold'''plain
682 *plain''italic'''bold-italic'''''plain
683 *plain'''bold''bold-italic'''''plain
684 *plain l'''italic''plain
685 *plain l''''bold''' plain
688 <li>plain<i>italic</i>plain</li>
689 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
690 <li>plain<b>bold</b>plain</li>
691 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
692 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
693 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
694 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
695 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
696 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
697 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
698 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
699 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
700 <li>plain l'<i>italic</i>plain</li>
701 <li>plain l'<b>bold</b> plain</li></ul>
705 # this example taken from the [[simple:Moon]] article (T49326)
707 Italics and possessives (1)
709 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
711 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
715 # this example taken from [[en:Flaming Pie]] (T51926)
717 Italics and possessives (2)
719 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
721 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
725 # this example taken from [[en:Dictionary]] (T51926)
727 Italics and possessives (3)
729 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
731 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
737 ### 2-quote opening sequence tests
740 Italics and bold: 2-quote opening sequence: (2,2)
749 Italics and bold: 2-quote opening sequence: (2,3)
758 Italics and bold: 2-quote opening sequence: (2,4)
768 # same html as previous, but wikitext adjusted to match parsoid html2wt
770 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
772 ''foo<nowiki>''</nowiki>''
778 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
780 Italics and bold: 2-quote opening sequence: (2,5)
793 # same html as previous, but wikitext adjusted to match parsoid html2wt
795 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
797 ''foo'''''<nowiki/>'''
808 ### 3-quote opening sequence tests
812 Italics and bold: 3-quote opening sequence: (3,2)
821 Italics and bold: 3-quote opening sequence: (3,3)
830 Italics and bold: 3-quote opening sequence: (3,4)
838 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
840 Italics and bold: 3-quote opening sequence: (3,5)
853 # same html as previous, but wikitext adjusted to match parsoid html2wt
855 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
857 '''foo'''''<nowiki/>''
868 ### 4-quote opening sequence tests
872 Italics and bold: 4-quote opening sequence: (4,2)
882 # same html as previous, but wikitext adjusted to match parsoid html2wt
884 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
886 <nowiki>''</nowiki>''foo''
893 Italics and bold: 4-quote opening sequence: (4,3)
902 Italics and bold: 4-quote opening sequence: (4,4)
912 # same html as previous, but wikitext adjusted to match parsoid html2wt
914 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
922 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
924 Italics and bold: 4-quote opening sequence: (4,5)
933 <p>'<b>foo</b><i></i>
937 # same html as previous, but wikitext adjusted to match parsoid html2wt
939 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
941 '<nowiki/>'''foo'''''<nowiki/>''
946 <p>'<b>foo</b><i></i>
952 ### 5-quote opening sequence tests
956 Italics and bold: 5-quote opening sequence: (5,2)
966 # same html as previous, but wikitext adjusted to match parsoid html2wt
968 Italics and bold: 5-quote opening sequence: (5,2+3)
977 Italics and bold: 5-quote opening sequence: (5,3)
987 # same html as previous, but wikitext adjusted to match parsoid html2wt
989 Italics and bold: 5-quote opening sequence: (5,3+2)
998 Italics and bold: 5-quote opening sequence: (5,4)
1004 <p><i><b>foo'</b></i>
1009 Italics and bold: 5-quote opening sequence: (5,5)
1013 <p><i><b>foo</b></i>
1018 Italics and bold: 5-quote opening sequence: (5,6)
1022 <p><i><b>foo'</b></i>
1027 ### multiple quote sequences in a line
1031 Italics and bold: multiple quote sequences: (2,4,2)
1037 <p><i>foo'<b>bar</b></i>
1041 # same html as previous, but wikitext adjusted to match parsoid html2wt
1043 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
1045 ''foo'<nowiki/>'''bar'''''
1047 <p><i>foo'<b>bar</b></i>
1052 Italics and bold: multiple quote sequences: (2,4,3)
1058 <p><i>foo'<b>bar</b></i>
1062 # same html as previous, but wikitext adjusted to match parsoid html2wt
1064 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
1066 ''foo'<nowiki/>'''bar'''''
1068 <p><i>foo'<b>bar</b></i>
1073 Italics and bold: multiple quote sequences: (2,4,4)
1079 <p><i>foo'<b>bar'</b></i>
1083 # same html as previous, but wikitext adjusted to match parsoid html2wt
1085 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1087 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1089 <p><i>foo'<b>bar'</b></i>
1093 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1095 Italics and bold: multiple quote sequences: (3,4,2)
1104 <p><b>foo'</b>bar<i></i>
1108 # same html as previous, but wikitext adjusted to match parsoid html2wt
1110 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1112 '''foo''''bar''<nowiki/>''
1117 <p><b>foo'</b>bar<i></i>
1121 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1123 Italics and bold: multiple quote sequences: (3,4,3)
1132 <p><b>foo'</b>bar<b></b>
1136 # same html as previous, but wikitext adjusted to match parsoid html2wt
1138 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1140 '''foo''''bar'''<nowiki/>'''
1145 <p><b>foo'</b>bar<b></b>
1150 ### other quote tests
1153 Italics and bold: other quote tests: (2,3,5)
1155 ''this is about '''foo's family'''''
1157 <p><i>this is about <b>foo's family</b></i>
1163 Italics and bold: other quote tests: (2,(3,3),2)
1165 ''this is about '''foo's''' family''
1167 <p><i>this is about <b>foo's</b> family</i>
1173 Italics and bold: other quote tests: (3,2,3,2)
1177 '''this is about ''foo'''s family''
1179 <p><b>this is about <i>foo</i></b><i>s family</i>
1184 # same html as previous, but wikitext adjusted to match parsoid html2wt
1186 Italics and bold: other quote tests: (3,2,3+2+2,2)
1188 '''this is about ''foo'''''<nowiki/>''s family''
1190 <p><b>this is about <i>foo</i></b><i>s family</i>
1196 Italics and bold: other quote tests: (3,2,3,3)
1198 '''this is about ''foo'''s family'''
1200 <p>'<i>this is about </i>foo<b>s family</b>
1206 Italics and bold: other quote tests: (3,(2,2),3)
1208 '''this is about ''foo's'' family'''
1210 <p><b>this is about <i>foo's</i> family</b>
1216 Italicized possessive
1218 The ''[[Main Page]]'''s talk page.
1220 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1223 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1227 Quote balancing context should be restricted to td/th cells on the same wikitext line
1229 parsoid=wt2html,wt2wt
1243 </td></tr></tbody></table>
1251 Non-html5 tags should be accepted
1253 <center>''foo''</center>
1255 <font>''foo''</font>
1256 <strike>''foo''</strike>
1259 <center><i>foo</i></center>
1260 <p><big><i>foo</i></big>
1261 <font><i>foo</i></font>
1262 <strike><i>foo</i></strike>
1268 <wbr> is valid wikitext (T54468)
1276 # <strike> is HTML4, <s> is HTML4/5.
1278 <s> or <strike> for strikethrough
1280 <strike>strike</strike>
1284 <p><strike>strike</strike>
1292 Text-level semantic html elements in wikitext
1295 <strong>text</strong>
1311 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1318 <strong>text</strong>
1334 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1342 # test cases taken from
1343 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1345 Ruby markup (W3C-style)
1347 ;Mono-ruby for individual base characters
1348 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1350 :<ruby>今日<rt>きょう</rt></ruby>
1352 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1354 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1356 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1359 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1360 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1361 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1364 <dl><dt>Mono-ruby for individual base characters</dt>
1365 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1367 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1368 <dt>Jukugo ruby</dt>
1369 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1370 <dt>Inline ruby</dt>
1371 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1372 <dt>Double-sided ruby</dt>
1373 <dd><ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1375 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1376 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1377 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1382 # The next two test different paths in the sanitizer.
1384 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1386 <blockquote|>a</blockquote>
1388 <b→> doesn't terminate </b→>
1390 <bä> doesn't terminate </bä>
1392 <boo> doesn't terminate </boo>
1394 <s.foo> doesn't terminate </s.foo>
1398 <p><blockquote|>a</blockquote>
1399 </p><p><b→> doesn't terminate </b→>
1400 </p><p><bä> doesn't terminate </bä>
1401 </p><p><boo> doesn't terminate </boo>
1402 </p><p><s.foo> doesn't terminate </s.foo>
1403 </p><p><sub-ID#1>
1408 Non-word characters don't terminate tag names
1410 <blockquote|>a</blockquote>
1412 <b→> doesn't terminate </b→>
1414 <bä> doesn't terminate </bä>
1416 <boo> doesn't terminate </boo>
1418 <s.foo> doesn't terminate </s.foo>
1422 <p><blockquote|>a
1423 </p><p><b→> doesn't terminate </b→>
1424 </p><p><bä> doesn't terminate </bä>
1425 </p><p><boo> doesn't terminate </boo>
1426 </p><p><s.foo> doesn't terminate </s.foo>
1427 </p><p><sub-ID#1>
1432 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1433 ### This checks that HTML5 tags (with non-word characters in the tag
1434 ### name) make it safely through the parser -- the Sanitizer will
1435 ### munge them later, as it should.
1438 Non-word characters are valid in extension tags (T19663)
1449 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1453 Isolated close tags should be treated as literal text (T54760)
1461 <p class="mw-empty-elt">
1462 </p><p><s.foo>s
1465 <p><s.foo>s</p>
1469 ### Special characters
1473 Bare pipe character (T54363)
1482 Bare pipe character from a template (T54363)
1491 ### <nowiki> test cases
1495 <nowiki> unordered list
1497 <nowiki>* This is not an unordered list item.</nowiki>
1499 <p>* This is not an unordered list item.
1502 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1508 <nowiki>Lorem ipsum dolor
1516 <p>Lorem ipsum dolor
1525 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1535 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1537 <nowiki><span class="error"></nowiki>
1539 <p><span class="error">
1542 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1548 :There is not nowiki.
1549 :There is <nowiki>nowiki</nowiki>.
1551 #There is not nowiki.
1552 #There is <nowiki>nowiki</nowiki>.
1554 *There is not nowiki.
1555 *There is <nowiki>nowiki</nowiki>.
1557 <dl><dd>There is not nowiki.</dd>
1558 <dd>There is nowiki.</dd></dl>
1559 <ol><li>There is not nowiki.</li>
1560 <li>There is nowiki.</li></ol>
1561 <ul><li>There is not nowiki.</li>
1562 <li>There is nowiki.</li></ul>
1565 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1566 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1568 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1569 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1571 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1572 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1576 Entities inside <nowiki>
1578 <nowiki><</nowiki>
1583 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1587 Entities inside template parameters
1594 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1598 Properly escape nowiki when combined with other wiki markup
1602 <p>* </nowiki> tag</p>
1604 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1608 T93824: Put escaped HTML tags inside nowiki
1612 <p><h2>foo</h2></p>
1614 <nowiki><h2>foo</h2></nowiki>
1618 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1622 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1623 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1624 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1626 This text: L'[[Foo]]
1627 This text: L<nowiki>''</nowiki>[[Foo]]
1628 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1631 # This test fails because wikitext whitespace is not normalized before comparing.
1633 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1637 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1640 This text : L<nowiki>''</nowiki>[[Foo]]
1643 # This test and the next one are html2wt only as they test that incorrect wikitext
1644 # passed in template arguments gets escaped or wrapped in nowikis where required.
1646 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1650 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1651 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1653 {{echo|foo{{!}}bar}}
1654 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1658 T53961: Output correct nowikis in template arguments
1662 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1663 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1664 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1665 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1666 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1669 {{echo|<nowiki>a }} b</nowiki>}}
1670 {{echo|<nowiki>a [[ b</nowiki>}}
1671 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1672 {{echo|a <nowiki>}</nowiki>}}
1676 Cases where "!!" needs nowiki protection
1681 <tr><th>this needs protection !! here</th></tr>
1685 <tr><th>this does not need
1686 protection !! here</th></tr>
1690 !<nowiki>this needs protection !! here</nowiki>
1703 Comments and Indent-Pre
1705 <!-- comment 1 --> asdf
1707 <!-- comment 1 --> asdf
1710 <!-- comment 1 --> asdf
1711 <!-- comment 2 -->xyz
1713 <!-- comment 1 --> asdf
1714 <!-- comment 2 --> xyz
1770 asdf<!-- comment 1 -->jkl
1780 <!-- foo --> b <!-- bar -->
1794 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1800 Comment semantics and delimiters
1802 <!-- --><!----><!-----><!------>
1806 <!-- --><!----><!-----><!------>
1810 Comment semantics and delimiters, redux
1812 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1813 -- foo -- funky huh? ... -->
1817 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1818 -- foo -- funky huh? ... -->
1822 Comment semantics and delimiters: directors cut
1824 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1825 everything starting with < followed by !-- until the first -- and > we see,
1826 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1832 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1833 everything starting with < followed by !-- until the first -- and > we see,
1834 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1839 Comment semantics: nesting
1841 <!--<!-- no, we're not going to do anything fancy here -->-->
1846 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1849 # Parsoid closes the unclosed comment, even if it means a slight
1852 Comment semantics: unclosed comment at end
1854 parsoid=wt2html,html2html
1856 <!--This comment will run out to the end of the document
1860 <!--This comment will run out to the end of the document-->
1864 Comment semantics: normalize comments to play nice with XML and browsers
1866 <!-- Browsers --!> think this is closed -->
1867 <!--> This would normally be text -->
1868 <!---> As would this -->
1869 <!-- XML doesn't like trailing dashes -------->
1870 <!-- Nor doubled hyphens -- anywhere in the data -->
1871 But this is not a comment.
1873 <p>But this is not a comment.
1876 <!-- Browsers --!> think this is closed -->
1877 <!--> This would normally be text -->
1878 <!---> As would this -->
1879 <!-- XML doesn't like trailing dashes -------->
1880 <!-- Nor doubled hyphens -- anywhere in the data -->
1881 <p>But this is not a comment.</p>
1885 Comment semantics: round-trip even text which contains encoded -->
1887 <!-- hello & goodbye - > --> --&gt; --&xx -->
1889 <!-- hello & goodbye - > --> --&gt; --&xx -->
1893 Comment in template title
1902 Comment on its own line post-expand
1914 Comment on its own line post-expand with non-significant whitespace
1926 post-expand include size being exceeded
1930 {{echo3|1234567890}}
1932 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1937 max template depth being reached
1941 {{echo with depth|too deep!}}
1943 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1948 multiple templates that are redirects
1959 Multiple comments should still parse as SOL-transparent
1961 parsoid=wt2html,wt2wt
1964 <!--c2--><!--c3--><!--c4-->*b
1973 <!--c2--><!--c3--><!--c4-->
1979 ## Make sure ">" gets escaped in comments to avoid XSS
1981 IE conditional comments
1984 <script>alert('hi');</script>
1987 <!--[if lt IE 9]>
1988 <script>alert('hi');</script>
1993 ### paragraph wrapping tests
2009 Block tag on one line (<div>)
2019 <p>a </p><div>foo</div>
2024 # Remex wraps empty tag runs with p-tags.
2025 # Parsoid strips them out during p-wrapping.
2027 No p-wrappable content
2029 <span><div>x</div></span>
2030 <span><s><div>x</div></s></span>
2031 <small><em></em></small><span><s><div>x</div></s></span>
2033 <span><div>x</div></span>
2034 <span><s><div>x</div></s></span>
2035 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2037 <span><div>x</div></span>
2038 <span><s><div>x</div></s></span>
2039 <small><em></em></small><span><s><div>x</div></s></span>
2042 # T177612: Parsoid-only test
2044 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2046 {{echo|<span><div>x</div></span>}}
2049 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
2054 Block tag on one line (<blockquote>)
2056 a <blockquote>foo</blockquote>
2060 a <blockquote>foo</blockquote>
2064 <p>a </p><blockquote><p>foo</p></blockquote>
2070 Block tag on both lines (<div>)
2080 <p>a </p><div>foo</div><p>
2081 b </p><div>foo</div>
2085 Block tag on both lines (<blockquote>)
2087 a <blockquote>foo</blockquote>
2089 b <blockquote>foo</blockquote>
2091 a <blockquote>foo</blockquote>
2092 b <blockquote>foo</blockquote>
2095 <p>a </p><blockquote><p>foo</p></blockquote><p>
2096 b </p><blockquote><p>foo</p></blockquote>
2100 Multiple lines without block tags
2121 x </p><div>foo</div><p> z
2125 # The difference between Parsoid & Remex here
2126 # is because of Parsoid's Tidy-emulation code
2127 # for p-wrapping. We'll start work to remove this
2128 # emulation code in Parsoid sooner than later.
2129 # Remex wraps empty tag runs with p-tags.
2130 # Parsoid strips them out in a separate pass.
2132 Empty lines between lines with block tags
2167 </p><div>b</div><p>d
2172 <div data-parsoid='{"stx":"html"}'></div>
2175 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2178 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2180 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2183 <div data-parsoid='{"stx":"html"}'>e</div>
2187 Unclosed HTML p-tags should be handled properly
2194 <div><p>foo</p></div>
2199 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2204 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2205 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2208 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2212 a [[Category:A1]] [[Category:A2]]
2217 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2221 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2227 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2231 No paragraph necessary for SOL transparent template
2233 <span><div>foo</div></span>
2236 <span><div>foo</div></span>
2237 {{echo|[[Category:Foo]]}}
2239 <span><div>foo</div></span>
2240 <span><div>foo</div></span>
2243 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2244 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2246 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2247 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]"}},"i":0}}]}'/>
2251 Avoid expanding multiline sol transparent template ranges unnecessarily
2269 <br about="#mwt1" typeof="mw:Transclusion" data-parsoid='{}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<br/>\n"}},"i":0}}]}'/><span about="#mwt1">
2272 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2276 Paragraph wrapping following unclosed table
2278 parsoid=wt2html,html2html
2299 </td></tr></tbody></table>
2305 <table data-parsoid='{"autoInsertedEnd":true}'>
2306 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2308 </tbody></table><table>
2309 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2320 Paragraph wrapping suppressed in html p
2322 parsoid=wt2html,html2html
2342 <p data-parsoid='{"stx":"html"}'>
2353 ### Preformatted text
2363 And a [[Main Page|link]]
2369 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2374 Tabs don't trigger preformatted text
2378 This is preformatted text.
2384 <pre>This is preformatted text.
2389 preformatted text.</p>
2390 <pre>This is preformatted text.
2395 Space before tab needs nowiki pre protection
2401 <nowiki> </nowiki> a
2405 Ident preformatting with inline content
2416 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2433 Regression with preformatted in <center>
2447 T54763: Preformatted in <blockquote>
2453 indented cell (no pre-wrapping!)
2463 <p> indented cell (no pre-wrapping!)
2471 T53086: Double newlines in blockquotes should be turned into paragraphs
2488 T17491: <ins>/<del> in blockquote
2491 Foo <del>bar</del> <ins>baz</ins> quux
2495 <p>Foo <del>bar</del> <ins>baz</ins> quux
2501 <p>Foo <del>bar</del> <ins>baz</ins> quux
2507 T17491: <ins>/<del> in blockquote (2)
2509 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2512 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2516 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2521 <pre> with attributes (T5202)
2523 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2525 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2530 <pre> with width attribute (T5202)
2532 <pre width="8">Narrow screen goodies</pre>
2534 <pre width="8">Narrow screen goodies</pre>
2539 <pre> with forbidden attribute (T5202)
2541 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2543 <pre width="8">Narrow screen goodies</pre>
2548 Entities inside <pre>
2557 <pre> with forbidden attribute values (T5202)
2559 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2561 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2566 <nowiki> inside <pre> (T15238)
2574 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2582 <pre><nowiki>Foo</nowiki></pre>
2587 <nowiki> inside of #tag:pre
2589 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2591 <pre>Foo →bar</pre>
2594 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2597 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2598 ## aren't enclosed in nowikis.
2600 <nowiki> and <pre> preference (first one wins)
2631 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2636 <p><span typeof="mw:Nowiki">
2644 </pre> inside nowiki
2646 <nowiki></pre></nowiki>
2653 Empty pre; pre inside other HTML tags (T56946)
2670 <div data-parsoid='{"stx":"html"}'><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
2672 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2676 HTML pre followed by indent-pre
2689 <p><pre>foo</pre></p>
2691 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2693 <p class='mw-empty-elt' data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2697 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2705 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2715 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2727 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2748 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2752 {{echo| foo}}{{echo| bar}}
2757 {{echo|<!--cmt--> foo}}
2759 <!--cmt-->{{echo| foo}}
2761 {{echo|{{echo| }}bar}}
2779 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2815 ## Hmm, should Parsoid rt this?
2817 Pres with newline attributes
2819 parsoid=wt2html,html2html
2824 <pre class="one two">hi</pre>
2827 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2831 Things that look like <pre> tags aren't treated as such
2833 Barack Obama <President> of the United States
2834 <President></President>
2836 <p>Barack Obama <President> of the United States
2837 <President></President>
2842 Handle broken pre-like tags (T66025)
2846 {{echo|<pre <pre>x</pre>}}
2848 <table><pre </table>
2851 <table><pre </table>
2855 <pre <table></table>
2857 <pre typeof="mw:Transclusion mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html","a":{"<pre":null},"sa":{"<pre":""},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2859 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'><pre </span><table data-parsoid='{"stx":"html"}'></table>
2863 Parsoid: handle pre with space after attribute
2867 <pre style="width:50%;" >{{echo|foo}}</pre>
2869 <pre style="width:50%;">{{echo|foo}}</pre>
2872 <pre typeof="mw:Extension/pre" about="#mwt2" style="width:50%;" data-mw='{"name":"pre","attrs":{"style":"width:50%;"},"body":{"extsrc":"{{echo|foo}}"}}'>{{echo|foo}}</pre>
2875 # TODO / maybe: fix wt2wt for this
2877 Parsoid: Don't paragraph-wrap fosterable content
2910 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2914 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2942 #--------------------------------------------------------------------
2943 # Transclusion parameter whitespace stripping tests
2944 # Behavior is different for positional and named parameters
2945 #--------------------------------------------------------------------
2947 Templates: Strip leading and trailing whitespace from named-param values
2951 {{echo|1= {{echo|b}} }}
2969 Templates: Don't strip whitespace from positional-param values
2973 {{echo|{{echo|b}} }}
3013 Templates: Don't recognize targets split by newlines
3029 Templates: Recognize targets when newlines and comments don't split the target
3034 <!--X--> ech<!--X-->o<!--X-->
3042 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech<!--X-->o<!--X--> \n <!--X--> <!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3046 Templates: Handle empty comment-and-ws-only lines correctly
3049 <!--should be ignored-->
3050 <!--should be ignored as well-->
3057 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n<!--should be ignored-->\n <!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
3061 Templates: Handle comments in the target
3064 <!-- should be ignored -->
3068 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3071 {{echo<!-- should be ignored -->
3074 {{echo<!-- should be ignored -->|foo}}
3076 {{<!-- should be ignored -->echo|foo}}
3085 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3087 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3089 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3091 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3093 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3097 Templates: Handle comments in parameter names (T69657)
3100 <!-- should be ignored -->
3104 <!-- should be ignored -->
3107 {{echo|1<!-- should be ignored -->=foo}}
3109 {{echo|<!-- should be ignored -->1=foo}}
3117 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3119 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
3121 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3123 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
3127 Templates: Other wikitext in parameter names (T69657)
3134 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3138 Templates: With colons
3142 <p>Template with colon
3145 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"With: Colon","href":"./Template:With:_Colon"},"params":{},"i":0}}]}'>Template with colon</p>
3148 #--------------------------------------------------------------------
3149 # Transclusion parameter escaping tests
3150 #--------------------------------------------------------------------
3153 Templates: Parsoid parameter escaping test 1
3155 {{echo|[foo]|{{echo|[bar]}}}}
3160 <p about="#mwt1" typeof="mw:Transclusion"
3161 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3165 Parsoid: Pipes in external links in template parameter
3167 {{echo|[{{echo|http://example.com}} link]}}
3169 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3172 <p><a rel="mw:ExtLink" class="external text" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
3176 Parsoid: pipe in transclusion parameter
3178 {{echo|http://foo.com/a|b}}
3180 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3183 <p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
3187 Parsoid: Pipe in external link target and content in template parameter
3189 parsoid=html2wt,wt2wt
3191 {{echo|[http://foo.com/a|b a|b]}}
3193 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3196 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3197 typeof="mw:Transclusion"
3198 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3199 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3203 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3207 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3209 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
3213 Templates: Don't escape already nowiki-escaped text in template parameters
3215 parsoid=html2wt,wt2wt
3217 {{echo|foo<nowiki>|</nowiki>bar}}
3218 {{echo|<nowiki><div></nowiki>}}
3219 {{echo|<nowiki></nowiki>}}
3226 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
3227 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
3228 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
3234 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3236 parsoid=html2wt,wt2wt
3238 {{echo|{{echo|1=bar}}}}
3243 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
3248 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3255 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
3260 Templates: Preserve blank parameter names
3267 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3271 Templates: Preserve blank parameter names in other positions
3273 {{blank_param|bar|=foo}}
3279 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
3284 ### Parsoid-centric tests for testing RT edge cases for pre
3288 1a. Indent-Pre and Comments
3301 1b. Indent-Pre and Comments
3314 1c. Indent-Pre and Comments
3327 1d. Indent-Pre and Comments
3328 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3341 2a. Indent-Pre and tables
3362 2b. Indent-Pre and tables
3378 2c. Indent-Pre and tables (T44252)
3395 2d. Indent-Pre and tables
3412 <tbody><tr><td> b</td></tr>
3417 2e. Indent-Pre and table-line syntax
3430 2f. Indent-pre started by table-line syntax
3449 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3454 Text that should be rendered preformatted
3462 <pre>Text that should be rendered preformatted
3471 2h. Indent pre in tables
3473 parsoid=wt2html,html2html
3516 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3518 </td></tr></tbody></table>
3522 3a. Indent-Pre and block tags (single-line html)
3526 c <blockquote> foo </blockquote>
3531 c <blockquote> foo </blockquote>
3532 <pre><span> foo </span>
3535 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3536 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3537 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3538 <pre><span> foo </span>
3541 <p> a </p><p> foo </p><p>
3542 b </p><div> foo </div><p>
3543 c </p><blockquote><p> foo </p></blockquote>
3544 <pre><span> foo </span>
3549 3b. Indent-Pre and block tags (multi-line html)
3552 <!-- comment --> b <div> foo </div>
3554 <pre>a <span>foo</span>
3559 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3560 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3562 <pre>a <span>foo</span>
3564 b </p><div> foo </div>
3568 3c. Indent-Pre and block tags (pre-content on separate line)
3632 4. Indent-Pre and extension tags
3643 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3647 5. Indent-Pre and html pre
3649 <pre class="123">hi</pre>
3651 <pre class="123">hi</pre>
3654 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3658 Render paragraphs when indent-pre is suppressed in blocklevels
3675 4. Multiple spaces at start-of-line
3693 ## NOTE: the leading white-space chars on empty line are significant
3695 5a. White-space in indent-pre
3707 ## NOTE: the leading white-space chars on empty line are significant
3709 5b. White-space in indent-pre
3728 5c. White-space in indent-pre
3741 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3764 7a. Indent-pre and category links
3766 parsoid=wt2html,wt2wt
3768 [[Category:foo]] <!-- No pre-wrapping -->
3769 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3772 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3773 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3776 ## We used to, but no longer wt2wt this test since the default serializer
3777 ## will normalize all categories to serialize on their own line.
3778 ## This wikitext usage is going to be fairly uncommon in production and
3779 ## selser will take care of preserving formatting in those scenarios.
3781 7b. Indent-pre and category links
3786 [[Category:foo]] {{echo|b}}
3788 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3789 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
3793 Indent-Pre: Newlines in comments shouldn't affect sol state
3808 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3812 HTML-pre: 1. embedded newlines
3844 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3846 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3849 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3854 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3862 HTML-pre: big spaces
3898 <pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n"}}'>
3917 HTML-pre: 2: indented text
3930 HTML-pre: 3: other wikitext
3949 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n* foo\n# bar\n= no-h =\n'' no-italic ''\n[[ NoLink ]]\n"}}'>* foo
3958 ### Definition lists
3965 <dl><dt>name </dt>
3966 <dd>Definition</dd></dl>
3971 Definition list for indentation only
3975 <dl><dd>Indented text</dd></dl>
3980 Definition list with no space
3985 <dd>Definition</dd></dl>
3990 Definition list with URL link
3992 ;http://example.com/ :definition
3994 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3995 <dd>definition</dd></dl>
4000 Definition list with bracketed URL link
4002 ;[http://www.example.com/ Example]:Something about it
4004 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4005 <dd>Something about it</dd></dl>
4010 Definition list with wikilink containing colon
4012 ;[[Help:FAQ]]:The least-read page on Wikipedia
4014 <dl><dt><a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
4015 <dd>The least-read page on Wikipedia</dd></dl>
4019 # At Brion's and JeLuF's insistence... :)
4021 Definition list with news link containing colon
4023 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4025 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> </dt>
4026 <dd>This isn't even a real newsgroup!</dd></dl>
4029 <dl><dt><a rel="mw:ExtLink" class="external free" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'>This isn't even a real newsgroup!</dd></dl>
4033 Malformed definition list with colon
4035 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4037 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
4042 Definition lists: colon in external link text
4044 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4046 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a> </dt>
4047 <dd>OK, I made that up</dd></dl>
4052 Definition lists: colon in HTML attribute
4054 ;<b style="display: inline">bold</b>
4056 <dl><dt><b style="display: inline">bold</b></dt></dl>
4061 Definition lists: self-closed tag
4063 ;one<br/>two :two-line fun
4065 <dl><dt>one<br />two </dt>
4066 <dd>two-line fun</dd></dl>
4071 Definition lists: ignore colons inside tags
4073 ;one <b>two : tag <i>fun:</i>:</b>:def
4075 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4081 Definition lists: excess closed tags
4083 ;one</b>two :bad tag fun
4085 <dl><dt>onetwo </dt>
4086 <dd>bad tag fun</dd></dl>
4090 <dd>bad tag fun</dd>
4095 T13748: Literal closing tags
4099 <dd>test test test test test</dd>
4101 <dd>test test test test test</dd>
4106 <dd>test test test test test</dd>
4108 <dd>test test test test test</dd>
4114 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4122 <dl><dt>term </dt>
4123 <dd>description</dd></dl>
4124 <ul><li>unordered</li></ul>
4130 Definition list with empty definition and following paragraph
4143 Nested definition lists using html syntax
4156 Definition Lists: No nesting: Multiple dd's
4169 Definition Lists: Indentation: Regular
4177 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4182 Definition Lists: Indentation: Missing 1st level
4188 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4193 Definition Lists: Indentation: Multi-level indent
4197 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4202 Definition Lists: Hacky use to indent tables
4209 should be left alone
4211 <dl><dd><dl><dd><table>
4216 </td></tr></table></dd></dl></dd></dl>
4218 should be left alone
4223 Definition Lists: Hacky use to indent tables (with content following table)
4228 |} <!--c1--> this text should be part of the dl
4235 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4242 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4246 Definition Lists: Hacky use to indent tables, with comments (T65979)
4254 should be left alone
4257 <dl><dd><dl><dd><table><tr>
4260 </tr></table><!-- bar --></dd></dl></dd></dl>
4262 should be left alone</p>
4266 Definition Lists: Hacky use to indent tables, with comment before table
4274 <dl><dd><dl><dd><!-- foo --><table><tr>
4276 </tr></table></dd></dl></dd></dl>
4279 # The trailing whitespace in this test is to catch a regression in
4280 # Parsoid after T54473.
4282 Definition Lists: Hacky use to indent tables (WS-insensitive)
4291 </td></tr></table></dd></dl>
4295 <tbody><tr><td>a</td></tr>
4296 </tbody></table></dd></dl>
4299 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4300 ## as an empty dt item. It also ignores all but the last ";" when followed
4301 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4302 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4305 ## Ex: ";;t2 ::d2" is transformed into:
4317 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4318 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4329 ## All Parsoid only definition list tests have this difference.
4331 ## See also: https://phabricator.wikimedia.org/T8569
4332 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4335 Table / list interaction: indented table with lists in table contents
4357 </td></tr></table></dd></dl>
4362 Table / list interaction: lists nested in tables nested in indented lists
4385 </td></tr></table></dd></dl>
4392 Definition Lists: Nesting: Multi-level (Parsoid only)
4420 Definition Lists: Nesting: Test 2
4427 <dl><dd>d2</dd></dl></dd></dl>
4432 Definition Lists: Nesting: Test 3
4437 <dl><dd><dl><dt>t1</dt>
4439 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4444 Definition Lists: Nesting: Test 4
4449 <dl><dd><dl><dd><dl><dt>t3</dt>
4450 <dd>d3</dd></dl></dd></dl></dd></dl>
4455 ## The Parsoid team believes the following three test exposes a
4456 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4457 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4458 ## It also exposes a "misfeature" in tidy, which doesn't like
4459 ## <dl> tags with a single <dt> child; it converts the <dt> into
4460 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4462 Definition Lists: Mixed Lists: Test 1
4468 <dl><dd><dl><dt><ul><li>foo</li>
4469 <li>bar</li></ul></dt></dl>
4470 <dl><dt>baz</dt></dl></dd></dl>
4473 <dl><dd><dl><dt><ul><li>foo</li>
4474 <li>bar</li></ul></dt></dl>
4475 <dl><dt>baz</dt></dl></dd></dl>
4493 Definition Lists: Mixed Lists: Test 2
4498 <ul><li><dl><dd>d1</dd>
4499 <dd>d2</dd></dl></li></ul>
4505 Definition Lists: Mixed Lists: Test 3
4510 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4511 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4517 Definition Lists: Mixed Lists: Test 4
4522 <ul><li><dl><dt>d1 </dt>
4525 <dd>d4</dd></dl></li></ul>
4531 Definition Lists: Mixed Lists: Test 5
4537 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4543 Definition Lists: Mixed Lists: Test 6
4548 <ol><li><ul><li><dl><dd>d1
4549 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4555 Definition Lists: Mixed Lists: Test 7
4560 <dl><dd><ul><li>d1</li>
4561 <li>d2</li></ul></dd></dl>
4567 Definition Lists: Mixed Lists: Test 8
4572 <dl><dd><ul><li>d1</li></ul>
4573 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4579 Definition Lists: Mixed Lists: Test 9
4583 <ul><li><dl><dt>foo </dt>
4584 <dd>bar</dd></dl></li></ul>
4590 Definition Lists: Mixed Lists: Test 10
4594 <ul><li><ol><li><dl><dt>foo </dt>
4595 <dd>bar</dd></dl></li></ol></li></ul>
4599 # The Parsoid team disagrees with the PHP parser's seemingly-random
4600 # rules regarding dd/dt on the next few tests. Parsoid is more
4601 # consistent, and recognizes the shared nesting and keeps the
4602 # still-open tags around until the nesting is complete.
4604 # This is a regression test for T175099
4606 Definition Lists: Mixed Lists: Test 11
4613 <ul><li>b</li></ul></dd></dl>
4617 <dd><ul><li>b</li></ul></dd></dl>
4620 # FIXME: Maybe get rid of this test?
4622 Definition Lists: Mixed Lists: Test 12
4627 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4628 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4629 <dl><dt>boo </dt>
4630 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4633 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4634 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4635 <dl><dt>boo </dt>
4636 <dd>baz</dd></dl></li></ol></li></ul>
4653 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4654 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4658 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4659 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4667 # FIXME: Maybe get rid of this test?
4669 # * The test is wrong, there are two colons where there should be :;
4670 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4672 Definition Lists: Weird Ones: Test 1
4674 *#;*::;;foo :bar (who uses this?)
4676 <ul><li><ol><li><dl><dt>foo </dt>
4677 <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>
4694 <dt>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4695 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4707 Definition Lists: colons occurring in tags
4724 <dt><span>a:b</span></dt>
4725 <dt><div>a:b</div></dt>
4726 <dt><div>a</div></dt>
4730 <dt><i>a:b</i></dt></dl>
4731 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4733 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4735 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4736 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4737 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4738 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4740 <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>
4741 <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>
4742 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4745 # Parsoid's output differs here again because it shares
4746 # nesting between the two lists unlike the PHP parser.
4747 # Unsure which is more desirable.
4749 Definition Lists: colons and tables 1
4761 </td></tr></table></dd></dl>
4765 </td></tr></table></dd></dl>
4771 </td></tr></table></dd>
4775 </td></tr></table></dd></dl>
4778 # FIXME: Does this need a html/php section?
4780 Definition Lists: template interaction
4782 ::{{definition_list}}
4785 ::{{definition_list}}
4790 <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">
4791 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4793 <dl><dd data-parsoid='{}'>one
4794 <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">
4795 </span><dd about="#mwt2">two
4797 <dd>three</dd></dl></dd>
4798 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4806 External links: non-bracketed
4808 Non-bracketed: http://example.com
4810 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4814 # parsoid doesn't explicitly mark autonumbered links, see T55505
4816 External links: numbered
4818 Numbered: [http://example.com]
4819 Numbered: [http://example.net]
4820 Numbered: [http://example.com]
4822 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4823 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4824 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4827 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4828 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4829 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4833 External links: specified text
4835 Specified text: [http://example.com link]
4837 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4842 External links: trail
4844 Linktrails should not work for external links: [http://example.com link]s
4846 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4851 External links: dollar sign in URL
4853 http://example.com/1$2345
4855 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4859 # parsoid doesn't explicitly mark autonumbered links, see T55505
4861 External links: dollar sign in URL (autonumber)
4863 [http://example.com/1$2345]
4865 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4868 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4872 External links: open square bracket forbidden in URL (T6377)
4874 parsoid=wt2html,wt2wt,html2html
4876 http://example.com/1[2345
4878 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4881 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4885 External links: open square bracket forbidden in URL (named) (T6377)
4887 parsoid=wt2html,html2html
4889 [http://example.com/1[2345]
4891 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4894 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4897 # parsoid adds a space before the link name
4899 External links: open square bracket forbidden in URL (named) (T6377)
4902 [http://example.com/1 [2345]
4904 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4909 External links: nowiki in URL link text (T8230)
4911 [http://example.com/ <nowiki>''example site''</nowiki>]
4913 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4918 External links: newline forbidden in text (T8230 regression check)
4920 [http://example.com/ first
4923 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4929 External links: Pipe char between url and text
4931 [http://example.com | link]
4933 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4938 External links: protocol-relative URL in brackets
4940 [//example.com/ Test]
4942 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4946 # parsoid doesn't explicitly mark autonumbered links, see T55505
4948 External links: protocol-relative URL in brackets without text
4952 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4955 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4959 External links: protocol-relative URL in free text is left alone
4963 <p>//example.com/Foo
4968 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4970 foo//example.com/Foo
4972 <p>foo//example.com/Foo
4976 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4978 External links: with no contents
4980 parsoid=wt2html,wt2wt
4982 [http://en.wikipedia.org/wiki/Foo]
4984 [[wikipedia:Foo|Bar]]
4986 [[wikipedia:Foo|<span>Bar</span>]]
4988 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4989 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4990 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4993 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4994 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4995 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4999 External links: Free with trailing punctuation
5009 http://example.com/url_with_(brackets)
5010 (http://example.com/url_without_brackets)
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
5015 http://example.com/url_with_entity 
5016 http://example.com/url_with_entity 
5017 http://example.com/url_with_entity<
5018 http://example.com/url_with_entity<
5019 http://example.com/url_with_entity<
5021 <p><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">http://example.com</a>.
5025 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5026 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5027 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5028 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5029 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5030 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</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> 
5035 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5036 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5037 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5038 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5039 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5042 <p><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">http://example.com</a>.
5046 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5047 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5048 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5049 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5050 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5051 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5052 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5053 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5054 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
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":"&nbsp;","srcContent":" "}'> </span>
5056 <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>
5057 <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>
5058 <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>
5059 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
5060 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
5064 External links: tricky Parsoid html2html case
5066 parsoid=wt2html,wt2wt,html2html
5068 http://example.com/url_with_entity&amp;
5070 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5073 <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>
5077 External links: Free with trailing quotes (T113666)
5079 '''News:''' Stuff here
5083 <p><b>News:</b> Stuff here
5084 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5087 <p><b>News:</b> Stuff here</p>
5088 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5092 External links: with entity
5094 [http:// www.librarieswithoutborders.org Libraries without borders]
5096 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5099 <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>
5103 External links: Lone protocols are never linked (T105697)
5122 External links: No preceding word characters allowed (T67278)
5124 NOPEhttp://example.com
5125 N0http://example.com
5126 ok:http://example.com
5127 ok-http://example.com
5129 <p>NOPEhttp://example.com
5130 N0http://example.com
5131 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5132 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5137 External links: nofollow domain exception
5139 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5141 <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>.
5148 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5150 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5155 External image from https
5157 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5159 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5164 External image (when not allowed)
5166 wgAllowExternalImages=0
5168 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5170 <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>
5175 Link to non-http image, no img tag
5177 Link to non-http image, no img tag: ftp://example.com/test.jpg
5179 <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>
5184 External links: terminating separator
5186 Terminating separator: http://example.com/thing,
5188 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5193 External links: intervening separator
5195 Intervening separator: http://example.com/1,2,3
5197 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5202 External links: old bug with URL in query
5204 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5206 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5211 External links: old URL-in-URL bug, mixed protocols
5213 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5215 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5219 # Since Parsoid is starting to emit canonical wikitext for links,
5220 # [http://example.com http://example.com] will not RT back to that
5223 External links: URL in text
5227 URL in text: [http://example.com http://example.com]
5229 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5232 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5236 External links: Clickable images
5238 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5240 <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>
5243 <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>
5247 External links: raw ampersand
5249 Old & use: http://x&y
5251 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5256 External links: encoded ampersand
5258 Old & use: http://x&y
5260 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5263 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5267 External links: encoded equals (T8102)
5269 http://example.com/?foo=bar
5271 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5274 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5278 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5279 ## does it number them. As discussed in T55505, we can identify
5280 ## autonumbered links via CSS.
5284 External links: [raw ampersand]
5286 Old & use: [http://x&y]
5288 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5291 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5294 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5295 # mode will return the [raw ampersand] wikitext
5297 External links: [encoded ampersand]
5299 parsoid=wt2html,wt2wt,html2html
5301 Old & use: [http://x&y]
5303 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5306 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5310 External links: [raw equals]
5312 [http://example.com/?foo=bar]
5314 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5317 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5320 # note that parsoid html is identical to [raw equals] case; so html2wt
5321 # mode will return the [raw equals] wikitext
5323 External links: [encoded equals] (T8102)
5325 parsoid=wt2html,wt2wt,html2html
5327 [http://example.com/?foo=bar]
5329 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5332 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5335 # xxx parsoid strips the IDN character, so the round-trip tests will
5336 # obviously fail and are disabled. --cscott
5338 External links: [IDN ignored character reference in hostname; strip it right off]
5340 parsoid=wt2html,wt2wt,html2html
5342 [http://e‌xample.com/]
5344 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5347 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5350 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5351 # Where an external link could easily circumvent the sanitization of the text of
5352 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5353 # test demands a higher standard. That's a bit strange.
5357 # http://example.com -> [http://example.com|http://example.com]
5358 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5360 # The first example is sanitized, but the second is not. Any security benefits
5361 # from this production are trivial to circumvent. Either remove this test and
5362 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5363 # the test accordingly.
5367 # xxx parsoid strips the IDN character, so the round-trip tests will
5368 # obviously fail and are disabled. --cscott
5370 External links: IDN ignored character reference in hostname; strip it right off
5372 parsoid=wt2html,html2html
5374 http://e‌xample.com/
5376 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5379 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5383 External links: www.jpeg.org (T2554)
5387 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5391 # parsoid doesn't explicitly mark autonumbered links, see T55505
5393 External links: URL within URL (T2002)
5395 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5397 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5400 <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>
5404 T2361: URL inside bracketed URL
5406 [http://www.example.com/foo http://www.example.com/bar]
5408 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5413 T2361: URL within URL, not bracketed
5415 http://www.example.com/foo?=http://www.example.com/bar
5417 <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>
5422 T2289: ">"-token in URL-tail
5424 http://www.example.com/<hello>
5426 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5431 T2289: literal ">"-token in URL-tail
5433 http://www.example.com/<b>html</b>
5435 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5438 <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>
5442 T2289: ">"-token in bracketed URL
5444 [http://www.example.com/<hello> stuff]
5446 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5451 T2289: literal ">"-token in bracketed URL
5453 [http://www.example.com/<b>html</b> stuff]
5455 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5460 T2289: literal double quote at end of URL
5462 http://www.example.com/"hello"
5464 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5469 T2289: literal double quote in bracketed URL
5471 [http://www.example.com/"hello" stuff]
5473 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5478 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5480 [http://www.example.com test]
5482 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5487 External links: link text with spaces
5489 [http://www.example.com a b c]
5490 [http://www.example.com ''a'' ''b'']
5492 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5493 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5497 # Note edge case difference between PHP and Parsoid here.
5499 External links: wiki links within external link (T5695)
5501 parsoid=wt2html,html2html
5503 [http://example.com [[wikilink]] embedded in ext link]
5505 [http://example.com test [[wikilink]] embedded in ext link]
5507 <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>
5508 </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>
5511 <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>
5512 <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>
5516 T2787: Links with one slash after the url protocol are invalid
5520 [http:/example.com title]
5522 <p>http:/example.com
5523 </p><p>[http:/example.com title]
5528 Bracketed external links with template-generated invalid target
5530 [{{echo|http:/example.com}} title]
5532 <p>[http:/example.com title]
5536 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5538 Broken wikilinks (but not external links) prevent templates from closing
5542 [http://example.com x
5544 {{echo|[http://example.com x}}
5550 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5551 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5553 </p><p>{{echo|[[Foo}}
5556 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5557 <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>
5559 <p>{{echo|[[Foo}}</p>
5563 Wikilinks with embedded newlines are not broken
5574 <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>
5586 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5590 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5591 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5595 T4702: Mismatched <i>, <b> and <a> tags are invalid
5597 ''[http://example.com text'']
5598 [http://example.com '''text]'''
5599 ''Something [http://example.com in italic'']
5600 ''Something [http://example.com mixed''''', even bold]'''
5601 '''''Now [http://example.com both''''']
5603 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5604 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5605 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5606 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5607 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5615 http://www.example.com/?title=AT%26T
5617 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5620 <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>
5623 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5624 # % is actually legal in HTML5. Any change in output would need testing though.
5626 T6781, T7267: %25 in URL
5628 http://www.example.com/?title=100%25_Bran
5630 <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>
5633 <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>
5637 T6781, T7267: %28, %29 in URL
5639 http://www.example.com/?title=Ben-Hur_%281959_film%29
5641 <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>
5644 <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>
5649 T6781: %26 in autonumber URL
5651 [http://www.example.com/?title=AT%26T]
5653 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5656 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5660 T6781, T7267: %26 in autonumber URL
5662 [http://www.example.com/?title=100%25_Bran]
5664 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5667 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5671 T6781, T7267: %28, %29 in autonumber URL
5673 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5675 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5678 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5683 T6781: %26 in bracketed URL
5685 [http://www.example.com/?title=AT%26T link]
5687 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5690 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5694 T6781, T7267: %25 in bracketed URL
5696 [http://www.example.com/?title=100%25_Bran link]
5698 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5703 T6781, T7267: %28, %29 in bracketed URL
5705 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5707 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5710 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5714 External link containing a period in the anchor. (T65947)
5716 [//foo.org/bar#baz. bang]
5718 [//foo.org/bar. bang]
5720 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5721 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5724 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5725 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5729 External link containing a single quote. (T65947)
5733 [//foo.org/bar'baz bang]
5735 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5736 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5739 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5740 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5744 External link containing double-single-quotes in text '' (T6598 sanity check)
5746 Some [http://example.com/ pretty ''italics'' and stuff]!
5748 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5753 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5755 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5757 <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>
5761 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5763 External link containing double-single-quotes with no space separating the url from text in italics
5765 [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]].]
5767 <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>.
5770 <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>
5774 External link with comments in link text
5776 [http://www.google.com Google <!-- comment -->]
5778 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5781 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5785 External link to bare IPv4 address
5787 [http://192.168.0.1 Link]
5789 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5792 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5796 URL-encoding in URL functions (single parameter)
5798 {{localurl:Some page|amp=&}}
5800 <p>/index.php?title=Some_page&amp=&
5805 URL-encoding in URL functions (multiple parameters)
5807 {{localurl:Some page|q=?&=&}}
5809 <p>/index.php?title=Some_page&q=?&amp=&
5816 http://example.com/index.php?foozoid%5B%5D=bar
5818 http://example.com/index.php?foozoid[]=bar
5820 <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>
5821 </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>
5824 <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>
5826 <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>
5830 IPv6 urls, autolink format (T23261)
5832 http://[2404:130:0:1000::187:2]/index.php
5834 Examples from RFC 2373, section 2.2:
5836 *http://[1080::8:800:200C:417A]/unicast
5837 *http://[FF01::101]/multicast
5838 *http://[::1]/loopback
5839 *http://[::]/unspecified
5840 *http://[::13.1.68.3]/ipv4compat
5841 *http://[::FFFF:129.144.52.38]/ipv4compat
5843 Examples from RFC 2732, section 2:
5845 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5846 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5847 *http://[3ffe:2a00:100:7031::1]
5848 *http://[1080::8:800:200C:417A]/foo
5849 *http://[::192.9.5.5]/ipng
5850 *http://[::FFFF:129.144.52.38]:80/index.html
5851 *http://[2010:836B:4179::836B:4179]
5853 <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>
5854 </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:
5856 <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>
5857 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5858 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5859 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5860 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5861 <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>
5862 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5864 <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>
5865 <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>
5866 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5867 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5868 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5869 <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>
5870 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5873 <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>
5875 <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>
5876 <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>
5877 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5878 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5879 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5880 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5881 <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>
5883 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5884 <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>
5885 <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>
5886 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5887 <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>
5888 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5889 <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>
5890 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5894 IPv6 urls, bracketed format (T23261)
5896 [http://[2404:130:0:1000::187:2]/index.php test]
5898 Examples from RFC 2373, section 2.2:
5900 *[http://[1080::8:800:200C:417A] unicast]
5901 *[http://[FF01::101] multicast]
5902 *[http://[::1]/ loopback]
5903 *[http://[::] unspecified]
5904 *[http://[::13.1.68.3] ipv4compat]
5905 *[http://[::FFFF:129.144.52.38] ipv4compat]
5907 Examples from RFC 2732, section 2:
5909 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5910 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5911 *[http://[3ffe:2a00:100:7031::1] 3]
5912 *[http://[1080::8:800:200C:417A]/foo 4]
5913 *[http://[::192.9.5.5]/ipng 5]
5914 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5915 *[http://[2010:836B:4179::836B:4179] 7]
5917 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5918 </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:
5920 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5921 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5922 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5923 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5924 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5925 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5926 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5928 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5929 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5930 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5931 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5932 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5933 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5934 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5937 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5939 <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>
5940 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5941 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5942 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5943 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5944 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5945 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5947 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5948 <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>
5949 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5950 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5951 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5952 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5953 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5954 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5958 Non-extlinks in brackets
5967 [{{echo|foo}} ''bar'']
5968 [{{echo|foo}}l's] errand
5969 [{{echo|foo}}l's errand]
5971 [url=http://example.com]
5972 [http:// bare protocols don't count]
5985 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5986 [http:// bare protocols don't count]
5994 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5995 [<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]
5996 [<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>]
5997 [<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
5998 [<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]
5999 [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>]
6000 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6001 [http:// bare protocols don't count]</p>
6005 Percent encoding in external links
6007 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6009 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6012 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6016 Use url link syntax for links where the content is equal the link target
6020 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6023 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6027 Parenthesis in external links, especially URL links
6031 http://example.com/test)
6033 http://example.com/(test)
6035 http://example.com/((test)
6037 (http://example.com/(test))
6039 (http://example.com/(test)))))
6041 http://example.com/a)b
6043 [http://example.com) foo]
6045 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6046 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6047 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6048 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6049 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6050 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6051 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6052 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6055 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6056 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6057 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6058 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6059 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6060 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6061 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6062 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6066 Parenthesis in external links, w/ transclusion or comment
6068 (http://example.com/{{echo|hi}})
6070 (http://example.com<!-- hi -->)
6072 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6073 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6076 <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>
6078 <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>
6082 Serialize <a> tags with invalid link targets as plain text
6084 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6086 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6087 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6088 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6089 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6092 <nowiki>*</nowiki>text
6093 <nowiki>[[foo]]</nowiki>
6094 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6098 mw:ExtLink -vs- mw:WikiLink (T94723)
6102 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6103 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6104 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6105 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6107 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6108 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6116 [[:en:European_Robin|European Robin]]
6117 [[:en:European_Robin|European Robin]]
6121 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6125 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6127 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6138 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6140 Normal text. '''''Bold italic text.''''' Normal text.
6142 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6143 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6148 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6149 # parser strips. The wikitext contains just the first half of the bold
6152 Unclosed and unmatched quotes
6154 '''''Bold italic text '''with bold deactivated''' in between.'''''
6156 '''''Bold italic text ''with italic deactivated'' in between.'''''
6160 ..spanning two paragraphs (should not work).'''
6162 '''Bold tag left open
6164 ''Italic tag left open
6168 <!-- Unmatching number of opening, closing tags: -->
6169 '''This year''''s election ''should'' beat '''last year''''s.
6171 ''Tom'''s car is bigger than ''Susan'''s.
6173 Plain ''italic'''s plain
6175 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6176 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6177 </p><p><b>Bold text..</b>
6178 </p><p>..spanning two paragraphs (should not work).
6179 </p><p><b>Bold tag left open</b>
6180 </p><p><i>Italic tag left open</i>
6182 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6183 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6184 </p><p>Plain <i>italic'</i>s plain
6187 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6188 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6189 </p><p><b>Bold text..</b>
6190 </p><p>..spanning two paragraphs (should not work).<b></b>
6191 </p><p><b>Bold tag left open</b>
6192 </p><p><i>Italic tag left open</i>
6195 <!-- Unmatching number of opening, closing tags: -->
6196 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6197 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6198 </p><p>Plain <i>italic'</i>s plain
6205 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6208 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6209 # is the bare minimum required by the spec, see:
6210 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6211 # Parsoid team replies: empty table tags are legal in HTML5
6213 A table with no data.
6226 A table with stray table end tags on start tag line (wt2html)
6230 {|style="color: red;"|}
6232 {|style="color: red;" |}
6236 {|style="color: red;"|} id="foo"
6240 {|style="color: red;" |} id="foo"
6244 <table style="color: red;"></table>
6246 <table style="color: red;">
6252 <table style="color: red;" id="foo">
6258 <table style="color: red;" id="foo">
6267 A table with no data (take 2)
6275 # A table with nothing but a caption is invalid XHTML, we might want to render
6276 # this as <p>caption</p>
6277 # Parsoid team replies: table with only a caption is legal in HTML5
6279 A table with nothing but a caption
6287 </caption><tr><td></td></tr></table>
6290 <table><caption>caption</caption></table>
6294 A table with caption with default-spaced attributes and a table row
6297 |+ style="color: red;" |caption1
6303 <caption style="color: red;">caption1
6312 A table with captions with non-default spaced attributes and a table row
6315 |+style="color: red;"|caption2
6316 |+ style="color: red;"|caption3
6322 <caption style="color: red;">caption2
6324 <caption style="color: red;">caption3
6333 Table td-cell syntax variations
6338 |style='color:red;'|baz
6339 |style='color:red;'||baz
6346 <td>foo bar foo</td>
6349 <td style="color:red;">baz
6351 <td>style='color:red;'</td>
6379 Simple table but with multiple dashes for row wikitext
6398 Multiplication table
6400 {| border="1" cellpadding="2"
6401 |+Multiplication table
6421 <table border="1" cellpadding="2">
6422 <caption>Multiplication table
6469 Accept "||" in table headings
6484 Accept "!!" in table data
6498 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6503 Accept "||" in indented table headings
6513 </th></tr></table></dd></dl>
6518 Accept "!!" in templates
6532 <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>
6536 Accept "!!" in table headings after newline
6553 <p>b!!c</p></th></tr>
6558 Accept "!!" in table data of mixed wikitext / html syntax
6562 <tr><td>b!!c</td></tr>
6568 </th></tr><tr><td>b!!c</td></tr>
6572 <tbody><tr><th>a</th></tr>
6573 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6578 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6595 Accept "| !" at start of line in tables (ignore !-attribute)
6599 |!style="color:red"|bar
6611 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 +/-
6615 |style='color:red;'|+1
6616 |style='color:blue;'|-1
6628 <td style="color:red;">+1
6630 <td style="color:blue;">-1
6654 |rowspan=2|Cell 2, row 1 (and 2)
6665 <td rowspan="2">Cell 2, row 1 (and 2)
6683 {| bgcolor=#ABCDEF border=2
6688 |the original table again
6696 <table bgcolor="#ABCDEF" border="2">
6704 <td>the original table again
6710 Invalid attributes in table cell (T3830)
6724 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6728 |title="foo<nowiki>|</nowiki>" |bar
6729 |title="foo<nowiki>|</nowiki>" bar
6736 <td title="foo|">bar
6738 <td>title="foo|" bar
6743 <tbody><tr><td title="foo">bar</td>
6744 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6745 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6749 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6750 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6751 # *2wt modes will fail.
6753 Table security: embedded pipes
6755 parsoid=wt2html,html2html
6758 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6762 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6763 <td>]" onmouseover="alert(document.cookie)">test
6771 <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>
6775 Element attributes with double ! should not be broken up by <th>
6778 !hi <div class="!!">ha</div> ho
6783 <th>hi <div class="!!">ha</div> ho
6788 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6793 ! and || in element attributes should not be parsed as <th>/<td>
6796 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6801 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6806 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6810 # FIXME: The output seems broken. Filed as T110268.
6812 ! and || in td attributes should not be parsed as <th>/<td>
6817 |style="color: red !important;" data-contrived="put this here ||"|foo
6822 <td>style="color: red !important;" data-contrived="put this here</td>
6828 <tbody><tr><td>style="color: red !important;" data-contrived="put this here</td><td data-parsoid='{"stx":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'>foo</td></tr>
6833 Break on | in element attribute in template
6835 parsoid=wt2html,html2html
6837 {{echo|1=<div class="hi|ho">ha</div>}}
6839 <p>ho">ha</div>
6842 <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>
6846 Break on | in element attribute name in template
6848 {{echo|<div cla|ss="hiho">ha</div>}}
6850 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"ss","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div cla"},"ss":{"wt":"\"hiho\">ha</div>"}},"i":0}}]}'><div cla</p>
6854 Don't break on | in extension attribute in template
6856 {{echo|<ref name="hi|ho">ha</ref>}}
6860 <p><sup about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
6862 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./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>
6865 ## We don't support roundtripping of these attributes in Parsoid.
6866 ## Selective serialization takes care of preventing dirty diffs.
6867 ## But, on edits, we dirty-diff the invalid attribute text.
6869 Invalid text in table attributes should be discarded
6873 {| <span>boo</span> style='border:1px solid black'
6874 | <span>boo</span> style='color:blue' |1
6875 |<span>boo</span> style='color:blue'|2
6878 <table style="border:1px solid black">
6880 <td style="color:blue">1
6882 <td style="color:blue">2
6886 <table style="border:1px solid black">
6888 <td style="color:blue">1</td>
6889 <td style="color:blue">2</td>
6895 Invalid text in table attributes should be preserved by selective serializer
6898 "modes": ["selser"],
6900 ["td:first-child", "text", "abc"],
6901 ["td + td", "text", "xyz"]
6905 {| <span>boo</span> style='border:1px solid black'
6906 | <span>boo</span> style='color:blue' | 1
6907 |<span>boo</span> style='color:blue'| 2
6910 {| <span>boo</span> style='border:1px solid black'
6911 | <span>boo</span> style='color:blue' | abc
6912 |<span>boo</span> style='color:blue'| xyz
6917 1. Template-generated table cell attributes and cell content
6922 || {{table_attribs_5}}
6923 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6924 |align=center {{table_attribs}}
6925 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6930 <td style="color:red;">Foo
6932 <td style="color:red;">Foo
6934 <td>style="color:red;"</td>
6937 <td style="color:red;">Foo
6939 <td align="center" style="color:red;">Foo
6941 <td align="center" style="color:red;">Foo
6947 2. Template-generated table cell attributes and cell content
6950 |{{table_attribs_2}}
6955 <td style="color:red;">Foo
6963 <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>
6964 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6969 3. Template-generated table cell attributes and cell content
6972 !align=center {{table_header_cells}}
6974 |align=center {{table_cells}}
6979 <th align="center" style="color:red;">Foo</th>
6980 <th style="color:red;"><i>Bar</i></th>
6981 <th style="color:brown;"><i>Foo</i> and Baz
6984 <td align="center" style="color:red;">Foo</td>
6985 <td style="color:red;"><i>Bar</i></td>
6986 <td style="color:brown;"><i>Foo</i> and Baz
6991 <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>
6992 <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>
6997 4. Template-generated table cell attributes and cell content inside a templated table
7000 !align=center {{table_header_cells}}
7002 |align=center {{table_cells}}
7007 <th align="center" style="color:red;">Foo</th>
7008 <th style="color:red;"><i>Bar</i></th>
7009 <th style="color:brown;"><i>Foo</i> and Baz
7012 <td align="center" style="color:red;">Foo</td>
7013 <td style="color:red;"><i>Bar</i></td>
7014 <td style="color:brown;"><i>Foo</i> and Baz
7018 <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}}]}'>
7019 <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>
7021 <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>
7025 ## Edge case fix to prevent future regressions
7027 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7030 |{{table_attribs_7}}
7035 <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>
7037 <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>
7041 Table with row followed by newlines and table heading
7043 parsoid=wt2html,html2html
7061 Table with empty line following the start tag
7063 parsoid=wt2html,html2html
7081 Table attributes with empty value
7083 parsoid=wt2html,html2html
7096 <tbody><tr><td style="">hello</td></tr>
7101 Wikitext table with a lot of comments
7124 Wikitext table comments represented in parsoid dom
7126 {|<!--c1--><!--c2-->
7135 </td></tr></tbody></table>
7137 <table><!--c1--><!--c2-->
7138 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7139 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7144 Wikitext table with double-line table cell
7161 Table cell with a single comment
7178 Table-cell after a comment-only-empty-line
7195 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7197 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7203 Build table with {{!}}
7205 {{{!}} class="wikitable"
7208 {{!}}- style="color:red;"
7209 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7212 <table class="wikitable">
7218 <tr style="color:red;">
7220 <td style="color:red;">second data
7226 Build table with pipe as data
7228 {| class="wikitable"
7231 |- style="color:red;"
7232 |data|| style="color:red;" |second data
7234 | style="color:red;" |data with | || style="color:red;" | second data with |
7236 ||data with | |||second data with |
7239 <table class="wikitable">
7245 <tr style="color:red;">
7247 <td style="color:red;">second data
7250 <td style="color:red;">data with |</td>
7251 <td style="color:red;">second data with |
7254 <td>data with |</td>
7255 <td>second data with |
7261 Build table with wikilink
7263 {| class="wikitable"
7264 !header||second header
7265 |- style="color:red;"
7266 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7268 |data||second data [[Main Page|link|text with pipe]]
7271 <table class="wikitable">
7276 <tr style="color:red;">
7277 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7278 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7282 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7287 # The expected HTML structure in this test is debatable. The PHP parser does
7288 # not parse this kind of table at all. The main focus for Parsoid is on
7289 # round-tripping, so this output is ok for now. TODO: revisit!
7291 Wikitext table with html-syntax row
7301 <td>foo</td></tr></tbody></table>
7305 Fostered content in tables: Plain text
7307 parsoid=wt2html,html2html
7325 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7328 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7332 Fostered content in tables: Lists
7334 parsoid=wt2html,html2html
7347 <ul><li>a</li></ul><table>
7352 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7353 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7355 </tr></tbody></table>
7359 Template generated table cell with attributes
7363 {{table_attribs_4}} ||a||b
7369 <td style="background-color:#DC241f;" width="10px"></td>
7372 </td></tr></tbody></table>
7375 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7376 <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>
7380 Parsoid: Round-trip tables directly followed by content (T53219)
7382 parsoid=wt2html,wt2wt
7395 </td></tr></tbody></table><p> bar
7399 </td></tr></tbody></table><p><b>quux</b>
7404 Parsoid: Default to a newline after tables in new content (T53219)
7409 <tr><td>foo</td></tr></tbody></table> bar
7411 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7416 <nowiki> </nowiki>bar
7424 Parsoid: Row-syntax table headings followed by comment & table cells
7426 parsoid=wt2html,wt2wt
7430 <!-- foo --> ||baz||quux
7444 <tbody><tr><th>foo</th><th>bar
7445 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7450 Parsoid: Recover better from broken table attributes
7464 </td></tr></tbody></table>
7469 <p>foo</p></td></tr>
7474 Tables: Digest broken attributes on table and tr tag
7485 <tr class='mw-empty-elt'></tr>
7486 <tr class='mw-empty-elt'></tr>
7491 Table with missing opening <tr> tag
7493 parsoid=wt2html,wt2wt
7501 <tbody><tr><td>foo</td>
7506 # T137406: Whitespace in the HTML
7508 1. Generate correct wikitext for tables with thead/tbody/tfoot
7513 <caption>Test</caption>
7575 </td></tr></tbody></table>
7578 # T137406: No whitespace in the HTML
7580 2. Generate correct wikitext for tables with thead/tbody/tfoot
7584 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7594 Wikitext tables can be nested inside HTML tables
7598 <table data-parsoid='{"stx":"html"}'>
7601 <tr><td>foo</td></tr>
7619 Plain link, capitalized
7623 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7628 Plain link, uncapitalized
7632 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7639 [[Main Page|The Main Page]]
7641 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7646 Piped link with comment in link text
7648 [[Main Page|The Main<!--front--> Page]]
7650 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7655 Piped link with multiple pipe characters in link text
7657 [[Main Page||The|Main|Page|]]
7659 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7662 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7666 Piped link with no link text
7668 [[Thomas Bek (bishop of St David's)|]]
7670 <p>[[Thomas Bek (bishop of St David's)|]]
7673 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7677 Piped link with empty link text
7679 [[Main Page|<nowiki/>]] - empty nowiki
7680 [[Main Page| ]] - empty space
7681 [[Main Page| ]] - empty non breaking space
7683 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7684 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7685 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7688 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7689 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7690 <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>
7698 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7703 Broken link with fragment
7705 [[Zigzagzogzagzig#zug]]
7707 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7712 Special page link with fragment
7714 [[Special:Version#anchor]]
7716 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7721 Nonexistent special page link with fragment
7723 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7725 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7732 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7734 <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>
7741 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7743 <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>!!!
7754 T45661: Piped links with identical prefixes
7756 [[prefixed article|prefixed articles with spaces]]
7758 [[prefixed article|prefixed articlesaoeu]]
7760 [[Main Page|Main Page test]]
7762 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7763 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7764 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7770 Link with HTML entity in suffix / tail
7772 [[Main Page]]", [[Main Page]]a
7774 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7777 <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>
7781 Link with 3 brackets
7792 Link with 4 brackets
7796 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7801 Piped link with 3 brackets
7803 [[[main page|the main page]]]
7805 <p>[[[main page|the main page]]]
7810 Piped link with extlink-like text
7813 [[Main Page|This is a [bar]]]
7816 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7817 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7818 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7821 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7822 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7823 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7827 Link with multiple pipes
7829 [[Main Page|The|Main|Page]]
7831 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7836 Anchor containing a #. (T65430)
7838 wgFragmentMode=[ 'html5', 'legacy' ]
7840 [[Main Page#And#Link]]
7842 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7845 <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>
7851 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7853 <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>
7858 Link with space in namespace
7860 [[User talk:Foo bar]]
7862 <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>
7867 MemoryAlpha:AlphaTest
7869 This is an article in the MemoryAlpha namespace
7870 (which shadows the memoryalpha interwiki link).
7874 Namespace takes precedence over interwiki link (T53680)
7876 [[MemoryAlpha:AlphaTest]]
7878 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7882 # The previous test doesn't work correctly in html2*, due to not recognizing the
7883 # link as an internal one. This one checks for the correct behavior.
7885 Link to namespace preferred over interwiki with correct rel attribute
7887 parsoid=html2wt,html2html
7889 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7891 [[MemoryAlpha:AlphaTest]]
7895 Piped link to namespace
7897 [[Meta:Disclaimers|The disclaimers]]
7899 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7906 [[Usually caused by a typo (oops}]]
7908 <p>[[Usually caused by a typo (oops}]]
7915 Just a test of an article title containing a percent.
7919 Link containing % (not as a hex sequence)
7922 [[7% Solution|7%25 Solution]]
7924 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7925 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7928 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7929 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7932 # note that the parsoid HTML is identical to the previous test output,
7933 # so the previous test ensures that the html2wt mode will generate the
7934 # "not as a hex sequence" wikitext.
7936 Link containing % as a single hex sequence interpreted to char
7938 parsoid=wt2wt,wt2html,html2html
7941 [[7%25 Solution|7%25 Solution]]
7943 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7944 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7947 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7948 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7952 Link containing % as a double hex sequence interpreted to hex sequence
7956 <p>[[7%2525 Solution]]
7960 ## Example for such a section: == < ==
7962 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7964 wgFragmentMode=[ 'html5', 'legacy' ]
7966 [[%23%3c]][[%23%3e]]
7968 <p><a href="#<">#<</a><a href="#>">#></a>
7971 <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>
7974 ## Example for such a section: == < ==
7976 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7978 wgFragmentMode=[ 'legacy' ]
7980 [[%23%3c]][[%23%3e]]
7982 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7987 Link containing "<#" and ">#" as a hex sequences
7989 [[%3c%23]][[%3e%23]]
7991 <p>[[%3c%23]][[%3e%23]]
7996 Link containing an equals sign
7998 [[Special:BookSources/isbn=4-00-026157-6]]
8000 <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>
8003 <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>
8009 Just a test of an article title containing a tilde.
8012 # note that links containing signatures, like [[Foo~~~~]], are
8013 # massaged by the pre-save transform (PST) and so the tildes are never
8014 # seen by the parser.
8016 Link containing a tilde
8020 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8023 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8027 Link containing double-single-quotes '' (T6598)
8029 [[Lista d''e paise d''o munno]]
8031 <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>
8034 <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>
8038 Link containing double quotes and spaces
8042 <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>
8045 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8049 File containing double quotes and spaces
8051 [[File:Cool "Gator".png]]
8053 <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>
8057 Redirect containing double quotes and spaces
8059 #REDIRECT [[Cool "Gator"]]
8061 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8065 Link containing double-single-quotes '' in text (T6598 sanity check)
8067 Some [[Link|pretty ''italics'' and stuff]]!
8069 <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>!
8072 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8076 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8078 ''Some [[Link|pretty ''italics'' and stuff]]!''
8080 <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>
8085 Link with double quotes in title part (literal) and alternate part (interpreted)
8087 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8091 [[''Pentecoste''|Pentecoste]]
8093 [[''Pentecoste''|''Pentecoste'']]
8095 <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>
8096 </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>
8097 </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>
8098 </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>
8101 <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>
8102 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8103 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8104 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8108 Broken image links with HTML captions (T41700)
8110 [[File:Nonexistent|<script></script>]]
8111 [[File:Nonexistent|100x100px|<script></script>]]
8112 [[File:Nonexistent|<]]
8113 [[File:Nonexistent|a<i>b</i>c]]
8115 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8116 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8117 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8118 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8121 <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>
8122 <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>
8123 <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>
8124 <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>
8130 [[http://www.example.com]]
8132 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8135 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8139 Plain link to URL with link text
8141 [[http://www.example.com Link text]]
8143 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8148 Plain link to protocol-relative URL
8150 [[//www.example.com]]
8152 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8155 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8159 Plain link to protocol-relative URL with link text
8161 [[//www.example.com Link text]]
8163 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8168 Plain link to page with question mark in title
8174 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8175 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8179 # I'm fairly sure the expected result here is wrong.
8180 # We want these to be URL links, not pseudo-pages with URLs for titles....
8181 # However the current output is also pretty screwy.
8184 # I'm changing it to match the current output--it arguably makes more
8185 # sense in the light of the test above. Old expected result was:
8186 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8188 # But I think this test is bordering on "garbage in, garbage out" anyway.
8193 Piped link to URL: [[http://www.example.com|an example URL]]
8195 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8198 <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>
8202 Plain link in template argument
8206 {{echo|[http://www.example.com |123]}}
8208 {{echo|[[http://www.example.com |123]]}}
8210 {{echo|[[http://www.example.com |123]}}
8212 {{echo|[http://www.example.com |123]]}}
8214 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8215 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8216 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8217 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8220 <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>
8222 <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>
8224 <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>
8226 <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>
8230 T2002: [[page|http://url/]] should link to page, not http://url/
8232 [[Main Page|http://url/]]
8234 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8237 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8240 # Parsoid does not mark self-links, by design.
8242 T2337: Escaped self-links should be bold
8246 [[Bug462]] [[Bug462]]
8248 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8251 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8255 Self-link to section should not be bold
8259 [[Main Page#section]]
8261 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8272 Self-link to numeric title
8278 <p><a class="mw-selflink selflink">0</a>
8283 Link to numeric-equivalent title
8289 <p><a href="/wiki/00" title="00">00</a>
8294 <nowiki> inside a link
8296 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8298 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8303 Non-breaking spaces in title
8305 [[ Main Page ]]
8307 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8311 # Add new article for the test below so that it doesn't red-link
8319 Multiple spaces in titles should normalize to a single underscore
8321 parsoid=wt2html,wt2wt
8327 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8328 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8329 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8332 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8333 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8334 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8339 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8345 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8350 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8356 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8361 Internal link with en linktrail: no apostrophes (T29473)
8367 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8372 Internal link with ca linktrail with apostrophes (T29473)
8378 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8383 Internal link with kaa linktrail with apostrophes (T29473)
8389 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8394 Link with multiple ":" in a subpage-supporting namespace (T65636)
8396 [[User:Foo/Test/63636:Bar|Test]]
8398 <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>
8401 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8404 ## Mainly a sanity check for Parsoid
8406 Handle title parsing for subpages
8426 Link to a subpage from a namespace other than main
8433 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8436 <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>
8440 Ensure that transclusion titles are not url-decoded
8442 subpage title=[[Test]]
8445 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8447 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8450 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8454 Purely hash wikilink
8456 title=[[User:Test/123]]
8461 <p><a href="#a">b</a>
8464 <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>
8468 Serialization of purely hash wikilink
8470 title=[[User:Test/123]]
8474 <p><a href="#a">[[</a></p>
8476 [[#a|<nowiki>[[</nowiki>]]
8478 <p><a href="#a">[[</a>
8483 1. Interaction of linktrail and template encapsulation
8487 <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>
8491 2. Interaction of linktrail and template encapsulation
8495 {{echo|Some [[Fool]]}}s
8497 <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>
8501 3. Interaction of linktrail and template encapsulation
8505 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8507 <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>
8517 Internal link with is link prefix
8521 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8523 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8534 Internal link with is link trail and link prefix
8538 [[mótmælendatrú|xxx]]ar
8540 mótmælenda[[söfnuður]]
8541 mótmælenda[[söfnuður|söfnuðir]]
8542 mótmælenda[[söfnuður|söfnuðir]]xxx
8544 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8545 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8546 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8547 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8548 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8553 Parsoid link trail escaping
8555 parsoid=html2wt,html2html
8557 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8563 Parsoid link prefix escaping
8566 parsoid=html2wt,html2html
8568 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8570 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8574 Parsoid link bracket escaping
8576 parsoid=html2wt,html2html
8578 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8579 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8580 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8581 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8582 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8583 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8591 [[[<nowiki/>[[Test]]]]]
8595 [[[[[<nowiki/>[[Test]]]]]]]
8599 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8607 [http://wp.org ''foo'']
8609 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8610 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8611 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8612 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8617 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8619 [[Foo|{{echo|a}} b {{echo|c}}]]
8621 <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>
8625 Link with angle bracket after anchor
8627 wgFragmentMode=[ 'html5', 'legacy' ]
8631 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8634 <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>
8638 Link with angle bracket after anchor (legacy)
8640 wgFragmentMode=[ 'legacy' ]
8644 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8649 ### Interwiki links (see maintenance/interwiki.sql)
8653 Inline interwiki link
8655 parsoid=wt2html,wt2wt,html2html
8657 [[MeatBall:SoftSecurity]]
8659 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8662 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8666 Inline interwiki link with empty title (T4372)
8668 parsoid=wt2html,wt2wt,html2html
8672 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8675 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8678 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8680 Interwiki link encoding conversion (T3636)
8682 parsoid=wt2html,wt2wt
8684 *[[Wikipedia:ro:Olteniţa]]
8685 *[[Wikipedia:ro:Olteniţa]]
8687 <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>
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></ul>
8692 <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>
8693 <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>
8697 <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 <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>
8703 Interwiki link with fragment (T4130)
8705 [[MeatBall:SoftSecurity#foo]]
8707 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8712 Link scenarios with escaped fragments
8714 wgFragmentMode=[ 'html5', 'legacy' ]
8717 [[Foo#Is this great?]]
8718 [[meatball:Foo#Is this great?]]
8720 <p><a href="#Is_this_great?">#Is this great?</a>
8721 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8722 <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>
8725 <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>
8726 <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>
8727 <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>
8731 Link scenarios with escaped fragments (legacy)
8733 wgFragmentMode=[ 'legacy' ]
8736 [[Foo#Is this great?]]
8737 [[meatball:Foo#Is this great?]]
8739 <p><a href="#Is_this_great.3F">#Is this great?</a>
8740 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8741 <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>
8745 # Ideally the wikipedia: prefix here should be proto-relative too
8746 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8747 # define the 'en' prefix, and originally the test used 'wikipedia',
8748 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8751 Different interwiki prefixes mapping to the same URL
8759 [[:wikipedia:Foo|Foo]]
8761 [[wikipedia:en:Foo]]
8763 [[:wikipedia:en:Foo]]
8767 <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>
8769 <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>
8771 <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>
8773 <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>
8775 <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>
8777 <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>
8779 <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>
8783 Interwiki links that cannot be represented in wiki syntax
8786 [[meatball:ok#foo|ok with fragment]]
8787 [[meatball:ok_as_well?|ok ending with ? mark]]
8788 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8789 [http://de.wikipedia.org/wiki/#foo is just fragment]
8792 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8793 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8794 <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>
8795 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8796 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8799 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8800 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8801 <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>
8802 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8803 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8807 Interwiki links: trail
8809 [[wikipedia:Foo|Ba]]r
8811 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8814 <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>
8818 Local interwiki link
8820 parsoid=wt2html,wt2wt,html2html
8822 [[local:Template:Foo]]
8824 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8827 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8830 # Parsoid does not mark self-links, by design.
8832 Local interwiki link: self-link to current page
8835 parsoid=wt2html,wt2wt,html2html
8839 <p><a class="mw-selflink selflink">local:Main Page</a>
8842 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8846 Local interwiki link: prefix only (T66167)
8848 parsoid=wt2html,wt2wt,html2html
8852 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8855 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8859 Local interwiki link: with additional interwiki prefix (T63357)
8861 parsoid=wt2html,wt2wt,html2html
8863 [[local:meatball:Hello]]
8865 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8868 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8872 Multiple local interwiki link prefixes
8874 [[local:local:local:local:mi:local:Foo]]
8876 parsoid=wt2html,wt2wt,html2html
8878 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8881 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8885 ### Interlanguage links
8886 ### Language links (so that searching for '### language' matches..)
8898 <p>Blah blah blah</p>
8899 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8902 ## parsoid html2wt will lose the space variations
8904 Interlanguage link with spacing
8906 parsoid=wt2html,wt2wt,html2html
8914 <p>Blah blah blah</p>
8915 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8919 Double interlanguage link
8928 <p>Blah blah blah</p>
8929 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8930 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8933 ## parsoid html2wt will lose the space variations
8935 Interlanguage link variations
8937 parsoid=wt2html,wt2wt,html2html
8947 <p>Blah blah blah</p>
8948 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8949 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8950 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8954 Escaping of interlanguage links (T129218, T156308)
8958 [[ : zh : Chinese ]]
8961 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8962 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8966 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8967 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8971 Multiple colons escaping interlanguage links
8979 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8984 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8986 [[:::es:Spanish]]</p>
8989 ## parsoid html2wt will normalize the space to _
8991 Space and question mark encoding in interlanguage links (T95473)
8993 parsoid=wt2html,wt2wt,html2html
9001 <p>Blah blah blah</p>
9002 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9006 Interlanguage link, with prefix links
9016 <p>Blah blah blah</p>
9017 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9021 Double interlanguage link, with prefix links (T10897)
9032 <p>Blah blah blah</p>
9033 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9034 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9038 "Extra" interlanguage links (T34189 / gerrit 111390)
9046 <p>Blah blah blah</p>
9047 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9050 ## PHP parser tests script needs an update
9051 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9053 Language links render as inline links if $wgInterwikiMagic=false
9055 wgInterwikiMagic=false
9056 parsoid=wt2html,wt2wt,html2html
9061 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9064 ## PHP parser tests script needs an update
9065 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9067 Language links render as inline links in the Talk namespace
9070 parsoid=wt2html,wt2wt,html2html
9075 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9079 Parsoid-specific test: Wikilinks with should RT properly
9085 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9090 Parsoid T55221: Wikilinks should be properly entity-escaped
9092 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9094 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9095 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9097 He&nbsp;llo [[Foo|He&nbsp;llo]]
9099 He&nbsp;llo He&nbsp;llo
9101 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9102 </p><p>He&nbsp;llo He&nbsp;llo
9106 # html2wt will fail because of title normalization without data-parsoid
9108 Parsoid: handle constructor well
9110 parsoid=wt2html,wt2wt
9116 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9117 </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>
9120 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9122 <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>
9126 Template parameter named "constructor"
9128 {{echo| constructor = |hi}}
9130 <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>
9139 # Note that `ko` isn't a known interlanguage prefix
9141 Parsoid: recognize interlanguage links without a target page
9151 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9153 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9156 # Note that `ko` isn't a known interwiki prefix
9158 Parsoid: recognize interwiki links without a target page
9160 parsoid=wt2html,wt2wt,html2html
9166 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9167 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9170 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9171 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9175 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9179 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9182 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9186 Interlanguage link with preceding local interwiki link (T70085)
9188 parsoid=wt2html,wt2wt,html2html
9191 [[local:es:Spanish]]
9194 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9198 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9202 Looks like an interlanguage link, but is actually a local interwiki
9204 parsoid=wt2html,wt2wt,html2html
9210 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9214 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9218 ### Redirects, Parsoid-only
9222 1. Simple redirect to page
9224 #REDIRECT [[Main Page]]
9226 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9230 2. Other redirect variants
9232 #REDIRECT [[Main_Page]]
9234 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9237 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9238 # This tests the Parsoid bail-out code.
9240 3. Other redirect variants
9244 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9246 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9250 4. Redirect to a templated destination
9252 #REDIRECT [[{{echo|Foo}}bar]]
9254 <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"}]]}'/>
9260 parsoid=wt2html,wt2wt
9265 <li>REDIRECT [[]]</li></ol>
9269 Optional colon in #REDIRECT
9271 # the colon is archaic syntax. we support it for wt2html, but we
9272 # don't care that it roundtrips back to the modern syntax.
9273 parsoid=wt2html,html2html
9275 #REDIRECT:[[Main Page]]
9277 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9281 Whitespace in #REDIRECT with optional colon
9283 # the colon and gratuitous whitespace is archaic syntax. we support
9284 # it for wt2html, but we don't care that it roundtrips back to the
9285 # modern syntax (without extra whitespace)
9286 parsoid=wt2html,html2html
9293 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9297 Piped link in #REDIRECT
9299 # content after piped link is ignored. we support this syntax,
9300 # but don't care that the piped link is lost when we roundtrip this.
9303 #REDIRECT [[Main Page|bar]]
9305 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9309 Redirect to category (T104502)
9311 parsoid=wt2html,wt2wt
9313 #REDIRECT [[Category:Foo]]
9315 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9319 Redirect to category with URL encoding (T104502)
9323 #REDIRECT [[Category%3AFoo]]
9325 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9329 Redirect to category page
9331 #REDIRECT [[:Category:Foo]]
9333 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9337 Redirect to image page (1)
9339 #REDIRECT [[File:Wiki.png]]
9341 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9345 Redirect to image page (2)
9347 #REDIRECT [[Image:Wiki.png]]
9349 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9352 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9353 # Next test confirms this.
9355 Redirect to language (1) (T104918)
9357 parsoid=wt2html,wt2wt,html2html
9359 #REDIRECT [[en:File:Wiki.png]]
9361 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9365 Redirect to language (2) (T104918)
9367 #REDIRECT [[:en:File:Wiki.png]]
9369 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9373 Redirect to interwiki (T104918)
9375 #REDIRECT [[meatball:File:Wiki.png]]
9377 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9381 Non-English #REDIRECT
9385 #TILVÍSUN [[Main Page]]
9387 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9391 Redirect syntax under text isn't considered a redirect
9395 #redirect [[Main Page]]
9398 <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>
9406 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9413 Redirect followed by block on the same line
9417 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9419 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9423 Redirect followed by a newline
9425 #REDIRECT [[Main Page]]
9428 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9433 Redirect followed by multiple newlines
9435 #REDIRECT [[Main Page]]
9440 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9447 Drop duplicate redirects
9451 <link rel="mw:PageProp/redirect" href="./Foo"/>
9452 <link rel="mw:PageProp/redirect" href="./Bar"/>
9453 <link rel="mw:PageProp/redirect" href="./Baz"/>
9472 Broken br tag sanitization
9480 # TODO: Fix html2html mode (T53055)!
9482 Parsoid: Broken br tag recognition
9496 Incorrecly removing closing slashes from correctly formed XHTML
9498 <br style="clear:both;" />
9500 <p><br style="clear:both;" />
9505 Failing to transform badly formed HTML into correct XHTML
9507 <br style="clear: left;">
9508 <br style="clear: right;">
9509 <br style="clear: both;">
9511 <p><br style="clear: left;" />
9512 <br style="clear: right;" />
9513 <br style="clear: both;" />
9517 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9518 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9520 Handling html with a div self-closing tag
9529 <p><div title />
9533 <p><div title=bar />
9534 <div title=bar/>
9536 <div title="bar/"></div>
9540 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9541 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9542 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9543 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9544 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9545 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9549 Handling html with a br self-closing tag
9576 Horizontal ruler (should it add that extra space?)
9585 foo </p><hr /><p> bar
9590 Horizontal ruler -- 4+ dashes render hr
9599 Horizontal ruler -- eats additional dashes on the same line
9608 Horizontal ruler -- does not collapse dashes on consecutive lines
9619 Horizontal ruler -- <4 dashes render as plain text
9628 Horizontal ruler -- Supports content following dashes on same line
9640 ### Block-level elements
9649 <ul><li>Common list</li>
9651 <li>item 3</li></ul>
9662 <ol><li>Numbered list</li>
9664 <li>item 3</li></ol>
9668 # the switch from level 3 to ordered should not introduce a newline between
9679 ***#Number on level 4
9681 **#Number on level 3
9682 **#Number on level 3
9686 #**Level 3, but ordered
9689 <ol><li>with numbers</li></ol>
9690 <ul><li>and bullets</li></ul>
9691 <ol><li>and numbers</li></ol></li>
9693 <ul><li>bullet level 2
9694 <ul><li>bullet level 3
9695 <ol><li>Number on level 4</li></ol></li></ul></li>
9697 <ol><li>Number on level 3</li>
9698 <li>Number on level 3</li></ol></li></ul>
9699 <ol><li>number level 2</li></ol></li>
9701 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9702 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9707 1. Nested mixed wikitext and html list
9710 *<ul><li>ho</li></ul>
9715 <li><ul><li>ho</li></ul></li>
9717 <ul><li>ho</li></ul></li></ul>
9721 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9723 <ul><li>ho</li></ul></li></ul>
9727 2. Nested mixed wikitext and html list (incompatible)
9730 :{{echo|<li>ho</li>}}
9733 <dd><li>ho</li></dd></dl>
9737 <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>
9747 <ul><li>bar</li></ul></li></ul>
9757 <ul><li><ul><li>foo</li></ul></li>
9763 Nested lists 3 (first element empty)
9769 <ul><li>bar</li></ul></li></ul>
9774 Nested lists 4 (first element empty)
9779 <ul><li><ul><li></li></ul></li>
9785 Nested lists 5 (both elements empty)
9790 <ul><li><ul><li></li></ul></li>
9796 Nested lists 6 (both elements empty)
9802 <ul><li></li></ul></li></ul>
9807 Nested lists 7 (skip initial nesting levels)
9811 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9816 Nested lists 8 (multiple nesting transitions)
9824 <ul><li><ul><li>bar</li></ul></li>
9825 <li>baz</li></ul></li>
9831 Nested lists 9 (extension interaction)
9837 <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>
9841 1. Lists with start-of-line-transparent tokens before bullets: Comments
9854 Nested lists 10 (list and span siblings: wt2wt regression)
9859 <ul><li>a <span>x</span>
9860 <ul><li>b <span>y</span></li></ul></li></ul>
9864 2. Lists with start-of-line-transparent tokens before bullets: Template close
9869 <ul><li>foo bar</li>
9875 List items are not parsed correctly following a <pre> block (T2785)
9881 <ul><li><pre>foo</pre></li>
9882 <li><pre>bar</pre></li>
9886 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9887 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9891 # FIXME: Might benefit from a html/parsoid since this has a template
9893 List items from template
9904 *notSOL{{inner list}}
9908 <li>item 2</li></ul>
9911 <li>item 2</li></ul>
9915 <li>item 2</li></ul>
9920 List interrupted by empty line or heading
9928 <ul><li>foo</li></ul>
9929 <ul><li><ul><li>bar</li></ul></li></ul>
9930 <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>
9931 <ul><li>Another list item</li></ul>
9936 Multiple list tags generated by templates
9955 <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
9956 </li><li about="#mwt1">b
9957 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9961 Multiple newlines in between HTML list items don't induce paragraph wrapping
9974 <dd>ho<div>123</div>
9990 <dd>ho<div>123</div>
9998 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10001 <!--This line will NOT split the list-->
10003 <!--This line will NOT split the list either-->
10005 <!--foo--> <!----> <!--This line NOT split the list either-->
10016 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10019 <!--This line will NOT split the list-->
10021 <!--This line will NOT split the list either-->
10023 <!--foo--> <!----> <!--This line NOT split the list
10034 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10035 # That pass could possibly be removed.
10037 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10039 parsoid=wt2html,wt2wt
10043 *{{echo|<li>templated li-hack}}
10044 *<!--foo--><li> unsupported li-hack with preceding comments
10047 <li><li>not a li-hack
10052 <li class="mw-empty-elt"></li><li>li-hack</li>
10053 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10054 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10056 <li class="mw-empty-elt"></li><li>not a li-hack
10061 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10062 <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>
10063 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10065 <ul data-parsoid='{"stx":"html"}'>
10066 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10073 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10102 Parsoid: Test of whitespace serialization with Templated bullets
10109 <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>
10113 # ------------------------------------------------------------------------
10114 # The next set of tests are about Parsoid's ability to handle badly nested
10115 # tags (parse, minimize scope of fixup, and roundtrip back)
10116 # ------------------------------------------------------------------------
10118 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10119 # Parsoid's list handling is more aware of block structure.
10121 Unbalanced closing block tags break a list
10128 <ul><li>a</li></ul></div><div>
10140 Unbalanced closing non-block tags don't break a list
10148 <ul><li>a<span></span></li>
10153 <li>a<span></span></li>
10159 # Parsoid does some post-dom-building cleanup
10160 # which is why its output differs from Remex.
10162 Unclosed formatting tags that straddle lists are closed and reopened
10164 parsoid=wt2html,wt2wt,html2html
10169 <ol><li><s> a</s></li><s>
10170 </s><li><s>b </s></li></ol>
10172 <ol><li><s> a</s></li>
10173 <li><s>b </s></li></ol>
10176 # Output is ugly because of all the misnested tag fixups.
10177 # Remex is wrapping p-tags around empty elements.
10178 # Parsoid has special-case handling of this pattern of
10179 # wrapping lists in formatting tags.
10180 # FIXME: Should we remove this code from Parsoid? Or add
10181 # special support in Remex? If the latter, maybe just wait
10182 # for Parsoid to become the default parser.
10185 1. List embedded in a formatting tag
10192 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10202 # Output is ugly because of all the misnested tag fixups
10203 # Remex is wrapping p-tags around empty elements.
10204 # Parsoid has code that strips useless p-tags.
10206 2. List embedded in a formatting tag in a misnested way
10213 </small></p><small></small><ul><small><li>a</li>
10214 </small><li><small>b</small></li></ul>
10220 <li><small>b</small></li>
10228 # Note that the current date is hard-coded as
10229 # 1970-01-01T00:02:03Z (a Thursday)
10230 # when running parser tests. The timezone is also fixed to GMT, so
10231 # local date will be identical to current date.
10234 Magic Word: {{CURRENTDAY}}
10243 Magic Word: {{CURRENTDAY2}}
10252 Magic Word: {{CURRENTDAYNAME}}
10261 Magic Word: {{CURRENTDOW}}
10270 Magic Word: {{CURRENTMONTH}}
10279 Magic Word: {{CURRENTMONTH1}}
10288 Magic Word: {{CURRENTMONTHABBREV}}
10290 {{CURRENTMONTHABBREV}}
10297 Magic Word: {{CURRENTMONTHNAME}}
10299 {{CURRENTMONTHNAME}}
10306 Magic Word: {{CURRENTMONTHNAMEGEN}}
10308 {{CURRENTMONTHNAMEGEN}}
10315 Magic Word: {{CURRENTTIME}}
10324 Magic Word: {{CURRENTHOUR}}
10333 Magic Word: {{CURRENTWEEK}} (T6594)
10342 Magic Word: {{CURRENTYEAR}}
10351 Magic Word: {{CURRENTTIMESTAMP}}
10353 {{CURRENTTIMESTAMP}}
10360 Magic Words LOCAL (UTC)
10364 *{{LOCALMONTHNAME}}
10365 *{{LOCALMONTHNAMEGEN}}
10366 *{{LOCALMONTHABBREV}}
10375 *{{LOCALTIMESTAMP}}
10390 <li>19700101000203</li></ul>
10395 Magic Word: {{FULLPAGENAME}}
10397 title=[[User:Ævar Arnfjörð Bjarmason]]
10398 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10402 <p>User:Ævar Arnfjörð Bjarmason
10407 Magic Word: {{FULLPAGENAMEE}}
10409 title=[[User:Ævar Arnfjörð Bjarmason]]
10410 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10414 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10419 Magic Word: {{TALKSPACE}}
10421 title=[[User:Ævar Arnfjörð Bjarmason]]
10422 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10431 Magic Word: {{TALKSPACE}}, same namespace
10433 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10434 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10443 Magic Word: {{TALKSPACE}}, main namespace
10445 title=[[Parser Test]]
10446 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10455 Magic Word: {{TALKSPACEE}}
10457 title=[[User:Ævar Arnfjörð Bjarmason]]
10458 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10467 Magic Word: {{SUBJECTSPACE}}
10469 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10470 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10479 Magic Word: {{SUBJECTSPACE}}, same namespace
10481 title=[[User:Ævar Arnfjörð Bjarmason]]
10482 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10491 Magic Word: {{SUBJECTSPACE}}, main namespace
10493 title=[[Parser Test]]
10494 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10502 Magic Word: {{SUBJECTSPACEE}}
10504 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10505 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10514 Magic Word: {{NAMESPACE}}
10516 title=[[User:Ævar Arnfjörð Bjarmason]]
10517 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10526 Magic Word: {{NAMESPACEE}}
10528 title=[[User:Ævar Arnfjörð Bjarmason]]
10529 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10538 Magic Word: {{NAMESPACENUMBER}}
10540 title=[[User:Ævar Arnfjörð Bjarmason]]
10541 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10543 {{NAMESPACENUMBER}}
10550 Magic Word: {{SUBPAGENAME}}
10552 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10553 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10562 Magic Word: {{SUBPAGENAMEE}}
10564 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10565 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10574 Magic Word: {{ROOTPAGENAME}}
10576 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10577 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10581 <p>Ævar Arnfjörð Bjarmason
10586 Magic Word: {{ROOTPAGENAMEE}}
10588 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10589 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10593 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10598 Magic Word: {{BASEPAGENAME}}
10600 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10601 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10605 <p>Ævar Arnfjörð Bjarmason
10610 Magic Word: {{BASEPAGENAMEE}}
10612 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10613 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10617 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10622 Magic Word: {{TALKPAGENAME}}
10624 title=[[User:Ævar Arnfjörð Bjarmason]]
10625 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10629 <p>User talk:Ævar Arnfjörð Bjarmason
10634 Magic Word: {{TALKPAGENAMEE}}
10636 title=[[User:Ævar Arnfjörð Bjarmason]]
10637 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10641 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10646 Magic Word: {{SUBJECTPAGENAME}}
10648 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10649 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10651 {{SUBJECTPAGENAME}}
10653 <p>User:Ævar Arnfjörð Bjarmason
10658 Magic Word: {{SUBJECTPAGENAMEE}}
10660 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10661 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10663 {{SUBJECTPAGENAMEE}}
10665 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10670 Magic Word: {{NUMBEROFFILES}}
10672 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10681 Magic Word: {{PAGENAME}}
10683 title=[[User:Ævar Arnfjörð Bjarmason]]
10684 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10688 <p>Ævar Arnfjörð Bjarmason
10693 Magic Word: {{PAGENAME}} with metacharacters
10695 title=[['foo & bar = baz']]
10696 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10700 <p><i>'foo & bar = baz'</i>
10705 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10707 title=[[*RFC 1234 http://example.com/]]
10708 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10712 <p>*RFC 1234 http://example.com/
10717 Magic Word: {{PAGENAMEE}}
10719 title=[[User:Ævar Arnfjörð Bjarmason]]
10720 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10724 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10729 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10731 title=[[*RFC 1234 http://example.com/]]
10732 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10736 <p>*RFC_1234_http://example.com/
10741 Magic Word: {{REVISIONID}}
10743 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10750 flags=vary-revision-id
10754 Magic Word: {{SCRIPTPATH}}
10756 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10764 Magic Word: {{STYLEPATH}}
10766 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10775 Magic Word: {{SERVER}}
10777 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10781 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10786 Magic Word: {{SERVERNAME}}
10788 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10797 Magic Word: {{SITENAME}}
10799 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10808 Magic Word: {{PAGELANGUAGE}}
10811 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10820 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10822 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10831 Case-sensitive magic words, when cased differently, should just be template transclusions
10838 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10839 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10840 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10841 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10846 Case-insensitive magic words should still work with weird casing.
10856 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10860 # From plwiki:PLOS_ONE
10862 Parsoid: Page property magic word with magic word contents
10864 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10866 <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>"}]]}'/>
10869 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10870 # But, this is a limitation of our representation and is documented in
10871 # TemplateHandler.js in processSpecialMagicWord
10873 Parsoid: Template-generated DISPLAYTITLE
10875 {{{{echo|DISPLAYTITLE}}:Foo}}
10879 wgAllowDisplayTitle=true
10880 wgRestrictDisplayTitle=false
10885 <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"}]]}'/>
10889 Namespace 1 {{ns:1}}
10898 Namespace 1 {{ns:01}}
10907 Namespace 0 {{ns:0}} (T6783)
10915 Namespace 0 {{ns:00}} (T6783)
10923 Namespace -1 {{ns:-1}}
10932 Namespace User {{ns:User}}
10941 Namespace User talk {{ns:User_talk}}
10950 Namespace User talk {{ns:uSeR tAlK}}
10959 Namespace File {{ns:File}}
10968 Namespace File {{ns:Image}}
10977 Namespace (lang=de) Benutzer {{ns:User}}
10988 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10994 <p>Benutzer Diskussion
11001 {{urlencode:hi world?!}}
11002 {{urlencode:hi world?!|WIKI}}
11003 {{urlencode:hi world?!|PATH}}
11004 {{urlencode:hi world?!|QUERY}}
11014 Magic Word: prioritize type info over data-parsoid
11018 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11024 Magic Word: serialize on separate line (parsoid)
11026 parsoid=wt2wt,html2wt
11032 foo<meta property="mw:PageProp/notoc"/>bar
11036 Magic Word: rt non-english wikis
11043 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11047 __proto__ is treated as normal wikitext (T105997)
11059 Magic links: internal link to RFC (T2479)
11063 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11066 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11070 Magic links: RFC (T2479)
11074 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11077 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11081 Magic links: RFC (T67278)
11083 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11085 <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.
11088 <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>
11092 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11094 RFC      822
11098 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11103 <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>
11109 Magic links: ISBN (T3937)
11113 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11116 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11120 Magic links: ISBN (T67278)
11122 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11124 <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.
11127 <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>
11131 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11133 ISBN      978 0 316 09811 3
11139 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11146 <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>
11154 Magic links: PMID incorrectly converts space to underscore
11158 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11161 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11165 Magic links: PMID (T67278)
11167 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11169 <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.
11172 <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>
11176 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11178 PMID      1234
11182 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11187 <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>
11192 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11193 # since these are ExtLinkText, not MagicLinkText
11195 Magic links: use appropriate serialization for "almost" magic links.
11197 X[[Special:BookSources/0978739256|foo]]
11199 X[https://tools.ietf.org/html/rfc1234 foo]
11201 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11202 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11205 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11206 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11210 Magic links: All disabled (T47942)
11212 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11218 <p>ISBN 0-306-40615-2
11229 Nonexistent template
11231 {{thistemplatedoesnotexist}}
11233 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11238 Template with invalid target containing tags
11240 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11242 <p>{{a<b>b</b>|foo|a=b|a = b}}
11247 Template with invalid target containing unclosed tag
11249 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11251 <p>{{a<b>|foo|a=b|a = b}}</b>
11256 Template with invalid target containing wikilink
11260 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11263 <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>
11267 Template with just whitespace in it, T70421
11271 <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>
11277 This is a test template
11285 <p>This is a test template
11290 Template with explicit namespace
11294 <p>This is a test template
11302 This is a test template with parameter {{{param}}}
11308 {{paramtest|param=foo}}
11310 <p>This is a test template with parameter foo
11315 Template:paramtestnum
11317 [[{{{1}}}|{{{2}}}]]
11321 Template unnamed parameter
11323 {{paramtestnum|Main Page|the main page}}
11325 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11330 Template:templatesimple
11336 Template:templateredirect
11338 #redirect [[Template:templatesimple]]
11342 Template:templateasargtestnum
11348 Template:templateasargtest
11350 {{template{{{templ}}}}}
11354 Template:templateasargtest2
11360 Template with template name as unnamed argument
11362 {{templateasargtestnum|templatesimple}}
11369 Template with template name as argument
11371 {{templateasargtest|templ=simple}}
11378 Template with template name as argument (2)
11380 {{templateasargtest2|templ=templatesimple}}
11387 Template:templateasargtestdefault
11389 {{{{{templ|templatesimple}}}}}
11399 Template with default value
11401 {{templateasargtestdefault}}
11408 Template with default value (value set)
11410 {{templateasargtestdefault|templ=templa}}
11419 {{templateredirect}}
11424 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11428 Template with argument in separate line
11430 {{ templateasargtest |
11438 Template with complex template as argument
11441 param ={{ templateasargtest |
11442 templ = simple }}}}
11444 <p>This is a test template with parameter (test)
11449 Templates with templated name
11451 {{{{echo|echo}}|foo}}
11452 {{{{echo|inner list}} }}
11456 <ul><li>item 1</li></ul>
11459 <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>
11460 <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>
11463 ## Regression test; the output here isn't really that interesting.
11465 Templates with templated name and top level template args
11467 {{1{{2{{{3}}}|4=5}}}}
11469 <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>
11472 # Parsoid markup is deliberate "broken". This is an edge case.
11473 # See long comment in TemplateHandler.js:convertAttribsToString.
11475 Templates with invalid templated targets
11486 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11491 Template with thumb image (with link in description)
11493 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11495 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>
11498 <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>
11500 <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>
11504 Template:complextemplate
11506 {{{1}}} {{paramtest|
11507 param ={{{param}}}}}
11511 Template with complex arguments
11514 param ={{ templateasargtest |
11515 templ = simple }}|[[Template:complextemplate|link]]}}
11517 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11522 T2553: link with two variables in a piped link
11525 |[[{{{1}}}|{{{2}}}]]
11530 <td>[[{{{1}}}|{{{2}}}]]
11535 <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>
11541 Abort table cell attribute parsing on wikilink
11544 |testing [[one|two]] |three||four
11545 |testing one two |three||four
11546 |testing="[[one|two]]" |three||four
11551 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11557 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11563 <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>
11564 <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>
11565 <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>
11570 Don't abort table cell attribute parsing if wikilink is found in template arg
11573 |Test {{#tag:ref|One two "[[three]]" four}}
11577 <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>
11582 Magic variable as template parameter
11584 {{paramtest|param={{SITENAME}}}}
11586 <p>This is a test template with parameter MediaWiki
11593 [[{{{param}}}|link]]
11597 Template parameter as link source
11599 {{linktest|param=Main Page}}
11601 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11606 Template:paramtest2
11608 including another template, {{paramtest|param={{{arg}}}}}
11612 Template passing argument to another template
11614 {{paramtest2|arg='hmm'}}
11616 <p>including another template, This is a test template with parameter 'hmm'
11627 Template as link source
11631 [[{{linktest2}}|Main Page]]
11633 [[{{linktest2}}]]Page
11635 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11636 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11637 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11655 Template infinite loop
11659 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11664 Template from main namespace
11673 Template from non-includable namespace
11675 wgNonincludableNamespaces=10
11679 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11694 T2529: Template with table, not included at beginning of line
11713 T2523: Template shouldn't eat newline (or add an extra one before table)
11733 T2041: Template parameters shown as broken links
11742 Template with targets containing wikilinks
11748 {{[[{{echo|foo}}]]}}
11750 {{{{echo|[[foo}}]]}}
11752 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11753 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11757 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11758 <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>
11759 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11769 Templates: Double quotes as template target
11776 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11780 ## This test is about making sure Parsoid's data-mw is well formed in the
11781 ## face of multiple templates with intersecting and overlapping ranges. The
11782 ## wikitext itself is wretched.
11784 Templates with intersecting and overlapping ranges
11795 </table><p>ho</p><table>
11799 </td></tr></tbody></table>
11801 <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":""}]]}'>
11803 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11805 <tbody><tr><td>hi</td></tr>
11810 Template:MSGNW test
11812 ''None'' of '''this''' should be
11814 but rather passed unmodified
11822 # hmm, fix this or just deprecate msgnw and document its behavior?
11826 {{msgnw:MSGNW test}}
11828 <p>''None'' of '''this''' should be
11830  but rather passed unmodified
11831 {{test}}
11835 <!-- comment -->
11842 {{int:youhavenewmessages|lots of money|not!}}
11844 <p>You have lots of money (not!).
11849 int keyword - non-existing message
11860 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11864 <includeonly> and <noinclude> being included
11875 <onlyinclude>Foo</onlyinclude>bar
11879 <onlyinclude> being included
11891 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11895 <onlyinclude> and <includeonly> being included
11904 <includeonly> and <noinclude> on a page
11906 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11913 Un-closed <noinclude>
11920 <onlyinclude> on a page
11922 <onlyinclude>Foo</onlyinclude>bar
11929 Un-closed <onlyinclude>
11936 Self-closed noinclude, includeonly, onlyinclude tags
11947 Unbalanced includeonly and noinclude tags
11951 |b</noinclude></noinclude>
11952 |c</noinclude></includeonly>
11953 |d</includeonly></includeonly>
11962 <td>c</includeonly>
11964 <td>d</includeonly></includeonly>
11970 Template:Includeonly section
11973 ==Includeonly section==
11979 T8563: Edit link generation for section shown by <includeonly>
11981 {{includeonly section}}
11983 <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>
11984 <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>
11988 # Uses same input as the contents of [[Template:Includeonly section]]
11990 T8563: Section extraction for section shown by <includeonly>
11995 ==Includeonly section==
12003 T8563: Edit link generation for section suppressed by <includeonly>
12006 ==Includeonly section==
12010 <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>
12015 T8563: Section extraction for section suppressed by <includeonly>
12020 ==Includeonly section==
12028 Un-closed <includeonly>
12033 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
12036 ## We used to, but no longer wt2wt this test since the default serializer
12037 ## will normalize the include directives to serialize on their own line.
12038 ## Selser will take care of preserving formatting in scenarios where they
12039 ## intermingled with other wikitext.
12041 Includes and comments at SOL
12043 parsoid=wt2html,html2html
12045 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12052 <includeonly>can have stuff</includeonly>===here===
12055 <h2><span class="mw-headline" id="hu">hu</span></h2>
12060 <h3><span class="mw-headline" id="here">here</span></h3>
12063 <!-- 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>
12065 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12067 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12070 <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>
12074 # TODO: test with DOM fragment reuse!
12076 Parsoid: DOM fragment reuse
12078 parsoid=wt2wt,wt2html
12080 a{{echo|b<table></table>c}}d
12092 <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>
12094 <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">
12095 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12096 </span><p about="#mwt2">cd</p>
12098 <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">
12100 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12102 </span><p about="#mwt3">b</p>
12106 Parsoid: Merge double tds (T52603)
12111 |{{echo|{{!}} foo}}
12115 <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>
12120 Parsoid: Merge double tds in nested transclusion content (T52603)
12126 |{{echo|{{!}} foo}}
12130 <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}}]}'>
12132 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12138 ### <includeonly> and <noinclude> in attributes
12141 0. includeonly around the entire attribute
12143 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12145 <p><span id="v2">bar</span>
12150 1. includeonly in html attr key
12152 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12154 <p><span id="foo">bar</span>
12159 2. includeonly in html attr value
12161 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12162 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12164 <p><span id="v1">bar</span>
12165 <span id="v1">bar</span>
12170 3. includeonly in part of an attr value
12172 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12174 <p><span style="color:red;">bar</span>
12179 4. includeonly in table attributes
12203 ### Preprocessor precedence tests
12204 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12206 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12208 Preprocessor precedence 1: link is rightmost opening
12214 But close-brace is not a valid character in a link title:
12217 However, we can still tell this was handled as a link in the preprocessor:
12218 {{echo|[[Foo}}|bar]]|bat}}
12220 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12221 </p><p>But close-brace is not a valid character in a link title:
12223 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12227 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12228 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12229 <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>
12233 Preprocessor precedence 2: template is rightmost opening
12242 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12246 Preprocessor precedence 3: language converter is rightmost opening
12262 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12263 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12264 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12268 Preprocessor precedence 4: left-most angle bracket
12279 Template:Precedence5
12285 Preprocessor precedence 5: tplarg takes precedence over template
12287 {{Precedence5|Bullet}}
12289 <ul><li>Bar</li></ul>
12292 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12296 Preprocessor precedence 6: broken link is rightmost opening
12302 {{echo|[[Foo|bar|bat=baz}}
12305 </p><p>{{echo|[[Foo|bar|bat=baz}}
12308 <p>{{echo|[[Foo}}</p>
12309 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12312 # This next test exposes a difference between PHP and Parsoid:
12313 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12314 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12315 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12316 # outer `[[Foo` extends until the `y]]`
12317 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12318 # intermediate result (after template expansion), and link processing
12319 # happens on this intermediate result, which moves the wikilink
12320 # boundary leftward to `[[Foo|Bar]]`
12321 # 2b) Parsoid works in a single step, so it's going to keep the
12322 # wikilink as extending to the `y]]`
12323 # 3a) Then PHP does linktrail processing which slurps up the trailing
12324 # `xy` inside the link.
12325 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12326 # `z` inside the link.
12327 # This is "correct" behavior. Parsoid's basic worldview is that the
12328 # `]]` inside the template shouldn't be allowed to leak out to affect
12329 # the surrounding wikilink. PHP may match Parsoid (in the future)
12330 # if you use {{#balance}} (T114445).
12333 Preprocessor precedence 7: broken template is rightmost opening
12339 [[Foo|{{echo|Bar]]-x}}-y]]-z
12341 Careful: linktrails can move the end of the wikilink:
12342 [[Foo|{{echo|y']]a}}l]]l
12344 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12345 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12346 </p><p>Careful: linktrails can move the end of the wikilink:
12347 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12350 <p>[[Foo|{{echo|Bar]]</p>
12351 <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>
12352 <p>Careful: linktrails can move the end of the wikilink:
12353 <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>
12357 Preprocessor precedence 8: broken language converter is rightmost opening
12368 Template:Preprocessor_precedence_9
12373 ;7: {{{{{{{4}}}}}}}
12377 Preprocessor precedence 9: groups of braces
12379 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12385 <ul><li>Bar</li></ul>
12389 <dd>{Bullet}</dd></dl>
12392 <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}}]}'>
12397 </dl><ul about="#mwt1">
12399 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12408 Template:Preprocessor_precedence_10
12415 ;6: -{{{{{{4}}}}}}-
12416 ;7: -{{{{{{{5}}}}}}}-
12420 Preprocessor precedence 10: groups of braces with leading dash
12424 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12430 <ul><li>Bar-</li></ul>
12437 <ul><li>Bar-</li></ul>
12444 <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}}]}'>
12446 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12449 </dl><ul about="#mwt1">
12451 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12455 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12458 </dl><ul about="#mwt1">
12460 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12464 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12469 Preprocessor precedence 11: found during visual diff testing
12471 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12473 {{echo|-{{echo|-{{echo|x}}}}}}
12475 {{echo|-{{echo|x}}}}
12477 <p><span>-<span>-x</span></span>
12482 <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>
12484 <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>
12486 <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>
12490 Preprocessor precedence 12: broken language converter closed by brace.
12494 This form breaks the template, which is unfortunate:
12495 *{{echo|foo-{bar}bat}}
12497 But if the broken language converter markup is inside an extension
12498 tag, nothing bad happens:
12499 *<nowiki>foo-{bar}bat</nowiki>
12500 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12501 *<pre>foo-{bar}bat</pre>
12502 *{{echo|<pre>foo-{bar}bat</pre>}}
12504 <tag>foo-{bar}bat</tag>
12505 {{echo|<tag>foo-{bar}bat</tag>}}
12508 <p>This form breaks the template, which is unfortunate:
12510 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12511 <p>But if the broken language converter markup is inside an extension
12512 tag, nothing bad happens:
12514 <ul><li>foo-{bar}bat</li>
12515 <li>foo-{bar}bat</li>
12516 <li><pre>foo-{bar}bat</pre></li>
12517 <li><pre>foo-{bar}bat</pre></li></ul>
12518 <pre>'foo-{bar}bat'
12522 <pre>'foo-{bar}bat'
12527 <p>This form breaks the template, which is unfortunate:</p>
12529 <li>{{echo|foo-{bar}bat}}</li>
12531 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12533 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12534 <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>
12535 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12536 <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>
12538 <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>
12542 Preprocessor precedence 13: broken language converter in external link
12546 *[http://example.com/-{foo Example in URL]
12547 *[http://example.com Example in -{link} description]
12548 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12550 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12551 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12552 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12555 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12556 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12557 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12562 Preprocessor precedence 14: broken language converter in comment
12564 *<!--{{foo}}-->...should be ok
12565 *<!---{{foo}}-->...extra dashes
12566 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12568 <ul><li>...should be ok</li>
12569 <li>...extra dashes</li>
12570 <li>foobat...should be ok</li></ul>
12573 <li><!--{{foo}}-->...should be ok</li>
12574 <li><!---{{foo}}-->...extra dashes</li>
12575 <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>
12580 Preprocessor precedence 15: broken brace markup in headings
12582 wgFragmentMode=[ 'html5', 'legacy' ]
12586 __NOTOC__ __NOEDITSECTION__
12595 ===5 foo{{{bar 5===
12600 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12603 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12606 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12609 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12612 <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>
12615 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12619 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12620 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12622 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12624 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12626 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12628 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12630 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12635 Preprocessor precedence 16: matching closing braces to opening braces
12640 -{{{echo|foo}}bar}-
12645 <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>
12649 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12658 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12662 Preprocessor precedence 18: another rightmost wins scenario
12666 {{ -{{{{1|tplarg}}} }} }-
12668 <p>{{ -{tplarg }} }-
12671 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12675 Preprocessor precedence 19: break syntax
12688 ### Token Stream Patcher tests
12690 ### These tests won't always pass wt2wt and other modes because
12691 ### on serialization, the table will be output on a new line.
12692 ### For now, we are blacklisting them, and using this to test selser.
12696 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12698 parsoid=wt2html,wt2wt
12700 {{echo|}}{| width = '100%'
12704 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12705 <tbody><tr><td>foo</td></tr>
12709 ## We used to, but no longer wt2wt this test since the default serializer
12710 ## will normalize the include directives to serialize on their own line.
12711 ## Selser will take care of preserving formatting in scenarios where they
12712 ## intermingled with other wikitext.
12714 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12718 <includeonly>a</includeonly>{| {{{b}}}
12722 <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":""}]]}'>
12723 <tbody><tr><td>c</td></tr>
12728 Table wikitext syntax outside wiki-tables
12732 ! not a table heading
12735 | class="foo bar" | baz
12743 ! not a table heading
12746 | class="foo bar" | baz
12755 ### Testing parsing of templates where a template arg
12756 ### has the same name as the template itself.
12762 {{{quote|{{{1}}}}}}
12766 Templates: Template Name/Arg clash: 1. Use of positional param
12775 Templates: Template Name/Arg clash: 2. Use of named param
12777 {{quote|quote=foo}}
12784 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12793 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12797 Templates: 1. Simple use
12806 Templates: 2. Inside a block tag
12808 <div>{{echo|Foo}}</div>
12809 <blockquote>{{echo|Foo}}</blockquote>
12812 <blockquote>Foo</blockquote>
12816 <blockquote><p>Foo</p></blockquote>
12820 Templates: P-wrapping: 1a. Templates on consecutive lines
12831 Templates: P-wrapping: 1b. Templates on consecutive lines
12845 Templates: P-wrapping: 1c. Templates on consecutive lines
12848 {{echo|bar}} <div>baz</div>
12857 bar </p><div>baz</div>
12861 Templates: P-wrapping: 1d. Template preceded by comment-only line
12870 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12874 Templates: Inline Text: 1. Multiple template uses
12876 {{echo|Foo}}bar{{echo|baz}}
12883 Templates: Inline Text: 2. Back-to-back template uses
12885 {{echo|Foo}}{{echo|bar}}
12892 Templates: Block Tags: 1. Multiple template uses
12894 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12896 <div>Foo</div><div>bar</div><div>baz</div>
12901 Templates: Block Tags: 2. Back-to-back template uses
12903 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12905 <div>Foo</div><div>bar</div>
12909 ## This is an edge case relating to paragraph wrapping.
12910 ## Note that Parsoid fails to match Remex because it's using the closing tag
12911 ## as a heuristic to determine if it's in a block, rather than SAX based events.
12912 ## And Parsoid drops empty elements in templates.
12914 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12921 b</p><p class="mw-empty-elt"></p>
12923 <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">
12924 </span><span about="#mwt1">b</span>
12928 Templates: Links: 1. Simple example
12930 {{echo|[[Foo|bar]]}}
12932 <p><a href="/wiki/Foo" title="Foo">bar</a>
12937 Templates: Links: 2. Generation of link href
12939 [[{{echo|Foo}}|bar]]
12941 <p><a href="/wiki/Foo" title="Foo">bar</a>
12946 Templates: Links: 3. Generation of part of a link href
12948 [[Fo{{echo|o}}|bar]]
12950 [[Foo{{echo|bar}}]]
12952 [[Foo{{echo|bar}}baz]]
12954 [[Foo{{echo|bar}}|bar]]
12956 [[:Foo{{echo|bar}}]]
12958 [[:Foo{{echo|bar}}|bar]]
12960 <p><a href="/wiki/Foo" title="Foo">bar</a>
12961 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12962 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12963 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12964 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12965 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12970 Templates: Links: 4. Multiple templates generating link href
12972 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12974 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12979 Templates: Links: 5. Generation of link text
12981 [[Foo|{{echo|bar}}]]
12983 <p><a href="/wiki/Foo" title="Foo">bar</a>
12988 Templates: Links: 5. Nested templates (only outermost template should be marked)
12990 {{echo|[[{{echo|Foo}}|bar]]}}
12992 <p><a href="/wiki/Foo" title="Foo">bar</a>
12997 Templates: HTML Tag: 1. Generation of HTML attr. key
12999 <div {{echo|style}}="color:red;">foo</div>
13001 <div style="color:red;">foo</div>
13006 Templates: HTML Tag: 2. Generation of HTML attr. value
13008 <div style={{echo|'color:red;'}}>foo</div>
13010 <div style="color:red;">foo</div>
13015 Templates: HTML Tag: 3. Generation of HTML attr key and value
13017 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13019 <div style="color:red;">foo</div>
13024 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13026 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13028 <div title="This is a long title with just one piece templated">foo</div>
13033 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13035 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13037 <div title="This is a long title with just one piece templated">foo</div>
13042 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13044 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13046 <div title="This is a long title with just one piece templated">foo</div>
13050 # SSS FIXME: While it is great we added support for all this,
13051 # do we want to make this part of the spec? Maybe we want to
13052 # deprecate this kind of usage in the future?
13054 Templates: HTML Tag: 7. Generation of partial attribute key string
13056 <div st{{echo|yle}}="color:red;">foo</div>
13058 <div style="color:red;">foo</div>
13063 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13065 <div {{echo|1=id="v1"}}>bar</div>
13067 <div id="v1">bar</div>
13072 Templates: HTML Tag: 9. Multiple template-generated attributes
13074 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13076 <div id="v1" title="foo">bar</div>
13081 Templates: Support for templates generating attributes and content
13083 {| {{mixed_attr_content_template}}
13088 <table style="color:red;" title="T48811">
13098 <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|}"]}'>
13107 Template:attribute_from_template
13113 Table cell with attribute before expanded attribute
13116 | align="center" {{attribute_from_template}} |456
13120 <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>
13125 1. Entities and nowikis inside templated attributes should be handled correctly
13127 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13129 <div style="background:#f9f9f9;">foo</div>
13132 <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>
13136 2. Entities and nowikis inside templated attributes should be handled correctly
13139 |{{table_attribs_3}}
13144 <td style="background:#f9f9f9;">Foo
13149 <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>
13154 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13157 |{{table_attribs_3}}
13162 <td style="background:#f9f9f9;">Foo
13166 <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}}]}'>
13167 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13173 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13176 |{{table_attribs_6}} hi
13181 <td style="background: red;">hi
13186 <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>
13191 Templates: HTML Tables: 1. Generating start of a HTML table
13193 {{echo|<table><tr><td>foo</td>}}</tr></table>
13195 <table><tr><td>foo</td></tr></table>
13200 Templates: HTML Tables: 2a. Generating middle of a HTML table
13202 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13204 <table><tr><td>foo</td></tr></table>
13209 Templates: HTML Tables: 2b. Generating middle of a HTML table
13211 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13213 <table><tr><td>foo</td></tr></table>
13218 Templates: HTML Tables: 3. Generating end of a HTML table
13220 <table><tr>{{echo|<td>foo</td></tr></table>}}
13222 <table><tr><td>foo</td></tr></table>
13227 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13229 {{echo|<table>}}<tr><td>foo</td></tr></table>
13231 <table><tr><td>foo</td></tr></table>
13236 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13238 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13240 <table><tr><td>foo</td></tr></table>
13245 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13247 <table><tr>{{echo|<td>}}foo</td></tr></table>
13249 <table><tr><td>foo</td></tr></table>
13254 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13256 <table><tr><td>foo{{echo|</td>}}</tr></table>
13258 <table><tr><td>foo</td></tr></table>
13263 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13265 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13267 <table><tr><td>foo</td></tr></table>
13272 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13274 <table><tr><td>foo</td></tr>{{echo|</table>}}
13276 <table><tr><td>foo</td></tr></table>
13281 Templates: HTML Tables: 5. Proper fostering of categories from inside
13283 parsoid=wt2html,wt2wt
13285 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13286 <!--Two categories (T52330)-->
13287 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13289 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13290 <!--Two categories (T52330)-->
13291 <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>
13295 Templates: Wiki Tables: 1a. Fostering of entire template content
13303 <tr><td></td></tr></table>
13308 <table><tbody><tr><td></td></tr></tbody></table>
13310 <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">
13316 Templates: Wiki Tables: 1b. Fostering of entire template content
13329 <tr><td></td></tr></table>
13337 <tbody><tr><td></td></tr></tbody></table>
13339 <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|}"]}'>
13341 </div><table about="#mwt3">
13347 Templates: Wiki Tables: 2. Fostering of partial template content
13357 <tr><td></td></tr></table>
13362 <div>b</div><table>
13363 <tbody><tr><td></td></tr></tbody></table>
13365 <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">
13372 Templates: Wiki Tables: 3. td-content via multiple templates
13375 {{echo|{{pipe}}a}}{{echo|b}}
13386 Templates: Wiki Tables: 4. Templated tags, no content
13392 <tr><td></td></tr></table>
13397 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13411 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13424 ## This test case is very specific to Parsoid's internals
13425 ## and is hence only tested for Parsoid's code. Parsoid uses
13426 ## a <meta> marker tag for <ref> tags and they are expanded
13427 ## much later. We are verifying that this <meta> tag usage
13428 ## doesn't prevent foster parenting.
13430 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13432 {{PartialTable}}<ref>foo</ref>
13437 <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">
13441 <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>
13445 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13455 <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{{!}}}"]}'>
13456 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13460 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13465 Templates: Lists: Multi-line list-items via templates
13467 *{{echo|a {{nonexistent|
13469 *{{echo|b {{nonexistent|
13472 <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>
13473 <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>
13478 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13480 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13482 <p><i>ab</i>c<i>d</i>e
13487 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13488 (PHP parser generates misnested html)
13490 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13492 <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>
13496 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13497 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13499 parsoid=wt2html,wt2wt
13501 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13503 <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>
13504 <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>
13505 <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>
13509 Templates: Ugly nesting: 4. Divs opened/closed across templates
13511 a<div>b{{echo|c</div>d}}e
13516 <p>a</p><div>bc</div><p>de
13521 Templates: Ugly templates: 3. newline-only template parameter
13530 # This looks like a bug: a single newline triggers p/br for some reason.
13532 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13541 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13542 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13544 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13550 <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
13551 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13555 # T66017 -- ugly wikitext with fostered content generates two template ranges
13556 # that are "identical" and generate nesting cycles in the algorithm
13558 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13560 {{echo|<table><tr><td><table>}}
13564 <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"}'>
13565 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13566 </table></td></tr></tbody></table>
13570 Templates: Parameters substituted at the top-level
13572 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13576 <p><i>who</i> me? <b>never!</b>
13580 <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>
13582 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13586 Templates: Param with empty arg in the final position
13590 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13594 Parser Functions: 1. Simple example
13603 Parser Functions: 2. Nested use (only outermost should be marked up)
13611 ## Note that the templates inside the references are not wrapped
13613 Template nested in extension tag in template
13615 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13616 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13619 <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>
13620 <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>
13621 <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>
13625 ### Pre-save transform tests
13628 pre-save transform: subst:
13634 This is a test template
13638 pre-save transform: normal template
13648 pre-save transform: nonexistent template
13652 {{thistemplatedoesnotexist}}
13654 {{thistemplatedoesnotexist}}
13658 pre-save transform: subst magic variables
13667 # This is T2089, which I fixed. -- wtm
13669 pre-save transform: subst: templates with parameters
13673 {{subst:paramtest|param="something else"}}
13675 This is a test template with parameter "something else"
13679 Template:nowikitest
13681 <nowiki>'''not wiki'''</nowiki>
13685 pre-save transform: nowiki in subst (T3188)
13689 {{subst:nowikitest}}
13691 <nowiki>'''not wiki'''</nowiki>
13695 Template:commenttest
13697 This template has <!-- a comment --> in it.
13701 pre-save transform: comment in subst (T3936)
13705 {{subst:commenttest}}
13707 This template has <!-- a comment --> in it.
13711 pre-save transform: unclosed tag
13715 <nowiki>'''not wiki'''
13717 <nowiki>'''not wiki'''
13721 pre-save transform: mixed tag case
13725 <NOwiki>'''not wiki'''</noWIKI>
13727 <NOwiki>'''not wiki'''</noWIKI>
13731 pre-save transform: unclosed comment in <nowiki>
13735 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13737 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13740 # Leading @ in this template definition works around a limitation
13741 # in parsoid's parserTests which otherwise strips the <span> from the
13742 # result (confusing it for a template wrapper)
13746 @<span onmouseover="alert('crap')">Oh no</span>
13750 (confirming safety of fix for subst T3936)
13752 {{Template:dangerous}}
13754 <p>@<span>Oh no</span>
13759 pre-save transform: comment containing gallery (T7024)
13763 <!-- <gallery>data</gallery> -->
13765 <!-- <gallery>data</gallery> -->
13769 pre-save transform: comment containing extension
13773 <!-- <tag>data</tag> -->
13775 <!-- <tag>data</tag> -->
13779 pre-save transform: comment containing nowiki
13783 <!-- <nowiki>data</nowiki> -->
13785 <!-- <nowiki>data</nowiki> -->
13789 pre-save transform: <noinclude> in subst (T5298)
13799 pre-save transform: <onlyinclude> in subst (T5298)
13803 {{subst:Includes2}}
13811 {{<includeonly>subst:</includeonly>Includes}}
13815 Template:SafeSubstTest
13817 {{<includeonly>safesubst:</includeonly>Includes}}
13821 T24297: safesubst: works during PST
13825 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13831 T24297: safesubst: works during normal parse
13840 subst: does not work during normal parse
13844 <p>{{subst:Includes}}
13849 pre-save transform: context links ("pipe trick")
13853 [[Article (context)|]]
13856 [[Bar:Article (context)|]]
13857 [[:Bar:Article (context)|]]
13859 [[|Article (context)]]
13863 [[Article (context)|Article]]
13864 [[Bar:Article|Article]]
13865 [[:Bar:Article|Article]]
13866 [[Bar:Article (context)|Article]]
13867 [[:Bar:Article (context)|Article]]
13869 [[Article (context)]]
13870 [[Bar:X (Y) Z|X (Y) Z]]
13871 [[:Bar:X (Y) Z|X (Y) Z]]
13875 pre-save transform: context links ("pipe trick") with interwiki prefix
13879 [[interwiki:Article|]]
13880 [[:interwiki:Article|]]
13881 [[interwiki:Bar:Article|]]
13882 [[:interwiki:Bar:Article|]]
13884 [[interwiki:Article|Article]]
13885 [[:interwiki:Article|Article]]
13886 [[interwiki:Bar:Article|Bar:Article]]
13887 [[:interwiki:Bar:Article|Bar:Article]]
13891 pre-save transform: context links ("pipe trick") with parens in title
13893 pst title=[[Somearticle (context)]]
13897 [[Article (context)|Article]]
13901 pre-save transform: context links ("pipe trick") with comma in title
13903 pst title=[[Someplace, Somewhere]]
13906 [[Otherplace, Elsewhere|]]
13907 [[Otherplace, Elsewhere, Anywhere|]]
13909 [[Otherplace, Somewhere|Otherplace]]
13910 [[Otherplace, Elsewhere|Otherplace]]
13911 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13915 pre-save transform: context links ("pipe trick") with parens and comma
13917 pst title=[[Someplace (IGNORED), Somewhere]]
13920 [[Otherplace (place), Elsewhere|]]
13922 [[Otherplace, Somewhere|Otherplace]]
13923 [[Otherplace (place), Elsewhere|Otherplace]]
13927 pre-save transform: context links ("pipe trick") with comma and parens
13929 pst title=[[Who, me? (context)]]
13932 [[Me, Myself, and I (1937 song)|]]
13934 [[Yes, you. (context)|Yes, you.]]
13935 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13939 pre-save transform: context links ("pipe trick") with namespace
13941 pst title=[[Ns:Somearticle]]
13945 [[Ns:Article|Article]]
13949 pre-save transform: context links ("pipe trick") with namespace and parens
13951 pst title=[[Ns:Somearticle (context)]]
13955 [[Ns:Article (context)|Article]]
13959 pre-save transform: context links ("pipe trick") with namespace and comma
13961 pst title=[[Ns:Somearticle, Context, Whatever]]
13965 [[Ns:Article, Context, Whatever|Article]]
13969 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13971 pst title=[[Ns:Somearticle, Context (context)]]
13975 [[Ns:Article (context)|Article]]
13979 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13981 pst title=[[Ns:Somearticle (IGNORED), Context]]
13985 [[Ns:Article, Context|Article]]
13989 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13993 [[Article(context)|]]
13994 [[Bar:Article(context)|]]
13995 [[:Bar:Article(context)|]]
13996 [[|Article(context)]]
14000 [[Article(context)|Article]]
14001 [[Bar:Article(context)|Article]]
14002 [[:Bar:Article(context)|Article]]
14003 [[Article(context)]]
14004 [[Bar:X(Y)Z|X(Y)Z]]
14005 [[:Bar:X(Y)Z|X(Y)Z]]
14009 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14013 [[Article (context)|]]
14014 [[Bar:Article (context)|]]
14015 [[:Bar:Article (context)|]]
14016 [[|Article (context)]]
14020 [[Article (context)|Article]]
14021 [[Bar:Article (context)|Article]]
14022 [[:Bar:Article (context)|Article]]
14023 [[Article (context)]]
14024 [[Bar:X (Y) Z|X (Y) Z]]
14025 [[:Bar:X (Y) Z|X (Y) Z]]
14029 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14033 [[Article(context)|]]
14034 [[Bar:Article(context)|]]
14035 [[:Bar:Article(context)|]]
14036 [[|Article(context)]]
14040 [[Article(context)|Article]]
14041 [[Bar:Article(context)|Article]]
14042 [[:Bar:Article(context)|Article]]
14043 [[Article(context)]]
14044 [[Bar:X(Y)Z|X(Y)Z]]
14045 [[:Bar:X(Y)Z|X(Y)Z]]
14049 pre-save transform: context links ("pipe trick") with commas (T23660)
14053 [[Article (context), context|]]
14054 [[Article (context),context|]]
14055 [[Bar:Article (context), context|]]
14056 [[Bar:Article (context),context|]]
14057 [[:Bar:Article (context), context|]]
14058 [[:Bar:Article (context),context|]]
14060 [[Article (context), context|Article]]
14061 [[Article (context),context|Article]]
14062 [[Bar:Article (context), context|Article]]
14063 [[Bar:Article (context),context|Article]]
14064 [[:Bar:Article (context), context|Article]]
14065 [[:Bar:Article (context),context|Article]]
14069 Parsoid: backwards pipe trick
14076 <p>[[|<b>bar</b>]]</p>
14080 pre-save transform: trim trailing empty lines
14084 Empty lines are trimmed
14090 Empty lines are trimmed
14094 pre-save transform: Signature expansion
14101 * <noinclude>~~~</noinclude>
14102 * <includeonly>~~~</includeonly>
14103 * <onlyinclude>~~~</onlyinclude>
14105 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14106 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14107 * 00:02, 1 January 1970 (UTC)
14108 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14109 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14110 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14115 ParserOutput flags from signature expansion (T84843)
14122 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14123 flags=user-signature
14128 pre-save transform: Signature expansion in nowiki tags (T2093)
14134 <nowiki>~~~~</nowiki>
14136 <includeonly><nowiki>~~~~</nowiki></includeonly>
14138 <noinclude><nowiki>~~~~</nowiki></noinclude>
14140 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14142 {{subst:Foo}} shall be converted to FOO
14144 As well as inside noinclude/onlyinclude
14145 <noinclude>{{subst:Foo}}</noinclude>
14146 <onlyinclude>{{subst:Foo}}</onlyinclude>
14148 But not inside includeonly
14149 <includeonly>{{subst:Foo}}</includeonly>
14153 <nowiki>~~~~</nowiki>
14155 <includeonly><nowiki>~~~~</nowiki></includeonly>
14157 <noinclude><nowiki>~~~~</nowiki></noinclude>
14159 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14161 FOO shall be converted to FOO
14163 As well as inside noinclude/onlyinclude
14164 <noinclude>FOO</noinclude>
14165 <onlyinclude>FOO</onlyinclude>
14167 But not inside includeonly
14168 <includeonly>{{subst:Foo}}</includeonly>
14172 Parsoid: Recognize nowiki with trailing space in tags
14176 <nowiki ><div>[[foo]]</nowiki >
14184 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14191 Parsoid: Recognize nowiki with odd capitalization
14195 <noWikI ><div>[[foo]]</Nowiki >
14197 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14202 Parsoid: Escape nowiki with trailing space in tags
14206 <p><nowiki > foo </nowiki ></p>
14207 <p>a<nowiki />b</p>
14208 <p>c<nowiki/ >d</p>
14210 <nowiki > foo </nowiki >
14218 Parsoid: Escape weird noWikI capitalizations
14222 <p><noWikI > foo </NoWikI ></p>
14224 <noWikI > foo </NoWikI >
14228 ### Message transform tests
14231 message transform: magic variables
14241 message transform: should not transform wiki markup
14251 message transform: <noinclude> in transcluded template (T6926)
14261 message transform: <onlyinclude> in transcluded template (T6926)
14271 {{#special:}} page name, known
14275 {{#special:Recentchanges}}
14277 Special:RecentChanges
14281 {{#special:}} page name with subpage, known
14285 {{#special:Recentchanges/param}}
14287 Special:RecentChanges/param
14291 {{#special:}} page name, unknown
14295 {{#special:foobar nonexistent}}
14297 Special:Foobar nonexistent
14301 {{#speciale:}} page name, known
14305 {{#speciale:Recentchanges}}
14307 Special:RecentChanges
14311 {{#speciale:}} page name with subpage, known
14315 {{#speciale:Recentchanges/param}}
14317 Special:RecentChanges/param
14321 {{#speciale:}} page name, unknown
14325 {{#speciale:foobar nonexistent}}
14327 Special:Foobar_nonexistent
14333 ### For Parsoid-specific tests, see
14334 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14339 parsoid=wt2html,wt2wt,html2html
14341 [[Image:foobar.jpg]]
14343 <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>
14346 <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>
14350 Serialize simple image with span wrapper
14354 <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>
14356 [[File:Foobar.jpg]]
14360 Simple image (using File: namespace, now canonical)
14362 [[File:Foobar.jpg]]
14364 <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>
14367 <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>
14371 Right-aligned image
14373 [[File:Foobar.jpg|right]]
14375 <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>
14378 <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>
14384 [[File:Foobar.jpg|right|Caption text]]
14386 <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>
14389 <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>
14393 Image with caption, T55312 #1
14395 [[File:Foobar.jpg|right|Caption page stuff]]
14397 <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>
14400 <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>
14404 Image with caption, T55312 #2
14406 [[File:Foobar.jpg|right|Caption page=]]
14408 <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>
14411 <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>
14415 Image with caption, T55312 #3
14417 [[File:Foobar.jpg|right|Caption page=stuff]]
14419 <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>
14422 <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>
14426 Image caption with pipe entity
14428 [[File:Foobar.jpg|thumb|one | two]]
14429 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14431 <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>
14432 <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>
14435 <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>
14436 <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>
14440 Allow empty links in image captions (T62753)
14444 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14449 <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>
14452 <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>
14454 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14455 </figcaption></figure>
14459 Titles in unlinked images (T23454)
14461 [[File:Foobar.jpg|link=|stuff]]
14463 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14466 <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>
14470 Link with empty target
14479 Image with link trail
14481 Linktrails should not work for images: [[File:Foobar.jpg]]s
14483 <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
14486 <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>
14490 Image with empty attribute
14492 parsoid=wt2html,wt2wt,html2html
14494 [[File:Foobar.jpg|right||Caption text]]
14496 <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>
14499 <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>
14503 1. Block image with individual attributes from templates
14505 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14507 <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>
14510 <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>
14514 2. Block Image with individual attributes from templates
14516 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14518 <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>
14521 <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>
14525 3. Inline image with individual attributes from templates
14527 [[File:Foobar.jpg|{{echo|50px}}]]
14529 <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>
14532 <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>
14535 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14536 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14538 Image with multiple attributes from the same template
14540 [[File:Foobar.jpg|{{image_attribs}}]]
14542 <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>
14545 <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>
14549 Image with link tails
14553 123[[File:Foobar.jpg]]456
14554 123[[File:Foobar.jpg|right]]456
14555 123[[File:Foobar.jpg|thumb]]456
14557 <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
14559 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
14560 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
14563 <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
14565 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
14566 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
14569 <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>
14570 <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>
14571 <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>
14575 Image with multiple captions -- only last one is accepted
14577 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14579 <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>
14582 <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>
14586 Image with multiple widths -- use last
14588 [[File:Foobar.jpg|200px|300px|caption]]
14590 <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>
14593 <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>
14597 Image with multiple alignments -- use first (T50664)
14601 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14603 [[File:Foobar.jpg|middle|text-top|caption]]
14605 <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>
14606 <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>
14609 <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>
14610 <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>
14614 Image with width attribute at different positions
14616 [[File:Foobar.jpg|200px|right|Caption]]
14617 [[File:Foobar.jpg|right|200px|Caption]]
14618 [[File:Foobar.jpg|right|Caption|200px]]
14620 <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>
14621 <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>
14622 <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>
14625 <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>
14626 <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>
14627 <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>
14630 # a sad bit of backward-compatibility
14632 Image with size specified with pxpx (T15500, T53628)
14634 parsoid=wt2html,wt2wt,html2html
14636 [[File:Foobar.jpg|20pxpx]]
14637 [[File:Foobar.jpg|200x20pxpx]]
14639 <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>
14640 <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>
14643 <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>
14647 Image with link parameter, wiki target
14649 [[File:Foobar.jpg|link=Main Page]]
14651 <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>
14654 <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>
14657 # parsoid T51293 (part 1)
14659 Image with link parameter, URL target
14661 [[File:Foobar.jpg|link=http://example.com/]]
14663 <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>
14666 <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>
14669 # parsoid T51293 (part 2)
14671 Image with link parameter, protocol-less URL target
14673 [[File:Foobar.jpg|link=//example.com/]]
14675 <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>
14678 <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>
14682 Escaping non-block captions (T107435)
14685 "modes": ["wt2wt"],
14687 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14691 [[Image:Foobar.jpg|caption]]
14693 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14696 # wgExternalLinkTarget not supported by Parsoid
14698 Image with link parameter, wgExternalLinkTarget
14700 [[Image:foobar.jpg|link=http://example.com/]]
14702 wgExternalLinkTarget='foobar'
14704 <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>
14709 Image with link parameter, wgNoFollowLinks set to false
14711 [[Image:foobar.jpg|link=http://example.com/]]
14713 wgNoFollowLinks=false
14715 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14720 Image with link parameter, wgNoFollowDomainExceptions
14722 [[Image:foobar.jpg|link=http://example.com/]]
14724 wgNoFollowDomainExceptions='example.com'
14726 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14730 # wgExternalLinkTarget not supported by Parsoid
14732 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14734 [[Image:foobar.jpg|link=http://example.com/|Title]]
14736 wgExternalLinkTarget='foobar'
14738 <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>
14743 Image with empty link parameter
14745 [[File:Foobar.jpg|link=]]
14747 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14750 <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>
14754 Image with link parameter (wiki target) and unnamed parameter
14756 [[File:Foobar.jpg|link=Main_Page|Title]]
14758 <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>
14761 <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>
14765 Image with link parameter (URL target) and unnamed parameter
14767 [[File:Foobar.jpg|link=http://example.com/|Title]]
14769 <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>
14772 <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>
14776 Thumbnail image with link parameter
14779 parsoid=wt2html,wt2wt,html2html
14781 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14783 <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>
14786 <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>
14790 Manually-specified thumbnail image
14794 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14796 <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>
14799 <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>
14803 Manually-specified thumbnail image with explicit link to wiki page
14806 parsoid=wt2html,wt2wt,html2html
14808 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14810 <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>
14813 <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>
14817 Manually-specified thumbnail image with explicit link to url
14820 parsoid=wt2html,wt2wt,html2html
14822 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14824 <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>
14827 <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>
14831 Manually-specified thumbnail image with explicit no link
14834 parsoid=wt2html,wt2wt,html2html
14836 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14838 <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>
14841 <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>
14845 Manually-specified thumbnail image with explicit link and alt text
14848 parsoid=wt2html,wt2wt,html2html
14850 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14852 <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>
14855 <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>
14859 Image with frame and link
14861 parsoid=wt2html,wt2wt,html2html
14863 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14865 <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>
14868 <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>
14872 Image with frame and link and explicit alt
14874 parsoid=wt2html,wt2wt,html2html
14876 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14878 <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>
14881 <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>
14885 Image with wiki markup in implicit alt
14887 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14889 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14891 <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>
14892 </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>
14895 <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>
14897 <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>
14901 Alt image option should handle most kinds of wikitext without barfing
14903 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14905 <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>
14908 <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>
14912 Image with table with attributes in caption
14914 parsoid=wt2html,html2html
14916 [[File:Foobar.jpg|thumb|
14923 <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>
14924 <table class="123">
14925 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14928 </figcaption></figure>
14932 Image with table with rows from templates in caption
14934 [[File:Foobar.jpg|thumb|
14940 <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>
14942 <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>
14944 </figcaption></figure>
14948 Image with nested tables in caption
14950 [[File:Foobar.jpg|thumb|Foo<br />
14959 <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}'/>
14963 <tbody><tr><td>z</td></tr>
14964 </tbody></table></td></tr>
14966 </figcaption></figure>
14970 Image with heading and horizontal rule in caption
14972 [[File:Foobar.jpg|thumb|
14978 <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>
14981 <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>
14982 <h3 id="Testing">Testing</h3>
14984 <hr data-parsoid='{"extra_dashes":10}'/>
14985 </figcaption></figure>
14988 ###################
14989 # Conflicting image format options.
14990 # First option specified should 'win'.
14991 # All three cases in each test should be identical.
14994 Image with 'frameless' first.
14996 parsoid=wt2html,wt2wt,html2html
14998 [[File:Foobar.jpg|frameless|caption]]
15000 [[File:Foobar.jpg|frameless|frame|caption]]
15002 [[File:Foobar.jpg|frameless|thumb|caption]]
15004 <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>
15005 </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>
15006 </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>
15009 <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>
15010 <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>
15011 <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>
15015 Image with 'frame' first.
15017 parsoid=wt2html,wt2wt,html2html
15019 [[File:Foobar.jpg|frame|caption]]
15020 [[File:Foobar.jpg|frame|frameless|caption]]
15021 [[File:Foobar.jpg|frame|thumb|caption]]
15023 <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>
15024 <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>
15025 <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>
15028 <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>
15029 <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>
15030 <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>
15034 Image with 'thumb' first.
15036 parsoid=wt2html,wt2wt,html2html
15038 [[File:Foobar.jpg|thumb|caption]]
15039 [[File:Foobar.jpg|thumb|frameless|caption]]
15040 [[File:Foobar.jpg|thumb|frame|caption]]
15042 <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>
15043 <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>
15044 <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>
15047 <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>
15048 <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>
15049 <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>
15052 ###################
15054 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15055 # and https://phabricator.wikimedia.org/T64258
15056 # Foobar has actual size of 1941x220
15057 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15058 # a scalable format.
15059 # 2. Framed images always ignore size options; always render at default size.
15060 # 3. "Unspecified format" and border are the only types which can be
15064 Image: unspecified format and border enlarge
15066 parsoid=wt2html,wt2wt,html2html
15068 [[File:Foobar.jpg|2000px]]
15070 [[File:Foobar.jpg|border|2000px]]
15072 <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>
15073 </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>
15076 <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>
15077 <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>
15081 Image: "unspecified format" and border reduce
15083 parsoid=wt2html,wt2wt,html2html
15085 [[File:Foobar.jpg|1000px]]
15087 [[File:Foobar.jpg|border|1000px]]
15089 <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>
15090 </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>
15093 <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>
15094 <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>
15098 Image: thumbs reduce
15100 parsoid=wt2html,wt2wt,html2html
15102 [[File:Foobar.jpg|thumb|50px]]
15104 <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>
15107 <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>
15111 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15113 parsoid=wt2html,wt2wt,html2html
15115 [[File:Foobar.jpg|thumb|2000px]]
15117 [[File:Foobar.svg|thumb|2000px]]
15119 <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>
15120 <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>
15123 <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>
15124 <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>
15128 Image: frameless can reduce in size
15130 parsoid=wt2html,wt2wt,html2html
15132 [[File:Foobar.jpg|frameless|50px]]
15134 <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>
15137 <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>
15141 Image: bitmap frameless can't be enlarged past original size, but vector can
15143 parsoid=wt2html,wt2wt,html2html
15145 [[File:Foobar.jpg|frameless|2000px]]
15147 [[File:Foobar.svg|frameless|2000px]]
15149 <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>
15150 </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>
15153 <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>
15154 <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>
15158 Image: framed images are always unscaled.
15160 parsoid=wt2html,wt2wt,html2html
15162 [[File:Foobar.jpg|frame]]
15164 [[File:Foobar.jpg|frame|50px]]
15166 [[File:Foobar.jpg|frame|50x50px]]
15168 [[File:Foobar.jpg|frame|2000px]]
15170 <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>
15171 <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>
15172 <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>
15173 <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>
15176 <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>
15177 <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>
15178 <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>
15179 <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>
15182 ###################
15185 Link to image page- image page normally doesn't exists, hence edit link
15186 Add test with existing image page
15187 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15191 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15196 T20784 Link to non-existent image page with caption should use caption as link text
15198 [[:Image:test|caption]]
15200 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15205 Frameless image caption with a free URL
15207 [[File:Foobar.jpg|http://example.com]]
15209 <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>
15212 <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>
15216 Thumbnail image caption with a free URL
15220 [[File:Foobar.jpg|thumb|http://example.com]]
15222 <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>
15225 <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>
15229 Thumbnail image caption with a free URL and explicit alt
15232 parsoid=wt2html,wt2wt,html2html
15234 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15236 <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>
15239 <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>
15243 SVG thumbnails with no language set
15246 [[File:Foobar.svg|thumb|caption]]
15248 <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>
15251 <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>
15255 SVG thumbnails with language de
15257 parsoid=wt2html,wt2wt,html2html
15259 [[File:Foobar.svg|thumb|caption|lang=de]]
15261 <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>
15264 <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>
15268 SVG thumbnails with invalid language code
15270 parsoid=wt2html,wt2wt,html2html
15272 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15274 <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>
15277 <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>
15281 T3887: A ISBN with a thumbnail
15283 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15285 <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>
15288 <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>
15292 T3887: A RFC with a thumbnail
15294 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15296 <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>
15299 <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>
15303 T3887: A mailto link with a thumbnail
15305 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15307 <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>
15310 <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>
15313 # Pending resolution to T2368
15315 T2648: Frameless image caption with a link
15317 [[File:Foobar.jpg|text with a [[link]] in it]]
15319 <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>
15322 <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>
15326 T2648: Frameless image caption with a link (suffix)
15328 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15330 <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>
15333 <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>
15337 T2648: Frameless image caption with an interwiki link
15339 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15341 <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>
15344 <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>
15348 T2648: Frameless image caption with a piped interwiki link
15350 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15352 <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>
15355 <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>
15359 T107474: Frameless image caption with <nowiki>
15361 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15363 <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>
15367 Escape HTML special chars in image alt text
15369 [[File:Foobar.jpg|& < > "]]
15371 <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>
15374 <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>
15378 Escape HTML special chars in image alt text with LanguageConverter
15382 [[File:Foobar.jpg|& < > "]]
15384 <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>
15387 <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>
15391 Entities in file name and attributes
15393 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15395 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15398 <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>
15402 T2499: Alt text should have Ӓ, not &1234;
15404 [[File:Foobar.jpg|♀]]
15406 <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>
15409 <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>
15413 Broken image caption with link
15415 parsoid=wt2html,wt2wt,html2html
15417 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15419 <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.
15422 <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>
15426 Image caption containing another image
15428 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15430 <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>
15433 <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>
15437 Image: caption containing a newline
15439 [[File:Foobar.jpg|This
15442 <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>
15445 <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>
15449 Image: caption containing leading space
15450 (The leading space should not trigger nowiki escaping in wt2wt mode)
15452 [[File:Foobar.jpg|thumb| bar]]
15454 <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>
15457 <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>
15460 # html/php output not have newlines after table, td, th, etc. because
15461 # Linker::makeThumbLink2() replaces the newlines with spaces since
15462 # the table is inside a caption.
15463 # FIXME: Verify if that circa 2004 fix is still required.
15465 Image: caption containing a table
15467 parsoid=wt2html,wt2wt,html2html
15469 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15475 and some more text.]]
15477 <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>
15480 <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
15483 <tr><th>Foo</th><th>Bar</th></tr>
15486 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15490 T5090: External links other than http: in image captions
15492 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15494 <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>
15497 <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>
15503 parsoid=wt2html,wt2wt,html2html
15505 [[Image:foobar.jpg|a|class=b]]
15507 <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>
15510 <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>
15514 Localized image handling (1).
15516 parsoid=wt2html,wt2wt,html2html
15519 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15521 <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>
15524 <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>
15528 Localized image handling (2).
15531 parsoid=wt2html,wt2wt,html2html
15534 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15536 <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>
15539 <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>
15543 Localized image handling (3).
15548 <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>
15550 [[File:Foobar.jpg|بندانگشتی]]
15554 "border", "frameless" and "class" attributes on an image.
15557 parsoid=wt2html,wt2wt,html2html
15559 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15561 <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>
15564 <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>
15567 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15569 Invalid image attributes (T64500)
15572 parsoid=wt2html,wt2wt,html2html
15574 [[File:Foobar.jpg|thumb|float|left|caption]]
15576 [[File:Foobar.jpg|thumb|righ|caption]]
15578 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15580 <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>
15581 <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>
15582 <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>
15585 <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>
15586 <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>
15587 <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>
15593 #REDIRECT [[File:Barfoo.jpg]]
15596 # FIXME: Parsoid should run this test -- but we'd need to teach the
15597 # mockAPI about the redirected Barfoo.jpg image.
15601 [[Image:Barfoo.jpg]]
15603 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15608 Missing image with uploads disabled
15612 [[File:Foobaz.jpg]]
15614 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15617 <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>
15620 # Parsoid-specific testing for images
15621 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15622 # Currently imperfect due to a flaw in the Parsoid testrunner
15624 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15628 Parsoid-specific image handling - simple image with size and middle alignment
15630 [[File:Foobar.jpg|middle|50px]]
15632 <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>
15636 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
15638 parsoid=wt2wt,wt2html,html2html
15640 [[Image:Foobar.jpg|middle|50px]]
15642 <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>
15646 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
15648 [[File:Foobar.jpg|50px|middle]]
15650 <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>
15654 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
15656 parsoid=wt2html,wt2wt,html2html
15658 [[Image:Foobar.jpg|50px|middle]]
15660 <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>
15664 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15666 [[File:Foobar.jpg|500x10px|baseline|caption]]
15668 <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>
15672 Parsoid-specific image handling - simple image with border and size spec
15674 [[File:Foobar.jpg|50px|border|caption]]
15676 <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>
15680 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15682 parsoid=wt2html,html2html
15684 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15686 <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>
15690 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
15692 parsoid=wt2html,html2html
15694 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15696 <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>
15700 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15702 parsoid=wt2html,html2html
15704 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15706 <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>
15710 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
15712 parsoid=wt2html,html2html
15714 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15716 <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>
15720 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
15722 parsoid=wt2html,wt2wt,html2html
15724 [[File:Foobar.jpg|frame|500x50px|caption]]
15726 <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>
15730 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
15732 parsoid=wt2html,html2html
15734 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15736 <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>
15740 Parsoid-specific image handling - frameless image with specific size, border, and caption
15742 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15744 <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>
15748 Parsoid-specific image handling - simple image with a formatted caption
15750 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15752 <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>
15756 Parsoid-specific image handling - caption with a template in it
15758 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15760 <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>
15764 Parsoid-specific image handling - caption with unbalanced tags in it
15766 parsoid=wt2html,wt2wt,html2html
15769 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15773 <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>
15778 Parsoid-specific image handling - empty caption (1)
15780 parsoid=wt2html,wt2wt
15782 [[File:Foobar.jpg|thumb|]]
15784 <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>
15787 # empty captions don't get serialized unless we're in the "round trip" case
15789 Parsoid-specific image handling - empty caption (2)
15793 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15794 <a href="./File:Foobar.jpg">
15795 <img resource="./File:Foobar.jpg"
15796 src="//example.com/images/3/3a/Foobar.jpg"
15797 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15798 height="25" width="220"/>
15800 <figcaption></figcaption>
15803 [[File:Foobar.jpg|thumb]]
15807 Parsoid-specific image handling - whitespace caption
15809 [[File:Foobar.jpg|thumb| ]]
15811 <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>
15815 Parsoid-specific image handling - lang option
15818 [[File:Foobar.svg|lang=de|caption]]
15822 <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>
15826 ## Edge case bugs in Parsoid from T93580
15828 T93580: 1. Templated <ref> inside block images
15830 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15834 <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>
15836 <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>
15840 T93580: 2. <ref> inside inline images
15842 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15846 <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>
15848 <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>
15852 T93580: 3. Templated <ref> inside inline images
15854 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15858 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{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>
15860 <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>
15867 Subpage test/subpage
15875 subpage title=[[Subpage test]]
15879 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15884 Subpage noslash link
15886 subpage title=[[Subpage test]]
15890 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15895 Subpage test/1/2/subpage
15901 Relative subpage noslash link
15903 parsoid=wt2wt,wt2html,html2html
15904 subpage title=[[Subpage test/1/2/3/4]]
15910 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15911 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15914 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15915 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15919 Parsoid: dot-slash prefixed wikilinks
15929 </p><p>[[././baz/]]
15934 </p><p>[[././baz/]]
15939 Render invalid page names as plain text (T53090)
15951 [[foo[http://example.com]xyz]]
15953 [[{{echo|./../foo}}|bar]]
15954 [[{{echo|foo/.}}|bar]]
15955 [[{{echo|foo/..}}|bar]]
15956 [[{{echo|foo~~~~bar}}]]
15957 [[{{echo|foo>bar}}]]
15958 [[{{echo|foo././bar}}]]
15959 [[{{echo|foo{bar}}]]
15960 [[{{echo|foo}bar}}]]
15961 [[{{echo|foo[bar}}]]
15962 [[{{echo|foo]bar}}]]
15963 [[{{echo|foo<bar}}]]
15965 <p>[[./../foo|bar]]
15975 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15976 </p><p>[[./../foo|bar]]
15989 <p>[[./../foo|bar]]
15999 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16001 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16002 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16003 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16004 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16005 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16006 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16007 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16008 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16009 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16010 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16011 [[<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>
16019 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16024 T2561: {{/Subpage}}
16026 subpage title=[[Page]]
16030 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16038 Category:MediaWiki User's Guide
16046 [[:Category:MediaWiki User's Guide]]
16048 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16057 [[Category:MediaWiki User's Guide]]
16059 cat=MediaWiki_User's_Guide sort=
16061 <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"}}'/>
16065 PAGESINCATEGORY invalid title fatal (r33546 fix)
16067 {{PAGESINCATEGORY:<bogus>}}
16074 Category with different sort key
16078 [[Category:MediaWiki User's Guide|Foo]]
16080 cat=MediaWiki_User's_Guide sort=Foo
16082 <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"}}'/>
16086 Category with identical sort key
16090 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16092 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16094 <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"}}'/>
16098 Category with empty sort key
16103 [[Category:MediaWiki User's Guide|]]
16105 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16109 Category with empty sort key and parentheses
16114 [[Category:Foo (bar)|]]
16116 [[Category:Foo (bar)|Foo]]
16120 Category with link tail
16125 123[[Category:Foo]]456
16127 123[[Category:Foo]]456
16131 Category with template
16136 [[Category:{{echo|Foo}}]]
16138 [[Category:{{echo|Foo}}]]
16142 Category with template in sort key
16147 [[Category:Foo|{{echo|Bar}}]]
16149 [[Category:Foo|{{echo|Bar}}]]
16153 Category with template in sort key and title
16158 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16160 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16163 ## We used to, but no longer wt2wt this test since the default serializer
16164 ## will normalize all categories to serialize on their own line.
16165 ## This wikitext usage is going to be fairly uncommon in production and
16166 ## selser will take care of preserving formatting in those scenarios.
16168 Category / paragraph interactions
16172 Foo [[Category:Baz]] Bar
16174 Foo [[Category:Baz]]
16182 [[Category:Baz]] Bar
16195 {{echo|[[Category:Baz]]}}
16208 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16209 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16210 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16211 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16212 <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>
16213 <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}}]}'/>
16214 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16217 ## We used to, but no longer wt2wt this test since the default serializer
16218 ## will normalize all categories to serialize on their own line.
16219 ## This wikitext usage is going to be fairly uncommon in production and
16220 ## selser will take care of preserving formatting in those scenarios.
16222 ## The whitespace on the empty line is part of the test. Please do not delete
16224 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16230 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16232 {{echo|[[Category:Foo]] and so should this!}}
16234 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16239 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16241 <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>
16244 ## Parsoid will not try to wt2wt this while preserving newlines because
16245 ## it suppresses excess newlines within list items -- and we don't want to
16246 ## introduce a special case just for categories, which is, in reality somewhat
16247 ## odd behavior -- categories are unlikely to be used in list items like this
16248 ## in top-level pages and are only likely to show up in template-generated
16249 ## list items where this RT-ing is a non-issue.
16251 ## The whitespace on the empty line is part of the test. Please do not delete
16253 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16259 [[Category:Foo]] and this should be part of the same list item
16262 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16264 <ul><li>This and this should be part of the same list item</li>
16265 <li>So should this and this should be part of the same list item</li></ul>
16268 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16269 <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>
16273 ## Newlines and categories that follow the last item of a list
16274 ## are treated differently because this (list followed by categories)
16275 ## is an extremely common pattern on wikis.
16277 3. Categories and newlines: newline suppression for last list item should RT properly
16298 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16300 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16301 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16303 <dl><dd>c</dd></dl>
16305 <link rel="mw:PageProp/Category" href="./Category:C"/>
16307 <dl><dt>d</dt></dl>
16309 <link rel="mw:PageProp/Category" href="./Category:D"/>
16313 4. Categories and newlines: newline suppression for last list item should RT properly
16321 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16323 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16326 ## only wt2html for this to make sure the algo only applies to the rightmost path
16328 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16341 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16343 <ul><li>d</li></ul></li></ul>
16344 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16347 ## We used to, but no longer wt2wt this test since the default serializer
16348 ## will normalize all categories to serialize on their own line.
16349 ## This wikitext usage is going to be fairly uncommon in production and
16350 ## selser will take care of preserving formatting in those scenarios.
16352 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16356 *a [[Category:Foo]]
16358 <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>
16361 # This test also demonstrates because of newline+category tunneling
16362 # through the list hander, template wrapping doesn't expand to the
16363 # containing list when the list item swallows the category.
16365 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16370 <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
16371 </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>
16375 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16379 {{echo|[[Category:Foo]]
16383 <ul><li>a</li></ul>
16385 <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">
16386 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16387 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16391 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16395 [[Category:Bar]]<!--boo1--> <!--boo2-->
16396 [[Category:Baz]]<!--boo3--> <!--boo4-->
16398 <ul><li>a</li></ul>
16400 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16401 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16405 Categories and newlines: should behave properly with linkprefix (T87753)
16420 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16421 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16425 No regressions on internal links following category (T174639)
16427 parsoid=wt2html,html2html
16429 [[Category:Foo]]<div>a
16434 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16437 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16439 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16442 # Note that Parsoid differs slightly from PHP due to T175421
16444 11. Special case where only newlines separate links (T175416)
16446 parsoid=wt2html,html2html
16450 [[Foo]][[es:Alimento]]
16455 <a href="/wiki/Foo" title="Foo">Foo</a>
16456 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16459 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16461 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16463 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16467 Category links with multiple namespaces
16469 [[Category:Project:Foo]]
16471 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16475 Parsoid: Serialize link to category page with colon escape
16481 [[:Category:Foo|Bar]]
16484 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16485 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16489 # We used to, but no longer wt2wt this test since the default serializer
16490 # will normalize all categories to serialize on their own line.
16491 # This wikitext usage is going to be fairly uncommon in production and
16492 # selser will take care of preventing whitespace insertion if this
16493 # occurs in an article.
16495 # html2html disabled for the same reason (whitespace insertion between
16498 # html2wt disabled because it localizes the "Category" namespace.
16500 Link prefix/suffixes aren't applied to category links
16510 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16514 Link prefix/suffixes aren't applied to language links
16524 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16528 Parsoid: Serialize link to file page with colon escape
16534 [[:File:Foo.png|Bar]]
16537 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16538 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16543 Parsoid: Serialize a genuine category link without colon escape
16548 [[Category:Foo|Bar]]
16550 <link rel="mw:PageProp/Category" href="./Category:Foo">
16551 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16555 Normalize hrefs properly before testing for invalid link targets (T72894)
16559 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16561 [[Category:Toxine bactérienne]]
16565 Parsoid: Defaultsort
16567 {{DEFAULTSORT:Foo}}
16569 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16572 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16573 # But, this is a limitation of our representation and is documented in
16574 # TemplateHandler.js in processSpecialMagicWord
16576 Parsoid: Defaultsort (template-generated)
16578 {{{{echo|DEFAULTSORT}}:Foo}}
16580 <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"}]]}'/>
16584 ### Inter-language links
16587 Interlanguage links
16595 es:Alimento fr:Nourriture zh:食品
16597 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16598 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16599 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16603 Duplicate interlanguage links (T26502)
16614 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16615 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16616 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16617 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16624 Basic section headings
16631 ===Smaller headline===
16634 <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>
16637 <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>
16640 <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>
16646 Section headings with TOC
16649 ===Subheadline 1===
16650 =====Skipping a level=====
16651 ======Skipping a level======
16655 ===Another headline===
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_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16661 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16663 <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>
16665 <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>
16672 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16674 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16680 <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>
16681 <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>
16682 <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>
16683 <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>
16684 <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>
16687 <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>
16692 TOC anchors don't collide
16700 <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>
16702 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16703 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16704 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16705 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16709 <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>
16710 <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>
16711 <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>
16712 <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>
16716 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16717 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16719 Handling of sections up to level 6 and beyond
16724 ==Level 2 Heading==
16725 ===Level 3 Heading===
16726 ====Level 4 Heading====
16727 =====Level 5 Heading=====
16728 ======Level 6 Heading======
16729 =======Level 7 Heading=======
16730 ========Level 8 Heading========
16731 =========Level 9 Heading=========
16732 ==========Level 10 Heading==========
16734 <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>
16736 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16738 <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>
16740 <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>
16742 <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>
16744 <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>
16746 <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>
16747 <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>
16748 <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>
16749 <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>
16750 <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>
16764 <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>
16765 <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>
16766 <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>
16767 <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>
16768 <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>
16769 <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>
16770 <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>
16771 <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>
16772 <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>
16773 <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>
16776 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16777 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16778 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16779 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16780 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16781 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16782 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16783 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16784 <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>
16785 <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>
16789 TOC regression (T11764)
16793 ====title 1.1.1====
16798 <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>
16800 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16802 <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>
16804 <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>
16807 <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>
16810 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16812 <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>
16818 <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>
16819 <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>
16820 <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>
16821 <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>
16822 <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>
16823 <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>
16828 TOC for heading containing <span id="..."></span> (T96153)
16831 ==<span id="old-anchor"></span>New title==
16833 <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>
16835 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16839 <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>
16844 TOC with wgMaxTocLevel=3 (T8204)
16850 ====title 1.1.1====
16855 <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>
16857 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16859 <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>
16860 <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>
16863 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16865 <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>
16871 <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>
16872 <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>
16873 <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>
16874 <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>
16875 <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>
16876 <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>
16881 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16887 ====Section 1.1.1====
16888 ====Section 1.1.1.1====
16891 <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>
16893 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16895 <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>
16898 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16902 <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>
16903 <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>
16904 <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>
16905 <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>
16906 <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>
16912 Resolving duplicate section names
16917 <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>
16918 <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>
16923 Resolving duplicate section names with differing case (T12721)
16928 <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>
16929 <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>
16941 Template with sections, __NOTOC__
16948 <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>
16949 <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>
16950 <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>
16951 <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>
16956 __NOEDITSECTION__ keyword
16962 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16963 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16968 Link inside a section heading
16970 ==Section with a [[Main Page|link]] in it==
16972 <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>
16977 TOC regression (T14077)
16984 <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>
16986 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16988 <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>
16991 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16995 <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>
16996 <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>
16997 <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>
17002 T3219 URL next to image (good)
17004 http://example.com [[File:Foobar.jpg]]
17006 <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>
17009 <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>
17012 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17014 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17016 parsoid=wt2html,html2html
17019 The line above must have a trailing space!
17022 But just in case it doesn't...
17024 <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>
17025 <p>The line above must have a trailing space!
17027 <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>
17028 <p>But just in case it doesn't...
17031 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17032 <p>The line above must have a trailing space!</p>
17033 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17035 <p>But just in case it doesn't...</p>
17039 Header with special characters (T27462)
17041 The tooltips shall not show entities to the user (ie. be double escaped)
17058 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17060 <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>
17062 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17063 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17064 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17065 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17066 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17070 <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>
17073 <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>
17076 <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>
17079 <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>
17082 <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>
17086 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17088 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17091 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17094 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17097 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17100 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17105 Header with space, plus and underscore as entity
17107 Id should not contain + for spaces
17109 ==Space between Text==
17112 ==Space-Entity between Text==
17115 ==Plus+between+Text==
17118 ==Plus-Entity+between+Text==
17121 ==Underscore_between_Text==
17124 ==Underscore-Entity_between_Text==
17127 [[#Space between Text]]
17128 [[#Space-Entity between Text]]
17129 [[#Plus+between+Text]]
17130 [[#Plus-Entity+between+Text]]
17131 [[#Underscore_between_Text]]
17132 [[#Underscore-Entity_between_Text]]
17134 <p>Id should not contain + for spaces
17136 <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>
17138 <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>
17139 <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>
17140 <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>
17141 <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>
17142 <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>
17143 <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>
17147 <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>
17150 <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>
17153 <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>
17156 <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>
17159 <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>
17162 <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>
17164 </p><p><a href="#Space_between_Text">#Space between Text</a>
17165 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17166 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17167 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17168 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17169 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17172 <p>Id should not contain + for spaces</p>
17174 <h2 id="Space_between_Text">Space between Text</h2>
17177 <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>
17180 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17183 <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>
17186 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17189 <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>
17192 <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>
17193 <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>
17194 <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>
17195 <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>
17196 <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>
17197 <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>
17200 # Parsoid html2wt disabled because it adds padding spaces around =
17202 Headers with excess '=' characters
17203 (Are similar tests necessary beyond the 1st level?)
17205 parsoid=wt2html,wt2wt,html2html
17209 =''italic'' heading==
17210 ==''italic'' heading=
17212 <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>
17214 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17215 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17216 <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>
17217 <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>
17221 <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>
17222 <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>
17223 <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>
17224 <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>
17227 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17228 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17229 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17230 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17234 HTML headers vs TOC (T25393)
17235 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17247 <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>
17249 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17251 <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>
17252 <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>
17255 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17257 <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>
17258 <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>
17264 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17265 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17266 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17267 <h1><span class="mw-headline" id="Header_2">Header 2
17269 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17270 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17273 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17274 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17275 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17277 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17279 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17280 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17281 <meta property="mw:PageProp/noeditsection"/>
17285 Single-line or multiline-comments can follow headings
17287 parsoid=wt2html,wt2wt
17295 <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>
17296 <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>
17297 <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>
17300 <h2 id="foo">foo</h2><!---->
17301 <h2 id="bar">bar</h2><!--c1-->
17302 <h2 id="baz">baz</h2><!--
17308 T3219 URL next to image (broken)
17310 http://example.com[[File:Foobar.jpg]]
17312 <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>
17315 <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>
17319 T3186 news: in the middle of text
17321 http://en.wikinews.org/wiki/Wikinews:Workplace
17323 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17329 Namespaced link must have a title
17338 Namespaced link must have a title (bad fragment version)
17340 [[Project:#fragment]]
17342 <p>[[Project:#fragment]]
17348 ### HTML tags and HTML attributes
17352 div with no attributes
17354 <div>HTML rocks</div>
17356 <div>HTML rocks</div>
17361 div with double-quoted attribute
17363 <div id="rock">HTML rocks</div>
17365 <div id="rock">HTML rocks</div>
17370 div with single-quoted attribute
17372 <div id='rock'>HTML rocks</div>
17374 <div id="rock">HTML rocks</div>
17379 div with unquoted attribute
17381 <div id=rock>HTML rocks</div>
17383 <div id="rock">HTML rocks</div>
17388 div with illegal double attributes
17390 <div id="a" id="b">HTML rocks</div>
17392 <div id="b">HTML rocks</div>
17397 div with empty attribute value, space before equals
17399 parsoid=wt2html,html2html
17401 <div class =>HTML rocks</div>
17403 <div class="">HTML rocks</div>
17406 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17410 div with multiple empty attribute values
17412 wgFragmentMode=[ 'html5', 'legacy' ]
17414 parsoid=wt2html,html2html
17416 <div id= title=>HTML rocks</div>
17418 <div id="title=">HTML rocks</div>
17421 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17424 # FIXME Parsoid doesn't actually match PHP here.
17425 # Probably we should use the synthetic <foo /> or <indicator>
17426 # extensions for this test, which are enabled when running parser tests.
17428 Extension tag in attribute value
17430 <span title="<translate>123</translate>">ok</span>
17431 !! html/php+disabled
17432 <p><span title="<translate>123</translate>">ok</span>
17435 <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>
17439 table with multiple empty attribute values
17441 parsoid=wt2html,html2html
17447 <table title="id=">
17453 <table title="id=">
17454 <tbody><tr><td>hi</td></tr>
17459 div with braces in attribute value
17461 <div title="{}">Foo</div>
17463 <div title="{}">Foo</div>
17466 <div title="{}">Foo</div>
17470 div with empty attribute value, no space before equals
17472 parsoid=wt2html,html2html
17474 <div class=>HTML rocks</div>
17476 <div class="">HTML rocks</div>
17479 <div class="">HTML rocks</div>
17483 HTML multiple attributes correction
17485 <p class="error" class="awesome">Awesome!</p>
17487 <p class="awesome">Awesome!</p>
17492 Table multiple attributes correction
17495 !+ class="error" class="awesome"|status
17500 <th class="awesome">status
17508 <DIV ID="x">HTML ROCKS</DIV>
17510 <div id="x">HTML ROCKS</div>
17515 Non-ASCII pseudo-tags are rendered as text
17524 Pseudo-tag with URL 'name' renders as url link
17526 <http://example.com/>
17528 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17533 text with amp in the middle of nowhere
17537 <p>Remember AT&T?
17542 text with character entity: eacute
17544 I always thought é was a cute letter.
17546 <p>I always thought é was a cute letter.
17551 text with entity-escaped character entity-like string: eacute
17553 I always thought &eacute; was a cute letter.
17555 <p>I always thought &eacute; was a cute letter.
17560 text with undefined character entity: xacute
17562 I always thought &xacute; was a cute letter.
17564 <p>I always thought &xacute; was a cute letter.
17571 <data value="5">five</data>
17572 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17573 <mark>This highlighted text</mark>
17575 <p><data value="5">five</data>
17576 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17577 <mark>This highlighted text</mark>
17582 HTML tag with leading space is parsed as text
17586 <p>< div>foo< /div>
17590 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17591 ## the HTML5 parsing spec.
17593 Element with broken attribute syntax
17597 <div style=" style="123">hi</div>
17600 <div style="123">hi</div>
17604 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17605 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17609 ### Nesting tests (see T43545, T52604, T53081)
17612 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17613 # Note that html2wt is considerably more difficult if we use <b> in
17614 # the test case, instead of <small>
17616 Ensure that HTML adoption agency algorithm is properly implemented.
17618 <small>X<small>Y</small>Z</small>
17620 <p><small>X<small>Y</small>Z</small>
17624 # This was T43545 in the PHP parser.
17628 <kbd>X<kbd>Y</kbd>Z</kbd>
17630 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17634 # The following cases were T53081 in the PHP parser.
17635 # Note that there are some other nestable tags (b, i, etc) which are
17636 # not covered; see T53081 for discussion.
17641 <em>X<em>Y</em>Z</em>
17643 <p><em>X<em>Y</em>Z</em>
17648 Nesting of <strong>
17650 <strong>X<strong>Y</strong>Z</strong>
17652 <p><strong>X<strong>Y</strong>Z</strong>
17661 <p><q>X<q>Y</q>Z</q>
17668 <ruby>X<ruby>Y</ruby>Z</ruby>
17670 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17677 <bdo>X<bdo>Y</bdo>Z</bdo>
17679 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17691 [[Media:Foobar.jpg]]
17692 [[Media:Video.ogv]]
17693 [[:Media:Video.ogv]]
17695 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17696 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17697 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17700 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17701 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17702 <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>
17706 Media link with text
17708 [[Media:Foobar.jpg|A neat file to look at]]
17710 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17713 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17716 # FIXME: this is still bad HTML tag nesting
17717 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17718 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17720 Media link with nasty text
17722 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17724 <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>
17727 <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>
17729 <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>
17734 Media link to nonexistent file (T3702)
17736 [[Media:No such.jpg]]
17737 [[Media:No_such file.jpg]]
17739 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17740 <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>
17743 <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>
17744 <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>
17748 Image link to nonexistent file (T3850 - good)
17750 [[File:No_such.jpg]]
17752 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17755 <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>
17759 :Image link to nonexistent file (T3850 - bad)
17761 [[:Image:No such.jpg]]
17763 <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>
17766 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17770 Character reference normalization in link text (T3938)
17772 [[Main Page|this&that]]
17774 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17781 Test for unicode normalization
17783 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17787 (T21451) Links should refer to the normalized form.
17795 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17796 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17797 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17798 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17799 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17804 Empty attribute crash test (T4067)
17806 <font color="">foo</font>
17808 <p><font color="">foo</font>
17813 Empty attribute crash test single-quotes (T4067)
17815 <font color=''>foo</font>
17817 <p><font color="">foo</font>
17822 Attribute test: equals, then nothing
17824 parsoid=wt2html,html2html
17826 <font color=>foo</font>
17828 <p><font color="">foo</font>
17831 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17835 Attribute test: unquoted value
17837 parsoid=wt2html,html2html
17839 <font color=x>foo</font>
17841 <p><font color="x">foo</font>
17844 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17848 Attribute test: unquoted but illegal value (hash)
17850 <font color=#x>foo</font>
17852 <p><font color="#x">foo</font>
17856 # Parsoid does not serialize to empty attribute syntax,
17857 # so wt2wt and html2wt cases are skipped
17859 Attribute test: no value (T54330)
17861 parsoid=wt2html,html2html
17863 <font color>foo</font>
17865 <p><font color="">foo</font>
17868 <p><font color="">foo</font></p>
17872 T4095: link with three closing brackets
17876 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17879 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17883 T4095: link with pipe and three closing brackets
17885 [[Main Page|link]]]
17887 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17890 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17894 T4095: link with pipe and three closing brackets, version 2
17896 [[Main Page|[http://example.com/]]]
17898 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17901 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17910 Template:Dangerous attribute
17912 " onmouseover="alert(document.cookie)
17916 Template:Dangerous style attribute
17918 border-size: expression(alert(document.cookie))
17924 <div style="float: right; {{{1}}}">Magic div</div>
17928 T4304: HTML attribute safety (safe template; regression T4309)
17930 <div title="{{test}}"></div>
17932 <div title="This is a test template"></div>
17935 <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>
17938 # Parsoid has enough context to handle this case
17940 T4304: HTML attribute safety (dangerous template; 2309)
17942 <div title="{{dangerous attribute}}"></div>
17944 <div title=""></div>
17947 <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>
17951 T4304: HTML attribute safety (dangerous style template; 2309)
17953 <div style="{{dangerous style attribute}}"></div>
17955 <div style="/* insecure input */"></div>
17958 <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>
17962 T4304: HTML attribute safety (safe parameter; 2309)
17964 {{div style|width: 200px}}
17966 <div style="float: right; width: 200px">Magic div</div>
17969 <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>
17973 T4304: HTML attribute safety (unsafe parameter; 2309)
17975 {{div style|width: expression(alert(document.cookie))}}
17977 <div style="/* insecure input */">Magic div</div>
17980 <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>
17983 ## Parsoid output here differs; needs investigation.
17985 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17987 {{div style|"><script>alert(document.cookie)</script>}}
17989 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17993 ## Parsoid output here differs; needs investigation.
17995 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17997 {{div style|" ><script>alert(document.cookie)</script>}}
17999 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18004 T4304: HTML attribute safety (link)
18006 <div title="[[Main Page]]"></div>
18008 <div title="[[Main Page]]"></div>
18011 <div title="[[Main Page]]"></div>
18015 T4304: HTML attribute safety (italics)
18017 <div title="''foobar''"></div>
18019 <div title="''foobar''"></div>
18024 T4304: HTML attribute safety (bold)
18026 <div title="'''foobar'''"></div>
18028 <div title="'''foobar'''"></div>
18033 T4304: HTML attribute safety (ISBN)
18035 <div title="ISBN 1234567890"></div>
18037 <div title="ISBN 1234567890"></div>
18042 T4304: HTML attribute safety (RFC)
18044 <div title="RFC 1234"></div>
18046 <div title="RFC 1234"></div>
18051 T4304: HTML attribute safety (PMID)
18053 <div title="PMID 1234567890"></div>
18055 <div title="PMID 1234567890"></div>
18060 T4304: HTML attribute safety (web link)
18062 <div title="http://example.com/"></div>
18064 <div title="http://example.com/"></div>
18069 T4304: HTML attribute safety (named web link)
18071 <div title="[http://example.com/ link]"></div>
18073 <div title="[http://example.com/ link]"></div>
18076 <div title="[http://example.com/ link]"></div>
18080 T5244: HTML attribute safety (extension; safe)
18082 <div style="<nowiki>background:blue</nowiki>"></div>
18084 <div style="background:blue"></div>
18087 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18091 T5244: HTML attribute safety (extension; unsafe)
18093 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18095 <div style="/* insecure input */"></div>
18098 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18101 # More MSIE fun discovered by Tom Gilder
18104 MSIE CSS safety test: spurious slash
18106 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18108 <div style="/* insecure input */">evil</div>
18111 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18115 MSIE CSS safety test: hex code
18117 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18119 <div style="/* insecure input */">evil</div>
18122 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18126 MSIE CSS safety test: comment in url
18128 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18130 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18133 <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>
18137 MSIE CSS safety test: comment in expression
18139 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18141 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18144 <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>
18148 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18150 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18152 <p style="/* invalid control char */">A</p>
18155 <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>
18159 MSIE 6 CSS safety test: Fullwidth (T57332)
18161 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18162 <div style="top:EXPRESSION(alert())">B</div>
18164 <p style="/* insecure input */">A</p>
18165 <div style="/* insecure input */">B</div>
18168 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18169 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18173 MSIE 6 CSS safety test: IPA extensions (T57332)
18175 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18176 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18178 <div style="/* insecure input */">A</div>
18179 <p style="/* insecure input */">B</p>
18182 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18183 <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>
18187 MSIE 6 CSS safety test: sup/sub script (T57332)
18189 <div style="background-image:url⁽javascript:alert())">A</div>
18190 <div style="background-image:url₍javascript:alert())">B</div>
18191 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18193 <div style="/* insecure input */">A</div>
18194 <div style="/* insecure input */">B</div>
18195 <p style="/* insecure input */">C</p>
18198 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18199 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18200 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18206 parsoid=wt2html,html2html
18209 title="data:text/html,<img src=1 onerror=alert(1)>"
18210 style="-o-link:attr(title);-o-link-source:current">X</div>
18212 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18215 <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>
18219 MSIE 6 CSS safety test: Repetition markers (T57332)
18221 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18222 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18223 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18224 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18225 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18226 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18227 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18229 <p style="/* insecure input */">A</p>
18230 <p style="/* insecure input */">B</p>
18231 <p style="/* insecure input */">C</p>
18232 <p style="/* insecure input */">D</p>
18233 <p style="/* insecure input */">E</p>
18234 <p style="/* insecure input */">F</p>
18235 <p style="/* insecure input */">G</p>
18238 <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>
18239 <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>
18240 <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>
18241 <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>
18242 <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>
18243 <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>
18244 <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>
18248 Table attribute legitimate extension
18251 !+ style="<nowiki>color:blue</nowiki>"|status
18256 <th style="color:blue">status
18262 Table attribute safety
18265 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18270 <th style="/* insecure input */">status
18276 CSS line continuation 1
18278 <div style="background-image: u\ rl(test.jpg);"></div>
18280 <div style="/* insecure input */"></div>
18285 CSS line continuation 2
18287 <div style="background-image: u\ rl(test.jpg); "></div>
18289 <div style="/* invalid control char */"></div>
18300 Expansion of multi-line templates in attribute values (T8255)
18302 <div style="background: {{identity|#00FF00}}">-</div>
18304 <div style="background: #00FF00">-</div>
18309 Expansion of multi-line templates in attribute values (T8255 sanity check)
18311 <div style="background:
18314 <div style="background: #00FF00">-</div>
18317 <div style="background:
18322 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18324 <div style="background: #00FF00">-</div>
18326 <div style="background: #00FF00">-</div>
18331 Tags which are hidden from tidiers cannot pass through the Sanitizer
18333 <mw:toc><script>alert();</script></mw:toc>
18335 <p><mw:toc><script>alert();</script></mw:toc>
18340 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18344 Parser hook: empty input
18355 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18358 ## Don't expect parsoid to rt this form.
18360 Parser hook: empty input using terminated empty elements
18362 parsoid=wt2html,html2html
18373 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18377 Parser hook: empty input using terminated empty elements (space before)
18388 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18392 Parser hook: basic input
18403 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18406 ## Don't expect parsoid to rt this form.
18408 Parser hook: case insensitive
18410 parsoid=wt2html,html2html
18421 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18424 ## Don't expect parsoid to rt this form.
18426 Parser hook: case insensitive, redux
18428 parsoid=wt2html,html2html
18439 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18443 Parser hook: nested tags
18445 <tag><tag></tag></tag>
18454 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18458 Parser hook: basic arguments
18460 <tag width="200" height="100" depth="50" square=""></tag>
18473 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18476 ## Don't expect parsoid to rt this form.
18478 Parser hook: basic arguments, variations
18480 parsoid=wt2html,html2html
18482 <tag width=200 height = "100" depth = '50' square></tag>
18495 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18499 Parser hook: argument containing a forward slash (T7344)
18501 <tag filename="/tmp/bla"></tag>
18506 'filename' => '/tmp/bla',
18511 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18514 ## Don't expect parsoid to rt this form.
18516 Parser hook: empty input using terminated empty elements (T4374)
18518 parsoid=wt2html,html2html
18530 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18533 ## </tag> should be output literally since there is no matching tag that begins it
18534 ## Don't expect parsoid to rt this form.
18536 Parser hook: basic arguments using terminated empty elements (T4374)
18540 <tag width=200 height = "100" depth = '50' square/>
18557 <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
18561 ## Don't expect parsoid to rt this form.
18563 Parser hook: Don't allow unclosed extension tags
18569 this is a '''test'''
18571 <p>test <tag>123
18572 </p><p>this is a <b>test</b>
18575 <p>test <tag>123</p>
18577 <p>this is a <b>test</b></p>
18581 Parser hook: horizontal rule inside extension tag that outputs <pre>
18602 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18606 Parser hook: static parser hook not inside a comment
18608 <statictag>hello, world</statictag>
18610 <statictag action="flush" />
18616 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18617 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18621 Parser hook: static parser hook inside a comment
18623 <!-- <statictag>hello, world</statictag> -->
18624 <statictag action="flush" />
18629 <!-- <statictag>hello, world</statictag> -->
18630 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18633 # Nested template calls; this case was broken by Parser.php rev 1.506,
18637 Template:One-parameter
18639 (My parameter is: {{{1}}})
18643 Template:Map-one-parameter
18645 {{{{{1}}}|{{{2}}}}}
18649 Nested template calls
18651 {{Map-one-parameter|One-parameter|param}}
18653 <p>(My parameter is: param)
18662 # Remex wraps empty tag runs with p-tags.
18663 # Parsoid strips them out during p-wrapping.
18665 Sanitizer: Closing of open tags
18667 <s></s><table></table>
18669 <p><s></s></p><table></table>
18671 <s></s><table></table>
18675 Sanitizer: Closing of open but not closed tags
18684 Sanitizer: Closing of closed but not open tags
18690 <p class="mw-empty-elt">
18696 Sanitizer: Closing of closed but not open table tags
18700 Table not started</td></tr></table>
18702 <p>Table not started
18707 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18709 wgFragmentMode=[ 'html5', 'legacy' ]
18711 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18713 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18716 <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>
18720 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18722 wgFragmentMode=[ 'legacy' ]
18724 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18726 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18730 # In HTML5, the restrictions are that id must contain at least one character,
18731 # and must not contain any space characters.
18733 Sanitizer: Validating the contents of the id attribute (T6515)
18737 <br id="" /><br id="a space" />
18742 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18744 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18748 <br id="foo" /><br id="foo" />
18750 Something need to be done. foo-2 ?
18754 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18757 <meta itemprop="hello" content="world">
18758 <meta http-equiv="refresh" content="5">
18759 <meta itemprop="hello" http-equiv="refresh" content="5">
18760 <link itemprop="hello" href="{{SERVER}}">
18761 <link rel="stylesheet" href="{{SERVER}}">
18762 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18766 <p> <meta itemprop="hello" content="world" />
18767 <meta http-equiv="refresh" content="5">
18768 <meta itemprop="hello" content="5" />
18769 <link itemprop="hello" href="http://example.org" />
18770 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18771 <link itemprop="hello" href="http://example.org" />
18778 Sanitizer: Strip comments from CSS attributes
18780 parsoid=wt2html,wt2wt
18782 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18784 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18787 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18791 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18793 [[meatball:Soft"Security]]
18795 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18798 <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>
18802 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18804 [[meatball:Foo<Bar]]
18805 [[meatball:Foo>Bar]]
18806 [[meatball:Foo<bar]]
18807 [[meatball:Foo>bar]]
18809 <p>[[meatball:Foo<Bar]]
18810 [[meatball:Foo>Bar]]
18811 [[meatball:Foo<bar]]
18812 [[meatball:Foo>bar]]
18815 <p>[[meatball:Foo<Bar]]
18816 [[meatball:Foo>Bar]]
18817 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18818 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18822 Language converter: output gets cut off unexpectedly (T7757)
18826 this bit is safe: }-
18828 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18830 then we get cut off here: }-
18832 all additional text is vanished
18834 <p>this bit is safe: }-
18835 </p><p>but if we add a conversion instance: xxx
18836 </p><p>then we get cut off here: }-
18837 </p><p>all additional text is vanished
18840 <p>this bit is safe: }-</p>
18841 <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>
18842 <p>then we get cut off here: }-</p>
18843 <p>all additional text is vanished</p>
18847 Language converter glossary rules inside attributes (T119158)
18849 language=sr variant=sr-el
18851 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18853 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18856 </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>
18859 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18861 <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>
18865 Self closed html pairs (T7487)
18867 <center><font id="bug" />Centered text</center>
18868 <div><font id="bug2" />In div text</div>
18870 <center><font id="bug"></font>Centered text</center>
18871 <div><font id="bug2"></font>In div text</div>
18875 Punctuation: nbsp before exclamation
18879 <p>C'est grave !
18884 Punctuation: CSS !important (T13874)
18886 <div style="width:50% !important">important</div>
18888 <div style="width:50% !important">important</div>
18893 Punctuation: CSS ! important (T13874; with space after)
18895 <div style="width:50% ! important">important</div>
18897 <div style="width:50% ! important">important</div>
18902 HTML bullet list, closed tags (T7497)
18915 <ul data-parsoid='{"stx":"html"}'>
18916 <li data-parsoid='{"stx":"html"}'>One</li>
18917 <li data-parsoid='{"stx":"html"}'>Two</li>
18923 HTML bullet list, unclosed tags (T7497)
18935 <ul data-parsoid='{"stx":"html"}'>
18936 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18937 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18943 HTML ordered list, closed tags (T7497)
18956 <ol data-parsoid='{"stx":"html"}'>
18957 <li data-parsoid='{"stx":"html"}'>One</li>
18958 <li data-parsoid='{"stx":"html"}'>Two</li>
18964 HTML ordered list, unclosed tags (T7497)
18977 <ol data-parsoid='{"stx":"html"}'>
18978 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18979 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18985 HTML nested bullet list, closed tags (T7497)
19008 <ul data-parsoid='{"stx":"html"}'>
19009 <li data-parsoid='{"stx":"html"}'>One</li>
19010 <li data-parsoid='{"stx":"html"}'>Two:
19011 <ul data-parsoid='{"stx":"html"}'>
19012 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19013 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19020 HTML nested bullet list, open tags (T7497)
19042 HTML nested ordered list, closed tags (T7497)
19067 HTML nested ordered list, open tags (T7497)
19104 HTML ordered list item with parameters oddity
19106 <ol><li id="fragment">One</li>
19109 <ol><li id="fragment">One</li>
19114 # parsoid doesn't explicitly mark autonumbered links, see T55505
19116 T7918: autonumbering
19118 [http://first/] [http://second] [ftp://ftp]
19122 [mailto:enclosed@mail.tld With target]
19124 [mailto:enclosed@mail.tld]
19126 mailto:inline@mail.tld
19128 <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>
19129 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19130 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19131 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19132 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19135 <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>
19136 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19137 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19138 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19139 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19144 # Security and HTML correctness
19145 # From Nick Jenkins' fuzz testing
19149 Fuzz testing: Parser13
19163 # Note that Parsoid output differs from the PHP parser here: the PHP
19164 # parser breaks the URL for the magic word, while in Parsoid the URL
19165 # production takes precedence.
19167 Fuzz testing: Parser14
19172 <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>
19173 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>
19175 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19181 <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>
19182 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>
19184 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19188 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19189 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19193 Fuzz testing: Parser14-table
19195 parsoid=wt2html,html2html
19200 <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>
19201 <table style="__TOC__">
19206 <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>
19207 <table style="__TOC__">
19214 <table style="__TOC__"></table>
19217 # Known to produce bogus xml (extra </td>)
19218 # Don't add the html/php section since it generates broken HTML
19220 Fuzz testing: Parser16
19237 Fuzz testing: Parser21
19240 !irc://{{ftp://a" onmouseover="alert('hello world');"
19245 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19255 Fuzz testing: Parser22
19257 http://===r:::https://b
19261 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19269 # Known to produce bad XML for now
19271 Fuzz testing: Parser24
19278 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19279 <br style="onmouseover='alert(document.cookie);' " />
19281 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19286 <u class="|">}}}} >
19287 <br style="onmouseover='alert(document.cookie);'" />
19289 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19297 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19298 <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>"}'/>}}}} >
19299 <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}'>
19303 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19306 # Note: the current result listed for this is not what the original one was,
19307 # but the original bug was JavaScript injection, which is fixed in any case.
19308 # It's not clear that the original result listed was any more correct than the
19309 # current one. Original result:
19312 # <li class="||">
19313 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19315 Fuzz testing: Parser25 (T8055)
19321 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19323 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19326 <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"]}'>
19327 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19331 Fuzz testing: URL adjacent extension (with space, clean)
19333 http://example.com <nowiki>junk</nowiki>
19335 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19338 <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>
19342 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19344 http://example.com<nowiki>junk</nowiki>
19346 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19349 <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>
19353 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19355 http://example.com<pre>junk</pre>
19357 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19360 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19362 <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>
19366 Fuzz testing: image with bogus manual thumbnail
19368 [[Image:foobar.jpg|thumbnail= ]]
19370 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19373 <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>
19376 # Parsoid will emit the newline literally in wt2wt; see next test case.
19378 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19382 <pre dir=" "></pre>
19384 <pre dir=" "></pre>
19387 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19388 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19392 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19396 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19397 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19407 Templates in extension attributes are not expanded
19409 <pre dir="{{echo|ltr}}"></pre>
19411 <pre dir="{{echo|ltr}}"></pre>
19414 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19418 Parsing optional HTML elements (T8171)
19423 <td> Some tabular data</td>
19424 <td> More tabular data ...
19425 <td> And yet som tabular data</td>
19431 <td> Some tabular data</td>
19432 <td> More tabular data ...
19433 </td><td> And yet som tabular data</td>
19440 Correct handling of <td>, <tr> (T8171)
19445 <td> Some tabular data</td>
19446 <td> More tabular data ...</td>
19447 <td> And yet som tabular data</td>
19453 <td> Some tabular data</td>
19454 <td> More tabular data ...</td>
19455 <td> And yet som tabular data</td>
19463 Parsing crashing regression (fr:JavaScript)
19467 <p></body></x>
19472 Inline wiki vs wiki block nesting
19478 <p><b>Bold paragraph</b>
19479 </p><p>New wiki paragraph
19483 # FIXME: The current php output is documented
19484 # and desired output is the parsoid target.
19486 Inline HTML vs wiki block nesting
19492 <p><b>Bold paragraph
19493 </p><p>New wiki paragraph</b>
19496 <p><b>Bold paragraph</b>
19497 </p><p>New wiki paragraph
19501 # Original result was this:
19502 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19504 # While that might be marginally more intuitive, maybe, the six-apostrophe
19505 # construct is clearly pathological and the result stated here (which is what
19506 # the parser actually does) is about as reasonable as anything.
19508 Mixing markup for italics and bold
19511 '''bold''''''bold''bolditalics'''''
19513 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19521 Article for special page transclusion test
19525 Special page transclusion
19528 {{Special:Prefixindex/Xyzzyx}}
19530 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19536 Special page transclusion twice (T7021)
19539 {{Special:Prefixindex/Xyzzyx}}
19540 {{Special:Prefixindex/Xyzzyx}}
19542 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19544 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19550 Transclusion of default MediaWiki message
19552 {{MediaWiki:Mainpage}}
19559 Transclusion of nonexistent MediaWiki message
19561 {{MediaWiki:Mainpagexxx}}
19563 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19568 Transclusion of MediaWiki message with underscore
19570 {{MediaWiki:history_short}}
19577 Transclusion of MediaWiki message with space
19579 {{MediaWiki:history short}}
19586 Invalid header with following text
19596 Section extraction test (section 0)
19616 Section extraction test (section 1)
19638 Section extraction test (section 2)
19659 Section extraction test (section 3)
19679 Section extraction test (section 4)
19703 Section extraction test (section 5)
19723 Section extraction test (section 6)
19744 Section extraction test (section 7)
19764 Section extraction test (section 8)
19784 Section extraction test (section 9)
19805 Section extraction test (section 10)
19825 Section extraction test (nonexistent section 11)
19844 Section extraction test with bogus heading (section 1)
19849 ==bogus== not a legal section
19853 ==bogus== not a legal section
19857 Section extraction test with bogus heading (section 2)
19862 ==bogus== not a legal section
19869 Section extraction test with comment after heading (section 1)
19881 Section extraction test with comment after heading (section 2)
19893 Section extraction test with bogus <nowiki> heading (section 1)
19898 ==bogus== <nowiki>not a legal section</nowiki>
19902 ==bogus== <nowiki>not a legal section</nowiki>
19906 Section extraction test with bogus <nowiki> heading (section 2)
19911 ==bogus== <nowiki>not a legal section</nowiki>
19917 # Formerly testing for T4587, now resolved by the use of unmarked sections
19918 # instead of respecting commented sections
19920 Section extraction prefixed by comment (section 1)
19931 Section extraction prefixed by comment (section 2)
19941 # Formerly testing for T4607, now resolved by the use of unmarked sections
19942 # instead of respecting HTML-style headings
19944 Section extraction, mixed wiki and html (section 1)
19960 Section extraction, mixed wiki and html (section 2)
19976 # Formerly testing for T5342
19978 Section extraction, heading surrounded by <noinclude>
19982 <noinclude>==unmarked==</noinclude>
19988 # Test behavior of T21910
19990 Sectiion with all-equals
19995 The line above must have a trailing space
19998 But just in case it doesn't...
20002 But just in case it doesn't...
20006 Section replacement test (section 0)
20037 Section replacement test (section 1)
20066 Section replacement test (section 2)
20096 Section replacement test (section 3)
20127 Section replacement test (section 4)
20154 Section replacement test (section 5)
20185 Section replacement test (section 6)
20215 Section replacement test (section 7)
20246 Section replacement test (section 8)
20277 Section replacement test (section 9)
20306 Section replacement test (section 10)
20336 Section replacement test with initial whitespace (T15728)
20340 Preformatted initial line
20344 Preformatted initial line
20351 Section extraction, heading followed by pre with 20 spaces (T8398)
20363 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20376 Section extraction, <pre> around bogus header (T12309)
20393 Section replacement, <pre> around bogus header (T12309)
20414 Handling of 
 in URLs
20418 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20421 <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>
20425 Handling of %0A in URLs
20429 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20432 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20435 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20437 5 quotes, code coverage +1 line
20447 # same html as previous, but wikitext adjusted to match parsoid html2wt
20448 # note that wt2html and html2html will put the <i> before the <b>
20450 5 quotes, code coverage +1 line w/ nowiki (1)
20452 parsoid=wt2wt,html2wt
20454 '''''<nowiki/>'''''
20459 <p><b><i></i></b></p>
20462 # same as previous, just swapping the <i> and <b>
20464 5 quotes, code coverage +1 line w/ nowiki (2)
20466 '''''<nowiki/>'''''
20471 <p><i><b></b></i></p>
20475 Special:Search page linking.
20479 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20484 {{!}} is a magic word
20486 {{!}} is a magic word there and {{!}} is still a magic word here
20487 | is not a magic word here but {{!}} is still a magic word here
20489 <p>| is a magic word there and | is still a magic word here
20490 | is not a magic word here but | is still a magic word here
20493 <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
20494 | 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>
20500 title=[[Parser test]]
20514 *{{SUBJECTPAGENAME}}
20515 *{{SUBJECTPAGENAMEE}}
20518 *{{NAMESPACENUMBER}}
20523 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20525 <ul><li>Parser test</li>
20526 <li>Parser_test</li>
20527 <li>Parser test</li>
20528 <li>Parser_test</li>
20529 <li>Parser test</li>
20530 <li>Parser_test</li>
20531 <li>Parser test</li>
20532 <li>Parser_test</li>
20533 <li>Parser test</li>
20534 <li>Parser_test</li>
20535 <li>Talk:Parser test</li>
20536 <li>Talk:Parser_test</li>
20537 <li>Parser test</li>
20538 <li>Parser_test</li>
20546 <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>
20549 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20552 Gallery with valid attributes
20554 <gallery type="123" summary="345">
20555 File:File:Foobar.jpg
20558 <ul class="gallery mw-gallery-traditional" type="123">
20559 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20560 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20561 <div class="gallerytext">
20567 <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"}}'>
20568 <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>
20572 ## Parsoid thinks the "centre" here is a property, not a caption.
20577 "modes": ["wt2html"],
20578 "nativeGallery": true
20586 image4 |300px| centre
20587 image5.svg| http://///////
20592 <ul class="gallery mw-gallery-traditional">
20593 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20594 <div class="thumb" style="height: 150px;">Image1.png</div>
20595 <div class="gallerytext">
20598 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20599 <div class="thumb" style="height: 150px;">Image2.gif</div>
20600 <div class="gallerytext">
20603 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20604 <div class="thumb" style="height: 150px;">Image3</div>
20605 <div class="gallerytext">
20608 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20609 <div class="thumb" style="height: 150px;">Image4</div>
20610 <div class="gallerytext">
20615 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20616 <div class="thumb" style="height: 150px;">Image5.svg</div>
20617 <div class="gallerytext">
20618 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20622 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20623 <div class="thumb" style="height: 150px;">* image6</div>
20624 <div class="gallerytext">
20630 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20631 <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>
20632 <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>
20633 <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>
20634 <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>
20635 <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>
20636 <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>
20641 Gallery (with options, html)
20644 "modes": ["wt2html", "html2html"],
20645 "nativeGallery": true
20648 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20649 File:Nonexistent.jpg|caption
20650 File:Nonexistent.jpg
20651 image:foobar.jpg|some '''caption''' [[Main Page]]
20653 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20656 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20657 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20658 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20659 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20660 <div class="gallerytext">
20665 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20666 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20667 <div class="gallerytext">
20670 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20671 <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>
20672 <div class="gallerytext">
20673 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20677 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20678 <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>
20679 <div class="gallerytext">
20682 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20683 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="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>
20684 <div class="gallerytext">
20692 <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":{}}'>
20693 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20694 <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>
20695 <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>
20696 <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>
20697 <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>
20698 <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>
20703 Gallery (with options, extsrc)
20706 "nativeGallery": false
20709 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20710 File:Nonexistent.jpg|caption
20711 File:Nonexistent.jpg
20712 image:foobar.jpg|some '''caption''' [[Main Page]]
20714 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20717 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20718 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20719 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20720 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20721 <div class="gallerytext">
20726 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20727 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20728 <div class="gallerytext">
20731 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20732 <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>
20733 <div class="gallerytext">
20734 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20738 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20739 <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>
20740 <div class="gallerytext">
20743 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20744 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="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>
20745 <div class="gallerytext">
20753 <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"}}'>
20754 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20755 <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>
20756 <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>
20757 <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>
20758 <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>
20759 <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>
20764 Gallery (without px units)
20766 <gallery widths="70" heights="40">
20770 <ul class="gallery mw-gallery-traditional">
20771 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20772 <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>
20773 <div class="gallerytext">
20779 <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"}}'>
20780 <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>
20785 Gallery (with invalid units)
20787 <gallery widths="70em" heights="40em">
20791 <ul class="gallery mw-gallery-traditional">
20792 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20793 <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>
20794 <div class="gallerytext">
20800 <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"}}'>
20801 <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>
20806 Gallery with link that has fragment
20809 "modes": ["wt2html", "html2html"],
20810 "nativeGallery": true
20814 image:foobar.jpg|link=Main_Page
20815 image:foobar.jpg|link=Main_Page#section
20816 image:foobar.jpg|link=Main Page#section|caption
20819 <ul class="gallery mw-gallery-traditional">
20820 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20821 <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>
20822 <div class="gallerytext">
20825 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20826 <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>
20827 <div class="gallerytext">
20830 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20831 <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>
20832 <div class="gallerytext">
20840 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20841 <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>
20842 <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>
20843 <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>
20847 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20849 Gallery with template inside caption
20852 "nativeGallery": true
20855 <gallery caption="{{echo|hi}}">
20856 File:Foobar.jpg|{{echo|ho}}
20859 <ul class="gallery mw-gallery-traditional">
20860 <li class='gallerycaption'>{{echo|hi}}</li>
20861 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20862 <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>
20863 <div class="gallerytext">
20871 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20872 <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>
20873 <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>
20878 Gallery with wikitext inside caption
20881 "nativeGallery": true
20885 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20886 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20889 <ul class="gallery mw-gallery-traditional">
20890 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20891 <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>
20892 <div class="gallerytext">
20893 <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>
20897 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20898 <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>
20899 <div class="gallerytext">
20900 <p>This is a test template
20907 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20908 <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>
20909 <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>
20914 Gallery (with showfilename option)
20917 "nativeGallery": true
20920 <gallery showfilename="">
20921 File:Nonexistent.jpg|caption
20922 File:Nonexistent.jpg
20923 File:Foobar.jpg|some '''caption''' [[Main Page]]
20927 <ul class="gallery mw-gallery-traditional">
20928 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20929 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20930 <div class="gallerytext">
20931 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20936 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20937 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20938 <div class="gallerytext">
20939 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20943 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20944 <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>
20945 <div class="gallerytext">
20946 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20947 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20951 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20952 <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>
20953 <div class="gallerytext">
20954 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20961 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20962 <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>
20963 <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>
20964 <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>
20965 <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>
20969 ## Should Parsoid be preserving these variations? See T151367
20971 Gallery (with namespace-less filenames)
20974 "modes": ["wt2html", "html2html"],
20975 "nativeGallery": true
20979 File:Nonexistent.jpg
20985 <ul class="gallery mw-gallery-traditional">
20986 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20987 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20988 <div class="gallerytext">
20991 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20992 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20993 <div class="gallerytext">
20996 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20997 <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>
20998 <div class="gallerytext">
21001 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21002 <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>
21003 <div class="gallerytext">
21009 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21010 <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>
21011 <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>
21012 <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>
21013 <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>
21018 Gallery override link with wikilink (T36852)
21021 "nativeGallery": true
21025 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21028 <ul class="gallery mw-gallery-traditional">
21029 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21030 <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>
21031 <div class="gallerytext">
21037 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21038 <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>
21043 Gallery override link with absolute external link (T36852)
21046 "nativeGallery": true
21050 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21053 <ul class="gallery mw-gallery-traditional">
21054 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21055 <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>
21056 <div class="gallerytext">
21062 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21063 <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>
21068 Gallery override link with absolute external link with LanguageConverter
21073 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21076 <ul class="gallery mw-gallery-traditional">
21077 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21078 <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>
21079 <div class="gallerytext">
21087 <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"}}'>
21088 <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>
21093 Gallery override link with malicious javascript (T36852)
21096 "modes": ["wt2html", "html2html"],
21097 "nativeGallery": true
21101 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21104 <ul class="gallery mw-gallery-traditional">
21105 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21106 <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>
21107 <div class="gallerytext">
21113 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21114 <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>
21118 # Note that parsoid uses the invalid link as a caption, PHP does not.
21120 Gallery with invalid title as link (T45964)
21123 "modes": ["wt2html", "html2html"],
21124 "nativeGallery": true
21128 File:Foobar.jpg|link=<
21131 <ul class="gallery mw-gallery-traditional">
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" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"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">link=<</div></li>
21146 Serialize gallery without attrs in data-mw
21149 "modes": ["html2wt"],
21150 "nativeGallery": true
21153 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21154 <li class="gallerycaption">123</li>
21155 <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>
21158 <gallery caption="123">
21164 Gallery with class and style attributes
21167 "nativeGallery": true
21170 <gallery class="center" style="text-align: center;">
21174 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21175 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21176 <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>
21177 <div class="gallerytext">
21183 <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":{}}'>
21184 <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>
21189 Gallery in slideshow mode
21192 "nativeGallery": true
21195 <gallery mode="slideshow" showthumbnails="">
21199 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21200 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21201 <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>
21202 <div class="gallerytext">
21208 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21209 <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>
21214 Serialize gallery image captions on a line
21217 "modes": ["html2wt"],
21218 "nativeGallery": true
21221 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21222 <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>
21223 <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>
21227 File:Foobar.jpg| hi ho
21228 File:Foobar.jpg|hi<br />ho
21233 HTML Hex character encoding (spells the word "JavaScript")
21235 parsoid=wt2html,wt2wt,html2html
21237 JavaScript
21239 <p>JavaScript
21242 <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>
21246 HTML Hex character encoding bogus encoding (T28437 regression check)
21250 <p>&#xsee;&#XSEE;
21255 HTML Hex character encoding mixed case
21257 parsoid=wt2html,wt2wt,html2html
21264 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21267 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21268 # Note that U+000C (form feed) is not a valid XML character, so
21269 # it is banned even though allowed in HTML5.
21271 Illegal character references (T106578)
21276 ; Control (low): 
21277 ; Control (high):  Ÿ
21278 ; Surrogate: ��
21279 ; This is an okay astral character: 💩
21287 <dt>Control (low)</dt>
21289 <dt>Control (high)</dt>
21290 <dd>&#x7F; &#x9F;</dd>
21292 <dd>&#xD83D;&#xDCA9;</dd>
21293 <dt>This is an okay astral character</dt>
21294 <dd>💩</dd></dl>
21298 __FORCETOC__ override
21310 ISBN 978-0-1234-56 789
21312 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21315 <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>
21319 ISBN followed by 5 spaces
21330 ISBN ISBN 1234567890
21332 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21335 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21338 # Uppercase X and lowercase x as well
21349 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21350 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21351 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21352 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21353 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21354 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21357 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21358 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21359 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21360 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21361 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21362 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21366 ISBN with empty prefix (parsoid test)
21370 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21373 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21377 T24905: <abbr> followed by ISBN followed by </a>
21379 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21381 <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>
21384 <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>
21392 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21395 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21399 Double RFC with a wiki link
21403 <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>
21406 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21414 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21417 <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>
21421 Centre-aligned image
21423 [[Image:foobar.jpg|centre]]
21425 <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>
21428 <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>
21434 [[Image:foobar.jpg|none]]
21436 <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>
21439 <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>
21443 Width + Height sized image (using px) (height is ignored)
21445 [[Image:foobar.jpg|640x480px]]
21447 <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>
21450 <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>
21454 Width-sized image (using px, no following whitespace)
21456 [[Image:foobar.jpg|640px]]
21458 <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>
21461 <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>
21465 Width-sized image (using px, with following whitespace - test regression from r39467)
21467 [[Image:foobar.jpg|640px ]]
21469 <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>
21472 <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>
21476 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21478 [[Image:foobar.jpg| 640px]]
21480 <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>
21483 <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>
21487 Image with page parameter
21491 [[File:LoremIpsum.djvu|page=2]]
21493 <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>
21496 <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>
21500 Another italics / bold test
21508 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21514 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21517 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21521 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21523 Images with the "|" character in the comment
21525 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21527 <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>
21530 <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>
21534 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21536 <html><script>alert(1);</script></html>
21538 <p><html><script>alert(1);</script></html>
21543 HTML with raw HTML ($wgRawHtml==true)
21547 <html><script>alert(1);</script></html>
21549 <p><script>alert(1);</script>
21554 Parents of subpages, one level up
21556 subpage title=[[Subpage test/L1/L2/L3]]
21560 <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>
21566 Parents of subpages, one level up, not named
21568 subpage title=[[Subpage test/L1/L2/L3]]
21572 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">Subpage test/L1/L2</a>
21579 Parents of subpages, two levels up
21581 subpage title=[[Subpage test/L1/L2/L3]]
21587 <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
21588 </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>
21593 Parents of subpages, two levels up, without trailing slash or name.
21595 subpage title=[[Subpage test/L1/L2/L3]]
21604 Parents of subpages, two levels up, with lots of extra trailing slashes.
21606 subpage title=[[Subpage test/L1/L2/L3]]
21610 <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>
21615 Subpage test/L1/L2/L3Sibling
21621 Transclusion of a sibling page (one level up)
21623 subpage title=[[Subpage test/L1/L2/L3]]
21632 Transclusion of a child page
21634 subpage title=[[Subpage test/L1/L2]]
21642 # This is wt2html only in Parsoid because we add <nowiki>
21643 # because of {{..}} and we don't expect to fix that to
21644 # eliminate the nowikis selective for {{..}} markup.
21646 Non-transclusion because of too many up levels
21648 subpage title=[[Subpage test/L1/L2/L3]]
21651 {{../../../../More than parent}}
21653 <p>{{../../../../More than parent}}
21656 <p>{{../../../../More than parent}}</p>
21660 Definition list code coverage
21666 <dl><dt>title  </dt>
21668 <dt>title </dt>
21674 <dl><dt>title <span typeof="mw:Placeholder"> </span></dt><dd>def</dd>
21675 <dt>title<span typeof="mw:Placeholder"> </span></dt><dd>def</dd>
21676 <dt>title</dt><dd>def</dd></dl>
21680 Don't fall for the self-closing div
21682 <div>hello world</div/>
21684 <div>hello world</div>
21693 <p>[[:Template:Msg]]
21702 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21706 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21708 Always escape literal '>' in output, not just after '<'
21722 <p>This is a test template
21723 This is a test template
21735 Inclusion of !userCanEdit() content
21739 <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>
21745 Out-of-order TOC heading levels
21754 <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>
21756 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21758 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21759 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21762 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21764 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21765 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21771 <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>
21772 <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>
21773 <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>
21774 <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>
21775 <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>
21776 <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>
21782 ISBN with a dummy number
21792 ISBN with space-delimited number
21796 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21799 <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>
21804 ISBN with multiple spaces, no number
21823 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21824 </p><p>ISBN 12345678901
21827 <p>ISBN 123456789</p>
21829 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21831 <p>ISBN 12345678901</p>
21836 ISBN with trailing year (T9110)
21838 ISBN 1-234-56789-0 - 2006
21840 ISBN 1 234 56789 0 - 2006
21842 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21843 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21846 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21848 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21855 wgFragmentMode=[ 'html5', 'legacy' ]
21857 {{anchorencode:foo bar©#%n}}
21862 <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>
21866 anchorencode (legacy)
21868 wgFragmentMode=[ 'legacy' ]
21870 {{anchorencode:foo bar©#%n}}
21872 <p>foo_bar.C2.A9.23.25n
21877 anchorencode trims spaces
21879 wgFragmentMode=[ 'html5', 'legacy' ]
21881 {{anchorencode: __pretty__please__}}
21886 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21890 anchorencode deals with links
21892 wgFragmentMode=[ 'html5', 'legacy' ]
21894 {{anchorencode: [[hello|world]] [[hi]]}}
21899 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21903 anchorencode deals with templates
21905 wgFragmentMode=[ 'html5', 'legacy' ]
21907 {{anchorencode: {{Foo}} x}}
21912 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21916 anchorencode encodes like the TOC generator: (T20431)
21918 wgFragmentMode=[ 'html5', 'legacy' ]
21920 ===_ +:.3A%3A _ &&]] x===
21921 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21924 <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>
21925 <p>+:.3A%3A_&&]]_x
21928 <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>
21929 <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>
21930 <meta property="mw:PageProp/noeditsection"/>
21934 anchorencode encodes like the TOC generator: (T20431) (legacy)
21936 wgFragmentMode=[ 'legacy' ]
21938 ===_ +:.3A%3A&&]]===
21939 {{anchorencode: _ +:.3A%3A&&]] }}
21942 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21943 <p>.2B:.3A.253A.26.26.5D.5D
21948 T8200: blockquotes and paragraph formatting
21969 T10293: Use of center tag ruins paragraph formatting
21990 Parsing of overlapping (improperly nested) inline html tags
21992 <span><s>x</span></s>
21994 <p><span><s>x</span></s></span>
21997 <p><span><s>x</s></span>
22002 ### Language variants related tests
22005 # Parsoid does not mark self-links.
22006 # Parsoid does not convert links; PHP will do any necessary redirects.
22009 Self-link in language variants
22011 title=[[Dunav]] language=sr
22013 Both [[Dunav]] and [[Дунав]] are names for this river.
22015 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22018 <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>
22028 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22030 title=[[Duna]] language=sr
22032 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22034 <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.
22037 <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>
22041 Link to a section of a variant of this title shouldn't be parsed as self-link
22043 title=[[Duna]] language=sr
22045 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22047 <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.
22050 <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>
22054 Link to pages in language variants
22058 Main Page can be written as [[Маин Паге]]
22060 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22063 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22068 Multiple links to pages in language variants
22072 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22074 <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>.
22077 <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>
22082 Simple template in language variants
22088 <p>This is a test template
22094 Template with explicit namespace in language variants
22100 <p>This is a test template
22106 Basic test for template parameter in language variants
22110 {{парамтест|param=foo}}
22112 <p>This is a test template with parameter foo
22117 Simple category in language variants
22121 [[Category:МедиаWики Усер'с Гуиде]]
22123 cat=МедиаWики_Усер'с_Гуиде sort=
22125 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22140 ## We used to, but no longer wt2wt this test since the default serializer
22141 ## will normalize all categories to serialize on their own line.
22142 ## This wikitext usage is going to be fairly uncommon in production and
22143 ## selser will take care of preserving formatting in those scenarios.
22145 Don't convert blue categorylinks to another variant (T35210)
22151 [[A]][[Category:分类]]
22155 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22156 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22160 Stripping -{}- tags (language variants)
22164 Latin proverb: -{Ne nuntium necare}-
22166 <p>Latin proverb: Ne nuntium necare
22169 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22174 Prevent conversion with -{}- tags (language variants)
22176 language=sr variant=sr-ec
22178 Latinski: -{Ne nuntium necare}-
22180 <p>Латински: Ne nuntium necare
22183 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22188 Prevent conversion of text with -{}- tags (language variants)
22190 language=sr variant=sr-ec
22192 Latinski: -{Ne nuntium necare}-
22194 <p>Латински: Ne nuntium necare
22197 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22202 Prevent conversion of links with -{}- tags (language variants)
22204 language=sr variant=sr-ec
22208 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22211 <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>
22216 -{}- tags within headlines (within html for parserConvert())
22218 wgFragmentMode=[ 'html5', 'legacy' ]
22220 language=sr variant=sr-ec
22224 Note that even an unprotected headline ID is not affected by language
22229 <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>
22230 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22233 <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>
22236 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22238 <p>Note that even an unprotected headline ID is not affected by language
22241 <h2 id="Latinski">Latinski</h2>
22245 Explicit definition of language variant alternatives
22247 language=zh variant=zh-tw
22249 -{zh:China;zh-tw:Taiwan}-, not China
22251 <p>Taiwan, not China
22254 <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>
22258 Filter syntax for language variants
22260 language=zh variant=zh-tw
22262 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22264 <p>fooblog, WEBJOURNAL, WEBLOGquux
22267 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22270 # Note that Parsoid post-processing for language variants needs to
22271 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22273 Conversion around HTML tags
22275 language=sr variant=sr-ec
22277 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22278 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22281 <span title="ЛаCтин">ски</span>
22284 <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"}]}'/>
22285 <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>
22289 Explicit session-wise two-way language variant mapping (A flag and - flag)
22291 language=zh variant=zh-tw
22293 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22295 Taiwan is not China.
22297 But -{A|zh:China; zh-tw:Taiwan}- is China,
22299 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22301 and -{China}- is China.
22303 <p>This is Taiwan, but we'll forget that now.
22304 </p><p>Taiwan is not China.
22305 </p><p>But Taiwan is Taiwan,
22306 </p><p>(This should be stripped!)
22307 </p><p>and China is China.
22310 <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>
22311 <p>Taiwan is not China.</p>
22312 <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>
22313 <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>
22314 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22318 Explicit session-wise one-way language variant mapping (A flag and - flag)
22320 language=zh variant=zh-tw
22322 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22324 COUNTRY is China or Taiwan.
22326 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22328 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22330 and -{COUNTRY}- is COUNTRY.
22332 <p>This is Taiwan, but we'll forget that now.
22333 </p><p>COUNTRY is China or Taiwan.
22334 </p><p>But Taiwan is Taiwan,
22335 </p><p>(This should be stripped!)
22336 </p><p>and COUNTRY is COUNTRY.
22339 <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>
22340 <p>COUNTRY is China or Taiwan.</p>
22341 <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>
22342 <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>
22343 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22347 Explicit session-wise two-way language variant mapping (H flag for hide)
22349 language=zh variant=zh-tw
22351 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22355 <p>(This should be stripped!)
22356 </p><p>Taiwan is Taiwan.
22359 <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>
22360 <p>Taiwan is China.</p>
22364 Explicit session-wise one-way language variant mapping (H flag for hide)
22366 language=zh variant=zh-tw
22368 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22370 COUNTRY is Taiwan or China.
22372 <p>(This should be stripped!)
22373 </p><p>Taiwan is Taiwan or China.
22376 <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>
22377 <p>COUNTRY is Taiwan or China.</p>
22380 ## Note that parsoid test runner does not support 'showtitle' option.
22382 Adding explicit conversion rule for title (T flag)
22384 language=zh variant=zh-tw showtitle
22386 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22391 <p>Should be stripped!
22392 </p><p>Taiwan is China.
22395 <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>
22396 <p>Taiwan is China.</p>
22400 Code coverage: T combined with H flag
22402 language=zh variant=zh-tw showtitle
22404 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22409 <p>Should be stripped!
22410 </p><p>Taiwan is Taiwan.
22413 <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>
22414 <p>Taiwan is China.</p>
22418 Code coverage: T with no variants
22420 language=zh variant=zh-tw showtitle
22422 -{H|zh:China; zh-tw:Taiwan}-
22423 Taiwan is China.-{T|Taiwan is China}-
22430 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22431 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22435 Code coverage: rules with no variants
22437 language=zh variant=zh-tw
22439 -{H|zh:China; zh-tw:Taiwan}-
22450 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22452 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22453 Taiwan is China.</p>
22458 Code coverage: D flag for conversion rule
22460 language=zh variant=zh-tw
22462 -{D|zh-cn:XA; zh-tw:YA}-
22463 -{A;D|zh-cn:XB; zh-tw:YB}-
22464 -{D;H|zh-cn:XC; zh-tw:YC}-
22466 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22472 XA XB XC YA YB YC FOO BAR BAT 012345
22477 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22481 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22484 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22485 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22486 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22487 <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>
22488 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22489 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22490 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22491 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22495 Code coverage: N flag for conversion rule
22497 language=zh variant=zh-cn
22507 </p><p>српски (ћирилица)
22510 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22511 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22512 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22515 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22517 Code coverage: N flag for conversion rule (wt2html only)
22519 language=zh variant=zh-cn
22520 parsoid=wt2html,html2html
22527 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22531 Testing that changing the language variant here in the tests actually works
22533 language=zh variant=zh showtitle
22535 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22538 <p>Should be stripped!
22541 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22545 Recursive conversion of alt and title attrs shouldn't clear converter state
22547 language=zh variant=zh-cn
22550 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22551 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22555 Should be stripped<span title="Exclamation">!</span>
22558 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22559 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>
22563 T26072: more test on conversion rule for title
22565 language=zh variant=zh-tw showtitle
22567 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22569 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22572 <p>This should be stripped!
22573 </p><p>This won't take interferes with the title rule.
22576 <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>
22577 <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>
22581 Partly disable title conversion if variant == main language code
22583 language=zh variant=zh title=[[ZH]] showtitle
22585 -{T|zh-cn:CN;zh-tw:TW}-
22591 <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>
22595 Partly disable title conversion if variant == main language code, more
22597 language=zh variant=zh title=[[ZH]] showtitle
22605 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22609 Raw output of variant escape tags (R flag)
22611 language=zh variant=zh-tw
22613 Raw: -{R|zh:China;zh-tw:Taiwan}-
22615 <p>Raw: zh:China;zh-tw:Taiwan
22618 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22621 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22623 Raw output of variant escape tags (R flag) (wt2html only)
22625 language=zh variant=zh-tw
22626 parsoid=wt2html,html2html
22628 -{Variant}- -{D|syntax}- -{D;R|options}-
22630 <p>Variant syntax options
22633 <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>
22637 Nested markup inside raw output of variant escape tags (R flag)
22639 language=zh variant=zh-tw
22641 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22643 <p>Nested raw: nested Taiwan nested
22646 <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>
22650 Nested markup and spaces inside raw output of variant escape tags (R flag)
22652 language=zh variant=zh-tw
22654 X-{ outer -{ inner }- outer }-X
22656 <p>X outer inner outer X
22659 <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>
22663 Templates inside raw output of variant escape tags (R flag)
22665 language=zh variant=zh-tw
22667 Nested raw: -{R|nested {{echo|hi}} templates}-
22669 <p>Nested raw: nested hi templates
22672 <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>
22676 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22678 language=zh variant=zh-cn
22680 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22685 <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>
22689 Conversion rules from [numeric-only string] to [something else] (T48634)
22691 language=zh variant=zh-cn
22693 -{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
22698 <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>
22702 Two-way converter rule entries with an empty value should be ignored (T53551)
22704 language=zh variant=zh-cn
22706 -{H|zh-cn:foo;zh-tw:;}-foobar
22711 <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>
22715 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22717 language=zh variant=zh-cn
22719 -{H|=>zh-cn:foo;}-foobar
22724 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22728 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22730 language=zh variant=zh-cn
22737 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22741 Nested using of manual convert syntax
22743 language=zh variant=zh-hk
22745 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22747 <p>Nested: Hello Hong Kong!
22750 <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>
22754 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22756 language=zh variant=zh-cn
22758 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22760 <p><span title="X">A</span>
22763 <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>
22767 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22769 language=zh variant=zh-cn
22771 -{<span title="-{X}-">A</span>}-
22772 !! html/php+disabled
22773 <p><span title="X">A</span>
22776 <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>
22779 # Parsoid and PHP disagree on how to parse this example: Parsoid
22780 # insists that the content of a language converter element be a valid
22781 # DOM fragment or attribute string
22783 Language converter markup with block content
22785 language=zh variant=zh-cn
22787 <span>a-{b<div>c}-d
22789 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22791 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22796 </span></div></span></div></span>
22798 <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>
22800 <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>
22802 <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>
22806 LanguageConverter selser (1)
22808 language=zh variant=zh-cn
22810 "modes": ["wt2wt", "selser"],
22812 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22822 LanguageConverter selser (2)
22824 language=zh variant=zh-cn
22826 "modes": ["wt2wt", "selser"],
22828 ["span[class='x']", "contents", "text", "-{foo}-"],
22829 ["a", "contents", "text", "-{"],
22830 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22834 <span class="x">TEXT1</span>
22835 [http://example.com TEXT2]
22839 <span class="x"><nowiki>-{foo}-</nowiki></span>
22840 [http://example.com -{]
22841 [[Foo|<nowiki>-{</nowiki>]]
22842 {{1x|<nowiki>-{</nowiki>}}
22845 # Tests LanguageVariantText in ConstrainedText
22847 LanguageConverter selser (3)
22849 language=zh variant=zh-cn
22851 "modes": ["wt2wt", "selser"],
22853 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22854 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22865 |<nowiki/>-{edited}-
22869 # Tests LanguageVariantText._fromSelSer
22871 LanguageConverter selser (4)
22873 language=zh variant=zh-cn
22875 "modes": ["wt2wt", "selser"],
22877 ["td > span.x", "remove"]
22883 |<span class="x">Foo</span>-{Bar}-
22884 ||<span class="x">Foo</span>-{Bar}-
22894 # Since Parsoid is starting to emit canonical wikitext for links,
22895 # [http://example.com http://example.com] will not RT back to that
22897 # Parsoid does not language-convert links (it is done in a
22898 # post-processing step)
22900 Proper conversion of text in external links
22902 language=sr variant=sr-ec
22905 http://www.google.com
22906 gopher://www.google.com
22907 [http://www.google.com http://www.google.com]
22908 [gopher://www.google.com gopher://www.google.com]
22909 [https://www.google.com irc://www.google.com]
22910 [ftp://www.google.com www.google.com/ftp://dir]
22911 [//www.google.com www.google.com]
22913 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22914 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22915 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22916 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22917 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22918 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22919 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22922 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22923 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22924 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
22925 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22926 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22927 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22928 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22932 Do not convert roman numbers to language variants
22934 language=sr variant=sr-ec
22938 <p>Фридрих IV је цар.
22941 <p>Fridrih IV je car.</p>
22945 Unclosed language converter markup "-{"
22956 Don't convert raw rule "-{R|=>}-" to "=>"
22965 <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>
22969 Don't break link parsing if language converter markup is in the caption.
22971 language=sr variant=sr-ec
22973 [[Main Page|-{R|main page}-]]
22975 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22978 <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>
22982 T146304: Don't break template parsing if language converter markup is in the parameter.
22984 language=sr variant=sr-ec
22991 <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>
22995 T146305: Don't break image parsing if language converter markup is in the caption.
22999 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23001 <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>
23004 <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>
23008 T146305: Don't break image parsing if nested language converter markup is in the caption.
23010 language=zh variant=zh-cn
23012 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23014 <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>
23017 <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>
23020 # XXX html2wt disabled because rich markup in alt is not preserved.
23022 Don't break gallery if language converter markup is inside.
23027 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23028 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23031 <ul class="gallery mw-gallery-traditional">
23032 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23033 <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>
23034 <div class="gallerytext">
23035 <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>
23039 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23040 <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>
23041 <div class="gallerytext">
23042 <p>This is a test template
23049 <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"}}'>
23050 <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>
23051 <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>
23056 T153135: Don't break list handling if language converter markup is in the item.
23058 language=zh variant=zh-cn
23060 ;-{zh-cn:AAA;zh-tw:BBB}-
23064 <dt>foo:bar</dt></dl>
23067 <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>
23068 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23072 // Note that parsoid does not protect colons unless language converter
23073 // markup is properly nested, because it is a backtracking parser.
23075 T153135: Unclosed markup in definition list (code coverage)
23077 language=zh variant=zh-cn
23082 <dl><dt><b>foo:bar</b></dt><b>
23083 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23086 <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}'>
23087 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
23088 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
23093 T153135: Nested language converter markup in definition list (code coverage)
23095 language=zh variant=zh-cn
23097 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23099 <dl><dt>AAA foo:bar bat:baz</dt>
23103 <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>
23104 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23108 # html2wt mode disabled due to <nowiki> insertion.
23110 T153140: Don't break table handling if language converter markup is in the cell.
23112 language=sr variant=sr-ec
23113 parsoid=wt2html,wt2wt,html2html
23130 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23137 Language converter tricky html2wt cases (1)
23140 parsoid=html2wt,wt2wt
23142 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23144 -{<nowiki>}-</nowiki>}-
23151 Language converter tricky html2wt cases (2)
23154 parsoid=html2wt,wt2wt
23158 <nowiki>-{foo}-</nowiki>
23160 <p>-{foo}-
23165 Language converter tricky html2wt cases (3)
23168 parsoid=html2wt,wt2wt
23170 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23171 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23172 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23178 -{<nowiki>-{foo}-</nowiki>}-
23182 </p><p>-{foo}-
23187 Language converter tricky html2wt cases (4)
23190 parsoid=html2wt,wt2wt
23192 <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>
23200 # Note that the <nowiki> escaping added by parsoid for source text,
23201 # destination text, and language names only works on the PHP side
23202 # for *destination text*. (HTML entity escaping wouldn't work
23203 # any better.) This is probably a bug, at least for source texts.
23204 # (For language names PHP uses a precise regexp based on the languages
23205 # it currently knows have variants, which is fragile since this set
23206 # can grow/shrink over time.)
23208 Language converter tricky html2wt cases (5)
23210 language=zh variant=zh-cn
23212 <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>
23213 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23214 <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>
23215 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23218 -{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
23220 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23222 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23224 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23227 !! html/php+disabled
23228 <p>foobat;xyz=>zh-cn:abc
23232 </p><p>a:b=>c 0;zh-tw:bar
23237 T179579: Nowiki and lc interaction
23244 -{123<nowiki>|</nowiki>456}-
23246 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23248 <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>
23252 T2529: Uncovered bullet
23262 T2529: Uncovered bullet in a deeply nested list
23264 *******Foo {{bullet}}
23266 <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>
23272 T2529: Uncovered table already at line-start
23295 T2529: Uncovered bullet in parser function result
23297 *Foo {{lc:{{bullet}} }}
23305 T7678: Double-parsed template argument
23307 {{lc:{{{1}}}|hello}}
23314 T7678: Double-parsed template invocation
23316 {{lc:{{paramtest {{!}} param = hello }} }}
23318 <p>{{paramtest | param = hello }}
23323 Case insensitivity of parser functions for non-ASCII characters (T10143)
23326 title=[[Main Page]]
23328 {{PRVNÍVELKÉ:ěščř}}
23329 {{prvnívelké:ěščř}}
23349 Morwen/13: Unclosed link followed by heading
23356 <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>
23361 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23368 <h1><span class="mw-headline" id="heading">heading</span></h1>
23373 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23380 <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>
23395 Paragraphs inside divs (no extra line breaks)
23407 Paragraphs inside divs (extra line break on open)
23422 Paragraphs inside divs (extra line break on close)
23437 Paragraphs inside divs (extra line break on open and close)
23453 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23454 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23456 Nesting tags, paragraphs on lines which begin with <div>
23458 <div></div><strong>A
23461 <div></div><p><strong>A
23462 </strong></p><strong></strong><p><strong>B</strong>
23471 # T8200: <blockquote> should behave like <div> with respect to line breaks
23473 T8200: paragraphs inside blockquotes (no extra line breaks)
23475 <blockquote>Line one
23477 Line two</blockquote>
23479 <blockquote>Line one
23480 Line two</blockquote>
23483 <blockquote><p>Line one
23484 Line two</p></blockquote>
23488 T8200: paragraphs inside blockquotes (extra line break on open)
23493 Line two</blockquote>
23498 Line two</blockquote>
23504 Line two</p></blockquote>
23507 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23509 T8200: paragraphs inside blockquotes (extra line break on close)
23511 <blockquote>Line one
23516 <blockquote>Line one
23522 <blockquote><p>Line one
23529 T8200: paragraphs inside blockquotes (extra line break on open and close)
23545 ## This is a corner case interaction between the paragraph wrapping in the
23546 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
23547 ## some tags which close paragraphs (and thus prevent wrapping on their line),
23548 ## of which "div" is one, but do p-wrapping inside them. These are referred
23549 ## to as "never suppressing". Remex, for its part, doesn't traverse into
23550 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
23552 Paragraphs inside blockquotes/divs (no extra line breaks)
23554 <blockquote><div>Line one
23556 Line two</div></blockquote>
23558 <blockquote><div>Line one
23559 Line two</div></blockquote>
23564 Paragraphs inside blockquotes/divs (extra line break on open)
23569 Line two</div></blockquote>
23574 Line two</div></blockquote>
23579 Paragraphs inside blockquotes/divs (extra line break on close)
23581 <blockquote><div>Line one
23584 </div></blockquote>
23586 <blockquote><div>Line one
23589 </div></blockquote>
23594 Paragraphs inside blockquotes/divs (extra line break on open and close)
23600 </div></blockquote>
23606 </div></blockquote>
23611 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23613 wgLinkHolderBatchSize=0
23619 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23620 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23621 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23626 Free external link invading image caption
23628 [[Image:Foobar.jpg|thumb|http://x|hello]]
23630 <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>
23633 <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>
23637 T17196: localised external link numbers
23641 [http://en.wikipedia.org/]
23643 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23646 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23650 Multibyte character in padleft
23652 {{padleft:-Hello|7|Æ}}
23657 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23661 Multibyte character in padright
23663 {{padright:Hello-|7|Æ}}
23668 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23672 formatdate parser function
23674 {{#formatdate:2009-03-24}}
23676 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23681 formatdate parser function, with default format
23683 {{#formatdate:2009-03-24|mdy}}
23685 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23690 Spacing of numbers in formatted dates
23692 {{#formatdate:January 15}}
23694 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23699 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
23701 language=nl title=[[MediaWiki:Common.css]]
23703 {{#formatdate:2009-03-24|dmy}}
23705 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23718 Edit comment with link
23722 I like the [[Main Page]] a lot
23724 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23728 Edit comment with link and link text
23732 I like the [[Main Page|best pages]] a lot
23734 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23738 Edit comment with link and link text with suffix
23742 I like the [[Main Page|best page]]s a lot
23744 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23748 Edit comment with section link (non-local, eg in history list)
23750 comment title=[[Main Page]]
23752 /* External links */ removed bogus entries
23754 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23758 Edit comment with section link and text before it (non-local, eg in history list)
23760 comment title=[[Main Page]]
23762 pre-comment text /* External links */ removed bogus entries
23764 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>
23768 Edit comment with section link (local, eg in diff view)
23770 comment local title=[[Main Page]]
23772 /* External links */ removed bogus entries
23774 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23778 Edit comment with subpage link (T16080)
23782 title=[[Subpage test]]
23784 Poked at a [[/subpage]] here...
23786 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23790 Edit comment with subpage link and link text (T16080)
23794 title=[[Subpage test]]
23796 Poked at a [[/subpage|neat little page]] here...
23798 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23802 Edit comment with bogus subpage link in non-subpage NS (T16080)
23805 title=[[Subpage test]]
23807 Poked at a [[/subpage]] here...
23809 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23813 Edit comment with bare anchor link (local, as on diff)
23817 title=[[Main Page]]
23821 <a href="#section">#section</a>
23825 Edit comment with bare anchor link (non-local, as on history)
23828 title=[[Main Page]]
23832 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23836 Anchor starting with underscore
23842 <p><a href="#_ref">One</a>
23845 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23849 Id starting with underscore
23851 <div id="_ref"></div>
23853 <div id="_ref"></div>
23858 Edit comment with link with more than one pipe (T99346)
23862 [[Main Page|Many|pipes]]
23864 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23868 Complex edit comment with link with more than one pipe (T99346)
23872 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23874 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..."
23878 Space normalisation on autocomment (T24784)
23881 title=[[Main Page]]
23883 /* __hello__world__ */
23885 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23889 percent-encoding and + signs in comments (T28410)
23893 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23895 <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>
23898 # Parsoid doesn't support this yet: see T75581
23899 # but it *should* omit the 'src' attribute if the image is bad.
23900 # PHP side of tests was disabled in
23901 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23902 # because of issues in the PHP parserTests infrastructure
23903 # (but the output below is indeed what the PHP side emits)
23905 Bad images - basic functionality
23908 !! html/php+disabled
23910 <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>
23914 Bad images - T18039: text after bad image disappears
23919 !! html/php+disabled
23925 <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>
23930 Verify that displaytitle works (T24501) no displaytitle
23934 wgAllowDisplayTitle=true
23935 wgRestrictDisplayTitle=false
23937 this is not the the title
23940 <p>this is not the the title
23945 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23950 wgAllowDisplayTitle=true
23951 wgRestrictDisplayTitle=false
23953 this is not the the title
23954 {{DISPLAYTITLE:whatever}}
23957 <p>this is not the the title
23962 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23967 wgAllowDisplayTitle=true
23968 wgRestrictDisplayTitle=true
23970 this is not the the title
23971 {{DISPLAYTITLE:whatever}}
23974 <p>this is not the the title
23979 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23984 wgAllowDisplayTitle=true
23985 wgRestrictDisplayTitle=true
23987 this is not the the title
23988 {{DISPLAYTITLE:screen}}
23991 <p>this is not the the title
23996 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24001 wgAllowDisplayTitle=false
24003 this is not the the title
24004 {{DISPLAYTITLE:screen}}
24007 <p>this is not the the title
24008 <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>
24013 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24018 wgAllowDisplayTitle=false
24020 this is not the the title
24023 <p>this is not the the title
24028 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24033 wgAllowDisplayTitle=true
24034 wgRestrictDisplayTitle=true
24036 this is not the the title
24037 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24039 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24040 <p>this is not the the title
24045 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24050 wgAllowDisplayTitle=true
24051 wgRestrictDisplayTitle=true
24053 this is not the the title
24054 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24056 <span style="color: red;">s</span>creen
24057 <p>this is not the the title
24062 Page status indicators: Empty name is invalid
24066 <indicator name=" "></indicator>
24067 <indicator></indicator>
24069 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24070 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24075 Page status indicators: Weird syntaxes that are okay
24079 <indicator name="empty" />
24080 <indicator name="name"></indicator>
24089 Page status indicators: Torture test
24093 <indicator name="01">hello world</indicator>
24094 <indicator name="02">[[Main Page]]</indicator>
24095 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24096 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24097 <indicator name="05">*foo
24099 <indicator name="06"><nowiki>foo</nowiki></indicator>
24100 <indicator name="07"> Preformatted</indicator>
24101 <indicator name="08"><div>Broken tag</indicator>
24102 <indicator name="09">{| class=wikitable
24105 <indicator name="10">Two
24107 paragraphs</indicator>
24110 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24111 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" />
24112 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>
24113 05=<ul><li>foo</li>
24117 07=<pre>Preformatted
24119 08=<div>Broken tag</div>
24121 09=<table class="wikitable">
24138 preload: check <noinclude> and <includeonly>
24142 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24148 preload: check <onlyinclude>
24152 Goodbye <onlyinclude>Hello world</onlyinclude>
24158 preload: can pass tags through if we want to
24162 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24164 <includeonly>Hello world</includeonly>
24168 preload: check that it doesn't try to do tricks
24172 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24174 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24178 Play a bit with r67090 and T5158
24180 <div style="width:50% !important"> </div>
24181 <div style="width:50% !important"> </div>
24182 <div style="width:50% !important"> </div>
24183 <div style="border : solid;"> </div>
24185 <div style="width:50% !important"> </div>
24186 <div style="width:50% !important"> </div>
24187 <div style="width:50% !important"> </div>
24188 <div style="border : solid;"> </div>
24191 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24192 <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>
24193 <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>
24194 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24199 T5158: Test for French spaces in attributes
24201 <br style=" clear : both ; " />
24203 <p><br style="clear : both ;" />
24208 HTML5 data attributes
24210 <span data-foo="bar">Baz</span>
24211 <p data-abc-def_hij="">Quuz</p>
24213 <p><span data-foo="bar">Baz</span>
24215 <p data-abc-def_hij="">Quuz</p>
24218 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24219 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24223 Strip reserved data attributes
24225 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24227 <div data-ok="fred">d</div>
24230 <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>
24234 percent-encoding and + signs in internal links (T28410)
24236 [[User:+%]] [[Page+title%]]
24237 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24238 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24239 [[%33%45]] [[%33%45+]]
24241 <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>
24242 <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>
24243 <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>
24244 <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>
24247 <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>
24248 <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>
24249 <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>
24250 <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>
24254 Special characters in embedded file links (T29679)
24256 [[File:Contains & ampersand.jpg]]
24257 [[File:Does not exist.jpg|Title with & ampersand]]
24259 <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>
24260 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24263 <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>
24264 <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>
24268 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24270 Text's been normalized?
24272 <p>Text's been normalized?
24277 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24279 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24281 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24286 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24288 [http://www.example.org/ ideograms]
24290 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24295 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24297 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24299 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24323 T33098 Template which includes system messages which includes the template
24327 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24328 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24333 T33490 Turkish: ucfirst 'blah'
24344 T33490 Turkish: ucfirst 'ix'
24355 T33490 Turkish: lcfirst 'BLAH'
24366 T33490 Turkish: ucfırst (with a dotless i)
24372 <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>
24377 T33490 ucfırst (with a dotless i) with English language
24383 <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>
24387 # Note that Parsoid doesn't emit an explicit TOC.
24388 # Note also that the html2wt direction tends to emit an extra newline
24389 # between the __TOC__ magicword and the first heading unless *both*
24390 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24394 T28375: TOC with italics
24396 title=[[Main Page]]
24399 ==''Lost'' episodes==
24401 <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>
24403 <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>
24407 <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>
24410 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24411 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24415 T28375: TOC with bold
24417 title=[[Main Page]]
24420 =='''should be bold''' then normal text==
24422 <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>
24424 <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>
24428 <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>
24431 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24432 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24436 T35845: Headings become cursive in TOC when they contain an image
24438 title=[[Main Page]]
24441 ==Image [[Image:foobar.jpg]]==
24443 <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>
24445 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24449 <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>
24452 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24453 <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>
24457 T35845 (2): Headings become bold in TOC when they contain a blockquote
24459 title=[[Main Page]]
24462 ==<blockquote>Quote</blockquote>==
24464 <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>
24466 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24470 <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>
24473 <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>
24475 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24479 <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>
24481 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24482 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24486 Unclosed tags in TOC
24488 wgFragmentMode=[ 'html5', 'legacy' ]
24490 title=[[Main Page]]
24494 <small>Hanc marginis exiguitas non caperet.</small>
24497 <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>
24499 <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>
24503 <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>
24504 <p><small>Hanc marginis exiguitas non caperet.</small>
24508 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24509 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24510 <p><small>Hanc marginis exiguitas non caperet.</small>
24515 Multiple tags in TOC
24518 ==<i>Foo</i> <b>Bar</b>==
24520 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24522 <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>
24524 <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>
24525 <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>
24529 <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>
24530 <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>
24533 <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>
24535 <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>
24536 <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>
24540 <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>
24541 <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>
24543 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24544 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24546 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24549 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24550 # html5 tag parsing.
24552 Tags with parameters in TOC
24557 ==<sup class="in-h2">Hello</sup>==
24559 ==<sup class="a > b">Evilbye</sup>==
24561 <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>
24563 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24564 <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>
24568 <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>
24569 <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>
24572 <meta property="mw:PageProp/toc" />
24573 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24575 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24579 span tags with directionality in TOC
24582 ==<span dir="ltr">C++</span>==
24584 ==<span dir="rtl">זבנג!</span>==
24586 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24588 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24590 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24592 <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>
24594 <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>
24595 <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>
24596 <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>
24597 <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>
24598 <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>
24602 <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>
24603 <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>
24604 <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>
24605 <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>
24606 <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>
24609 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24610 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24611 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24612 <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>
24613 <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>
24614 <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>
24618 T74884: bdi element in ToC
24621 ==<bdi>test</bdi>==
24623 <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>
24625 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24629 <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>
24632 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24633 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24637 T35715: s/strike element in ToC
24640 ==<s>test</s> test <strike>test</strike>==
24642 <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>
24644 <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>
24648 <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>
24651 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24652 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24656 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24661 <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>
24663 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24667 <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>
24670 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24671 <h2 id="x" data-parsoid='{}'>x</h2>
24677 == {{int:headline_sample}} ==
24681 T34057: Title needed when expanding <h> nodes.
24683 title=[[Main Page]]
24687 <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>
24692 Strip marker in urlencode
24694 {{urlencode:x<nowiki/>y}}
24695 {{urlencode:x<nowiki/>y|wiki}}
24696 {{urlencode:x<nowiki/>y|path}}
24697 {{urlencode:x<pre id="one">two</pre>y}}
24725 Strip marker in formatNum
24727 {{formatnum:1<nowiki/>2}}
24728 {{formatnum:1<nowiki/>2|R}}
24736 Check noCommafy in formatNum
24740 {{formatnum:123456.78}}
24741 {{formatnum:123456.78|NOSEP}}
24749 Wrong option for formatNum (T58199)
24751 {{formatnum:1,234.56|Random}}
24752 {{formatnum:1,234.56|EVERYTHING}}
24753 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24762 Strip marker in grammar
24766 {{grammar:elative|foo<nowiki/>bar}}
24773 Strip marker in padleft
24775 {{padleft:|2|x<nowiki/>y}}
24782 Strip marker in padright
24784 {{padright:|2|x<nowiki/>y}}
24791 Strip marker in anchorencode
24793 {{anchorencode:x<nowiki/>y}}
24798 <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>
24802 nowiki inside link inside heading (T20295)
24804 ==[[foo|x<nowiki>y</nowiki>z]]==
24806 <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>
24811 new support for bdi element (T33817)
24813 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24815 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24820 Ignore pipe between table row attributes
24824 |- id=foo | style='color: red'
24832 <tr id="foo" style="color: red">
24839 Language parser function
24848 Padleft and padright (default 0-padding)
24857 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24858 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24862 Padleft and padright (partial fill)
24864 {{padleft:xyz|6|ab}}
24865 {{padright:xyz|6|ab}}
24871 <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>
24872 <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>
24876 Padleft and padright as substr
24878 {{padleft:|3|abcde}}
24879 {{padright:|3|abcde}}
24885 <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>
24886 <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>
24890 Padleft and padright with non-numerical length (T180403)
24892 {{padleft:abcdef|junk}}
24893 {{padright:abcdef|junk}}
24901 Special parser function
24903 {{#special:RandomPage}}
24904 {{#special:BaDtItLe}}
24905 {{#special:Foobar}}
24914 T36939 - Case insensitive link parsing ([HttP://])
24916 [HttP://MediaWiki.Org/]
24918 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24921 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24925 T36939 - Case insensitive link parsing ([HttP:// title])
24927 [HttP://MediaWiki.Org/ MediaWiki]
24929 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24934 T36939 - Case insensitive link parsing (HttP://)
24936 HttP://MediaWiki.Org/
24938 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24941 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24959 <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>
24960 <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>
24961 <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>
24962 <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>
24963 <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>
24969 ### Parsoid-specific tests
24970 ### Parsoid-PHP parser incompatibilities
24973 1. SOL-sensitive wikitext tokens as template-args
24975 parsoid=wt2html,wt2wt
24981 <span about="#mwt1" typeof="mw:Transclusion">
24982 </span><ul about="#mwt1"><li>a</li>
24984 <span about="#mwt2" typeof="mw:Transclusion">
24985 </span><ol about="#mwt2"><li>a</li>
24987 <span about="#mwt3" typeof="mw:Transclusion">
24988 </span><dl about="#mwt3"><dd>a</dd>
24992 #### -----------------------------------------------------------------
24993 #### Parsoid-specific functionality tests
24994 #### -----------------------------------------------------------------
24996 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24997 # We know wt2wt will fail, but we expect selser to pass.
24998 # Due to the nature of our testing, wt2wt and selser tests will enter the
24999 # blacklist and we'll catch selser regressions based on changes to the
25000 # blacklist entries for selser tests.
25002 1. Bad treebuilder fixup of formatting elt is cleaned up
25004 parsoid=wt2html,wt2wt
25009 [[Image:Foobar.jpg|right|Test]]
25016 <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>
25023 2. Bad treebuilder fixup of formatting elt is cleaned up
25025 parsoid=wt2html,wt2wt
25027 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25029 <small>[[Image:Foobar.jpg|right|300px]]</small>
25033 <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>
25035 <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>
25039 3. Bad treebuilder fixup of formatting elt is cleaned up
25041 parsoid=wt2html,wt2wt
25043 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25045 <p><small><b>foo</b></small></p>
25046 <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>
25047 <p><small><b>bar</b></small></p>
25051 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
25053 parsoid=wt2html,wt2wt
25055 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25057 <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>
25060 #### ----------------------------------------------------------------
25061 #### Parsoid-only testing of Parsoid's impl of LST
25062 #### Not implemented yet, see
25063 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25064 #### ----------------------------------------------------------------
25066 ## We still need to support serializing the older format while content is stored.
25068 LST Sections: Backwards compatibility
25071 "suppressErrors": true,
25072 "modes": ["html2wt"]
25075 <section begin="2011-05-16" />
25076 <section end="2014-04-10 (MW 1.23wmf22)" />
25078 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25079 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25083 LST Sections: Newfangled approach
25085 <section begin="2011-05-16" />
25086 <section end="2014-04-10 (MW 1.23wmf22)" />
25088 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
25090 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
25094 #--------- Test stripping of empty nodes in template content ----------
25097 Empty LI and TR nodes should be stripped from template content
25102 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25106 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25119 Empty LI and TR nodes should not be stripped from top-level content
25133 <li class='mw-empty-elt'></li>
25138 <tr class='mw-empty-elt'></tr>
25147 Empty TR nodes should not be stripped if they have any attributes set
25149 {{EmptyTRWithHTMLAttrTest}}
25151 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25152 <tr align='center'></tr>
25153 <tr><td>foo</td></tr>
25154 <tr align='center'></tr>
25155 <tr><td>bar</td></tr>
25159 #### ----------------------------------------------------------------
25160 #### The following section of tests are primarily to test
25161 #### wikitext escaping capabilities of Parsoid. Given that
25162 #### escaping can be done any number of ways, the wikitext (input)
25163 #### is always adjusted to reflect how Parsoid adds nowiki
25166 #### We are marking several tests as parsoid-only since the
25167 #### HTML in the result section is different from what the
25168 #### PHP parser generates for it.
25169 #### ----------------------------------------------------------------
25172 #### --------------- Headings ---------------
25174 #### 1. Nested inside html <h1>=foo=</h1>
25175 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25176 #### 3. Nested inside html with wikitext split by html tags
25177 #### 4. No escape needed
25178 #### 5. Empty headings <h1></h1>
25179 #### 6. Heading chars in SOL context
25180 #### ----------------------------------------
25182 Headings: 0. Unnested
25192 <p>=foo<i>a</i>=</p>
25194 <nowiki>=foo=</nowiki>
25196 <nowiki> </nowiki>=foo=
25198 <nowiki>=foo=</nowiki>
25200 =foo''a''<nowiki>=</nowiki>
25203 # New headings and existing headings are handled differently
25205 Headings: 1. Nested inside html
25213 <h1 data-parsoid=''>=foo=</h1>
25214 <h2 data-parsoid=''>=foo=</h2>
25215 <h3 data-parsoid=''>=foo=</h3>
25216 <h4 data-parsoid=''>=foo=</h4>
25217 <h5 data-parsoid=''>=foo=</h5>
25218 <h6 data-parsoid=''>=foo=</h6>
25226 =<nowiki>=foo=</nowiki>=
25227 ==<nowiki>=foo=</nowiki>==
25228 ===<nowiki>=foo=</nowiki>===
25229 ====<nowiki>=foo=</nowiki>====
25230 =====<nowiki>=foo=</nowiki>=====
25231 ======<nowiki>=foo=</nowiki>======
25236 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25245 <nowiki>*</nowiki>bar
25251 <nowiki>=bar=</nowiki>
25255 Headings: 3. Nested inside html with wikitext split by html tags
25259 <h1>=<b>bold</b>foo=</h1>
25261 = ='''bold'''foo= =
25265 Headings: 4a. No escaping needed (testing just h1 and h2)
25276 <h1><i>=</i>foo=</h1>
25296 Headings: 4b. No escaping needed (inside p-tags)
25313 Headings: 4c. Short headings (1)
25320 <nowiki>===</nowiki>
25326 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25328 Headings: 4d. Short headings (2)
25330 parsoid=wt2html,html2html
25341 <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>
25342 <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>
25343 <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>
25348 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25349 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25350 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25354 Headings: 5. Empty headings
25358 <h1 data-parsoid='{}'></h1>
25360 <h2 data-parsoid='{}'></h2>
25362 <h3 data-parsoid='{}'></h3>
25364 <h4 data-parsoid='{}'></h4>
25366 <h5 data-parsoid='{}'></h5>
25368 <h6 data-parsoid='{}'></h6>
25378 =====<nowiki/>=====
25380 ======<nowiki/>======
25384 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25394 <nowiki>=a=</nowiki>
25396 <nowiki>=a=</nowiki>
25398 <nowiki>=a=</nowiki>
25402 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25415 <nowiki>=a=</nowiki>
25418 <nowiki>=a=</nowiki>
25421 <nowiki>=a=</nowiki>
25426 Headings: 6c. Heading chars in SOL context (leading newline break)
25434 <nowiki>=b=</nowiki>
25438 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25442 <!--c0--><p>=a=</p>
25444 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25446 <!--c0--><nowiki>=a=</nowiki>
25448 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25452 Headings: 6d. Heading chars in SOL context (No escaping needed)
25462 Headings: 7. Insert a newline between new content and headings
25468 <h2 data-parsoid='{}'>A</h2>
25469 <p data-parsoid='{}'>a</p>
25480 Headings: Used as horizontal rule
25482 wgFragmentMode=[ 'html5', 'legacy' ]
25488 <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>
25491 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25494 #### --------------- Lists ---------------
25495 #### 0. Outside nests (*foo, etc.)
25496 #### 1. Nested inside html <ul><li>*foo</li></ul>
25497 #### 2. Inside definition lists
25498 #### 3. Only bullets at start should be escaped
25499 #### 4. No escapes needed
25500 #### 5. No unnecessary escapes
25501 #### 6. Escape bullets in SOL position
25502 #### 7. Escape bullets in a multi-line context
25503 #### ----------------------------------------
25506 Lists: 0. Outside nests
25516 <nowiki>*</nowiki>foo
25518 <nowiki>#</nowiki>foo
25520 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25523 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25524 ## to test wikitext escaping, and insignificant whitespace diffs
25525 ## cause PHP parser tests to barf
25527 Lists: 1. Nested inside html (No unnecessary escapes)
25536 <li data-parsoid='{}'>*foo</li>
25537 <li data-parsoid='{}'>#foo</li>
25538 <li data-parsoid='{}'>:foo</li>
25539 <li data-parsoid='{}'>;foo</li>
25547 <li data-parsoid='{}'>*foo</li>
25548 <li data-parsoid='{}'>#foo</li>
25549 <li data-parsoid='{}'>:foo</li>
25550 <li data-parsoid='{}'>;foo</li>
25557 *<nowiki>*foo</nowiki>
25558 *<nowiki>#foo</nowiki>
25559 *<nowiki>:foo</nowiki>
25560 *<nowiki>;foo</nowiki>
25566 #<nowiki>*foo</nowiki>
25567 #<nowiki>#foo</nowiki>
25568 #<nowiki>:foo</nowiki>
25569 #<nowiki>;foo</nowiki>
25573 Lists: 2. Inside definition lists
25577 <dl><dt>;foo</dt></dl>
25578 <dl><dt>:foo</dt></dl>
25581 <dl><dd>:foo</dd></dl>
25585 ; <nowiki>:foo</nowiki>
25587 ; <nowiki>:foo</nowiki>
25594 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25600 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25604 *<nowiki>*foo</nowiki>''it''*bar
25608 Lists: 4. No escapes needed
25621 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25625 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25639 Lists: 5. No unnecessary escapes
25643 <ul><li> bar <span>[[foo]]</span></li></ul>
25644 <ul><li> =bar <span>[[foo]]</span></li></ul>
25645 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25646 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25647 <ul><li> =bar <span>foo]]</span>=</li></ul>
25648 <ul><li> <s></s>: a</li></ul>
25649 <ul><li> <i>* foo</i></li></ul>
25652 * bar <span><nowiki>[[foo]]</nowiki></span>
25654 * =bar <span><nowiki>[[foo]]</nowiki></span>
25656 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25658 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25660 * =bar <span>foo]]</span>=
25668 Lists: 6. Escape bullets in SOL position
25672 <p><!--cmt-->*foo</p>
25674 <!--cmt--><nowiki>*</nowiki>foo
25678 Lists: 7. Escape bullets in a multi-line context
25687 <nowiki>*</nowiki>b
25691 Lists: 8. Escape colons only if not present in tags
25695 <dl><dt>a:b<i>c:d</i></dt></dl>
25697 ; <nowiki>a:b</nowiki>''c:d''
25700 #### --------------- HRs ---------------
25701 #### 1. Single line
25702 #### -----------------------------------
25705 HRs: 1. Single line
25713 ----<nowiki>----</nowiki>
25718 #### --------------- Tables ---------------
25719 #### 1a. Simple example
25720 #### 1b. No escaping needed (!foo)
25721 #### 1c. No escaping needed (|foo)
25722 #### 1d. No escaping needed (|}foo)
25724 #### 2a. Nested in td (<td>foo|bar</td>)
25725 #### 2b. Nested in td (<td>foo||bar</td>)
25726 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25728 #### 3a. Nested in th (<th>foo!bar</th>)
25729 #### 3b. Nested in th (<th>foo!!bar</th>)
25730 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25734 #### 4c. No escaping needed
25735 #### --------------------------------------
25738 Tables: 1a. Simple example
25746 <nowiki>{|</nowiki>
25751 Tables: 1b. No escaping needed
25762 Tables: 1c. No escaping needed
25773 Tables: 1d. No escaping needed
25784 Tables: 2a. Nested in td
25789 <td>foo|bar</td></tr>
25790 <tr><td>x<div>a|b</div></td>
25794 |<nowiki>foo|bar</nowiki>
25796 |x<div><nowiki>a|b</nowiki></div>
25804 <td>x<div>a|b</div>
25805 </td></tr></tbody></table>
25809 Tables: 2b. Nested in td
25815 <td>a<i>b||c</i></td>
25816 <td>a<i><div>b||c</div></i></td>
25817 </tr></tbody></table>
25820 |<nowiki>foo||bar</nowiki>
25821 |a''<nowiki>b||c</nowiki>''
25822 |a''<div><nowiki>b||c</nowiki></div>''
25831 <td>a<i><div>b||c</div></i>
25837 Tables: 2c. Nested in td -- no escaping needed
25853 Tables: 3a. Nested in th
25869 Tables: 3b. Nested in th
25874 <tr><th>foo!!bar</th>
25875 <th><i>foo|bar</i></th>
25876 <th><i>foo!!bar</i></th>
25877 <th><i><span>foo!!bar</span></i></th>
25878 </tr></tbody></table>
25881 !<nowiki>foo!!bar</nowiki>
25882 !''<nowiki>foo|bar</nowiki>''
25883 !''<nowiki>foo!!bar</nowiki>''
25884 !''<span><nowiki>foo!!bar</nowiki></span>''
25893 <th><i>foo!!bar</i>
25895 <th><i><span>foo!!bar</span></i>
25901 Tables: 3c. Nested in th
25906 <tr><th>foo||bar</th>
25907 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25908 </tr></tbody></table>
25911 !<nowiki>foo||bar</nowiki>
25912 !<nowiki>foo||bar</nowiki>
25925 Tables: 4a. Escape -
25941 |<nowiki>-bar</nowiki>
25946 Tables: 4b. Escape +
25962 |<nowiki>+bar</nowiki>
25967 Tables: 4c. No escaping needed
25972 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25973 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25979 <div>a|b</div></td>
26024 Tables: 4d. No escaping needed
26029 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26030 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26031 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26042 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26052 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26056 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26058 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26060 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26062 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26065 | || align="center" | ||
26075 | {{!}}{{!}} align="center" | ||
26079 ! !! align="center" | !!
26085 <td align="center"></td>
26087 </td></tr></tbody></table>
26092 <td align="center">
26095 </td></tr></tbody></table>
26099 <td align="center"></td>
26101 </td></tr></tbody></table>
26105 <th align="center"></th>
26107 </th></tr></tbody></table>
26111 T97430: Don't emit empty nowiki pairs around marker meta tags
26115 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26116 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26118 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26119 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26123 Unclosed xmlish element in table line shouldn't eat end delimiters
26128 <tbody><tr><td> <foo</td>
26129 <td> bar></td></tr>
26146 #### --------------- Links ----------------
26147 #### 1. Quote marks in link text
26148 #### 2. Wikilinks: Escapes needed
26149 #### 3. Wikilinks: No escapes needed
26150 #### 4. Extlinks: Escapes needed
26151 #### 5. Extlinks: No escapes needed
26152 #### --------------------------------------
26154 Links 1. WikiLinks: No escapes needed
26158 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26159 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26160 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26164 [[Foo|x [Foobar] x]]
26166 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26167 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26168 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26173 Links 2. WikiLinks: Escapes needed
26177 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26178 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26179 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26180 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26181 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26182 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26183 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26184 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26185 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26186 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26188 [[Foo|<nowiki>Foobar]</nowiki>]]
26189 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26190 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26191 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26192 [[Foo|<nowiki>|Bar</nowiki>]]
26193 [[Foo|<nowiki>]]bar</nowiki>]]
26194 [[Foo|<nowiki>[[bar</nowiki>]]
26195 [[Foo|<nowiki>x [[ y</nowiki>]]
26196 [[Foo|<nowiki>x ]] y</nowiki>]]
26197 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26199 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26200 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26201 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26202 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26203 <a href="/wiki/Foo" title="Foo">|Bar</a>
26204 <a href="/wiki/Foo" title="Foo">]]bar</a>
26205 <a href="/wiki/Foo" title="Foo">[[bar</a>
26206 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26207 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26208 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26213 Links 3. WikiLinks: No escapes needed
26217 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26218 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26223 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26224 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26229 Links 4. ExtLinks: Escapes needed
26233 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26234 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26235 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26236 <p>[http://google.com]</p>
26237 <p>[http://google.com google]</p>
26238 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26239 <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>
26241 [http://google.com <nowiki>[google]</nowiki>]
26242 [http://google.com <nowiki>google]</nowiki>]
26243 [http://google.com <nowiki>goog] le</nowiki>]
26245 <nowiki>[http://google.com]</nowiki>
26247 <nowiki>[http://google.com google]</nowiki>
26249 [http://google.com<nowiki>]</nowiki>
26251 [{{echo|http://google.com}}<nowiki>]</nowiki>
26253 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26254 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26255 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26256 </p><p>[http://google.com]
26257 </p><p>[http://google.com google]
26258 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26259 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26264 Links 5. ExtLinks: No escapes needed
26268 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26269 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26271 [http://google.com [google]
26273 [[http://google.com]]
26275 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26276 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26281 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26285 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26286 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26287 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26288 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26289 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26290 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26291 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26292 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26293 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26294 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26295 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26296 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26297 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26300 x<nowiki/>http://example.com<nowiki/>y
26301 http://example.com<nowiki/>?x
26302 http://example.com<nowiki/>&x
26303 http://example.com<nowiki/>'x
26304 http://example.com<nowiki/>,x
26305 http://example.com<nowiki/>.x
26306 http://example.com<nowiki/>;x
26307 http://example.com<nowiki/>:x
26308 http://example.com<nowiki/>;x
26309 http://example.com<nowiki/>!x
26310 http://example.com<nowiki/>=x
26311 http://example.com<nowiki/>(x)
26312 http://example.com(x<nowiki/>)
26316 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26321 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26323 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26324 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26325 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26326 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26327 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26333 "http://example.com"
26334 (http://example.com)
26335 (http://example.com) foo
26336 http://example.com,
26337 http://example.com, foo
26340 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26342 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26343 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26344 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26345 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26346 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26351 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26355 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26356 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26358 http://example.com.,;:!?\
26359 -http://example.com:
26361 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26362 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26367 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26371 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26372 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26373 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26377 X<nowiki/>RFC 123<nowiki/>y
26381 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26385 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26386 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26387 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26394 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26395 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26396 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26401 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26405 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26406 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26407 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26411 X<nowiki/>PMID 123<nowiki/>y
26415 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26419 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26420 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26421 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26428 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26429 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26430 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26435 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26439 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26440 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26441 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26444 ISBN 1234567890<nowiki/>1
26445 ISBN 1234567890<nowiki/>x
26446 a<nowiki/>ISBN 1234567890<nowiki/>b
26450 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26454 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26458 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26463 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26467 <p>this is not a link: http://example.com
26470 this is not a link: <nowiki>http://example.com</nowiki>
26474 Links 15. Link trails can't become link prefixes.
26479 <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>
26481 [[Söfnuður]]-[[00]]
26483 <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>
26487 #### --------------- Quotes ---------------
26488 #### 1. Quotes inside <b> and <i>
26489 #### 2. Link fragments separated by <i> and <b> tags
26490 #### 3. Link fragments inside <i> and <b>
26491 #### 4. No escaping needed
26492 #### --------------------------------------
26494 1a. Quotes inside <b> and <i>
26505 <b>foo'<i>bar'</i>baz</b>
26514 <i>fools'<span> errand</span></i>
26515 <i><span>fool</span>'s errand</i>
26516 '<i>foo</i> bar '<i>baz</i>
26517 a|!*#-:;+-~[]{}b'<i>x</i>
26521 ''<nowiki>''foo''</nowiki>''
26522 ''<nowiki>'''foo'''</nowiki>''
26524 '''<nowiki/>'foo''''
26525 '''<nowiki>''foo''</nowiki>'''
26526 '''<nowiki>'''foo'''</nowiki>'''
26527 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26528 '''foo'''<nowiki/>'s
26534 '''foo'''<nowiki/>'
26535 ''''foo'''<nowiki/>'
26536 ''fools'<span> errand</span>''
26537 ''<span>fool</span>'s errand''
26538 '<nowiki/>''foo'' bar '''baz''
26539 a|!*#-:;+-~[]{}b'''x''
26543 1b. Quotes inside <b> and <i> with other tags on same line
26547 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26548 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26549 <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>
26550 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26551 '<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>
26552 '<i>foo</i> <div title="name">test</div>
26553 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26554 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26555 <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>
26558 '''a'' foo ''[[bar]]''
26559 ''a''' foo ''[[bar]]''
26560 ''a''' foo '''{{echo|[[bar]]}}'''
26561 [[foo]] x'''[[bar]]''
26562 '''foo'' <ref>test</ref>
26563 '''foo'' <div title="name">test</div>
26564 '''foo'' and <br> bar
26569 2. Link fragments separated by <i> and <b> tags
26573 <p>[[<i>foo</i>hello]]</p>
26574 <p>[[<b>foo</b>hello]]</p>
26576 [[''foo''<nowiki>hello]]</nowiki>
26578 [['''foo'''<nowiki>hello]]</nowiki>
26581 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26582 # this is one of the shortcomings of this format
26584 3. Link fragments inside <i> and <b>
26588 <p><i>[[foo</i>]]</p>
26589 <p><b>[[foo</b>]]</p>
26591 ''[[foo''<nowiki>]]</nowiki>
26593 '''[[foo'''<nowiki>]]</nowiki>
26597 4. No escaping needed
26601 <p>'<span><i>bar</i></span>'
26602 '<span><b>bar</b></span>'
26606 '<span>''bar''</span>'
26607 '<span>'''bar'''</span>'
26611 #### ----------- Paragraphs ---------------
26612 #### 1. No unnecessary escapes
26613 #### --------------------------------------
26616 1. No unnecessary escapes
26620 <p>bar <span>[[foo]]</span>
26621 </p><p>=bar <span>[[foo]]</span>
26622 </p><p>[[bar <span>[[foo]]</span>
26623 </p><p>]]bar <span>[[foo]]</span>
26624 </p><p>=bar <span>foo]]</span>=
26627 bar <span><nowiki>[[foo]]</nowiki></span>
26629 =bar <span><nowiki>[[foo]]</nowiki></span>
26631 [[bar <span><nowiki>[[foo]]</nowiki></span>
26633 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26635 =bar <span>foo]]</span><nowiki>=</nowiki>
26638 #### ----------------------- PRE --------------------------
26640 1. Leading whitespace in SOL context should be escaped
26663 <nowiki> </nowiki>a
26665 <nowiki> </nowiki> a
26669 <nowiki> </nowiki> a
26671 <nowiki> </nowiki>a
26674 <nowiki> </nowiki>b
26697 2. Leading whitespace in non-indent-pre contexts should not be escaped
26701 <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>
26702 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26703 <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>
26713 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26732 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26736 <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>
26738 [[File:Foobar.jpg|thumb|caption]]
26742 5. Nowiki escaping should account for indent-pres
26752 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26766 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
26769 "modes": ["html2wt"],
26770 "scrubWikitext": true
26778 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
26779 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
26780 <p> <!--boo-->*foo</p>
26781 <p><!--boo--> *foo</p>
26782 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
26783 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
26799 <nowiki>*</nowiki>foo
26801 <nowiki/><!--boo-->*foo
26803 <!--boo--><nowiki/>*foo
26805 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
26807 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
26810 #### --------------- Behavior Switches --------------------
26813 1. Valid behavior switches should be escaped
26820 <nowiki>__TOC__</nowiki>
26821 ''<nowiki>__TOC__</nowiki>''
26825 2. Invalid behavior switches should not be escaped
26836 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26838 Behavior switches should be SOL-transparent
26842 <meta property="mw:PageProp/toc" />
26844 <!-- this one's bogus -->
26847 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26849 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26853 <!-- this one's bogus -->
26862 #### --------------- HTML tags ---------------
26865 #### 3. multi-line html tag
26866 #### 4. extension tags
26867 #### -----------------------------------------
26873 <a href="http://google.com">google</a>
26875 <a href="http://google.com">google</a>
26883 <ul><li> <div>foo</div></li>
26884 <li> <div style="color:red">foo</div></li>
26885 <li> <td></li></ul>
26888 * <nowiki><div>foo</div></nowiki>
26889 * <nowiki><div style="color:red">foo</div></nowiki>
26890 * <nowiki><td></nowiki>
26894 3. multi-line html tag
26913 <p><ref>foo</ref>
26914 </p><p><ref>bar
26915 </p><p>baz</ref>
26918 <nowiki><ref>foo</ref></nowiki>
26920 <nowiki><ref>bar</nowiki>
26922 baz<nowiki></ref></nowiki>
26926 Parsoid: newline inducing block nodes don't suppress <nowiki>
26932 <nowiki> </nowiki>a
26937 #### --------------- Others ---------------
26943 <p><nowiki>foo</nowiki>
26946 <nowiki>foo</nowiki>
26949 ## The quote-char in the input is necessary for triggering the bug
26951 (T54035) Nowiki-escaping should not get tripped by " :" in text
26960 #----------- End of wikitext escaping tests --------------
26964 Tag-like HTML structures are passed through as text
26986 </p><p>1<d e>f
26991 HTML tag with necessary entities in attributes
26993 <span title="&amp;">foo</span>
26995 <p><span title="&amp;">foo</span>
27000 HTML tag with 'unnecessary' entity encoding in attributes
27002 <span title="&">foo</span>
27004 <p><span title="&">foo</span>
27009 HTML tag with broken attribute value quoting
27011 parsoid=wt2html,html2html
27013 <span title="Hello world>Foo</span>
27015 <p><span title="Hello world">Foo</span>
27018 <p><span title="Hello world">Foo</span></p>
27022 Self-closed tag with broken attribute value quoting
27024 parsoid=wt2html,html2html
27026 <div title="Hello world />Foo
27028 <div title="Hello world"></div><p>Foo
27031 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27035 Table with broken attribute value quoting
27037 parsoid=wt2html,html2html
27040 | title="Hello world|Foo
27045 <td title="Hello world">Foo
27051 <td title="Hello world">Foo
27057 Table with broken attribute value quoting on consecutive lines
27059 parsoid=wt2html,html2html
27062 | title="Hello world|Foo
27063 | style="color:red|Bar
27068 <td title="Hello world">Foo
27070 <td style="color:red">Bar
27076 <td title="Hello world">Foo
27077 </td><td style="color: red">Bar
27078 </td></tr></tbody></table>
27083 Accept empty td cell attribute
27086 | align="center" |foo|| |
27091 <td align="center">foo</td>
27098 Non-empty attributes in th-cells
27101 !Foo!! style="color: red" |Bar
27107 <th style="color: red">Bar
27113 Accept empty attributes in th-cells
27128 Empty table rows go away
27149 ### Parsoid-centric tests for testing RTing of inter-element separators
27150 ### Edge cases not tested by existing parser tests and specific to
27151 ### Parsoid-specific serialization strategies.
27155 RT-ed inter-element separators should be valid separators
27167 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27171 # Parsoid-only test of a DOM pass
27173 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27185 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27186 <p>bar</p></small></td></tr>
27190 <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>
27194 # Note that the "style" attribute is really a template parameter here.
27195 # The = would have to be {{=}} if you wanted the literal.
27197 Empty TD followed by TD with tpl-generated attribute
27202 |{{echo|style='color:red'}}|foo
27216 Indented table with an empty td
27234 ## We have some newline diffs RT-ing this edge case
27235 ## and it is not important enough -- we seem to be emitting
27236 ## at most 2 newlines after a </tr> and this is unrelated to
27237 ## the issue from T85627 that this is testing.
27239 Indented table with blank lines in between (T85627)
27258 Indented block & table
27272 <div data-parsoid='{"stx":"html"}'>foo</div>
27274 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27279 Indent and comment before table row
27294 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27295 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27299 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27301 Empty TR followed by a template-generated TR
27307 {{echo|<tr><td>foo</td></tr>}}
27312 <tr class='mw-empty-elt'></tr>
27313 <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}}]}'>
27318 ## PHP and parsoid output differ for this, and since this is primarily
27319 ## for testing Parsoid's serializer, marking this Parsoid only
27321 Empty TR followed by mixed-ws-comment line should RT correctly
27334 <tr class='mw-empty-elt'></tr>
27337 <!--c--> </tr><!--d-->
27343 Multi-line image caption generated by templates with/without trailing newlines
27345 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27346 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27348 <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>
27349 <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>
27353 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27357 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27359 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27361 <includeonly>foo</includeonly>
27369 ## PHP emits broken html for this, and since this is primarily
27370 ## a Parsoid serializer test, marking this Parsoid only
27372 Improperly nested inline or quotes tags with whitespace in between
27374 <span> <s>x</span> </s>
27377 <p><span> <s>x</s></span><s> </s>
27378 <b> <i>x</i></b><i> </i>
27383 Encapsulate protected attributes from wt
27385 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27387 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27391 <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>
27393 <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">
27394 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
27398 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27399 ## Having nested or stray pre tags results in the attempt to add duplicates,
27400 ## causing an assertion fail. This test tries to prevent that situation.
27402 Ensure ParagraphWrapper can deal with stray closing pre tags
27412 1. Ensure fostered text content is wrapped in element nodes
27416 <table>hi</table><table>ho</table>
27418 hi<table></table>ho<table></table>
27420 <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>
27424 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27426 parsoid=wt2html,wt2wt
27436 </td></tr></tbody></table>
27438 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||
27439 </span><table data-parsoid='{"stx":"html"}'>
27440 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
27441 </td></tr></tbody></table>
27445 Encapsulation properly handles null DSR information from foster box
27447 parsoid=wt2html,wt2wt
27449 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27451 <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>
27455 1. Encapsulate foster-parented transclusion content
27457 parsoid=wt2wt,wt2html
27459 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27461 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
27463 <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>
27467 2. Encapsulate foster-parented transclusion content
27469 parsoid=wt2wt,wt2html
27471 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27473 <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>
27484 3. Encapsulate foster-parented transclusion content
27486 parsoid=wt2wt,wt2html
27488 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27490 <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>"]}">
27503 4. Encapsulate foster-parented transclusion content
27505 parsoid=wt2wt,wt2html
27507 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27509 <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>"]}">
27522 5. Encapsulate foster-parented transclusion content
27524 parsoid=wt2wt,wt2html
27526 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27528 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27530 <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>
27534 6. Encapsulate foster-parented transclusion content
27536 parsoid=wt2wt,wt2html
27538 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27540 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
27542 <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>
27546 7. Encapsulate foster-parented transclusion content
27548 parsoid=wt2wt,wt2html
27550 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27552 <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>
27562 # Note that the wt is broken on purpose: the = should be {{=}} if you
27563 # don't want it to be a template parameter key.
27565 8. Encapsulate foster-parented transclusion content
27567 parsoid=wt2wt,wt2html
27570 }}{|{{echo|style='color:red'}}
27581 </td></tr></tbody></table>
27583 <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">
27584 </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">
27587 </td></tr></tbody></table>
27591 9. Encapsulate foster-parented transclusion content
27593 parsoid=wt2wt,wt2html
27595 <table>{{echo|hi</table>hello}}
27597 hi<table></table><p>hello
27600 <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>
27604 Table in fosterable position
27615 <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">
27617 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27623 # Parsoid only for T66747
27625 Properly encapsulate empty-content transclusions in fosterable positions
27633 <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"}]]}'>
27639 Always encapsulate foster box when template range is expanded to table
27652 T115289: Unclosed table
27654 {{echo|<table>}}<!--c-->[[Category:Two]]
27656 <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>
27660 T115289: Don't migrate newlines out of tables with fostered content
27662 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27664 <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>
27668 T73074: More fostering fun
27670 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27672 <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>
27676 Support <object> element with .data attribute
27680 <object data="test.swf"></object>
27682 <object data="test.swf"></object>
27686 Don't block XML namespace declaration
27688 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27690 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27693 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27696 # -----------------------------------------------------------------
27697 # The following section of tests are primarily to spec requirements
27698 # around Parsoid's serialization (old, new, edited content)
27700 # All these tests are marked Parsoid html2wt and html2html only
27701 # ----------------------------------------------------------------
27704 Ignore rel attribute in a-tags during serialization to url-links
27708 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27709 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27710 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27712 http://en.wikipedia.org/wiki/Foobar
27713 http://en.wikipedia.org/wiki/Foobar
27714 http://en.wikipedia.org/wiki/Foobar
27717 # 'mi' is a localinterwiki prefix as well as a language
27719 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27723 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27729 Parsoid should accept interwiki shortcuts
27733 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27734 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27735 <a href='./fr:Foo'>Foo</a></p>
27736 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27737 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27738 <a href='fr%3AFoo'>Foo</a></p>
27739 <p><a href='FR%3AFoo'>Foo</a>
27740 <a href='./FR:Foo'>Foo</a></p>
27755 Parsoid should not accept invalid interwiki shortcuts
27759 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27760 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27761 <a href='news:Foo'>Foo</a></p>
27770 New wikilinks should be serialized properly
27774 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27775 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27776 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27777 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27778 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27782 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27783 http://en.wikipedia.org/wiki/Foo
27784 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27788 New wiki links (href variations)
27792 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27793 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27794 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27795 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27800 [[Toxine bactérienne]]
27804 New wiki links (content string variations)
27808 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27809 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27810 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27814 [[Foo_bar|./Foo_bar]]
27818 New category links (href variations)
27822 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27823 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27824 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27826 [[Category:Toxine bactérienne]]
27827 [[Category:Toxine bactérienne]]
27828 [[Category:Toxine bactérienne]]
27832 New sol transparent links don't need indent-pre nowiki protection
27837 <link rel="mw:PageProp/redirect" href="./Main_Page">
27838 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27839 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27841 #WEITERLEITUNG [[Main Page]]
27842 <!-- this is good --> [[Category:Good]]
27843 <!-- this is great --> [[Kategorie:Great]]
27847 New interlanguage links (href variations)
27851 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27852 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27853 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27855 [[es:Toxine bactérienne]]
27856 [[es:Toxine_bactérienne]]
27857 [[es:Toxine_bactérienne]]
27861 Image: Modifying size of an image (1)
27864 "modes": ["wt2wt"],
27866 ["img[height]", "attr", "height", "22"],
27867 ["img[width]", "attr", "width", "200"]
27871 [[Image:Foobar.jpg|230x230px]]
27873 [[Image:Foobar.jpg|200x200px]]
27877 Image: Modifying size of an image (2)
27880 "modes": ["wt2wt"],
27882 ["img[height]", "attr", "height", "100"],
27883 ["img[width]", "attr", "width", "500"]
27887 [[Image:Foobar.jpg|230x230px]]
27889 [[Image:Foobar.jpg|500x500px]]
27892 # Change in size is ignored so long as class='mw-default-size'
27894 Image: Modifying size of an image (3)
27897 "modes": ["wt2wt"],
27899 ["figure[class]", "removeClass", "mw-default-size"],
27900 ["figure img", "attr", "height", "19"],
27901 ["figure img", "attr", "width", "170"]
27905 [[Image:Foobar.jpg|thumb]]
27907 [[Image:Foobar.jpg|thumb|170x170px]]
27911 Image: Modifying alignment of an image (T50665)
27914 "modes": ["wt2wt"],
27916 ["figure[class]", "removeClass", "mw-halign-right"],
27917 ["figure[class]", "addClass", "mw-halign-left"]
27921 [[Image:Foobar.jpg|thumb|caption|right]]
27923 [[Image:Foobar.jpg|thumb|caption|left]]
27927 Image: Modifying mw-default-size of an frameless image (T64805)
27930 "modes": ["wt2wt"],
27932 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27936 [[Image:Foobar.jpg|frameless|right]]
27938 [[Image:Foobar.jpg|frameless|right|220x220px]]
27942 Image: Modifying valign of an image (T51221)
27945 "modes": ["wt2wt"],
27947 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27948 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27952 [[File:Foobar.jpg|20px|middle]]
27954 [[File:Foobar.jpg|20px|text-top]]
27958 Image: Modifying alt attribute of an image (T58400)
27961 "modes": ["wt2wt"],
27963 ["img[alt]", "attr", "alt", "some alternate edited text"]
27967 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27969 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27973 Image: Modifying caption of an image
27976 "modes": ["wt2wt"],
27978 ["figcaption", "text", "new caption"]
27982 [[Image:Foobar.jpg|thumb|original caption]]
27984 [[Image:Foobar.jpg|thumb|new caption]]
27988 Image: empty alt attribute (T50924)
27992 [[File:Foobar.jpg|thumb|alt=|bar]]
27994 <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>
27998 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28004 <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>
28006 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28010 Image: Block level image should have \n before and after
28013 [[File:Foobar.jpg|right|thumb|150x150px]]
28017 <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>
28022 Image: New block level image should have \n before and after (existing content)
28025 [[File:Foobar.jpg|right|thumb|150x150px]]
28029 <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>
28034 Image: upright option (parsoid)
28036 [[File:Foobar.jpg|thumb|upright|caption]]
28037 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28038 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28040 <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>
28041 <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>
28042 <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>
28046 Image: upright option is ignored on inline and frame images (parsoid)
28048 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28050 <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>
28054 Image: in template parameter with empty parameter
28056 {{echo|[[File:Foobar.jpg|link=]]}}
28058 <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>
28062 Image: from basic HTML (1)
28066 <span typeof="mw:Image">
28067 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28070 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28074 Image: from basic HTML (2)
28078 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28080 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28084 Image: from basic HTML (3)
28088 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28090 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28094 Image: from basic HTML (4)
28098 <img src="./File:Foobar.jpg">
28100 [[File:Foobar.jpg|link=]]
28104 Image: Invalid title as link
28106 [[File:Foobar.jpg|link=<]]
28108 <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>
28111 <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>
28115 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28120 <li><p>foo</p></li>
28127 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28131 <ul> <li>foo</li></ul>
28137 Don't strip leading whitespace when handling indent-pre suppressing tags
28142 <tr><td> indented row</td></tr>
28145 <b>This is very bold of you!</b>
28148 indented cell (no pre-wrapping!)
28158 '''This is very bold of you!'''
28162 indented cell (no pre-wrapping!)
28170 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28192 <nowiki> </nowiki></span>bar2
28195 <nowiki> </nowiki><span>bar</span>
28198 <nowiki> </nowiki><span>foo</span>
28203 Lists: Dont insert newlines in a serialized list item.
28207 <ul><li>a<br>b</li><li>c</li></ul>
28214 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28217 "modes": ["html2wt"],
28218 "scrubWikitext": false
28221 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28222 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28224 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28225 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28227 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28229 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28231 == hello there [[Category:A1]] ==
28233 == [[Category:A2]] hi pal ==
28235 == <!--foo--> [[Category:A3]] how goes it ==
28237 == it goes well [[Category:A4]] <!--bar--> ==
28239 ==howdy [[Category:A5]]==
28245 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28248 "modes": ["html2wt"],
28249 "scrubWikitext": true
28252 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28253 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28255 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28256 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28258 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28266 <!--foo-->[[Category:A3]]
28271 [[Category:A4]] <!--bar-->
28279 Headings: Don't hoist metas that come from templates
28282 "modes": ["html2wt"],
28283 "scrubWikitext": true
28286 <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>
28288 == {{echo|foo [[Category:Foo]]}} ==
28292 Headings: Category in ref isn't hoisted
28295 "modes": ["html2wt"],
28296 "scrubWikitext": true
28299 <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>
28301 <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>
28304 [[Category:Baz]] </ref> ==
28310 Parsoid: Serialize positional parameters with = in them as named parameter
28314 <p about="#mwt1" typeof="mw:Transclusion"
28315 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28317 <p about="#mwt1" typeof="mw:Transclusion"
28318 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28320 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28321 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28322 <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>
28326 {{echo|1=f=oo|2=bar}}
28328 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28329 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28330 {{echo|<nowiki>f=oo</nowiki>|bar}}
28334 Parsoid: Serialize positional parameters with = in extlink as named parameter
28338 <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>
28340 {{echo|1=http://stuff?is=ok}}
28344 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28348 <div>a<p>b</p></div>
28369 Substrings resembling wikitext in hrefs should not get nowiki escapes
28373 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28379 Enforce single-line context in the serializer
28386 <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">
28387 </span><span about="#mwt1">you</span> </h2>
28389 <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>
28391 <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
28392 there</span></li></ol>
28404 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28411 </tbody></table></dd></dl>
28415 == hi {{bogus|there
28426 * foo '''bar''' baz
28438 Serialize new placeholder space without spans
28442 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28444 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28446 <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>
28452 <ref>foo : bar</ref>ok
28456 #-----------------------
28457 # Tag minimization tests
28458 #-----------------------
28461 1. I/B quote minimization: wikitext-only tags should be combined
28465 <p><i>A</i><i>B</i></p>
28466 <p><b>A</b><b>B</b></p>
28467 <p><i>A</i><b><i>B</i></b></p>
28468 <p><b>A</b><i><b>B</b></i></p>
28469 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28470 <p><i><b>A</b></i><i><b>B</b></i></p>
28471 <p><i><b>A</b></i><b><i>B</i></b></p>
28472 <p><b><i>A</i></b><i><b>B</b></i></p>
28492 2. I/B quote minimization: wikitext and html tags should not be combined
28496 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28497 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28501 ''A''<nowiki/>'''<i>B</i>'''
28505 3. I/B quote minimization: templated content stops minimization
28509 <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>
28510 <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>
28512 ''A''{{echo|''B''}}
28514 ''A''{{echo|'''''B'''''}}
28518 4. I/B quote minimization: new content should be mimimized with adjacent old content
28522 <p><i>A</i><i>B</i></p>
28523 <p><b>A</b><b>B</b></p>
28524 <p><i>A</i><b><i>B</i></b></p>
28534 5a. Merge adjacent quote nodes if they've been edited
28537 "modes": ["wt2wt", "selser"],
28539 ["p", "contents", "remove", ":contains('b')"]
28549 5b. Merge adjacent quote nodes if they've been edited
28552 "modes": ["wt2wt", "selser"],
28558 ''a''<span id="x">b</span>''c''
28564 1. Merge adjacent link nodes as long as at least one element is new
28567 "modes": ["html2wt"],
28568 "scrubWikitext": true
28571 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28572 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28573 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28577 [[Football|Foot]][[Football|ball]]
28581 2. Merge adjacent link nodes and enable additional normalizations
28584 "modes": ["html2wt"],
28585 "scrubWikitext": true
28588 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28594 3. Don't merge adjacent link nodes if scrubWikitext is false
28597 "modes": ["html2wt"],
28598 "scrubWikitext": false
28601 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28603 [[Football|Foot]][[Football|ball]]
28607 1. Move format tags outside of WikiLink
28610 "modes": ["html2wt"],
28611 "scrubWikitext": true
28614 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
28615 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
28616 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
28619 '''''[[Football]]'''''
28620 <u>'''''[[Football]]'''''</u>
28624 2. Move format tags outside of WikiLink with mergable A tags
28627 "modes": ["html2wt"],
28628 "scrubWikitext": true
28631 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
28633 '''''[[Football]]'''''
28637 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
28640 "modes": ["html2wt"],
28641 "scrubWikitext": true
28644 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
28646 <font color="red"><u>'''[[Foo]]'''</u></font>
28650 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
28653 "modes": ["html2wt"],
28654 "scrubWikitext": true
28657 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
28658 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
28659 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
28661 [[Foo|<font color="red">Foo</font>]]
28662 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
28663 [[Foo|<span class="Bar">Foo</span>]]
28667 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
28670 "modes": ["selser"],
28671 "scrubWikitext": true,
28673 ["a", "html", "<i>Foo</i>"]
28683 6. Regression test: Manual edit test to ensure diff markers are not lost
28686 "modes": ["selser"],
28687 "scrubWikitext": true,
28689 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
28698 #------------------------------
28699 # End of tag minimization tests
28700 #------------------------------
28703 T56262: New entities
28707 <span typeof="mw:Entity"> </span>
28712 ## Note that there is no wikitext output for 'unknownproperty' ##
28713 ## Unknown magic words are silently dropped ##
28720 <meta property='mw:PageProp/toc' />
28721 <meta property='mw:PageProp/notoc' />
28722 <meta property='mw:PageProp/forcetoc' />
28723 <meta property='mw:PageProp/index' />
28724 <meta property='mw:PageProp/noindex' />
28725 <meta property='mw:PageProp/nogallery' />
28726 <meta property='mw:PageProp/noeditsection' />
28727 <meta property='mw:PageProp/notitleconvert' />
28728 <meta property='mw:PageProp/nocontentconvert' />
28729 <meta property='mw:PageProp/unknownproperty' />
28739 __NOCONTENTCONVERT__
28743 Consecutive <pre>s should not get merged
28745 parsoid=html2wt,html2html
28747 <pre>a</pre><pre>b</pre>
28775 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28779 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28781 [[Special:BookSources/1234567890|ISBN 1234567895]]
28785 Edited RFC links not serializable as RFC links should serialize as extlinks
28789 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28791 [https://tools.ietf.org/html/rfc123 New RFC]
28795 Edited PMID links not serializable as PMID links should serialize as extlinks
28799 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28801 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28805 WTS of autolinks with trailing/surrounding context
28809 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28810 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28811 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28812 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28813 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28814 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28816 http://cscott.net'''foo'''
28818 http://cscott.net<b>foo</b>
28820 '''http://cscott.net'''
28822 '''http://cscott.net '''
28824 '''http://cscott.net<nowiki/>x'''
28826 http://cscott.net<nowiki/>x
28830 WTS of autolinks with nowikis (round-trip)
28832 x<nowiki/>http://cscott.net<nowiki/>x
28834 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28837 # this is the "easy" test because it leaves in place all the
28838 # data-parsoid information indicating this is an autolink
28840 WTS of autolinks with escapes (editing)
28843 "modes": ["wt2wt"],
28845 [ "span", "remove" ]
28849 x<nowiki/>http://cscott.net<nowiki/>x
28851 x<nowiki/>http://cscott.net<nowiki/>x
28855 WTS of edited autolink-like text (T103364)
28858 "modes": ["wt2wt"],
28860 [ "span[typeof]", "removeAttr", "typeof" ]
28864 Not a link: <nowiki>http://example.com</nowiki>.
28866 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28870 WTS of newly-authored autolink-like text (T103364)
28874 <p>http://example.com is not a link.</p>
28876 <nowiki>http://example.com</nowiki> is not a link.
28880 WTS of autolink-like text after an autolink (T108563)
28884 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28886 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28890 Magic links inside links (not autolinked)
28892 [[Foo|http://example.com]]
28895 [[Foo|ISBN 123456789x]]
28897 [http://foo.com http://example.com]
28898 [http://foo.com RFC 1234]
28899 [http://foo.com PMID 1234]
28900 [http://foo.com ISBN 123456789x]
28902 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28903 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28904 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28905 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28906 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28907 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28908 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28909 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28912 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28913 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28914 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28915 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28917 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28918 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28919 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28920 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28924 Magic links inside image captions (autolinked)
28926 [[File:Foobar.jpg|thumb|http://example.com]]
28927 [[File:Foobar.jpg|thumb|RFC 1234]]
28928 [[File:Foobar.jpg|thumb|PMID 1234]]
28929 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28931 <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>
28932 <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>
28933 <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>
28934 <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>
28936 <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>
28937 <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>
28938 <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>
28939 <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>
28943 WTS of magic word text (T109371)
28948 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28949 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28951 <nowiki>RFC 1234</nowiki>
28953 [http://foo.com RFC 1234]
28959 Edited Redirect link should emit a non-piped wikitext link
28963 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28969 T75121: Infer extension name from typeOf if data-mw is not present
28971 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28973 <div typeOf="mw:Extension/foo"></div>
28978 # Note that the <p> wrapping isn't present in PHP parser output
28979 # The important thing for this test is that P-wrapping doesn't
28980 # interfere with the <nowiki> protection for leading - in <td>
28981 # (which isn't necessary for <th>).
28983 T88318: p-wrapped dash in table.
28985 parsoid=html2wt,wt2wt
28988 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28989 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28990 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28997 |<nowiki>-</nowiki>
28998 |<nowiki>- </nowiki>
29018 <td><small>-</small>
29025 </td></tr></tbody></table>
29029 T149209: WTS: Handle newlines in table cells properly
29037 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29039 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29045 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29047 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29069 T149209: Selser: Handle newlines in table cells properly
29072 "modes": ["selser"],
29074 [ "#h1", "html", "a\nb\n" ],
29075 [ "#h2", "html", "a\nb\n" ],
29076 [ "#c1", "html", "a\nb\n" ],
29077 [ "#c2", "html", "<p>a</p>" ],
29078 [ "#c3", "html", "<p>a</p>" ],
29079 [ "#c4", "html", "edit-me<p>a</p>" ]
29084 ! id="h1" |edit-me!!1
29086 ! id="h2" |edit-me||2
29088 | id="c1" |edit-me||3
29090 | id="c2" |edit-me||4
29092 | id="c3" |edit-me||p||q||r
29094 | id="c4" |edit-me||p||q||r
29123 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29128 <td id='mwAc'>foo</td>
29129 <td id='serialize-this'>bar</td>
29134 | id="serialize-this" |bar
29139 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29143 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29145 <div id="hello">ok</div>
29149 Testing serialization after deletion in references
29152 "modes": ["wt2wt"],
29158 hi <ref><div id="x">ho</div></ref>
29168 Testing serialization after deletion of table cells
29171 "modes": ["wt2wt", "selser"],
29179 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29189 Testing selser after addition of new row before first row (T125419)
29192 "modes": ["wt2wt", "selser"],
29194 [ "tr", "before", "<tr><td>X</td></tr>" ]
29210 Serialize new table rows in a HTML table using HTML tags
29213 "modes": ["wt2wt", "selser"],
29215 [ "tr", "before", "<tr><td>X</td></tr>" ]
29219 <table><tr><td>a</td></tr></table>
29221 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29225 Serialize new table cells in a HTML row using HTML tags
29228 "modes": ["wt2wt", "selser"],
29230 [ "td", "before", "<td>X</td>" ]
29234 <table><tr><td>a</td></tr></table>
29236 <table><tr><td>X</td><td>a</td></tr></table>
29240 Serialize wikitext list items as HTML list items when embedded in a HTML list
29244 <ul data-parsoid='{"stx": "html"}'>
29245 <li data-parsoid='{}'>a</li>
29255 # SSS FIXME: Is this actually a good thing given the
29256 # odd nested list output that is generated by MW?
29257 # <ul><li>foo<ul>..</ul></li></ul> instead of
29258 # <ul><li>foo</li><ul>..</ul></ul>
29260 Wikitext lists can be nested inside HTML lists
29264 <ul data-parsoid='{"stx": "html"}'>
29265 <li data-parsoid='{"stx": "html"}'>a
29266 <ul><li>b</li></ul>
29270 <ul data-parsoid='{"stx": "html"}'>
29272 <ul><li>y</li></ul>
29293 "modes": ["wt2wt"],
29295 [ "#xyz", "before", "<b>before</b> stuff " ],
29296 [ "#xyz", "after", " stuff <i>after</i>" ],
29297 [ "#xyz", "html", "x <b>y</b> z" ]
29301 <span id="xyz">hello</span>
29303 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29307 Never serialize a-tag as html, regardless of what data-parsoid has to say
29309 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29311 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29316 ## SSS FIXME: This is broken output nevertheless.
29317 ## What might be a reasonable non-broken output for this?
29318 ## This is an edge case unlikely to be seen in production
29319 ## that I am not wasting more time on this right now.
29321 Never serialize a-tag as html, no matter what attributes it has
29323 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29325 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29327 [http://boo.org http://boohoo.org]
29330 # Misnested is an indication that selser can reuse the source but these have
29331 # shown to sneak through on occasion. See T101768.
29332 # The original wikitext here is: [http://test.com [[one]] two three]
29334 Strip span tags added to mark misnested links
29338 <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>
29340 [http://test.com][[one]] two three
29344 Catch regression when unpacking misnested links
29348 {{echo|hi}}[http://example.com [[ho]]]
29350 <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>
29354 Catch regression when unpacking with trailing content
29356 {{echo|Foo <references/> bar}}
29358 <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>
29362 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29366 <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|}"]}'>
29378 ## This test verifies the presence and computation of this attribute indirectly
29379 ## by making an edit and ensuring that the serialization is correct (which it would be
29380 ## only if firstWikitextNode is properly set).
29382 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
29385 "modes": ["wt2wt"],
29387 [ "div#x", "remove" ],
29388 [ "div", "before", "<div>new</div>" ]
29392 <div id="x">foo</div>
29394 {{echo|<div>boo</div>
29402 {{echo|<div>boo</div>
29408 # --------------------------------------------
29409 # Tests spec'ing wikitext serialization norms |
29410 # --------------------------------------------
29413 Serialize multi-line indent-pre starting with wikitext syntax
29427 1. Categories should always be serialized on their own line
29431 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
29439 2. Categories that are part of templates should not introduce a line break
29441 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
29443 <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>
29446 # Careful while editing these next 2 tests. There are \u200f characters
29447 # before and after the <link> tags in the HTML and following some
29448 # of the categories in wikitext
29449 # Do not remove these characters in edits.
29451 # As part of the serialization, these bidi characters will get stripped.
29453 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
29456 "modes": ["html2wt"],
29457 "scrubWikitext": true
29460 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
29461 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
29464 [[קטגוריה: שיטות משפט]]
29468 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
29471 "modes": ["html2wt"],
29472 "scrubWikitext": true
29475 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
29482 Lists: Add space after bullets
29489 <li><span> baz</span></li>
29494 * <span> baz</span>
29498 1. Headings: Add space before/after == (T53744)
29505 <h2><span> baz</span></h2>
29513 == <span> baz</span> ==
29517 2. Headings: Add space before/after == even after hoisted content
29520 "modes": ["html2wt"],
29521 "scrubWikitext": true
29524 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29532 1. Headings: suppress newly created empty headings
29535 "modes": ["html2wt"],
29536 "scrubWikitext": true
29544 2. Headings: don't suppress empty headings if scrubWikitext is false
29554 3. Headings: suppress empty headings on edits
29557 "modes": ["selser"],
29558 "scrubWikitext": true,
29564 ==<span id="x">foo</span>==
29569 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29572 "modes": ["html2wt"],
29573 "scrubWikitext": true
29576 <h2>foo<br/>bar</h2>
29577 <h2>foo <span><br/>bar</span> baz</h2>
29581 == foo <span> bar</span> baz ==
29585 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29588 "modes": ["html2wt"],
29589 "scrubWikitext": false
29592 <h2>foo<br/>bar</h2>
29598 1. WT Quote Tags: suppress newly created empty style tags
29601 "modes": ["html2wt"],
29602 "scrubWikitext": true
29610 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29616 ''<nowiki/>'''''<nowiki/>'''
29620 3. WT Quote Tags: suppress empty style tags on edits
29623 "modes": ["selser"],
29624 "scrubWikitext": true,
29630 '''<span id="x">foo</span>'''
29635 1. Anchors: suppress newly created empty anchors
29638 "modes": ["html2wt"],
29639 "scrubWikitext": true
29642 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29647 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29650 "modes": ["html2wt"],
29651 "scrubWikitext": false
29654 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29660 3. Anchors: suppress empty anchors on edits
29663 "modes": ["selser"],
29664 "scrubWikitext": true,
29670 [[Test|<span id="x">foo</span>]]
29675 3a. Anchors: do not suppress numbered extlinks
29678 "modes": ["wt2wt"],
29679 "scrubWikitext": true
29684 <a rel="mw:ExtLink" href="http://foo.com"></a>
29688 3b. Anchors: do not suppress numbered extlinks
29691 "modes": ["wt2wt"],
29692 "scrubWikitext": true,
29698 [http://foo.com <span id="x">foo</span>]
29704 Normalizations should be restricted to edited content
29707 "modes": ["selser"],
29708 "scrubWikitext": true,
29710 [ "h1", "before", "<i></i>"]
29724 1. Multiple normalizations (html2wt)
29727 "modes": ["html2wt"],
29728 "scrubWikitext": true
29732 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29733 </a><b><i></i></b>x</p>
29742 2. Multiple normalizations (selser)
29745 "modes": ["selser"],
29746 "scrubWikitext": true,
29748 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29752 <span id="x">foo</span>
29754 <span id="x">foo</span>
29760 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29763 "modes": ["html2wt"],
29764 "scrubWikitext": true
29776 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29783 <nowiki> </nowiki>hi
29785 <nowiki> </nowiki> hello
29789 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29792 "modes": ["html2wt"],
29793 "scrubWikitext": true
29802 baz bang</td></tr></table>
29808 bar<span>boo</span></p>
29824 bar<span>boo</span>
29828 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29831 "modes": ["selser"],
29832 "scrubWikitext": true,
29834 [ "p", "html", " a\n b" ]
29845 1. New links that end in spaces
29848 "modes": ["html2wt"],
29849 "scrubWikitext": false
29852 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29853 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29854 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29856 [[Berlin ]]<nowiki/>is the capital of Germany.
29860 [[Boston ]] is a city.
29864 2. New links that end in spaces
29867 "modes": ["html2wt"],
29868 "scrubWikitext": true
29871 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29872 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29873 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29875 [[Berlin]] is the capital of Germany.
29879 [[Boston]] is a city.
29883 1. Table cells with escapable prefixes
29886 "modes": ["html2wt"],
29887 "scrubWikitext": false
29891 <tr><td>a</td></tr>
29892 <tr><td>-</td></tr>
29893 <tr><td>+</td></tr>
29899 |<nowiki>-</nowiki>
29901 |<nowiki>+</nowiki>
29906 2. Table cells with escapable prefixes
29909 "modes": ["html2wt"],
29910 "scrubWikitext": true
29914 <tr><td>a</td></tr>
29915 <tr><td>-</td></tr>
29916 <tr><td>+</td></tr>
29929 3a. Table cells with escapable prefixes after edits
29932 "modes": ["selser"],
29933 "scrubWikitext": true,
29935 [ "table tbody tr:first-child td:first-child", "remove"]
29949 3b. Table cells with escapable prefixes after edits
29952 "modes": ["selser"],
29953 "scrubWikitext": true,
29955 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29962 |<span id="x">foo</span>+
29971 # FIXME: This test will fail because
29972 # normalization doesn't realize that the id attribute
29973 # will eliminate the escapable scenario
29975 4a. Table cells without escapable prefixes after edits
29978 "modes": ["selser"],
29979 "scrubWikitext": true,
29981 [ "#x", "html", "-" ]
29994 ## This tests normalizer's ability to discriminate between
29995 ## cells having identical content.
29997 4b. Table cells without escapable prefixes after edits
30000 "modes": ["selser"],
30001 "scrubWikitext": true,
30003 [ "td", "html", "-" ]
30016 ## This tests normalizer's ability to not be tripped by
30017 ## comments (and whitespace)
30019 4c. Table cells without escapable prefixes after edits
30022 "modes": ["selser"],
30023 "scrubWikitext": true,
30025 [ "table tbody tr td:first-child", "remove" ]
30040 ## This tests normalizer's ability to handle HTML cells
30042 4d. Table cells without escapable prefixes after edits
30045 "modes": ["selser"],
30046 "scrubWikitext": true,
30048 [ "td", "html", "-" ]
30053 <tr><td>a</td></tr>
30057 <tr><td>-</td></tr>
30061 ## T111151 Remove font elements without attributes
30063 5a. font tags without attributes should be dropped in scrubWikitext mode
30066 "modes": ["html2wt"],
30067 "scrubWikitext": true
30071 <font><font>bar</font></font>
30072 <font class="x">boo</font>
30076 <font class="x">boo</font>
30080 5b. font tags should not be dropped without scrubWikitext being enabled
30083 "modes": ["html2wt"],
30084 "scrubWikitext": false
30093 Escape nowiki DOM elements
30097 <nowiki><i>foo</i></nowiki>
30099 <nowiki>''foo''</nowiki>
30102 # This is meant to be an interim fix while we go about figuring out
30103 # how to not introduce these trailing <nowiki/>s in the first place.
30105 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30109 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30111 <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>
30112 <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>
30126 New list is serialized on newlines
30130 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30134 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30136 The quick brown fox jumps over the lazy dog.
30142 The quick onyx goblin jumps over the lazy dwarf.
30146 New lists in formatting elements serialized w/o newlines
30158 <small><ul><li>hi</li></ul></small>
30170 New list in table doesn't need newlines
30174 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30183 # ---------------------------------------------------
30184 # End of tests spec'ing wikitext serialization norms |
30185 # ---------------------------------------------------
30189 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30197 <td><b>c</b><p>d</p></td>
30216 Anchor without href scenarios
30218 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30221 <a class="no">dice</a>
30226 <span name="foo"></span>
30230 New transclusion added after a list should be serialized after the list
30234 <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>
30240 # -----------------------------------------------------------------
30241 # End of section for Parsoid-only html2wt tests for serialization
30243 # -----------------------------------------------------------------
30245 # -----------------------------------------------------------------
30246 # The following section of tests are primarily to spec behavior of
30247 # the selective serializer. All these tests have manual selser
30248 # changes. The automated selser changes for all tests handle the
30249 # wide variation of changes, but these tests here capture specs
30250 # deterministically.
30251 # ----------------------------------------------------------------
30255 Selser: New comments should not be lost
30258 "modes": ["selser"],
30260 [ "#a", "after", "<!--c1-->" ],
30261 [ "#b", "before", "<!--c2-->" ]
30265 <span id="a">a</span>
30267 <span id="b">b</span>
30269 <span id="a">a</span><!--c1-->
30271 <!--c2--><span id="b">b</span>
30276 Selser: Check for validity of DSR before using it
30279 "modes": ["selser"],
30281 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30285 <span id="a">a</span>
30287 {{DISPLAYTITLE:foo}}
30288 <span id="a">a</span>
30292 1. DOMDiff: Changes to <ref> content should be looked up using id
30295 "modes": ["selser"],
30297 ["#X", "after", "bar"],
30298 ["#Y", "after", "baz"]
30302 X <ref><span id="X">foo</span></ref>
30305 <ref name="a"><span id="Y">foo</span></ref>
30308 X <ref><span id="X">foo</span>bar</ref>
30311 <ref name="a"><span id="Y">foo</span>baz</ref>
30316 2. DOMDiff: Changes to <ref> content should be looked up using id
30319 "modes": ["selser"],
30321 ["#Z", "after", "bar"]
30325 A <ref>foo bar for a</ref>
30326 B <ref group="X" name="b" />
30330 <references group="X">
30331 <ref name="b"><span id="Z">foo</span></ref>
30334 A <ref>foo bar for a</ref>
30335 B <ref group="X" name="b" />
30339 <references group="X">
30340 <ref name="b"><span id="Z">foo</span>bar</ref>
30345 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30348 "modes": ["selser"],
30350 [ "div:first-child", "text", "bar" ]
30354 <div style="{{1x|color:red;}}%">foo</div>
30356 <div style="{{1x|color:red;}}%">bar</div>
30368 <li class="mw-empty-elt"></li>
30369 <li class="mw-empty-elt"></li>
30376 [[File:Thumb.png|thumb]]
30378 <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>
30380 <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>
30384 unclosed internal link XSS (T137264)
30386 [[#%3Cscript%3Ealert(1)%3C/script%3E|
30388 <p>[[#<script>alert(1)</script>|
30391 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
30395 Validating that <style> isn't eaten by tidy (T167349)
30400 <style>.foo::before { content: "<foo>"; }</style>
30401 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30405 <style>.foo::before { content: "<foo>"; }</style>
30406 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30411 Validating that <style> isn't wrapped in a paragraph (T186965)
30415 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30417 <style>.foo::before { content: "<foo>"; }</style>
30419 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30421 But if it's on a line with other content, let it be wrapped.
30423 <style>.foo::before { content: "<foo>"; }</style> bar
30425 foo <style>.foo::before { content: "<foo>"; }</style>
30427 foo <style>.foo::before { content: "<foo>"; }</style> bar
30429 And the same if we have non-paragraph-breaking whitespace
30432 <style>.foo::before { content: "<foo>"; }</style>
30435 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30437 <style>.foo::before { content: "<foo>"; }</style>
30438 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30439 <p>But if it's on a line with other content, let it be wrapped.
30440 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
30441 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
30442 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
30443 </p><p>And the same if we have non-paragraph-breaking whitespace
30445 <style>.foo::before { content: "<foo>"; }</style>
30451 Validating that <link> isn't wrapped in a paragraph (T186965)
30455 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30457 <link rel="foo" href="bar"/>
30459 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30461 But if it's on a line with other content, let it be wrapped.
30463 <link rel="foo" href="bar"/> bar
30465 foo <link rel="foo" href="bar"/>
30467 foo <link rel="foo" href="bar"/> bar
30469 And the same if we have non-paragraph-breaking whitespace
30472 <link rel="foo" href="bar"/>
30475 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30477 <link rel="foo" href="bar"/>
30478 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30479 <p>But if it's on a line with other content, let it be wrapped.
30480 </p><p><link rel="foo" href="bar"/> bar
30481 </p><p>foo <link rel="foo" href="bar"/>
30482 </p><p>foo <link rel="foo" href="bar"/> bar
30483 </p><p>And the same if we have non-paragraph-breaking whitespace
30485 <link rel="foo" href="bar"/>
30491 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
30493 wgFragmentMode=[ 'html5', 'legacy' ]
30495 ==A&B&C&amp;D&amp;amp;E==
30496 [[#A&B&C&amp;D&amp;amp;E]]
30498 <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>
30499 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
30502 <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>
30503 <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>
30507 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
30509 wgFragmentMode=[ 'legacy' ]
30511 ==A&B&C&amp;D&amp;amp;E==
30512 [[#A&B&C&amp;D&amp;amp;E]]
30514 <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>
30515 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
30520 Decoding of HTML entities in embedded HTML tags
30522 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30524 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30527 <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>
30531 Decoding of HTML entities in indicator names for IDs (T104196)
30533 parsoid=wt2html,html2html
30536 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30538 1&2&3&4&amp;5=Indicator
30541 <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>
30544 # this version of the test strips out the ambiguity so Parsoid rts cleanly
30546 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
30550 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30552 1&2&3&4&amp;5=Indicator
30555 <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>
30558 # This fragment mode is what Parsoid supports.
30560 HTML5 ids: fallback to legacy
30562 wgFragmentMode=[ 'html5', 'legacy' ]
30574 ==Hey < # " > % : '==
30575 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30577 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30579 <!-- These two links should produce identical HTML -->
30580 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30583 <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>
30585 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30586 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30587 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30588 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30589 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30590 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30594 <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>
30595 <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>
30596 <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>
30597 <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>
30598 <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>
30599 <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>
30600 <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>
30601 </p><p>💩 <span id="💩"></span>
30602 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30605 <h2 id="Foo_bar">Foo bar</h2>
30607 <h2 id="foo_Bar_2">foo Bar</h2>
30609 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30611 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30613 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30615 <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>
30616 <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>
30618 <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>
30620 <!-- These two links should produce identical HTML -->
30621 <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>
30624 # Parsoid doesn't support this mode
30626 HTML5 ids: legacy with a fallback to modern
30628 wgFragmentMode=[ 'legacy', 'html5' ]
30640 ==Hey < # " > % : '==
30641 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30643 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30645 <!-- These two links should produce identical HTML -->
30646 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30649 <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>
30651 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30652 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30653 <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>
30654 <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>
30655 <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>
30656 <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>
30660 <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>
30661 <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>
30662 <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>
30663 <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>
30664 <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>
30665 <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>
30666 <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>
30667 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30668 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30672 # Parsoid doesn't support this mode.
30674 HTML5 ids: no legacy
30676 wgFragmentMode=[ 'html5' ]
30688 ==Hey < # " > % : '==
30689 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30691 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30693 <!-- These two links should produce identical HTML -->
30694 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30697 <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>
30699 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30700 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30701 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30702 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30703 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30704 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30708 <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>
30709 <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>
30710 <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>
30711 <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>
30712 <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>
30713 <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>
30714 <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>
30715 </p><p>💩 <span id="💩"></span>
30716 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30721 T90902: Normalize weird characters in section IDs
30723 wgFragmentMode=[ 'html5', 'legacy' ]
30729 <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>
30730 <p><a href="#Foo_bar">#Foo bar</a>
30733 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30734 <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>
30738 T51672: Test for brackets in attributes of elements in external link texts
30740 [http://example.com/ link <span title="title with [brackets]">span</span>]
30741 [http://example.com/ link <span title="title with [brackets]">span</span>]
30744 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30745 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30748 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30749 <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>
30753 T72875: Test for brackets in attributes of elements in internal link texts
30755 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30756 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30759 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30760 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30763 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30764 <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>
30768 T179544: {{anchorencode:}} output should be always usable in links
30770 wgFragmentMode=[ 'html5' ]
30772 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30774 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30777 <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>
30780 ## ------------------------------
30781 ## Parsoid section-wrapping tests
30782 ## ------------------------------
30784 Section wrapping for well-nested sections (no leading content)
30787 "wrapSections": true
30808 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30811 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30814 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30817 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30820 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30823 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30830 Section wrapping for well-nested sections (with leading content)
30833 "wrapSections": true
30838 Para 2 with a <div>nested in it</div>
30851 <section data-mw-section-id="0"><p>Para 1.</p>
30853 <p>Para 2 with a </p><div>nested in it</div>
30857 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30860 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30863 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30866 </section></section>
30870 Section wrapping with template-generated sections (good nesting 1)
30873 "wrapSections": true
30890 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30893 <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">
30894 </span><p about="#mwt1">b</p>
30895 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30898 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30902 # In this example, the template scope is mildly expanded to incorporate the
30903 # trailing newline after the transclusion since that is part of section 1.1.1
30905 Section wrapping with template-generated sections (good nesting 2)
30908 "wrapSections": true,
30909 "modes": ["wt2html", "wt2wt"]
30924 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30927 <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">
30928 </span><p about="#mwt1">b</p><span about="#mwt1">
30929 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30930 </span><p about="#mwt1">d</p><span about="#mwt1">
30931 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30935 # In this example, the template scope is mildly expanded to incorporate the
30936 # trailing newline after the transclusion since that is part of section 1.2.1
30938 Section wrapping with template-generated sections (good nesting 3)
30941 "wrapSections": true,
30942 "modes": ["wt2html", "wt2wt"]
30960 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30963 <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">
30964 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
30965 </span><p about="#mwt1">b</p><span about="#mwt1">
30966 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30967 </span><p about="#mwt1">c</p><span about="#mwt1">
30968 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30969 </span><p about="#mwt1">d</p><span about="#mwt1">
30970 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
30974 # Because of section-wrapping and template-wrapping interactions,
30975 # the scope of the template is expanded so that the template markup
30976 # is valid in the presence of <section> tags.
30977 # This exercises the s1 is null scenario in the wrapSections code
30979 Section wrapping with template-generated sections (bad nesting 1)
30982 "wrapSections": true
30996 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30999 <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"]}'>
31000 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
31001 </span><p about="#mwt1">b
31002 </p><span about="#mwt1">
31004 </span><p about="#mwt1">c</p><span about="#mwt1">
31005 </span></section></div></section>
31008 # Because of section-wrapping and template-wrapping interactions,
31009 # the scope of the template is expanded so that the template markup
31010 # is valid in the presence of <section> tags.
31011 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
31013 Section wrapping with template-generated sections (bad nesting 2)
31016 "wrapSections": true
31034 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31037 </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">
31038 </span><p about="#mwt1">b</p><span about="#mwt1">
31039 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
31040 </span><p about="#mwt1">c</p><span about="#mwt1">
31042 </span><p about="#mwt1">d</p><span about="#mwt1">
31044 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
31048 # Because of section-wrapping and template-wrapping interactions,
31049 # additional template wrappers are added to <section> tags
31050 # so that template wrapping semantics are valid whether section
31051 # tags are retained or stripped. But, the template scope can expand
31052 # greatly when accounting for section tags.
31053 # This exercises the s1 and s2 are in different subtrees scenario
31055 Section wrapping with template-generated sections (bad nesting 3)
31058 "wrapSections": true,
31059 "modes": ["wt2html", "wt2wt"]
31077 <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>
31080 <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">
31081 </span><p about="#mwt1">b</p><span about="#mwt1">
31082 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
31083 </span><p about="#mwt1">c</p>
31086 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
31091 Section wrapping with uneditable lead section + div wrapping multiple sections
31094 "wrapSections": true
31099 <div style="border:1px solid red;">
31116 <section data-mw-section-id="-1"><p>foo</p>
31118 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31119 <section data-mw-section-id="1"><h1 id="1">1</h1>
31122 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31125 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31129 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31132 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31134 </section></section>
31138 Section wrapping with editable lead section + div overlapping multiple sections
31141 "wrapSections": true
31148 <div style="border:1px solid red;">
31165 <section data-mw-section-id="0"><p>foo</p>
31167 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31169 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31172 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31175 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31180 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31183 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31185 </section></section>
31189 HTML header tags should not be wrapped in section tags
31192 "wrapSections": true
31205 <section data-mw-section-id="0"><p>foo</p>
31207 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31209 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31211 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31213 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31217 Lead section containing only whitespace and comments.
31220 "wrapSections": true
31224 <!-- this is a comment, presumably significant to editors -->
31231 <section data-mw-section-id="0" data-parsoid="{}">
31232 <!-- this is a comment, presumably significant to editors -->
31233 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31236 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31241 Pseudo-sections emitted by templates should have id -2
31244 "wrapSections": true
31254 <section data-mw-section-id="-1"><p>foo</p>
31255 </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}}]}'>
31256 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31257 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31258 </section></div><span about="#mwt1">
31262 ##########################################################################
31263 Tests demonstrating white-space insensitivity in input wikitext
31264 for wikitext headings, wikitext list items, and wikitext table captions,
31265 headings, and cells. HTML versions of the same should preserve whitespace.
31266 ##########################################################################
31268 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31271 "modes": ["wt2html"],
31272 "preserveIEW": true
31276 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31277 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31278 == <!--Headings with fallback ids--> Личная жизнь ==
31279 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31280 ; <!--term to define--> term : <!--term's definition--> definition
31282 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31284 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31286 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31288 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
31290 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
31293 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31296 <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>
31297 <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>
31298 <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>
31299 <ul><li>List item</li></ul>
31300 <dl><dt>term </dt>
31301 <dd>definition</dd></dl>
31303 <caption>Table Caption
31306 <th>Table Heading 1</th>
31307 <th>Table Heading 2
31310 <td>Table Cell 1</td>
31314 <td>class="foo"</td>
31318 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
31319 </td></tr></tbody></table>
31322 <td>Table Cell 1</td>
31324 </td></tr></tbody></table> foo</dd></dl>
31326 <meta property="mw:PageProp/notoc">
31327 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
31328 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
31329 <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>
31330 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
31331 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
31333 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
31335 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
31337 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31339 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
31341 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
31344 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31345 </tbody></table><p> foo </p><!--c1--></dd></dl>
31348 # Looks like <caption> is not accepted in HTML
31350 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
31353 "modes": ["wt2html"],
31354 "preserveIEW": true
31358 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31359 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31361 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
31362 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
31365 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
31366 <ul><li> List item </li></ul>
31368 <tbody><tr><th> Table Heading </th><th></th></tr>
31369 <tr><td> Table Cell </td><th></th></tr>
31372 <meta property="mw:PageProp/notoc"/>
31373 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31374 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31376 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
31377 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
31382 Do not trim whitespace in links and quotes
31385 "modes": ["wt2html"],
31386 "preserveIEW": true
31389 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
31390 [[Foo| some text ]]
31392 <p>foo <i> italic </i> and <b> bold </b>
31393 <a href="/wiki/Foo" title="Foo"> some text </a>
31396 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
31397 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
31401 Remove p tags surrounding a single element in a figcaption
31405 [[File:Foobar.jpg|right|200x200px|Caption]]
31407 <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>
31411 Selser preserves lack of newline before list and allows newline after the list
31414 "modes": ["selser"],
31415 "scrubWikitext": true,
31417 [ "ul", "after", "<p>footer</p>" ]
31434 Selser does not introduce newlines between unedited paragraph preceding the list
31437 "modes": ["selser"],
31439 [ "table tbody tr td p:last-child", "empty" ]
31461 Selser does not introduce newlines between unedited paragraph following the list
31464 "modes": ["selser"],
31466 [ "table tbody tr td p:first-child", "empty" ]
31488 Remove a list item but do not insert newline above list
31491 "modes": ["selser"],
31493 [ "ul li:last-child", "remove" ]