1 # MediaWiki Parser test cases
2 # Some taken from https://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
66 Template:redirect to foo
68 #REDIRECT [[Template:Foo]]
89 MediaWiki:bad image list
91 * [[File:Bad.jpg]] except [[Nasty page]]
126 // For Serbian; localize Template namespace
134 Template:echo_with_span
140 Template:echo_with_div
146 Template:echo with depth
159 Template:table_attribs
162 |</noinclude>style="color:red;"|Foo
166 Template:table_attribs_2
169 |</noinclude>style="color:red;"|Foo
174 Template:table_attribs_3
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
181 Template:table_attribs_4
183 | style="background-color:#DC241f;" width="10px" |
187 Template:table_attribs_5
190 |</noinclude>style="color:red;"||Bar
194 Template:table_attribs_6
196 style="background: <nowiki>
203 Template:table_attribs_7
206 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
210 Template:table_header_cells
212 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
218 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
222 Template:PartialTable
229 Template:image_attribs
232 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
235 ## See T48811 for details
237 Template:mixed_attr_content_template
239 style="color:red;" title="T48811"
245 Template:definition_list
292 Template:EmptyTRWithHTMLAttrTest
295 <tr align="center"></tr>
296 <tr><td>foo</td></tr>
297 <tr align="center"></tr>
298 <tr><td>bar</td></tr>
321 This is a simple paragraph.
323 <p>This is a simple paragraph.
328 Paragraphs with extra newline spacing
359 Paragraphs with newline spacing with comment lines in between
367 <!--foo--><!--More than 1 comment, still stripped-->
371 <!--foo--> <!----> <!-- bar -->
432 Paragraphs with newline spacing with non-empty white-space lines in between
459 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
467 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
506 Extra newlines: More paragraphs with indented comment
521 Extra newlines followed by heading
535 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
536 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
539 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
544 Extra newlines between heading and content are swallowed (Parsoid does not)
552 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
553 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
560 <p><a rel="mw:WikiLink" href="./A" title="A">a</a></p>
564 Extra new lines before and after lists are preserved
591 # Parsoid regression test
593 Multiple newlines after tables are converted to p-br-p tags
595 parsoid=wt2html,wt2wt
609 </td></tr></tbody></table>
613 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
628 Heading with line break in nowiki
632 wgFragmentMode=[ 'html5', 'legacy' ]
637 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
639 C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
643 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
650 http://fr.wikipedia.org/wiki/🍺
651 <!-- EasterEgg we love beer, better be able be able to link to it -->
653 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
672 *plain''italic''plain
673 *plain''italic''plain''italic''plain
674 *plain'''bold'''plain
675 *plain'''bold'''plain'''bold'''plain
676 *plain''italic''plain'''bold'''plain
677 *plain'''bold'''plain''italic''plain
678 *plain''italic'''bold-italic'''italic''plain
679 *plain'''bold''bold-italic''bold'''plain
680 *plain'''''bold-italic'''italic''plain
681 *plain'''''bold-italic''bold'''plain
682 *plain''italic'''bold-italic'''''plain
683 *plain'''bold''bold-italic'''''plain
684 *plain l'''italic''plain
685 *plain l''''bold''' plain
688 <li>plain<i>italic</i>plain</li>
689 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
690 <li>plain<b>bold</b>plain</li>
691 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
692 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
693 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
694 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
695 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
696 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
697 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
698 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
699 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
700 <li>plain l'<i>italic</i>plain</li>
701 <li>plain l'<b>bold</b> plain</li></ul>
705 # this example taken from the [[simple:Moon]] article (T49326)
707 Italics and possessives (1)
709 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
711 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
715 # this example taken from [[en:Flaming Pie]] (T51926)
717 Italics and possessives (2)
719 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
721 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
725 # this example taken from [[en:Dictionary]] (T51926)
727 Italics and possessives (3)
729 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
731 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
737 ### 2-quote opening sequence tests
740 Italics and bold: 2-quote opening sequence: (2,2)
749 Italics and bold: 2-quote opening sequence: (2,3)
758 Italics and bold: 2-quote opening sequence: (2,4)
768 # same html as previous, but wikitext adjusted to match parsoid html2wt
770 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
772 ''foo<nowiki>''</nowiki>''
778 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
780 Italics and bold: 2-quote opening sequence: (2,5)
793 # same html as previous, but wikitext adjusted to match parsoid html2wt
795 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
797 ''foo'''''<nowiki/>'''
808 ### 3-quote opening sequence tests
812 Italics and bold: 3-quote opening sequence: (3,2)
821 Italics and bold: 3-quote opening sequence: (3,3)
830 Italics and bold: 3-quote opening sequence: (3,4)
838 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
840 Italics and bold: 3-quote opening sequence: (3,5)
853 # same html as previous, but wikitext adjusted to match parsoid html2wt
855 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
857 '''foo'''''<nowiki/>''
868 ### 4-quote opening sequence tests
872 Italics and bold: 4-quote opening sequence: (4,2)
882 # same html as previous, but wikitext adjusted to match parsoid html2wt
884 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
886 <nowiki>''</nowiki>''foo''
893 Italics and bold: 4-quote opening sequence: (4,3)
902 Italics and bold: 4-quote opening sequence: (4,4)
912 # same html as previous, but wikitext adjusted to match parsoid html2wt
914 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
922 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
924 Italics and bold: 4-quote opening sequence: (4,5)
933 <p>'<b>foo</b><i></i>
937 # same html as previous, but wikitext adjusted to match parsoid html2wt
939 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
941 '<nowiki/>'''foo'''''<nowiki/>''
946 <p>'<b>foo</b><i></i>
952 ### 5-quote opening sequence tests
956 Italics and bold: 5-quote opening sequence: (5,2)
966 # same html as previous, but wikitext adjusted to match parsoid html2wt
968 Italics and bold: 5-quote opening sequence: (5,2+3)
977 Italics and bold: 5-quote opening sequence: (5,3)
987 # same html as previous, but wikitext adjusted to match parsoid html2wt
989 Italics and bold: 5-quote opening sequence: (5,3+2)
998 Italics and bold: 5-quote opening sequence: (5,4)
1004 <p><i><b>foo'</b></i>
1009 Italics and bold: 5-quote opening sequence: (5,5)
1013 <p><i><b>foo</b></i>
1018 Italics and bold: 5-quote opening sequence: (5,6)
1022 <p><i><b>foo'</b></i>
1027 ### multiple quote sequences in a line
1031 Italics and bold: multiple quote sequences: (2,4,2)
1037 <p><i>foo'<b>bar</b></i>
1041 # same html as previous, but wikitext adjusted to match parsoid html2wt
1043 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
1045 ''foo'<nowiki/>'''bar'''''
1047 <p><i>foo'<b>bar</b></i>
1052 Italics and bold: multiple quote sequences: (2,4,3)
1058 <p><i>foo'<b>bar</b></i>
1062 # same html as previous, but wikitext adjusted to match parsoid html2wt
1064 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
1066 ''foo'<nowiki/>'''bar'''''
1068 <p><i>foo'<b>bar</b></i>
1073 Italics and bold: multiple quote sequences: (2,4,4)
1079 <p><i>foo'<b>bar'</b></i>
1083 # same html as previous, but wikitext adjusted to match parsoid html2wt
1085 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1087 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1089 <p><i>foo'<b>bar'</b></i>
1093 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1095 Italics and bold: multiple quote sequences: (3,4,2)
1104 <p><b>foo'</b>bar<i></i>
1108 # same html as previous, but wikitext adjusted to match parsoid html2wt
1110 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1112 '''foo''''bar''<nowiki/>''
1117 <p><b>foo'</b>bar<i></i>
1121 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1123 Italics and bold: multiple quote sequences: (3,4,3)
1132 <p><b>foo'</b>bar<b></b>
1136 # same html as previous, but wikitext adjusted to match parsoid html2wt
1138 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1140 '''foo''''bar'''<nowiki/>'''
1145 <p><b>foo'</b>bar<b></b>
1150 ### other quote tests
1153 Italics and bold: other quote tests: (2,3,5)
1155 ''this is about '''foo's family'''''
1157 <p><i>this is about <b>foo's family</b></i>
1163 Italics and bold: other quote tests: (2,(3,3),2)
1165 ''this is about '''foo's''' family''
1167 <p><i>this is about <b>foo's</b> family</i>
1173 Italics and bold: other quote tests: (3,2,3,2)
1177 '''this is about ''foo'''s family''
1179 <p><b>this is about <i>foo</i></b><i>s family</i>
1184 # same html as previous, but wikitext adjusted to match parsoid html2wt
1186 Italics and bold: other quote tests: (3,2,3+2+2,2)
1188 '''this is about ''foo'''''<nowiki/>''s family''
1190 <p><b>this is about <i>foo</i></b><i>s family</i>
1196 Italics and bold: other quote tests: (3,2,3,3)
1198 '''this is about ''foo'''s family'''
1200 <p>'<i>this is about </i>foo<b>s family</b>
1206 Italics and bold: other quote tests: (3,(2,2),3)
1208 '''this is about ''foo's'' family'''
1210 <p><b>this is about <i>foo's</i> family</b>
1216 Italicized possessive
1218 The ''[[Main Page]]'''s talk page.
1220 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1223 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1227 Quote balancing context should be restricted to td/th cells on the same wikitext line
1229 parsoid=wt2html,wt2wt
1243 </td></tr></tbody></table>
1251 Non-html5 tags should be accepted
1253 <center>''foo''</center>
1255 <font>''foo''</font>
1256 <strike>''foo''</strike>
1259 <center><i>foo</i></center>
1260 <p><big><i>foo</i></big>
1261 <font><i>foo</i></font>
1262 <strike><i>foo</i></strike>
1268 <wbr> is valid wikitext (T54468)
1276 # <strike> is HTML4, <s> is HTML4/5.
1278 <s> or <strike> for strikethrough
1280 <strike>strike</strike>
1284 <p><strike>strike</strike>
1292 Text-level semantic html elements in wikitext
1295 <strong>text</strong>
1311 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1318 <strong>text</strong>
1334 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1342 # test cases taken from
1343 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1345 Ruby markup (W3C-style)
1347 ;Mono-ruby for individual base characters
1348 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1350 :<ruby>今日<rt>きょう</rt></ruby>
1352 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1354 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1356 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1359 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1360 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1361 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1364 <dl><dt>Mono-ruby for individual base characters</dt>
1365 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1367 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1368 <dt>Jukugo ruby</dt>
1369 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1370 <dt>Inline ruby</dt>
1371 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1372 <dt>Double-sided ruby</dt>
1373 <dd><ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1375 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1376 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1377 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1382 # The next two test different paths in the sanitizer.
1384 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1386 <blockquote|>a</blockquote>
1388 <b→> doesn't terminate </b→>
1390 <bä> doesn't terminate </bä>
1392 <boo> doesn't terminate </boo>
1394 <s.foo> doesn't terminate </s.foo>
1398 <p><blockquote|>a</blockquote>
1399 </p><p><b→> doesn't terminate </b→>
1400 </p><p><bä> doesn't terminate </bä>
1401 </p><p><boo> doesn't terminate </boo>
1402 </p><p><s.foo> doesn't terminate </s.foo>
1403 </p><p><sub-ID#1>
1408 Non-word characters don't terminate tag names
1410 <blockquote|>a</blockquote>
1412 <b→> doesn't terminate </b→>
1414 <bä> doesn't terminate </bä>
1416 <boo> doesn't terminate </boo>
1418 <s.foo> doesn't terminate </s.foo>
1422 <p><blockquote|>a
1423 </p><p><b→> doesn't terminate </b→>
1424 </p><p><bä> doesn't terminate </bä>
1425 </p><p><boo> doesn't terminate </boo>
1426 </p><p><s.foo> doesn't terminate </s.foo>
1427 </p><p><sub-ID#1>
1432 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1433 ### This checks that HTML5 tags (with non-word characters in the tag
1434 ### name) make it safely through the parser -- the Sanitizer will
1435 ### munge them later, as it should.
1438 Non-word characters are valid in extension tags (T19663)
1449 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1453 Isolated close tags should be treated as literal text (T54760)
1461 <p class="mw-empty-elt">
1462 </p><p><s.foo>s
1465 <p><s.foo>s</p>
1469 ### Special characters
1473 Bare pipe character (T54363)
1482 Bare pipe character from a template (T54363)
1491 ### <nowiki> test cases
1495 <nowiki> unordered list
1497 <nowiki>* This is not an unordered list item.</nowiki>
1499 <p>* This is not an unordered list item.
1502 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1508 <nowiki>Lorem ipsum dolor
1516 <p>Lorem ipsum dolor
1525 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1535 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1537 <nowiki><span class="error"></nowiki>
1539 <p><span class="error">
1542 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1548 :There is not nowiki.
1549 :There is <nowiki>nowiki</nowiki>.
1551 #There is not nowiki.
1552 #There is <nowiki>nowiki</nowiki>.
1554 *There is not nowiki.
1555 *There is <nowiki>nowiki</nowiki>.
1557 <dl><dd>There is not nowiki.</dd>
1558 <dd>There is nowiki.</dd></dl>
1559 <ol><li>There is not nowiki.</li>
1560 <li>There is nowiki.</li></ol>
1561 <ul><li>There is not nowiki.</li>
1562 <li>There is nowiki.</li></ul>
1565 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1566 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1568 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1569 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1571 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1572 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1576 Entities inside <nowiki>
1578 <nowiki><</nowiki>
1583 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1587 Entities inside template parameters
1594 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1598 Properly escape nowiki when combined with other wiki markup
1602 <p>* </nowiki> tag</p>
1604 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1608 T93824: Put escaped HTML tags inside nowiki
1612 <p><h2>foo</h2></p>
1614 <nowiki><h2>foo</h2></nowiki>
1618 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1622 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1623 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1624 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1626 This text: L'[[Foo]]
1627 This text: L<nowiki>''</nowiki>[[Foo]]
1628 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1631 # This test fails because wikitext whitespace is not normalized before comparing.
1633 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1637 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1640 This text : L<nowiki>''</nowiki>[[Foo]]
1643 # This test and the next one are html2wt only as they test that incorrect wikitext
1644 # passed in template arguments gets escaped or wrapped in nowikis where required.
1646 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1650 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1651 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1653 {{echo|foo{{!}}bar}}
1654 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1658 T53961: Output correct nowikis in template arguments
1662 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1663 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1664 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1665 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1666 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1669 {{echo|<nowiki>a }} b</nowiki>}}
1670 {{echo|<nowiki>a [[ b</nowiki>}}
1671 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1672 {{echo|a <nowiki>}</nowiki>}}
1676 Cases where "!!" needs nowiki protection
1681 <tr><th>this needs protection !! here</th></tr>
1685 <tr><th>this does not need
1686 protection !! here</th></tr>
1690 !<nowiki>this needs protection !! here</nowiki>
1703 Comments and Indent-Pre
1705 <!-- comment 1 --> asdf
1707 <!-- comment 1 --> asdf
1710 <!-- comment 1 --> asdf
1711 <!-- comment 2 -->xyz
1713 <!-- comment 1 --> asdf
1714 <!-- comment 2 --> xyz
1770 asdf<!-- comment 1 -->jkl
1780 <!-- foo --> b <!-- bar -->
1794 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1800 Comment semantics and delimiters
1802 <!-- --><!----><!-----><!------>
1806 <!-- --><!----><!-----><!------>
1810 Comment semantics and delimiters, redux
1812 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1813 -- foo -- funky huh? ... -->
1817 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1818 -- foo -- funky huh? ... -->
1822 Comment semantics and delimiters: directors cut
1824 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1825 everything starting with < followed by !-- until the first -- and > we see,
1826 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1832 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1833 everything starting with < followed by !-- until the first -- and > we see,
1834 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1839 Comment semantics: nesting
1841 <!--<!-- no, we're not going to do anything fancy here -->-->
1846 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1849 # Parsoid closes the unclosed comment, even if it means a slight
1852 Comment semantics: unclosed comment at end
1854 parsoid=wt2html,html2html
1856 <!--This comment will run out to the end of the document
1860 <!--This comment will run out to the end of the document-->
1864 Comment semantics: normalize comments to play nice with XML and browsers
1866 <!-- Browsers --!> think this is closed -->
1867 <!--> This would normally be text -->
1868 <!---> As would this -->
1869 <!-- XML doesn't like trailing dashes -------->
1870 <!-- Nor doubled hyphens -- anywhere in the data -->
1871 But this is not a comment.
1873 <p>But this is not a comment.
1876 <!-- Browsers --!> think this is closed -->
1877 <!--> This would normally be text -->
1878 <!---> As would this -->
1879 <!-- XML doesn't like trailing dashes -------->
1880 <!-- Nor doubled hyphens -- anywhere in the data -->
1881 <p>But this is not a comment.</p>
1885 Comment semantics: round-trip even text which contains encoded -->
1887 <!-- hello & goodbye - > --> --&gt; --&xx -->
1889 <!-- hello & goodbye - > --> --&gt; --&xx -->
1893 Comment in template title
1902 Comment on its own line post-expand
1914 Comment on its own line post-expand with non-significant whitespace
1926 post-expand include size being exceeded
1930 {{echo3|1234567890}}
1932 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1937 max template depth being reached
1941 {{echo with depth|too deep!}}
1943 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1948 multiple templates that are redirects
1959 Multiple comments should still parse as SOL-transparent
1961 parsoid=wt2html,wt2wt
1964 <!--c2--><!--c3--><!--c4-->*b
1973 <!--c2--><!--c3--><!--c4-->
1979 ## Make sure ">" gets escaped in comments to avoid XSS
1981 IE conditional comments
1984 <script>alert('hi');</script>
1987 <!--[if lt IE 9]>
1988 <script>alert('hi');</script>
1993 ### paragraph wrapping tests
2009 Block tag on one line (<div>)
2019 <p>a </p><div>foo</div>
2024 # Remex wraps empty tag runs with p-tags.
2025 # Parsoid strips them out during p-wrapping.
2027 No p-wrappable content
2029 <span><div>x</div></span>
2030 <span><s><div>x</div></s></span>
2031 <small><em></em></small><span><s><div>x</div></s></span>
2033 <span><div>x</div></span>
2034 <span><s><div>x</div></s></span>
2035 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2037 <span><div>x</div></span>
2038 <span><s><div>x</div></s></span>
2039 <small><em></em></small><span><s><div>x</div></s></span>
2042 # T177612: Parsoid-only test
2044 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2046 {{echo|<span><div>x</div></span>}}
2049 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
2054 Block tag on one line (<blockquote>)
2056 a <blockquote>foo</blockquote>
2060 a <blockquote>foo</blockquote>
2064 <p>a </p><blockquote><p>foo</p></blockquote>
2070 Block tag on both lines (<div>)
2080 <p>a </p><div>foo</div><p>
2081 b </p><div>foo</div>
2085 Block tag on both lines (<blockquote>)
2087 a <blockquote>foo</blockquote>
2089 b <blockquote>foo</blockquote>
2091 a <blockquote>foo</blockquote>
2092 b <blockquote>foo</blockquote>
2095 <p>a </p><blockquote><p>foo</p></blockquote><p>
2096 b </p><blockquote><p>foo</p></blockquote>
2100 Multiple lines without block tags
2121 x </p><div>foo</div><p> z
2125 # The difference between Parsoid & Remex here
2126 # is because of Parsoid's Tidy-emulation code
2127 # for p-wrapping. We'll start work to remove this
2128 # emulation code in Parsoid sooner than later.
2129 # Remex wraps empty tag runs with p-tags.
2130 # Parsoid strips them out in a separate pass.
2132 Empty lines between lines with block tags
2167 </p><div>b</div><p>d
2172 <div data-parsoid='{"stx":"html"}'></div>
2175 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2178 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2180 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2183 <div data-parsoid='{"stx":"html"}'>e</div>
2187 Unclosed HTML p-tags should be handled properly
2194 <div><p>foo</p></div>
2199 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2204 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2205 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2208 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2212 a [[Category:A1]] [[Category:A2]]
2217 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2221 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2227 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2231 No paragraph necessary for SOL transparent template
2233 <span><div>foo</div></span>
2236 <span><div>foo</div></span>
2237 {{echo|[[Category:Foo]]}}
2239 <span><div>foo</div></span>
2240 <span><div>foo</div></span>
2243 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2244 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2246 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2247 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]"}},"i":0}}]}'/>
2251 Avoid expanding multiline sol transparent template ranges unnecessarily
2269 <br about="#mwt1" typeof="mw:Transclusion" data-parsoid='{}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<br/>\n"}},"i":0}}]}'/><span about="#mwt1">
2272 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2276 Paragraph wrapping following unclosed table
2278 parsoid=wt2html,html2html
2299 </td></tr></tbody></table>
2305 <table data-parsoid='{"autoInsertedEnd":true}'>
2306 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2308 </tbody></table><table>
2309 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2320 Paragraph wrapping suppressed in html p
2322 parsoid=wt2html,html2html
2342 <p data-parsoid='{"stx":"html"}'>
2353 ### Preformatted text
2363 And a [[Main Page|link]]
2369 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2374 Tabs don't trigger preformatted text
2378 This is preformatted text.
2384 <pre>This is preformatted text.
2389 preformatted text.</p>
2390 <pre>This is preformatted text.
2395 Space before tab needs nowiki pre protection
2401 <nowiki> </nowiki> a
2405 Ident preformatting with inline content
2416 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2433 Regression with preformatted in <center>
2447 T54763: Preformatted in <blockquote>
2453 indented cell (no pre-wrapping!)
2463 <p> indented cell (no pre-wrapping!)
2471 T53086: Double newlines in blockquotes should be turned into paragraphs
2488 T17491: <ins>/<del> in blockquote
2491 Foo <del>bar</del> <ins>baz</ins> quux
2495 <p>Foo <del>bar</del> <ins>baz</ins> quux
2502 T17491: <ins>/<del> in blockquote (2)
2504 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2507 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2511 <blockquote><p>Foo </p><del>bar</del> <ins>baz</ins><p> quux
2516 <pre> with attributes (T5202)
2518 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2520 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2525 <pre> with width attribute (T5202)
2527 <pre width="8">Narrow screen goodies</pre>
2529 <pre width="8">Narrow screen goodies</pre>
2534 <pre> with forbidden attribute (T5202)
2536 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2538 <pre width="8">Narrow screen goodies</pre>
2543 Entities inside <pre>
2552 <pre> with forbidden attribute values (T5202)
2554 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2556 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2561 <nowiki> inside <pre> (T15238)
2569 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2577 <pre><nowiki>Foo</nowiki></pre>
2582 <nowiki> inside of #tag:pre
2584 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2586 <pre>Foo →bar</pre>
2589 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2592 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2593 ## aren't enclosed in nowikis.
2595 <nowiki> and <pre> preference (first one wins)
2626 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2631 <p><span typeof="mw:Nowiki">
2639 </pre> inside nowiki
2641 <nowiki></pre></nowiki>
2648 Empty pre; pre inside other HTML tags (T56946)
2665 <div data-parsoid='{"stx":"html"}'><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
2667 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2671 HTML pre followed by indent-pre
2684 <p><pre>foo</pre></p>
2686 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2688 <p class='mw-empty-elt' data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2692 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2700 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2710 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2722 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2743 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2747 {{echo| foo}}{{echo| bar}}
2752 {{echo|<!--cmt--> foo}}
2754 <!--cmt-->{{echo| foo}}
2756 {{echo|{{echo| }}bar}}
2774 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2810 ## Hmm, should Parsoid rt this?
2812 Pres with newline attributes
2814 parsoid=wt2html,html2html
2819 <pre class="one two">hi</pre>
2822 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2826 Things that look like <pre> tags aren't treated as such
2828 Barack Obama <President> of the United States
2829 <President></President>
2831 <p>Barack Obama <President> of the United States
2832 <President></President>
2837 Handle broken pre-like tags (T66025)
2841 {{echo|<pre <pre>x</pre>}}
2843 <table><pre </table>
2846 <table><pre </table>
2850 <pre <table></table>
2852 <pre typeof="mw:Transclusion mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html","a":{"<pre":null},"sa":{"<pre":""},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2854 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'><pre </span><table data-parsoid='{"stx":"html"}'></table>
2858 Parsoid: handle pre with space after attribute
2862 <pre style="width:50%;" >{{echo|foo}}</pre>
2864 <pre style="width:50%;">{{echo|foo}}</pre>
2867 <pre typeof="mw:Extension/pre" about="#mwt2" style="width:50%;" data-mw='{"name":"pre","attrs":{"style":"width:50%;"},"body":{"extsrc":"{{echo|foo}}"}}'>{{echo|foo}}</pre>
2870 # TODO / maybe: fix wt2wt for this
2872 Parsoid: Don't paragraph-wrap fosterable content
2905 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2909 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2937 #--------------------------------------------------------------------
2938 # Transclusion parameter whitespace stripping tests
2939 # Behavior is different for positional and named parameters
2940 #--------------------------------------------------------------------
2942 Templates: Strip leading and trailing whitespace from named-param values
2946 {{echo|1= {{echo|b}} }}
2964 Templates: Don't strip whitespace from positional-param values
2968 {{echo|{{echo|b}} }}
3008 Templates: Don't recognize targets split by newlines
3024 Templates: Recognize targets when newlines and comments don't split the target
3029 <!--X--> ech<!--X-->o<!--X-->
3037 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech<!--X-->o<!--X--> \n <!--X--> <!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3041 Templates: Handle empty comment-and-ws-only lines correctly
3044 <!--should be ignored-->
3045 <!--should be ignored as well-->
3052 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n<!--should be ignored-->\n <!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
3056 Templates: Handle comments in the target
3059 <!-- should be ignored -->
3063 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3066 {{echo<!-- should be ignored -->
3069 {{echo<!-- should be ignored -->|foo}}
3071 {{<!-- should be ignored -->echo|foo}}
3080 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3082 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3084 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3086 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3088 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3092 Templates: Handle comments in parameter names (T69657)
3095 <!-- should be ignored -->
3099 <!-- should be ignored -->
3102 {{echo|1<!-- should be ignored -->=foo}}
3104 {{echo|<!-- should be ignored -->1=foo}}
3112 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3114 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
3116 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3118 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
3122 Templates: Other wikitext in parameter names (T69657)
3129 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3133 Templates: With colons
3137 <p>Template with colon
3140 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"With: Colon","href":"./Template:With:_Colon"},"params":{},"i":0}}]}'>Template with colon</p>
3143 #--------------------------------------------------------------------
3144 # Transclusion parameter escaping tests
3145 #--------------------------------------------------------------------
3148 Templates: Parsoid parameter escaping test 1
3150 {{echo|[foo]|{{echo|[bar]}}}}
3155 <p about="#mwt1" typeof="mw:Transclusion"
3156 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3160 Parsoid: Pipes in external links in template parameter
3162 {{echo|[{{echo|http://example.com}} link]}}
3164 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3167 <p><a rel="mw:ExtLink" class="external text" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
3171 Parsoid: pipe in transclusion parameter
3173 {{echo|http://foo.com/a|b}}
3175 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3178 <p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
3182 Parsoid: Pipe in external link target and content in template parameter
3184 parsoid=html2wt,wt2wt
3186 {{echo|[http://foo.com/a|b a|b]}}
3188 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3191 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3192 typeof="mw:Transclusion"
3193 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3194 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3198 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3202 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3204 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
3208 Templates: Don't escape already nowiki-escaped text in template parameters
3210 parsoid=html2wt,wt2wt
3212 {{echo|foo<nowiki>|</nowiki>bar}}
3213 {{echo|<nowiki><div></nowiki>}}
3214 {{echo|<nowiki></nowiki>}}
3221 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
3222 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
3223 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
3229 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3231 parsoid=html2wt,wt2wt
3233 {{echo|{{echo|1=bar}}}}
3238 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
3243 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3250 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
3255 Templates: Preserve blank parameter names
3262 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3266 Templates: Preserve blank parameter names in other positions
3268 {{blank_param|bar|=foo}}
3274 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
3279 ### Parsoid-centric tests for testing RT edge cases for pre
3283 1a. Indent-Pre and Comments
3296 1b. Indent-Pre and Comments
3309 1c. Indent-Pre and Comments
3322 1d. Indent-Pre and Comments
3323 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3336 2a. Indent-Pre and tables
3357 2b. Indent-Pre and tables
3373 2c. Indent-Pre and tables (T44252)
3390 2d. Indent-Pre and tables
3407 <tbody><tr><td> b</td></tr>
3412 2e. Indent-Pre and table-line syntax
3425 2f. Indent-pre started by table-line syntax
3444 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3449 Text that should be rendered preformatted
3457 <pre>Text that should be rendered preformatted
3466 2h. Indent pre in tables
3468 parsoid=wt2html,html2html
3511 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3513 </td></tr></tbody></table>
3517 3a. Indent-Pre and block tags (single-line html)
3521 c <blockquote> foo </blockquote>
3526 c <blockquote> foo </blockquote>
3527 <pre><span> foo </span>
3530 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3531 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3532 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3533 <pre><span> foo </span>
3536 <p> a </p><p> foo </p><p>
3537 b </p><div> foo </div><p>
3538 c </p><blockquote><p> foo </p></blockquote>
3539 <pre><span> foo </span>
3544 3b. Indent-Pre and block tags (multi-line html)
3547 <!-- comment --> b <div> foo </div>
3549 <pre>a <span>foo</span>
3554 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3555 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3557 <pre>a <span>foo</span>
3559 b </p><div> foo </div>
3563 3c. Indent-Pre and block tags (pre-content on separate line)
3627 4. Indent-Pre and extension tags
3638 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3642 5. Indent-Pre and html pre
3644 <pre class="123">hi</pre>
3646 <pre class="123">hi</pre>
3649 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3653 Render paragraphs when indent-pre is suppressed in blocklevels
3670 4. Multiple spaces at start-of-line
3688 ## NOTE: the leading white-space chars on empty line are significant
3690 5a. White-space in indent-pre
3702 ## NOTE: the leading white-space chars on empty line are significant
3704 5b. White-space in indent-pre
3723 5c. White-space in indent-pre
3736 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3759 7a. Indent-pre and category links
3761 parsoid=wt2html,wt2wt
3763 [[Category:foo]] <!-- No pre-wrapping -->
3764 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3767 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3768 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3771 ## We used to, but no longer wt2wt this test since the default serializer
3772 ## will normalize all categories to serialize on their own line.
3773 ## This wikitext usage is going to be fairly uncommon in production and
3774 ## selser will take care of preserving formatting in those scenarios.
3776 7b. Indent-pre and category links
3781 [[Category:foo]] {{echo|b}}
3783 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3784 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
3788 Indent-Pre: Newlines in comments shouldn't affect sol state
3803 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3807 HTML-pre: 1. embedded newlines
3839 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3841 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3844 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3849 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3857 HTML-pre: big spaces
3893 <pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n"}}'>
3912 HTML-pre: 2: indented text
3925 HTML-pre: 3: other wikitext
3944 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n* foo\n# bar\n= no-h =\n'' no-italic ''\n[[ NoLink ]]\n"}}'>* foo
3953 ### Definition lists
3960 <dl><dt>name </dt>
3961 <dd>Definition</dd></dl>
3966 Definition list for indentation only
3970 <dl><dd>Indented text</dd></dl>
3975 Definition list with no space
3980 <dd>Definition</dd></dl>
3985 Definition list with URL link
3987 ;http://example.com/ :definition
3989 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3990 <dd>definition</dd></dl>
3995 Definition list with bracketed URL link
3997 ;[http://www.example.com/ Example]:Something about it
3999 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4000 <dd>Something about it</dd></dl>
4005 Definition list with wikilink containing colon
4007 ;[[Help:FAQ]]:The least-read page on Wikipedia
4009 <dl><dt><a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
4010 <dd>The least-read page on Wikipedia</dd></dl>
4014 # At Brion's and JeLuF's insistence... :)
4016 Definition list with news link containing colon
4018 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4020 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> </dt>
4021 <dd>This isn't even a real newsgroup!</dd></dl>
4024 <dl><dt><a rel="mw:ExtLink" class="external free" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'>This isn't even a real newsgroup!</dd></dl>
4028 Malformed definition list with colon
4030 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4032 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
4037 Definition lists: colon in external link text
4039 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4041 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a> </dt>
4042 <dd>OK, I made that up</dd></dl>
4047 Definition lists: colon in HTML attribute
4049 ;<b style="display: inline">bold</b>
4051 <dl><dt><b style="display: inline">bold</b></dt></dl>
4056 Definition lists: self-closed tag
4058 ;one<br/>two :two-line fun
4060 <dl><dt>one<br />two </dt>
4061 <dd>two-line fun</dd></dl>
4066 Definition lists: ignore colons inside tags
4068 ;one <b>two : tag <i>fun:</i>:</b>:def
4070 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4076 Definition lists: excess closed tags
4078 ;one</b>two :bad tag fun
4080 <dl><dt>onetwo </dt>
4081 <dd>bad tag fun</dd></dl>
4085 <dd>bad tag fun</dd>
4090 T13748: Literal closing tags
4094 <dd>test test test test test</dd>
4096 <dd>test test test test test</dd>
4101 <dd>test test test test test</dd>
4103 <dd>test test test test test</dd>
4109 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4117 <dl><dt>term </dt>
4118 <dd>description</dd></dl>
4119 <ul><li>unordered</li></ul>
4125 Definition list with empty definition and following paragraph
4138 Nested definition lists using html syntax
4151 Definition Lists: No nesting: Multiple dd's
4164 Definition Lists: Indentation: Regular
4172 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4177 Definition Lists: Indentation: Missing 1st level
4183 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4188 Definition Lists: Indentation: Multi-level indent
4192 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4197 Definition Lists: Hacky use to indent tables
4204 should be left alone
4206 <dl><dd><dl><dd><table>
4211 </td></tr></table></dd></dl></dd></dl>
4213 should be left alone
4218 Definition Lists: Hacky use to indent tables (with content following table)
4223 |} <!--c1--> this text should be part of the dl
4230 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4237 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4241 Definition Lists: Hacky use to indent tables, with comments (T65979)
4249 should be left alone
4252 <dl><dd><dl><dd><table><tr>
4255 </tr></table><!-- bar --></dd></dl></dd></dl>
4257 should be left alone</p>
4261 Definition Lists: Hacky use to indent tables, with comment before table
4269 <dl><dd><dl><dd><!-- foo --><table><tr>
4271 </tr></table></dd></dl></dd></dl>
4274 # The trailing whitespace in this test is to catch a regression in
4275 # Parsoid after T54473.
4277 Definition Lists: Hacky use to indent tables (WS-insensitive)
4286 </td></tr></table></dd></dl>
4290 <tbody><tr><td>a</td></tr>
4291 </tbody></table></dd></dl>
4294 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4295 ## as an empty dt item. It also ignores all but the last ";" when followed
4296 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4297 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4300 ## Ex: ";;t2 ::d2" is transformed into:
4312 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4313 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4324 ## All Parsoid only definition list tests have this difference.
4326 ## See also: https://phabricator.wikimedia.org/T8569
4327 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4330 Table / list interaction: indented table with lists in table contents
4352 </td></tr></table></dd></dl>
4357 Table / list interaction: lists nested in tables nested in indented lists
4380 </td></tr></table></dd></dl>
4387 Definition Lists: Nesting: Multi-level (Parsoid only)
4415 Definition Lists: Nesting: Test 2
4422 <dl><dd>d2</dd></dl></dd></dl>
4427 Definition Lists: Nesting: Test 3
4432 <dl><dd><dl><dt>t1</dt>
4434 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4439 Definition Lists: Nesting: Test 4
4444 <dl><dd><dl><dd><dl><dt>t3</dt>
4445 <dd>d3</dd></dl></dd></dl></dd></dl>
4450 ## The Parsoid team believes the following three test exposes a
4451 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4452 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4453 ## It also exposes a "misfeature" in tidy, which doesn't like
4454 ## <dl> tags with a single <dt> child; it converts the <dt> into
4455 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4457 Definition Lists: Mixed Lists: Test 1
4463 <dl><dd><dl><dt><ul><li>foo</li>
4464 <li>bar</li></ul></dt></dl>
4465 <dl><dt>baz</dt></dl></dd></dl>
4468 <dl><dd><dl><dt><ul><li>foo</li>
4469 <li>bar</li></ul></dt></dl>
4470 <dl><dt>baz</dt></dl></dd></dl>
4488 Definition Lists: Mixed Lists: Test 2
4493 <ul><li><dl><dd>d1</dd>
4494 <dd>d2</dd></dl></li></ul>
4500 Definition Lists: Mixed Lists: Test 3
4505 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4506 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4512 Definition Lists: Mixed Lists: Test 4
4517 <ul><li><dl><dt>d1 </dt>
4520 <dd>d4</dd></dl></li></ul>
4526 Definition Lists: Mixed Lists: Test 5
4532 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4538 Definition Lists: Mixed Lists: Test 6
4543 <ol><li><ul><li><dl><dd>d1
4544 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4550 Definition Lists: Mixed Lists: Test 7
4555 <dl><dd><ul><li>d1</li>
4556 <li>d2</li></ul></dd></dl>
4562 Definition Lists: Mixed Lists: Test 8
4567 <dl><dd><ul><li>d1</li></ul>
4568 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4574 Definition Lists: Mixed Lists: Test 9
4578 <ul><li><dl><dt>foo </dt>
4579 <dd>bar</dd></dl></li></ul>
4585 Definition Lists: Mixed Lists: Test 10
4589 <ul><li><ol><li><dl><dt>foo </dt>
4590 <dd>bar</dd></dl></li></ol></li></ul>
4594 # The Parsoid team disagrees with the PHP parser's seemingly-random
4595 # rules regarding dd/dt on the next few tests. Parsoid is more
4596 # consistent, and recognizes the shared nesting and keeps the
4597 # still-open tags around until the nesting is complete.
4599 # This is a regression test for T175099
4601 Definition Lists: Mixed Lists: Test 11
4608 <ul><li>b</li></ul></dd></dl>
4612 <dd><ul><li>b</li></ul></dd></dl>
4615 # FIXME: Maybe get rid of this test?
4617 Definition Lists: Mixed Lists: Test 12
4622 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4623 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4624 <dl><dt>boo </dt>
4625 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4628 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4629 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4630 <dl><dt>boo </dt>
4631 <dd>baz</dd></dl></li></ol></li></ul>
4648 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4649 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4653 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4654 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4662 # FIXME: Maybe get rid of this test?
4664 # * The test is wrong, there are two colons where there should be :;
4665 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4667 Definition Lists: Weird Ones: Test 1
4669 *#;*::;;foo :bar (who uses this?)
4671 <ul><li><ol><li><dl><dt>foo </dt>
4672 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt>bar (who uses this?)</dt></dl></dt></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
4689 <dt>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4690 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4702 Definition Lists: colons occurring in tags
4719 <dt><span>a:b</span></dt>
4720 <dt><div>a:b</div></dt>
4721 <dt><div>a</div></dt>
4725 <dt><i>a:b</i></dt></dl>
4726 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4728 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4730 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4731 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4732 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4733 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4735 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4736 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4737 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4740 # Parsoid's output differs here again because it shares
4741 # nesting between the two lists unlike the PHP parser.
4742 # Unsure which is more desirable.
4744 Definition Lists: colons and tables 1
4756 </td></tr></table></dd></dl>
4760 </td></tr></table></dd></dl>
4766 </td></tr></table></dd>
4770 </td></tr></table></dd></dl>
4773 # FIXME: Does this need a html/php section?
4775 Definition Lists: template interaction
4777 ::{{definition_list}}
4780 ::{{definition_list}}
4785 <dl><dd><dl data-parsoid='{}'><dd about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[":",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}}]}'>one</dd><span about="#mwt1">
4786 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4788 <dl><dd data-parsoid='{}'>one
4789 <dl><dd about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":["::",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}},"\n:::two\n:::three"]}'>one</dd><span about="#mwt2">
4790 </span><dd about="#mwt2">two
4792 <dd>three</dd></dl></dd>
4793 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4801 External links: non-bracketed
4803 Non-bracketed: http://example.com
4805 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4809 # parsoid doesn't explicitly mark autonumbered links, see T55505
4811 External links: numbered
4813 Numbered: [http://example.com]
4814 Numbered: [http://example.net]
4815 Numbered: [http://example.com]
4817 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4818 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4819 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4822 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4823 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4824 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4828 External links: specified text
4830 Specified text: [http://example.com link]
4832 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4837 External links: trail
4839 Linktrails should not work for external links: [http://example.com link]s
4841 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4846 External links: dollar sign in URL
4848 http://example.com/1$2345
4850 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4854 # parsoid doesn't explicitly mark autonumbered links, see T55505
4856 External links: dollar sign in URL (autonumber)
4858 [http://example.com/1$2345]
4860 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4863 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4867 External links: open square bracket forbidden in URL (T6377)
4869 parsoid=wt2html,wt2wt,html2html
4871 http://example.com/1[2345
4873 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4876 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4880 External links: open square bracket forbidden in URL (named) (T6377)
4882 parsoid=wt2html,html2html
4884 [http://example.com/1[2345]
4886 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4889 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4892 # parsoid adds a space before the link name
4894 External links: open square bracket forbidden in URL (named) (T6377)
4897 [http://example.com/1 [2345]
4899 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4904 External links: nowiki in URL link text (T8230)
4906 [http://example.com/ <nowiki>''example site''</nowiki>]
4908 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4913 External links: newline forbidden in text (T8230 regression check)
4915 [http://example.com/ first
4918 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4924 External links: Pipe char between url and text
4926 [http://example.com | link]
4928 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4933 External links: protocol-relative URL in brackets
4935 [//example.com/ Test]
4937 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4941 # parsoid doesn't explicitly mark autonumbered links, see T55505
4943 External links: protocol-relative URL in brackets without text
4947 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4950 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4954 External links: protocol-relative URL in free text is left alone
4958 <p>//example.com/Foo
4963 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4965 foo//example.com/Foo
4967 <p>foo//example.com/Foo
4971 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4973 External links: with no contents
4975 parsoid=wt2html,wt2wt
4977 [http://en.wikipedia.org/wiki/Foo]
4979 [[wikipedia:Foo|Bar]]
4981 [[wikipedia:Foo|<span>Bar</span>]]
4983 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4984 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4985 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4988 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4989 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4990 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4994 External links: Free with trailing punctuation
5004 http://example.com/url_with_(brackets)
5005 (http://example.com/url_without_brackets)
5006 http://example.com/url_with_entity&
5007 http://example.com/url_with_entity&
5008 http://example.com/url_with_entity&
5009 http://example.com/url_with_entity
5010 http://example.com/url_with_entity 
5011 http://example.com/url_with_entity 
5012 http://example.com/url_with_entity<
5013 http://example.com/url_with_entity<
5014 http://example.com/url_with_entity<
5016 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5017 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5018 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5019 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5020 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5021 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5022 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5023 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5024 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5025 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5026 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5027 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5028 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5029 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5030 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5031 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5032 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5033 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5034 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5037 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5038 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5039 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5040 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5041 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5042 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5043 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5044 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5045 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5046 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5047 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5048 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5049 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5050 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
5051 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
5052 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
5053 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
5054 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
5055 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
5059 External links: tricky Parsoid html2html case
5061 parsoid=wt2html,wt2wt,html2html
5063 http://example.com/url_with_entity&amp;
5065 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5068 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
5072 External links: Free with trailing quotes (T113666)
5074 '''News:''' Stuff here
5078 <p><b>News:</b> Stuff here
5079 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5082 <p><b>News:</b> Stuff here</p>
5083 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5087 External links: with entity
5089 [http:// www.librarieswithoutborders.org Libraries without borders]
5091 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5094 <p><a rel="mw:ExtLink" class="external text" href="http://+www.librarieswithoutborders.org" data-parsoid='{"a":{"href":"http://+www.librarieswithoutborders.org"},"sa":{"href":"http://&#x20;www.librarieswithoutborders.org"}}'>Libraries without borders</a></p>
5098 External links: Lone protocols are never linked (T105697)
5117 External links: No preceding word characters allowed (T67278)
5119 NOPEhttp://example.com
5120 N0http://example.com
5121 ok:http://example.com
5122 ok-http://example.com
5124 <p>NOPEhttp://example.com
5125 N0http://example.com
5126 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5127 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5132 External links: nofollow domain exception
5134 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5136 <p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>.
5143 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5145 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5150 External image from https
5152 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5154 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5159 External image (when not allowed)
5161 wgAllowExternalImages=0
5163 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5165 <p>External image: <a rel="nofollow" class="external free" href="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png">http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png</a>
5170 Link to non-http image, no img tag
5172 Link to non-http image, no img tag: ftp://example.com/test.jpg
5174 <p>Link to non-http image, no img tag: <a rel="nofollow" class="external free" href="ftp://example.com/test.jpg">ftp://example.com/test.jpg</a>
5179 External links: terminating separator
5181 Terminating separator: http://example.com/thing,
5183 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5188 External links: intervening separator
5190 Intervening separator: http://example.com/1,2,3
5192 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5197 External links: old bug with URL in query
5199 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5201 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5206 External links: old URL-in-URL bug, mixed protocols
5208 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5210 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5214 # Since Parsoid is starting to emit canonical wikitext for links,
5215 # [http://example.com http://example.com] will not RT back to that
5218 External links: URL in text
5222 URL in text: [http://example.com http://example.com]
5224 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5227 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5231 External links: Clickable images
5233 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5235 <p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/></a>
5238 <p>ja-style clickable images: <a rel="mw:ExtLink" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
5242 External links: raw ampersand
5244 Old & use: http://x&y
5246 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5251 External links: encoded ampersand
5253 Old & use: http://x&y
5255 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5258 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5262 External links: encoded equals (T8102)
5264 http://example.com/?foo=bar
5266 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5269 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5273 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5274 ## does it number them. As discussed in T55505, we can identify
5275 ## autonumbered links via CSS.
5279 External links: [raw ampersand]
5281 Old & use: [http://x&y]
5283 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5286 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5289 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5290 # mode will return the [raw ampersand] wikitext
5292 External links: [encoded ampersand]
5294 parsoid=wt2html,wt2wt,html2html
5296 Old & use: [http://x&y]
5298 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5301 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5305 External links: [raw equals]
5307 [http://example.com/?foo=bar]
5309 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5312 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5315 # note that parsoid html is identical to [raw equals] case; so html2wt
5316 # mode will return the [raw equals] wikitext
5318 External links: [encoded equals] (T8102)
5320 parsoid=wt2html,wt2wt,html2html
5322 [http://example.com/?foo=bar]
5324 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5327 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5330 # xxx parsoid strips the IDN character, so the round-trip tests will
5331 # obviously fail and are disabled. --cscott
5333 External links: [IDN ignored character reference in hostname; strip it right off]
5335 parsoid=wt2html,wt2wt,html2html
5337 [http://e‌xample.com/]
5339 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5342 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5345 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5346 # Where an external link could easily circumvent the sanitization of the text of
5347 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5348 # test demands a higher standard. That's a bit strange.
5352 # http://example.com -> [http://example.com|http://example.com]
5353 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5355 # The first example is sanitized, but the second is not. Any security benefits
5356 # from this production are trivial to circumvent. Either remove this test and
5357 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5358 # the test accordingly.
5362 # xxx parsoid strips the IDN character, so the round-trip tests will
5363 # obviously fail and are disabled. --cscott
5365 External links: IDN ignored character reference in hostname; strip it right off
5367 parsoid=wt2html,html2html
5369 http://e‌xample.com/
5371 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5374 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5378 External links: www.jpeg.org (T2554)
5382 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5386 # parsoid doesn't explicitly mark autonumbered links, see T55505
5388 External links: URL within URL (T2002)
5390 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5392 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5395 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5399 T2361: URL inside bracketed URL
5401 [http://www.example.com/foo http://www.example.com/bar]
5403 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5408 T2361: URL within URL, not bracketed
5410 http://www.example.com/foo?=http://www.example.com/bar
5412 <p><a rel="nofollow" class="external free" href="http://www.example.com/foo?=http://www.example.com/bar">http://www.example.com/foo?=http://www.example.com/bar</a>
5417 T2289: ">"-token in URL-tail
5419 http://www.example.com/<hello>
5421 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5426 T2289: literal ">"-token in URL-tail
5428 http://www.example.com/<b>html</b>
5430 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5433 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
5437 T2289: ">"-token in bracketed URL
5439 [http://www.example.com/<hello> stuff]
5441 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5446 T2289: literal ">"-token in bracketed URL
5448 [http://www.example.com/<b>html</b> stuff]
5450 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5455 T2289: literal double quote at end of URL
5457 http://www.example.com/"hello"
5459 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5464 T2289: literal double quote in bracketed URL
5466 [http://www.example.com/"hello" stuff]
5468 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5473 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5475 [http://www.example.com test]
5477 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5482 External links: link text with spaces
5484 [http://www.example.com a b c]
5485 [http://www.example.com ''a'' ''b'']
5487 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5488 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5492 # Note edge case difference between PHP and Parsoid here.
5494 External links: wiki links within external link (T5695)
5496 parsoid=wt2html,html2html
5498 [http://example.com [[wikilink]] embedded in ext link]
5500 [http://example.com test [[wikilink]] embedded in ext link]
5502 <p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5503 </p><p><a rel="nofollow" class="external text" href="http://example.com">test </a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5506 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5507 <p><a rel="mw:ExtLink" class="external text" href="http://example.com">test </a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5511 T2787: Links with one slash after the url protocol are invalid
5515 [http:/example.com title]
5517 <p>http:/example.com
5518 </p><p>[http:/example.com title]
5523 Bracketed external links with template-generated invalid target
5525 [{{echo|http:/example.com}} title]
5527 <p>[http:/example.com title]
5531 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5533 Broken wikilinks (but not external links) prevent templates from closing
5537 [http://example.com x
5539 {{echo|[http://example.com x}}
5545 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5546 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5548 </p><p>{{echo|[[Foo}}
5551 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5552 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://example.com x"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5554 <p>{{echo|[[Foo}}</p>
5558 Wikilinks with embedded newlines are not broken
5569 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[ Foo\nB\nC]]"}},"i":0}}]}'>[[ Foo B C]]</p>
5581 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5585 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5586 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5590 T4702: Mismatched <i>, <b> and <a> tags are invalid
5592 ''[http://example.com text'']
5593 [http://example.com '''text]'''
5594 ''Something [http://example.com in italic'']
5595 ''Something [http://example.com mixed''''', even bold]'''
5596 '''''Now [http://example.com both''''']
5598 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5599 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5600 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5601 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5602 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5610 http://www.example.com/?title=AT%26T
5612 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5615 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5618 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5619 # % is actually legal in HTML5. Any change in output would need testing though.
5621 T6781, T7267: %25 in URL
5623 http://www.example.com/?title=100%25_Bran
5625 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a>
5628 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5632 T6781, T7267: %28, %29 in URL
5634 http://www.example.com/?title=Ben-Hur_%281959_film%29
5636 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
5639 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
5644 T6781: %26 in autonumber URL
5646 [http://www.example.com/?title=AT%26T]
5648 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5651 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5655 T6781, T7267: %26 in autonumber URL
5657 [http://www.example.com/?title=100%25_Bran]
5659 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5662 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5666 T6781, T7267: %28, %29 in autonumber URL
5668 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5670 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5673 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5678 T6781: %26 in bracketed URL
5680 [http://www.example.com/?title=AT%26T link]
5682 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5685 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5689 T6781, T7267: %25 in bracketed URL
5691 [http://www.example.com/?title=100%25_Bran link]
5693 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5698 T6781, T7267: %28, %29 in bracketed URL
5700 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5702 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5705 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5709 External link containing a period in the anchor. (T65947)
5711 [//foo.org/bar#baz. bang]
5713 [//foo.org/bar. bang]
5715 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5716 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5719 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5720 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5724 External link containing a single quote. (T65947)
5728 [//foo.org/bar'baz bang]
5730 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5731 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5734 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5735 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5739 External link containing double-single-quotes in text '' (T6598 sanity check)
5741 Some [http://example.com/ pretty ''italics'' and stuff]!
5743 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5748 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5750 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5752 <p><i>Some </i><a rel="nofollow" class="external text" href="http://example.com/"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
5756 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5758 External link containing double-single-quotes with no space separating the url from text in italics
5760 [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
5762 <p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.
5765 <p><a rel="mw:ExtLink" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
5769 External link with comments in link text
5771 [http://www.google.com Google <!-- comment -->]
5773 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5776 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5780 External link to bare IPv4 address
5782 [http://192.168.0.1 Link]
5784 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5787 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5791 URL-encoding in URL functions (single parameter)
5793 {{localurl:Some page|amp=&}}
5795 <p>/index.php?title=Some_page&amp=&
5800 URL-encoding in URL functions (multiple parameters)
5802 {{localurl:Some page|q=?&=&}}
5804 <p>/index.php?title=Some_page&q=?&amp=&
5811 http://example.com/index.php?foozoid%5B%5D=bar
5813 http://example.com/index.php?foozoid[]=bar
5815 <p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5816 </p><p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5819 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5821 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar" data-parsoid='{"stx":"url","a":{"href":"http://example.com/index.php?foozoid%5B%5D=bar"},"sa":{"href":"http://example.com/index.php?foozoid&#x5B;&#x5D;=bar"}}'>http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5825 IPv6 urls, autolink format (T23261)
5827 http://[2404:130:0:1000::187:2]/index.php
5829 Examples from RFC 2373, section 2.2:
5831 *http://[1080::8:800:200C:417A]/unicast
5832 *http://[FF01::101]/multicast
5833 *http://[::1]/loopback
5834 *http://[::]/unspecified
5835 *http://[::13.1.68.3]/ipv4compat
5836 *http://[::FFFF:129.144.52.38]/ipv4compat
5838 Examples from RFC 2732, section 2:
5840 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5841 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5842 *http://[3ffe:2a00:100:7031::1]
5843 *http://[1080::8:800:200C:417A]/foo
5844 *http://[::192.9.5.5]/ipng
5845 *http://[::FFFF:129.144.52.38]:80/index.html
5846 *http://[2010:836B:4179::836B:4179]
5848 <p><a rel="nofollow" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a>
5849 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5851 <ul><li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5852 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5853 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5854 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5855 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5856 <li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5857 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5859 <ul><li><a rel="nofollow" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5860 <li><a rel="nofollow" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5861 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5862 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5863 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5864 <li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5865 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5868 <p><a rel="mw:ExtLink" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5870 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external mw-magiclink">RFC 2373</a>, section 2.2:</p>
5871 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5872 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5873 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5874 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5875 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5876 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5878 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5879 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5880 <li><a rel="mw:ExtLink" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5881 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5882 <li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5883 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5884 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5885 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5889 IPv6 urls, bracketed format (T23261)
5891 [http://[2404:130:0:1000::187:2]/index.php test]
5893 Examples from RFC 2373, section 2.2:
5895 *[http://[1080::8:800:200C:417A] unicast]
5896 *[http://[FF01::101] multicast]
5897 *[http://[::1]/ loopback]
5898 *[http://[::] unspecified]
5899 *[http://[::13.1.68.3] ipv4compat]
5900 *[http://[::FFFF:129.144.52.38] ipv4compat]
5902 Examples from RFC 2732, section 2:
5904 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5905 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5906 *[http://[3ffe:2a00:100:7031::1] 3]
5907 *[http://[1080::8:800:200C:417A]/foo 4]
5908 *[http://[::192.9.5.5]/ipng 5]
5909 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5910 *[http://[2010:836B:4179::836B:4179] 7]
5912 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5913 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5915 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5916 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5917 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5918 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5919 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5920 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5921 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5923 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5924 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5925 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5926 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5927 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5928 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5929 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5932 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5934 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external mw-magiclink">RFC 2373</a>, section 2.2:</p>
5935 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5936 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5937 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5938 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5939 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5940 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5942 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5943 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5944 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5945 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5946 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5947 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5948 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5949 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5953 Non-extlinks in brackets
5962 [{{echo|foo}} ''bar'']
5963 [{{echo|foo}}l's] errand
5964 [{{echo|foo}}l's errand]
5966 [url=http://example.com]
5967 [http:// bare protocols don't count]
5980 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5981 [http:// bare protocols don't count]
5989 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5990 [<span about="#mwt20" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> bar]
5991 [<span about="#mwt21" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> <i>bar</i>]
5992 [<span about="#mwt22" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's] errand
5993 [<span about="#mwt23" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's errand]
5994 [url=<span about="#mwt24" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5995 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
5996 [http:// bare protocols don't count]</p>
6000 Percent encoding in external links
6002 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6004 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6007 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6011 Use url link syntax for links where the content is equal the link target
6015 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6018 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6022 Parenthesis in external links, especially URL links
6026 http://example.com/test)
6028 http://example.com/(test)
6030 http://example.com/((test)
6032 (http://example.com/(test))
6034 (http://example.com/(test)))))
6036 http://example.com/a)b
6038 [http://example.com) foo]
6040 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6041 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6042 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6043 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6044 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6045 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6046 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6047 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6050 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6051 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6052 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6053 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6054 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6055 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6056 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6057 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6061 Parenthesis in external links, w/ transclusion or comment
6063 (http://example.com/{{echo|hi}})
6065 (http://example.com<!-- hi -->)
6067 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6068 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6071 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" class="external free" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span>"}]]}'>http://example.com/hi</a>)</p>
6073 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
6077 Serialize <a> tags with invalid link targets as plain text
6079 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6081 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6082 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6083 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6084 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6087 <nowiki>*</nowiki>text
6088 <nowiki>[[foo]]</nowiki>
6089 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6093 mw:ExtLink -vs- mw:WikiLink (T94723)
6097 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6098 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6099 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6100 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6102 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6103 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6111 [[:en:European_Robin|European Robin]]
6112 [[:en:European_Robin|European Robin]]
6116 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6120 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6122 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6133 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6135 Normal text. '''''Bold italic text.''''' Normal text.
6137 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6138 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6143 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6144 # parser strips. The wikitext contains just the first half of the bold
6147 Unclosed and unmatched quotes
6149 '''''Bold italic text '''with bold deactivated''' in between.'''''
6151 '''''Bold italic text ''with italic deactivated'' in between.'''''
6155 ..spanning two paragraphs (should not work).'''
6157 '''Bold tag left open
6159 ''Italic tag left open
6163 <!-- Unmatching number of opening, closing tags: -->
6164 '''This year''''s election ''should'' beat '''last year''''s.
6166 ''Tom'''s car is bigger than ''Susan'''s.
6168 Plain ''italic'''s plain
6170 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6171 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6172 </p><p><b>Bold text..</b>
6173 </p><p>..spanning two paragraphs (should not work).
6174 </p><p><b>Bold tag left open</b>
6175 </p><p><i>Italic tag left open</i>
6177 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6178 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6179 </p><p>Plain <i>italic'</i>s plain
6182 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6183 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6184 </p><p><b>Bold text..</b>
6185 </p><p>..spanning two paragraphs (should not work).<b></b>
6186 </p><p><b>Bold tag left open</b>
6187 </p><p><i>Italic tag left open</i>
6190 <!-- Unmatching number of opening, closing tags: -->
6191 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6192 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6193 </p><p>Plain <i>italic'</i>s plain
6200 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6203 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6204 # is the bare minimum required by the spec, see:
6205 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6206 # Parsoid team replies: empty table tags are legal in HTML5
6208 A table with no data.
6221 A table with stray table end tags on start tag line (wt2html)
6225 {|style="color: red;"|}
6227 {|style="color: red;" |}
6231 {|style="color: red;"|} id="foo"
6235 {|style="color: red;" |} id="foo"
6239 <table style="color: red;"></table>
6241 <table style="color: red;">
6247 <table style="color: red;" id="foo">
6253 <table style="color: red;" id="foo">
6262 A table with no data (take 2)
6270 # A table with nothing but a caption is invalid XHTML, we might want to render
6271 # this as <p>caption</p>
6272 # Parsoid team replies: table with only a caption is legal in HTML5
6274 A table with nothing but a caption
6282 </caption><tr><td></td></tr></table>
6285 <table><caption>caption</caption></table>
6289 A table with caption with default-spaced attributes and a table row
6292 |+ style="color: red;" |caption1
6298 <caption style="color: red;">caption1
6307 A table with captions with non-default spaced attributes and a table row
6310 |+style="color: red;"|caption2
6311 |+ style="color: red;"|caption3
6317 <caption style="color: red;">caption2
6319 <caption style="color: red;">caption3
6328 Table td-cell syntax variations
6333 |style='color:red;'|baz
6334 |style='color:red;'||baz
6341 <td>foo bar foo</td>
6344 <td style="color:red;">baz
6346 <td>style='color:red;'</td>
6374 Simple table but with multiple dashes for row wikitext
6393 Multiplication table
6395 {| border="1" cellpadding="2"
6396 |+Multiplication table
6416 <table border="1" cellpadding="2">
6417 <caption>Multiplication table
6464 Accept "||" in table headings
6479 Accept "!!" in table data
6493 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6498 Accept "||" in indented table headings
6508 </th></tr></table></dd></dl>
6513 Accept "!!" in templates
6527 <tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["!a ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b!!c"}},"i":0}}]}'>a b</th><th about="#mwt1">c</th></tr>
6531 Accept "!!" in table headings after newline
6548 <p>b!!c</p></th></tr>
6553 Accept "!!" in table data of mixed wikitext / html syntax
6557 <tr><td>b!!c</td></tr>
6563 </th></tr><tr><td>b!!c</td></tr>
6567 <tbody><tr><th>a</th></tr>
6568 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6573 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6590 Accept "| !" at start of line in tables (ignore !-attribute)
6594 |!style="color:red"|bar
6606 Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present, or in 1st cell when there is a space between "|" and +/-
6610 |style='color:red;'|+1
6611 |style='color:blue;'|-1
6623 <td style="color:red;">+1
6625 <td style="color:blue;">-1
6649 |rowspan=2|Cell 2, row 1 (and 2)
6660 <td rowspan="2">Cell 2, row 1 (and 2)
6678 {| bgcolor=#ABCDEF border=2
6683 |the original table again
6691 <table bgcolor="#ABCDEF" border="2">
6699 <td>the original table again
6705 Invalid attributes in table cell (T3830)
6719 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6723 |title="foo<nowiki>|</nowiki>" |bar
6724 |title="foo<nowiki>|</nowiki>" bar
6731 <td title="foo|">bar
6733 <td>title="foo|" bar
6738 <tbody><tr><td title="foo">bar</td>
6739 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6740 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6744 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6745 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6746 # *2wt modes will fail.
6748 Table security: embedded pipes
6750 parsoid=wt2html,html2html
6753 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6757 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6758 <td>]" onmouseover="alert(document.cookie)">test
6766 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" class="external free" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6770 Element attributes with double ! should not be broken up by <th>
6773 !hi <div class="!!">ha</div> ho
6778 <th>hi <div class="!!">ha</div> ho
6783 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6788 ! and || in element attributes should not be parsed as <th>/<td>
6791 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6796 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6801 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6805 # FIXME: The output seems broken. Filed as T110268.
6807 ! and || in td attributes should not be parsed as <th>/<td>
6812 |style="color: red !important;" data-contrived="put this here ||"|foo
6817 <td>style="color: red !important;" data-contrived="put this here</td>
6823 <tbody><tr><td>style="color: red !important;" data-contrived="put this here</td><td data-parsoid='{"stx":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'>foo</td></tr>
6828 Break on | in element attribute in template
6830 parsoid=wt2html,html2html
6832 {{echo|1=<div class="hi|ho">ha</div>}}
6834 <p>ho">ha</div>
6837 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</span>
6841 Break on | in element attribute name in template
6843 {{echo|<div cla|ss="hiho">ha</div>}}
6845 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"ss","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div cla"},"ss":{"wt":"\"hiho\">ha</div>"}},"i":0}}]}'><div cla</p>
6849 Don't break on | in extension attribute in template
6851 {{echo|<ref name="hi|ho">ha</ref>}}
6855 <p><sup about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
6857 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Main_Page#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
6860 ## We don't support roundtripping of these attributes in Parsoid.
6861 ## Selective serialization takes care of preventing dirty diffs.
6862 ## But, on edits, we dirty-diff the invalid attribute text.
6864 Invalid text in table attributes should be discarded
6868 {| <span>boo</span> style='border:1px solid black'
6869 | <span>boo</span> style='color:blue' |1
6870 |<span>boo</span> style='color:blue'|2
6873 <table style="border:1px solid black">
6875 <td style="color:blue">1
6877 <td style="color:blue">2
6881 <table style="border:1px solid black">
6883 <td style="color:blue">1</td>
6884 <td style="color:blue">2</td>
6890 Invalid text in table attributes should be preserved by selective serializer
6893 "modes": ["selser"],
6895 ["td:first-child", "text", "abc"],
6896 ["td + td", "text", "xyz"]
6900 {| <span>boo</span> style='border:1px solid black'
6901 | <span>boo</span> style='color:blue' | 1
6902 |<span>boo</span> style='color:blue'| 2
6905 {| <span>boo</span> style='border:1px solid black'
6906 | <span>boo</span> style='color:blue' | abc
6907 |<span>boo</span> style='color:blue'| xyz
6912 1. Template-generated table cell attributes and cell content
6917 || {{table_attribs_5}}
6918 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6919 |align=center {{table_attribs}}
6920 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6925 <td style="color:red;">Foo
6927 <td style="color:red;">Foo
6929 <td>style="color:red;"</td>
6932 <td style="color:red;">Foo
6934 <td align="center" style="color:red;">Foo
6936 <td align="center" style="color:red;">Foo
6942 2. Template-generated table cell attributes and cell content
6945 |{{table_attribs_2}}
6950 <td style="color:red;">Foo
6958 <tbody><tr><td about="#mwt1" typeof="mw:Transclusion" style="color:red;" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_2","href":"./Template:Table_attribs_2"},"params":{},"i":0}}]}'>Foo</td>
6959 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6964 3. Template-generated table cell attributes and cell content
6967 !align=center {{table_header_cells}}
6969 |align=center {{table_cells}}
6974 <th align="center" style="color:red;">Foo</th>
6975 <th style="color:red;"><i>Bar</i></th>
6976 <th style="color:brown;"><i>Foo</i> and Baz
6979 <td align="center" style="color:red;">Foo</td>
6980 <td style="color:red;"><i>Bar</i></td>
6981 <td style="color:brown;"><i>Foo</i> and Baz
6986 <tbody><tr><th align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":0}}]}'>Foo</th><th about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></th><th about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</th></tr><tr>
6987 <td align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":0}}]}'>Foo</td><td about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></td><td about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</td></tr>
6992 4. Template-generated table cell attributes and cell content inside a templated table
6995 !align=center {{table_header_cells}}
6997 |align=center {{table_cells}}
7002 <th align="center" style="color:red;">Foo</th>
7003 <th style="color:red;"><i>Bar</i></th>
7004 <th style="color:brown;"><i>Foo</i> and Baz
7007 <td align="center" style="color:red;">Foo</td>
7008 <td style="color:red;"><i>Bar</i></td>
7009 <td style="color:brown;"><i>Foo</i> and Baz
7013 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":1}},"\n|-\n|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":2}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":3}}]}'>
7014 <tbody><tr><th align="center" style="color:red;">Foo</th><th style="color:red;"><i>Bar</i></th><th style="color:brown;"><i>Foo</i> and Baz</th></tr>
7016 <td align="center" style="color:red;">Foo</td><td style="color:red;"><i>Bar</i></td><td style="color:brown;"><i>Foo</i> and Baz</td></tr>
7020 ## Edge case fix to prevent future regressions
7022 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7025 |{{table_attribs_7}}
7030 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
7032 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
7036 Table with row followed by newlines and table heading
7038 parsoid=wt2html,html2html
7056 Table with empty line following the start tag
7058 parsoid=wt2html,html2html
7076 Table attributes with empty value
7078 parsoid=wt2html,html2html
7091 <tbody><tr><td style="">hello</td></tr>
7096 Wikitext table with a lot of comments
7119 Wikitext table comments represented in parsoid dom
7121 {|<!--c1--><!--c2-->
7130 </td></tr></tbody></table>
7132 <table><!--c1--><!--c2-->
7133 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7134 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7139 Wikitext table with double-line table cell
7156 Table cell with a single comment
7173 Table-cell after a comment-only-empty-line
7190 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7192 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7198 Build table with {{!}}
7200 {{{!}} class="wikitable"
7203 {{!}}- style="color:red;"
7204 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7207 <table class="wikitable">
7213 <tr style="color:red;">
7215 <td style="color:red;">second data
7221 Build table with pipe as data
7223 {| class="wikitable"
7226 |- style="color:red;"
7227 |data|| style="color:red;" |second data
7229 | style="color:red;" |data with | || style="color:red;" | second data with |
7231 ||data with | |||second data with |
7234 <table class="wikitable">
7240 <tr style="color:red;">
7242 <td style="color:red;">second data
7245 <td style="color:red;">data with |</td>
7246 <td style="color:red;">second data with |
7249 <td>data with |</td>
7250 <td>second data with |
7256 Build table with wikilink
7258 {| class="wikitable"
7259 !header||second header
7260 |- style="color:red;"
7261 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7263 |data||second data [[Main Page|link|text with pipe]]
7266 <table class="wikitable">
7271 <tr style="color:red;">
7272 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7273 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7277 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7282 # The expected HTML structure in this test is debatable. The PHP parser does
7283 # not parse this kind of table at all. The main focus for Parsoid is on
7284 # round-tripping, so this output is ok for now. TODO: revisit!
7286 Wikitext table with html-syntax row
7296 <td>foo</td></tr></tbody></table>
7300 Fostered content in tables: Plain text
7302 parsoid=wt2html,html2html
7320 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7323 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7327 Fostered content in tables: Lists
7329 parsoid=wt2html,html2html
7342 <ul><li>a</li></ul><table>
7347 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7348 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7350 </tr></tbody></table>
7354 Template generated table cell with attributes
7358 {{table_attribs_4}} ||a||b
7364 <td style="background-color:#DC241f;" width="10px"></td>
7367 </td></tr></tbody></table>
7370 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7371 <td style="background-color:#DC241f;" width="10px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"table_attribs_4","href":"./Template:Table_attribs_4"},"params":{},"i":0}}," ||a||b"]}'></td><td about="#mwt1">a</td><td about="#mwt1">b</td></tr>
7375 Parsoid: Round-trip tables directly followed by content (T53219)
7377 parsoid=wt2html,wt2wt
7390 </td></tr></tbody></table><p> bar
7394 </td></tr></tbody></table><p><b>quux</b>
7399 Parsoid: Default to a newline after tables in new content (T53219)
7404 <tr><td>foo</td></tr></tbody></table> bar
7406 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7411 <nowiki> </nowiki>bar
7419 Parsoid: Row-syntax table headings followed by comment & table cells
7421 parsoid=wt2html,wt2wt
7425 <!-- foo --> ||baz||quux
7439 <tbody><tr><th>foo</th><th>bar
7440 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7445 Parsoid: Recover better from broken table attributes
7459 </td></tr></tbody></table>
7464 <p>foo</p></td></tr>
7469 Tables: Digest broken attributes on table and tr tag
7480 <tr class='mw-empty-elt'></tr>
7481 <tr class='mw-empty-elt'></tr>
7486 Table with missing opening <tr> tag
7488 parsoid=wt2html,wt2wt
7496 <tbody><tr><td>foo</td>
7501 # T137406: Whitespace in the HTML
7503 1. Generate correct wikitext for tables with thead/tbody/tfoot
7508 <caption>Test</caption>
7570 </td></tr></tbody></table>
7573 # T137406: No whitespace in the HTML
7575 2. Generate correct wikitext for tables with thead/tbody/tfoot
7579 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7589 Wikitext tables can be nested inside HTML tables
7593 <table data-parsoid='{"stx":"html"}'>
7596 <tr><td>foo</td></tr>
7614 Plain link, capitalized
7618 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7623 Plain link, uncapitalized
7627 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7634 [[Main Page|The Main Page]]
7636 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7641 Piped link with comment in link text
7643 [[Main Page|The Main<!--front--> Page]]
7645 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7650 Piped link with multiple pipe characters in link text
7652 [[Main Page||The|Main|Page|]]
7654 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7657 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7661 Piped link with no link text
7663 [[Thomas Bek (bishop of St David's)|]]
7665 <p>[[Thomas Bek (bishop of St David's)|]]
7668 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7672 Piped link with empty link text
7674 [[Main Page|<nowiki/>]] - empty nowiki
7675 [[Main Page| ]] - empty space
7676 [[Main Page| ]] - empty non breaking space
7678 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7679 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7680 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7683 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7684 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7685 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></a> - empty non breaking space</p>
7693 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7698 Broken link with fragment
7700 [[Zigzagzogzagzig#zug]]
7702 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7707 Special page link with fragment
7709 [[Special:Version#anchor]]
7711 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7716 Nonexistent special page link with fragment
7718 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7720 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7727 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7729 <p>xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a>, xxx<a href="/wiki/Main_Page" title="Main Page">Main Page</a>, Xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a> XXX<a href="/wiki/Main_Page" title="Main Page">main Page</a>, XXX<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7736 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7738 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>!!!
7749 T45661: Piped links with identical prefixes
7751 [[prefixed article|prefixed articles with spaces]]
7753 [[prefixed article|prefixed articlesaoeu]]
7755 [[Main Page|Main Page test]]
7757 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7758 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7759 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7765 Link with HTML entity in suffix / tail
7767 [[Main Page]]", [[Main Page]]a
7769 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7772 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&quot;","srcContent":"\""}'>"</span>, <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&#97;","srcContent":"a"}'>a</span></p>
7776 Link with 3 brackets
7787 Link with 4 brackets
7791 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7796 Piped link with 3 brackets
7798 [[[main page|the main page]]]
7800 <p>[[[main page|the main page]]]
7805 Piped link with extlink-like text
7808 [[Main Page|This is a [bar]]]
7811 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7812 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7813 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7816 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7817 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7818 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7822 Link with multiple pipes
7824 [[Main Page|The|Main|Page]]
7826 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7831 Anchor containing a #. (T65430)
7833 wgFragmentMode=[ 'html5', 'legacy' ]
7835 [[Main Page#And#Link]]
7837 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7840 <p><a rel="mw:WikiLink" href="./Main_Page#And#Link" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#And#Link"},"sa":{"href":"Main Page#And#Link"}}'>Main Page#And#Link</a></p>
7846 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7848 <p><a href="/index.php?title=Talk:Parser_testing&action=edit&redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a>
7853 Link with space in namespace
7855 [[User talk:Foo bar]]
7857 <p><a href="/index.php?title=User_talk:Foo_bar&action=edit&redlink=1" class="new" title="User talk:Foo bar (page does not exist)">User talk:Foo bar</a>
7862 MemoryAlpha:AlphaTest
7864 This is an article in the MemoryAlpha namespace
7865 (which shadows the memoryalpha interwiki link).
7869 Namespace takes precedence over interwiki link (T53680)
7871 [[MemoryAlpha:AlphaTest]]
7873 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7877 # The previous test doesn't work correctly in html2*, due to not recognizing the
7878 # link as an internal one. This one checks for the correct behavior.
7880 Link to namespace preferred over interwiki with correct rel attribute
7882 parsoid=html2wt,html2html
7884 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7886 [[MemoryAlpha:AlphaTest]]
7890 Piped link to namespace
7892 [[Meta:Disclaimers|The disclaimers]]
7894 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7901 [[Usually caused by a typo (oops}]]
7903 <p>[[Usually caused by a typo (oops}]]
7910 Just a test of an article title containing a percent.
7914 Link containing % (not as a hex sequence)
7917 [[7% Solution|7%25 Solution]]
7919 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7920 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7923 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7924 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7927 # note that the parsoid HTML is identical to the previous test output,
7928 # so the previous test ensures that the html2wt mode will generate the
7929 # "not as a hex sequence" wikitext.
7931 Link containing % as a single hex sequence interpreted to char
7933 parsoid=wt2wt,wt2html,html2html
7936 [[7%25 Solution|7%25 Solution]]
7938 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7939 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7942 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7943 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7947 Link containing % as a double hex sequence interpreted to hex sequence
7951 <p>[[7%2525 Solution]]
7955 ## Example for such a section: == < ==
7957 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7959 wgFragmentMode=[ 'html5', 'legacy' ]
7961 [[%23%3c]][[%23%3e]]
7963 <p><a href="#<">#<</a><a href="#>">#></a>
7966 <p><a rel="mw:WikiLink" href="./Main_Page#<" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#<"},"sa":{"href":"%23%3c"}}'>#<</a><a rel="mw:WikiLink" href="./Main_Page#>" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#>"},"sa":{"href":"%23%3e"}}'>#></a></p>
7969 ## Example for such a section: == < ==
7971 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7973 wgFragmentMode=[ 'legacy' ]
7975 [[%23%3c]][[%23%3e]]
7977 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7982 Link containing "<#" and ">#" as a hex sequences
7984 [[%3c%23]][[%3e%23]]
7986 <p>[[%3c%23]][[%3e%23]]
7991 Link containing an equals sign
7993 [[Special:BookSources/isbn=4-00-026157-6]]
7995 <p><a href="/wiki/Special:BookSources/isbn%3D4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a>
7998 <p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
8004 Just a test of an article title containing a tilde.
8007 # note that links containing signatures, like [[Foo~~~~]], are
8008 # massaged by the pre-save transform (PST) and so the tildes are never
8009 # seen by the parser.
8011 Link containing a tilde
8015 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8018 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8022 Link containing double-single-quotes '' (T6598)
8024 [[Lista d''e paise d''o munno]]
8026 <p><a href="/index.php?title=Lista_d%27%27e_paise_d%27%27o_munno&action=edit&redlink=1" class="new" title="Lista d''e paise d''o munno (page does not exist)">Lista d''e paise d''o munno</a>
8029 <p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno" title="Lista d''e paise d''o munno">Lista d''e paise d''o munno</a></p>
8033 Link containing double quotes and spaces
8037 <p><a href="/index.php?title=Cool_%22Gator%22&action=edit&redlink=1" class="new" title="Cool "Gator" (page does not exist)">Cool "Gator"</a>
8040 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8044 File containing double quotes and spaces
8046 [[File:Cool "Gator".png]]
8048 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Cool_%22Gator%22.png" data-parsoid='{"a":{"href":"./File:Cool_%22Gator%22.png"},"sa":{"href":"File:Cool \"Gator\".png"}}'><img resource='./File:Cool_"Gator".png' src="./Special:FilePath/Cool_%22Gator%22.png" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Cool_\"Gator\".png","height":"220","width":"220","src":"./Special:FilePath/Cool_%22Gator%22.png"},"sa":{"resource":"File:Cool \"Gator\".png","src":"./Special:FilePath/Cool_\"Gator\".png"}}'/></a></figure-inline></p>
8052 Redirect containing double quotes and spaces
8054 #REDIRECT [[Cool "Gator"]]
8056 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8060 Link containing double-single-quotes '' in text (T6598 sanity check)
8062 Some [[Link|pretty ''italics'' and stuff]]!
8064 <p>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!
8067 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8071 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8073 ''Some [[Link|pretty ''italics'' and stuff]]!''
8075 <p><i>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!</i>
8080 Link with double quotes in title part (literal) and alternate part (interpreted)
8082 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8086 [[''Pentecoste''|Pentecoste]]
8088 [[''Pentecoste''|''Pentecoste'']]
8090 <p><a href="/index.php?title=Special:Upload&wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko ''Pentecoste''.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a>
8091 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a>
8092 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a>
8093 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)"><i>Pentecoste</i></a>
8096 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Denys_Savchenko_''Pentecoste''.jpg"><img resource="./File:Denys_Savchenko_''Pentecoste''.jpg" src="./Special:FilePath/Denys_Savchenko_''Pentecoste''.jpg" height="220" width="220"/></a></figure-inline></p>
8097 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8098 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8099 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8103 Broken image links with HTML captions (T41700)
8105 [[File:Nonexistent|<script></script>]]
8106 [[File:Nonexistent|100x100px|<script></script>]]
8107 [[File:Nonexistent|<]]
8108 [[File:Nonexistent|a<i>b</i>c]]
8110 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8111 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8112 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8113 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8116 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8117 <figure-inline typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"100","width":"100"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8118 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[107,111,null,null]}'>&lt;</span>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8119 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"a<i data-parsoid='{\"stx\":\"html\",\"dsr\":[134,142,3,4]}'>b</i>c"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline></p>
8125 [[http://www.example.com]]
8127 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8130 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8134 Plain link to URL with link text
8136 [[http://www.example.com Link text]]
8138 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8143 Plain link to protocol-relative URL
8145 [[//www.example.com]]
8147 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8150 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8154 Plain link to protocol-relative URL with link text
8156 [[//www.example.com Link text]]
8158 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8163 Plain link to page with question mark in title
8169 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8170 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8174 # I'm fairly sure the expected result here is wrong.
8175 # We want these to be URL links, not pseudo-pages with URLs for titles....
8176 # However the current output is also pretty screwy.
8179 # I'm changing it to match the current output--it arguably makes more
8180 # sense in the light of the test above. Old expected result was:
8181 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8183 # But I think this test is bordering on "garbage in, garbage out" anyway.
8188 Piped link to URL: [[http://www.example.com|an example URL]]
8190 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8193 <p>Piped link to URL: [<a rel="mw:ExtLink" class="external text" href="http://www.example.com%7Can" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
8197 Plain link in template argument
8201 {{echo|[http://www.example.com |123]}}
8203 {{echo|[[http://www.example.com |123]]}}
8205 {{echo|[[http://www.example.com |123]}}
8207 {{echo|[http://www.example.com |123]]}}
8209 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8210 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8211 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8212 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8215 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8217 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[http://www.example.com |123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external text" href="http://www.example.com">|123</a>]</p>
8219 <p>{{echo|[<a rel="mw:ExtLink" class="external text" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
8221 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8225 T2002: [[page|http://url/]] should link to page, not http://url/
8227 [[Main Page|http://url/]]
8229 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8232 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8235 # Parsoid does not mark self-links, by design.
8237 T2337: Escaped self-links should be bold
8241 [[Bug462]] [[Bug462]]
8243 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8246 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8250 Self-link to section should not be bold
8254 [[Main Page#section]]
8256 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8267 Self-link to numeric title
8273 <p><a class="mw-selflink selflink">0</a>
8278 Link to numeric-equivalent title
8284 <p><a href="/wiki/00" title="00">00</a>
8289 <nowiki> inside a link
8291 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8293 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8298 Non-breaking spaces in title
8300 [[ Main Page ]]
8302 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8306 # Add new article for the test below so that it doesn't red-link
8314 Multiple spaces in titles should normalize to a single underscore
8316 parsoid=wt2html,wt2wt
8322 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8323 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8324 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8327 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8328 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8329 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8334 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8340 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8345 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8351 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8356 Internal link with en linktrail: no apostrophes (T29473)
8362 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8367 Internal link with ca linktrail with apostrophes (T29473)
8373 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8378 Internal link with kaa linktrail with apostrophes (T29473)
8384 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8389 Link with multiple ":" in a subpage-supporting namespace (T65636)
8391 [[User:Foo/Test/63636:Bar|Test]]
8393 <p><a href="/index.php?title=User:Foo/Test/63636:Bar&action=edit&redlink=1" class="new" title="User:Foo/Test/63636:Bar (page does not exist)">Test</a>
8396 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8399 ## Mainly a sanity check for Parsoid
8401 Handle title parsing for subpages
8421 Link to a subpage from a namespace other than main
8428 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8431 <p><a rel="mw:WikiLink" href="./User:Test/123" title="User:Test/123" data-parsoid='{"stx":"simple","a":{"href":"./User:Test/123"},"sa":{"href":"/123"}}'>/123</a></p>
8435 Ensure that transclusion titles are not url-decoded
8437 subpage title=[[Test]]
8440 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8442 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8445 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8449 Purely hash wikilink
8451 title=[[User:Test/123]]
8456 <p><a href="#a">b</a>
8459 <p><a rel="mw:WikiLink" href="./User:Test/123#a" data-parsoid='{"stx":"piped","a":{"href":"./User:Test/123#a"},"sa":{"href":"#a"}}'>b</a></p>
8463 Serialization of purely hash wikilink
8465 title=[[User:Test/123]]
8469 <p><a href="#a">[[</a></p>
8471 [[#a|<nowiki>[[</nowiki>]]
8473 <p><a href="#a">[[</a>
8478 1. Interaction of linktrail and template encapsulation
8482 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo]]"}},"i":0}},"l"]}'>Fool</a></p>
8486 2. Interaction of linktrail and template encapsulation
8490 {{echo|Some [[Fool]]}}s
8492 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]"}},"i":0}},"s"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some </span><a rel="mw:WikiLink" href="./Fool" title="Fool" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a></p>
8496 3. Interaction of linktrail and template encapsulation
8500 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8502 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]s are '''bold and foolish'''"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some <a rel="mw:WikiLink" href="./Fool" title="Fool" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a> are <b>bold and foolish</b></p>
8512 Internal link with is link prefix
8516 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8518 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8529 Internal link with is link trail and link prefix
8533 [[mótmælendatrú|xxx]]ar
8535 mótmælenda[[söfnuður]]
8536 mótmælenda[[söfnuður|söfnuðir]]
8537 mótmælenda[[söfnuður|söfnuðir]]xxx
8539 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8540 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8541 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8542 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8543 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8548 Parsoid link trail escaping
8550 parsoid=html2wt,html2html
8552 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8558 Parsoid link prefix escaping
8561 parsoid=html2wt,html2html
8563 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8565 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8569 Parsoid link bracket escaping
8571 parsoid=html2wt,html2html
8573 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8574 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8575 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8576 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8577 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8578 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8586 [[[<nowiki/>[[Test]]]]]
8590 [[[[[<nowiki/>[[Test]]]]]]]
8594 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8602 [http://wp.org ''foo'']
8604 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8605 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8606 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8607 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8612 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8614 [[Foo|{{echo|a}} b {{echo|c}}]]
8616 <p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span> b <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c"}},"i":0}}]}'>c</span></a></p>
8620 Link with angle bracket after anchor
8622 wgFragmentMode=[ 'html5', 'legacy' ]
8626 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8629 <p><a rel="mw:WikiLink" href="./Foo#<bar>" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#<bar>"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
8633 Link with angle bracket after anchor (legacy)
8635 wgFragmentMode=[ 'legacy' ]
8639 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8644 ### Interwiki links (see maintenance/interwiki.sql)
8648 Inline interwiki link
8650 parsoid=wt2html,wt2wt,html2html
8652 [[MeatBall:SoftSecurity]]
8654 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8657 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8661 Inline interwiki link with empty title (T4372)
8663 parsoid=wt2html,wt2wt,html2html
8667 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8670 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8673 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8675 Interwiki link encoding conversion (T3636)
8677 parsoid=wt2html,wt2wt
8679 *[[Wikipedia:ro:Olteniţa]]
8680 *[[Wikipedia:ro:Olteniţa]]
8682 <ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8683 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li></ul>
8687 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8688 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8692 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8693 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8698 Interwiki link with fragment (T4130)
8700 [[MeatBall:SoftSecurity#foo]]
8702 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8707 Link scenarios with escaped fragments
8709 wgFragmentMode=[ 'html5', 'legacy' ]
8712 [[Foo#Is this great?]]
8713 [[meatball:Foo#Is this great?]]
8715 <p><a href="#Is_this_great?">#Is this great?</a>
8716 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8717 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8720 <p><a rel="mw:WikiLink" href="./Main_Page#Is_this_great?" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Is_this_great?"},"sa":{"href":"#Is this great?"}}'>#Is this great?</a>
8721 <a rel="mw:WikiLink" href="./Foo#Is_this_great?" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#Is_this_great?"},"sa":{"href":"Foo#Is this great?"}}'>Foo#Is this great?</a>
8722 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
8726 Link scenarios with escaped fragments (legacy)
8728 wgFragmentMode=[ 'legacy' ]
8731 [[Foo#Is this great?]]
8732 [[meatball:Foo#Is this great?]]
8734 <p><a href="#Is_this_great.3F">#Is this great?</a>
8735 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8736 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8740 # Ideally the wikipedia: prefix here should be proto-relative too
8741 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8742 # define the 'en' prefix, and originally the test used 'wikipedia',
8743 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8746 Different interwiki prefixes mapping to the same URL
8754 [[:wikipedia:Foo|Foo]]
8756 [[wikipedia:en:Foo]]
8758 [[:wikipedia:en:Foo]]
8762 <p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">en:Foo</a></p>
8764 <p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">Foo</a></p>
8766 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">wikipedia:Foo</a></p>
8768 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">Foo</a></p>
8770 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8772 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8774 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":" wikiPEdia :Foo"},"isIW":true}' title="wikipedia:Foo"> wikiPEdia :Foo</a></p>
8778 Interwiki links that cannot be represented in wiki syntax
8781 [[meatball:ok#foo|ok with fragment]]
8782 [[meatball:ok_as_well?|ok ending with ? mark]]
8783 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8784 [http://de.wikipedia.org/wiki/#foo is just fragment]
8787 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8788 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8789 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" class="extiw" title="meatball:ok as well?">ok ending with ? mark</a>
8790 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8791 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8794 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8795 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8796 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
8797 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8798 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8802 Interwiki links: trail
8804 [[wikipedia:Foo|Ba]]r
8806 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8809 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}' title="wikipedia:Foo">Bar</a></p>
8813 Local interwiki link
8815 parsoid=wt2html,wt2wt,html2html
8817 [[local:Template:Foo]]
8819 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8822 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8825 # Parsoid does not mark self-links, by design.
8827 Local interwiki link: self-link to current page
8830 parsoid=wt2html,wt2wt,html2html
8834 <p><a class="mw-selflink selflink">local:Main Page</a>
8837 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8841 Local interwiki link: prefix only (T66167)
8843 parsoid=wt2html,wt2wt,html2html
8847 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8850 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8854 Local interwiki link: with additional interwiki prefix (T63357)
8856 parsoid=wt2html,wt2wt,html2html
8858 [[local:meatball:Hello]]
8860 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8863 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8867 Multiple local interwiki link prefixes
8869 [[local:local:local:local:mi:local:Foo]]
8871 parsoid=wt2html,wt2wt,html2html
8873 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8876 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8880 ### Interlanguage links
8881 ### Language links (so that searching for '### language' matches..)
8893 <p>Blah blah blah</p>
8894 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8897 ## parsoid html2wt will lose the space variations
8899 Interlanguage link with spacing
8901 parsoid=wt2html,wt2wt,html2html
8909 <p>Blah blah blah</p>
8910 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8914 Double interlanguage link
8923 <p>Blah blah blah</p>
8924 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8925 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8928 ## parsoid html2wt will lose the space variations
8930 Interlanguage link variations
8932 parsoid=wt2html,wt2wt,html2html
8942 <p>Blah blah blah</p>
8943 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8944 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8945 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8949 Escaping of interlanguage links (T129218, T156308)
8953 [[ : zh : Chinese ]]
8956 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8957 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8961 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8962 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8966 Multiple colons escaping interlanguage links
8974 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8979 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8981 [[:::es:Spanish]]</p>
8984 ## parsoid html2wt will normalize the space to _
8986 Space and question mark encoding in interlanguage links (T95473)
8988 parsoid=wt2html,wt2wt,html2html
8996 <p>Blah blah blah</p>
8997 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9001 Interlanguage link, with prefix links
9011 <p>Blah blah blah</p>
9012 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9016 Double interlanguage link, with prefix links (T10897)
9027 <p>Blah blah blah</p>
9028 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9029 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9033 "Extra" interlanguage links (T34189 / gerrit 111390)
9041 <p>Blah blah blah</p>
9042 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9045 ## PHP parser tests script needs an update
9046 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9048 Language links render as inline links if $wgInterwikiMagic=false
9050 wgInterwikiMagic=false
9051 parsoid=wt2html,wt2wt,html2html
9056 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9059 ## PHP parser tests script needs an update
9060 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9062 Language links render as inline links in the Talk namespace
9065 parsoid=wt2html,wt2wt,html2html
9070 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9074 Parsoid-specific test: Wikilinks with should RT properly
9080 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9085 Parsoid T55221: Wikilinks should be properly entity-escaped
9087 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9089 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9090 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9092 He&nbsp;llo [[Foo|He&nbsp;llo]]
9094 He&nbsp;llo He&nbsp;llo
9096 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9097 </p><p>He&nbsp;llo He&nbsp;llo
9101 # html2wt will fail because of title normalization without data-parsoid
9103 Parsoid: handle constructor well
9105 parsoid=wt2html,wt2wt
9111 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9112 </p><p><a href="/index.php?title=Constructor:foo&action=edit&redlink=1" class="new" title="Constructor:foo (page does not exist)">constructor:foo</a>
9115 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9117 <p><a rel="mw:WikiLink" href="./Constructor:foo" title="Constructor:foo" data-parsoid='{"stx":"simple","a":{"href":"./Constructor:foo"},"sa":{"href":"constructor:foo"}}'>constructor:foo</a></p>
9121 Template parameter named "constructor"
9123 {{echo| constructor = |hi}}
9125 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"constructor","named":true,"spc":[" "," ",""," "]},{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"},"constructor":{"wt":""}},"i":0}}]}'>hi</p>
9134 # Note that `ko` isn't a known interlanguage prefix
9136 Parsoid: recognize interlanguage links without a target page
9146 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9148 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9151 # Note that `ko` isn't a known interwiki prefix
9153 Parsoid: recognize interwiki links without a target page
9155 parsoid=wt2html,wt2wt,html2html
9161 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9162 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9165 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9166 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9170 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9174 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9177 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9181 Interlanguage link with preceding local interwiki link (T70085)
9183 parsoid=wt2html,wt2wt,html2html
9186 [[local:es:Spanish]]
9189 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9193 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9197 Looks like an interlanguage link, but is actually a local interwiki
9199 parsoid=wt2html,wt2wt,html2html
9205 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9209 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9213 ### Redirects, Parsoid-only
9217 1. Simple redirect to page
9219 #REDIRECT [[Main Page]]
9221 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9225 2. Other redirect variants
9227 #REDIRECT [[Main_Page]]
9229 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9232 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9233 # This tests the Parsoid bail-out code.
9235 3. Other redirect variants
9239 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9241 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9245 4. Redirect to a templated destination
9247 #REDIRECT [[{{echo|Foo}}bar]]
9249 <link about="#mwt2" typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-parsoid='{"a":{"href":"./Foobar"},"sa":{"href":"{{echo|Foo}}bar"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,24,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span>bar"}]]}'/>
9255 parsoid=wt2html,wt2wt
9260 <li>REDIRECT [[]]</li></ol>
9264 Optional colon in #REDIRECT
9266 # the colon is archaic syntax. we support it for wt2html, but we
9267 # don't care that it roundtrips back to the modern syntax.
9268 parsoid=wt2html,html2html
9270 #REDIRECT:[[Main Page]]
9272 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9276 Whitespace in #REDIRECT with optional colon
9278 # the colon and gratuitous whitespace is archaic syntax. we support
9279 # it for wt2html, but we don't care that it roundtrips back to the
9280 # modern syntax (without extra whitespace)
9281 parsoid=wt2html,html2html
9288 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9292 Piped link in #REDIRECT
9294 # content after piped link is ignored. we support this syntax,
9295 # but don't care that the piped link is lost when we roundtrip this.
9298 #REDIRECT [[Main Page|bar]]
9300 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9304 Redirect to category (T104502)
9306 parsoid=wt2html,wt2wt
9308 #REDIRECT [[Category:Foo]]
9310 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9314 Redirect to category with URL encoding (T104502)
9318 #REDIRECT [[Category%3AFoo]]
9320 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9324 Redirect to category page
9326 #REDIRECT [[:Category:Foo]]
9328 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9332 Redirect to image page (1)
9334 #REDIRECT [[File:Wiki.png]]
9336 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9340 Redirect to image page (2)
9342 #REDIRECT [[Image:Wiki.png]]
9344 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9347 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9348 # Next test confirms this.
9350 Redirect to language (1) (T104918)
9352 parsoid=wt2html,wt2wt,html2html
9354 #REDIRECT [[en:File:Wiki.png]]
9356 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9360 Redirect to language (2) (T104918)
9362 #REDIRECT [[:en:File:Wiki.png]]
9364 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9368 Redirect to interwiki (T104918)
9370 #REDIRECT [[meatball:File:Wiki.png]]
9372 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9376 Non-English #REDIRECT
9380 #TILVÍSUN [[Main Page]]
9382 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9386 Redirect syntax under text isn't considered a redirect
9390 #redirect [[Main Page]]
9393 <ol data-parsoid='{}'><li data-parsoid='{}'>redirect <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'>Main Page</a></li></ol>
9401 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9408 Redirect followed by block on the same line
9412 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9414 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9418 Redirect followed by a newline
9420 #REDIRECT [[Main Page]]
9423 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9428 Redirect followed by multiple newlines
9430 #REDIRECT [[Main Page]]
9435 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9442 Drop duplicate redirects
9446 <link rel="mw:PageProp/redirect" href="./Foo"/>
9447 <link rel="mw:PageProp/redirect" href="./Bar"/>
9448 <link rel="mw:PageProp/redirect" href="./Baz"/>
9467 Broken br tag sanitization
9475 # TODO: Fix html2html mode (T53055)!
9477 Parsoid: Broken br tag recognition
9491 Incorrecly removing closing slashes from correctly formed XHTML
9493 <br style="clear:both;" />
9495 <p><br style="clear:both;" />
9500 Failing to transform badly formed HTML into correct XHTML
9502 <br style="clear: left;">
9503 <br style="clear: right;">
9504 <br style="clear: both;">
9506 <p><br style="clear: left;" />
9507 <br style="clear: right;" />
9508 <br style="clear: both;" />
9512 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9513 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9515 Handling html with a div self-closing tag
9524 <p><div title />
9528 <p><div title=bar />
9529 <div title=bar/>
9531 <div title="bar/"></div>
9535 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9536 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9537 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9538 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9539 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9540 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9544 Handling html with a br self-closing tag
9571 Horizontal ruler (should it add that extra space?)
9580 foo </p><hr /><p> bar
9585 Horizontal ruler -- 4+ dashes render hr
9594 Horizontal ruler -- eats additional dashes on the same line
9603 Horizontal ruler -- does not collapse dashes on consecutive lines
9614 Horizontal ruler -- <4 dashes render as plain text
9623 Horizontal ruler -- Supports content following dashes on same line
9635 ### Block-level elements
9644 <ul><li>Common list</li>
9646 <li>item 3</li></ul>
9657 <ol><li>Numbered list</li>
9659 <li>item 3</li></ol>
9663 # the switch from level 3 to ordered should not introduce a newline between
9674 ***#Number on level 4
9676 **#Number on level 3
9677 **#Number on level 3
9681 #**Level 3, but ordered
9684 <ol><li>with numbers</li></ol>
9685 <ul><li>and bullets</li></ul>
9686 <ol><li>and numbers</li></ol></li>
9688 <ul><li>bullet level 2
9689 <ul><li>bullet level 3
9690 <ol><li>Number on level 4</li></ol></li></ul></li>
9692 <ol><li>Number on level 3</li>
9693 <li>Number on level 3</li></ol></li></ul>
9694 <ol><li>number level 2</li></ol></li>
9696 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9697 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9702 1. Nested mixed wikitext and html list
9705 *<ul><li>ho</li></ul>
9710 <li><ul><li>ho</li></ul></li>
9712 <ul><li>ho</li></ul></li></ul>
9716 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9718 <ul><li>ho</li></ul></li></ul>
9722 2. Nested mixed wikitext and html list (incompatible)
9725 :{{echo|<li>ho</li>}}
9728 <dd><li>ho</li></dd></dl>
9732 <dd><li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>ho</li>"}},"i":0}}]}'>ho</li></dd></dl>
9742 <ul><li>bar</li></ul></li></ul>
9752 <ul><li><ul><li>foo</li></ul></li>
9758 Nested lists 3 (first element empty)
9764 <ul><li>bar</li></ul></li></ul>
9769 Nested lists 4 (first element empty)
9774 <ul><li><ul><li></li></ul></li>
9780 Nested lists 5 (both elements empty)
9785 <ul><li><ul><li></li></ul></li>
9791 Nested lists 6 (both elements empty)
9797 <ul><li></li></ul></li></ul>
9802 Nested lists 7 (skip initial nesting levels)
9806 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9811 Nested lists 8 (multiple nesting transitions)
9819 <ul><li><ul><li>bar</li></ul></li>
9820 <li>baz</li></ul></li>
9826 Nested lists 9 (extension interaction)
9832 <ul><li data-parsoid='{}'><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9836 1. Lists with start-of-line-transparent tokens before bullets: Comments
9849 Nested lists 10 (list and span siblings: wt2wt regression)
9854 <ul><li>a <span>x</span>
9855 <ul><li>b <span>y</span></li></ul></li></ul>
9859 2. Lists with start-of-line-transparent tokens before bullets: Template close
9864 <ul><li>foo bar</li>
9870 List items are not parsed correctly following a <pre> block (T2785)
9876 <ul><li><pre>foo</pre></li>
9877 <li><pre>bar</pre></li>
9881 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9882 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9886 # FIXME: Might benefit from a html/parsoid since this has a template
9888 List items from template
9899 *notSOL{{inner list}}
9903 <li>item 2</li></ul>
9906 <li>item 2</li></ul>
9910 <li>item 2</li></ul>
9915 List interrupted by empty line or heading
9923 <ul><li>foo</li></ul>
9924 <ul><li><ul><li>bar</li></ul></li></ul>
9925 <h2><span class="mw-headline" id="A_heading">A heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
9926 <ul><li>Another list item</li></ul>
9931 Multiple list tags generated by templates
9949 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[0,44,null,null],"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"a\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":1}},"b\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":2}},"c"]}'>a
9950 </li><li about="#mwt1">b
9951 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9955 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9958 <!--This line will NOT split the list-->
9960 <!--This line will NOT split the list either-->
9962 <!--foo--> <!----> <!--This line NOT split the list either-->
9973 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9976 <!--This line will NOT split the list-->
9978 <!--This line will NOT split the list either-->
9980 <!--foo--> <!----> <!--This line NOT split the list
9991 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
9992 # That pass could possibly be removed.
9994 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
9996 parsoid=wt2html,wt2wt
10000 *{{echo|<li>templated li-hack}}
10001 *<!--foo--><li> unsupported li-hack with preceding comments
10004 <li><li>not a li-hack
10009 <li class="mw-empty-elt"></li><li>li-hack</li>
10010 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10011 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10013 <li class="mw-empty-elt"></li><li>not a li-hack
10018 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10019 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["*",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>templated li-hack"}},"i":0}}]}'>templated li-hack</li>
10020 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10022 <ul data-parsoid='{"stx":"html"}'>
10023 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10030 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10059 Parsoid: Test of whitespace serialization with Templated bullets
10066 <li class="mw-empty-elt"> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
10070 # ------------------------------------------------------------------------
10071 # The next set of tests are about Parsoid's ability to handle badly nested
10072 # tags (parse, minimize scope of fixup, and roundtrip back)
10073 # ------------------------------------------------------------------------
10075 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10076 # Parsoid's list handling is more aware of block structure.
10078 Unbalanced closing block tags break a list
10085 <ul><li>a</li></ul></div><div>
10097 Unbalanced closing non-block tags don't break a list
10105 <ul><li>a<span></span></li>
10110 <li>a<span></span></li>
10116 # Parsoid does some post-dom-building cleanup
10117 # which is why its output differs from Remex.
10119 Unclosed formatting tags that straddle lists are closed and reopened
10121 parsoid=wt2html,wt2wt,html2html
10126 <ol><li><s> a</s></li><s>
10127 </s><li><s>b </s></li></ol>
10129 <ol><li><s> a</s></li>
10130 <li><s>b </s></li></ol>
10133 # Output is ugly because of all the misnested tag fixups.
10134 # Remex is wrapping p-tags around empty elements.
10135 # Parsoid has special-case handling of this pattern of
10136 # wrapping lists in formatting tags.
10137 # FIXME: Should we remove this code from Parsoid? Or add
10138 # special support in Remex? If the latter, maybe just wait
10139 # for Parsoid to become the default parser.
10142 1. List embedded in a formatting tag
10149 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10159 # Output is ugly because of all the misnested tag fixups
10160 # Remex is wrapping p-tags around empty elements.
10161 # Parsoid has code that strips useless p-tags.
10163 2. List embedded in a formatting tag in a misnested way
10170 </small></p><small></small><ul><small><li>a</li>
10171 </small><li><small>b</small></li></ul>
10177 <li><small>b</small></li>
10185 # Note that the current date is hard-coded as
10186 # 1970-01-01T00:02:03Z (a Thursday)
10187 # when running parser tests. The timezone is also fixed to GMT, so
10188 # local date will be identical to current date.
10191 Magic Word: {{CURRENTDAY}}
10200 Magic Word: {{CURRENTDAY2}}
10209 Magic Word: {{CURRENTDAYNAME}}
10218 Magic Word: {{CURRENTDOW}}
10227 Magic Word: {{CURRENTMONTH}}
10236 Magic Word: {{CURRENTMONTH1}}
10245 Magic Word: {{CURRENTMONTHABBREV}}
10247 {{CURRENTMONTHABBREV}}
10254 Magic Word: {{CURRENTMONTHNAME}}
10256 {{CURRENTMONTHNAME}}
10263 Magic Word: {{CURRENTMONTHNAMEGEN}}
10265 {{CURRENTMONTHNAMEGEN}}
10272 Magic Word: {{CURRENTTIME}}
10281 Magic Word: {{CURRENTHOUR}}
10290 Magic Word: {{CURRENTWEEK}} (T6594)
10299 Magic Word: {{CURRENTYEAR}}
10308 Magic Word: {{CURRENTTIMESTAMP}}
10310 {{CURRENTTIMESTAMP}}
10317 Magic Words LOCAL (UTC)
10321 *{{LOCALMONTHNAME}}
10322 *{{LOCALMONTHNAMEGEN}}
10323 *{{LOCALMONTHABBREV}}
10332 *{{LOCALTIMESTAMP}}
10347 <li>19700101000203</li></ul>
10352 Magic Word: {{FULLPAGENAME}}
10354 title=[[User:Ævar Arnfjörð Bjarmason]]
10355 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10359 <p>User:Ævar Arnfjörð Bjarmason
10364 Magic Word: {{FULLPAGENAMEE}}
10366 title=[[User:Ævar Arnfjörð Bjarmason]]
10367 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10371 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10376 Magic Word: {{TALKSPACE}}
10378 title=[[User:Ævar Arnfjörð Bjarmason]]
10379 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10388 Magic Word: {{TALKSPACE}}, same namespace
10390 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10391 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10400 Magic Word: {{TALKSPACE}}, main namespace
10402 title=[[Parser Test]]
10403 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10412 Magic Word: {{TALKSPACEE}}
10414 title=[[User:Ævar Arnfjörð Bjarmason]]
10415 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10424 Magic Word: {{SUBJECTSPACE}}
10426 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10427 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10436 Magic Word: {{SUBJECTSPACE}}, same namespace
10438 title=[[User:Ævar Arnfjörð Bjarmason]]
10439 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10448 Magic Word: {{SUBJECTSPACE}}, main namespace
10450 title=[[Parser Test]]
10451 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10459 Magic Word: {{SUBJECTSPACEE}}
10461 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10462 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10471 Magic Word: {{NAMESPACE}}
10473 title=[[User:Ævar Arnfjörð Bjarmason]]
10474 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10483 Magic Word: {{NAMESPACEE}}
10485 title=[[User:Ævar Arnfjörð Bjarmason]]
10486 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10495 Magic Word: {{NAMESPACENUMBER}}
10497 title=[[User:Ævar Arnfjörð Bjarmason]]
10498 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10500 {{NAMESPACENUMBER}}
10507 Magic Word: {{SUBPAGENAME}}
10509 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10510 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10519 Magic Word: {{SUBPAGENAMEE}}
10521 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10522 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10531 Magic Word: {{ROOTPAGENAME}}
10533 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10534 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10538 <p>Ævar Arnfjörð Bjarmason
10543 Magic Word: {{ROOTPAGENAMEE}}
10545 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10546 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10550 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10555 Magic Word: {{BASEPAGENAME}}
10557 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10558 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10562 <p>Ævar Arnfjörð Bjarmason
10567 Magic Word: {{BASEPAGENAMEE}}
10569 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10570 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10574 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10579 Magic Word: {{TALKPAGENAME}}
10581 title=[[User:Ævar Arnfjörð Bjarmason]]
10582 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10586 <p>User talk:Ævar Arnfjörð Bjarmason
10591 Magic Word: {{TALKPAGENAMEE}}
10593 title=[[User:Ævar Arnfjörð Bjarmason]]
10594 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10598 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10603 Magic Word: {{SUBJECTPAGENAME}}
10605 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10606 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10608 {{SUBJECTPAGENAME}}
10610 <p>User:Ævar Arnfjörð Bjarmason
10615 Magic Word: {{SUBJECTPAGENAMEE}}
10617 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10618 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10620 {{SUBJECTPAGENAMEE}}
10622 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10627 Magic Word: {{NUMBEROFFILES}}
10629 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10638 Magic Word: {{PAGENAME}}
10640 title=[[User:Ævar Arnfjörð Bjarmason]]
10641 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10645 <p>Ævar Arnfjörð Bjarmason
10650 Magic Word: {{PAGENAME}} with metacharacters
10652 title=[['foo & bar = baz']]
10653 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10657 <p><i>'foo & bar = baz'</i>
10662 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10664 title=[[*RFC 1234 http://example.com/]]
10665 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10669 <p>*RFC 1234 http://example.com/
10674 Magic Word: {{PAGENAMEE}}
10676 title=[[User:Ævar Arnfjörð Bjarmason]]
10677 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10681 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10686 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10688 title=[[*RFC 1234 http://example.com/]]
10689 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10693 <p>*RFC_1234_http://example.com/
10698 Magic Word: {{REVISIONID}}
10700 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10707 flags=vary-revision-id
10711 Magic Word: {{SCRIPTPATH}}
10713 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10721 Magic Word: {{STYLEPATH}}
10723 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10732 Magic Word: {{SERVER}}
10734 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10738 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10743 Magic Word: {{SERVERNAME}}
10745 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10754 Magic Word: {{SITENAME}}
10756 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10765 Magic Word: {{PAGELANGUAGE}}
10768 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10777 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10779 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10788 Case-sensitive magic words, when cased differently, should just be template transclusions
10795 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10796 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10797 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10798 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10803 Case-insensitive magic words should still work with weird casing.
10813 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10817 # From plwiki:PLOS_ONE
10819 Parsoid: Page property magic word with magic word contents
10821 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10823 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"DISPLAYTITLE:<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Main Page</span></i>"}]]}'/>
10826 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10827 # But, this is a limitation of our representation and is documented in
10828 # TemplateHandler.js in processSpecialMagicWord
10830 Parsoid: Template-generated DISPLAYTITLE
10832 {{{{echo|DISPLAYTITLE}}:Foo}}
10836 wgAllowDisplayTitle=true
10837 wgRestrictDisplayTitle=false
10842 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:ExpandedAttrs" data-parsoid='{"pi":[[]]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DISPLAYTITLE\"}},\"i\":0}}]}'>DISPLAYTITLE</span>:Foo"}]]}'/>
10846 Namespace 1 {{ns:1}}
10855 Namespace 1 {{ns:01}}
10864 Namespace 0 {{ns:0}} (T6783)
10872 Namespace 0 {{ns:00}} (T6783)
10880 Namespace -1 {{ns:-1}}
10889 Namespace User {{ns:User}}
10898 Namespace User talk {{ns:User_talk}}
10907 Namespace User talk {{ns:uSeR tAlK}}
10916 Namespace File {{ns:File}}
10925 Namespace File {{ns:Image}}
10934 Namespace (lang=de) Benutzer {{ns:User}}
10945 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10951 <p>Benutzer Diskussion
10958 {{urlencode:hi world?!}}
10959 {{urlencode:hi world?!|WIKI}}
10960 {{urlencode:hi world?!|PATH}}
10961 {{urlencode:hi world?!|QUERY}}
10971 Magic Word: prioritize type info over data-parsoid
10975 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10981 Magic Word: serialize on separate line (parsoid)
10983 parsoid=wt2wt,html2wt
10989 foo<meta property="mw:PageProp/notoc"/>bar
10993 Magic Word: rt non-english wikis
11000 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11004 __proto__ is treated as normal wikitext (T105997)
11016 Magic links: internal link to RFC (T2479)
11020 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11023 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11027 Magic links: RFC (T2479)
11031 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11034 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11038 Magic links: RFC (T67278)
11040 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11042 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
11045 <p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
11049 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11051 RFC      822
11055 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11060 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 822</a>
11066 Magic links: ISBN (T3937)
11070 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11073 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11077 Magic links: ISBN (T67278)
11079 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11081 <p>This is <a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11084 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
11088 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11090 ISBN      978 0 316 09811 3
11096 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11103 <p><a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 978<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>0<span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>316<span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span>09811<span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>3</a>
11111 Magic links: PMID incorrectly converts space to underscore
11115 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11118 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11122 Magic links: PMID (T67278)
11124 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11126 <p>This is <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.
11129 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
11133 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11135 PMID      1234
11139 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11144 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 1234</a>
11149 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11150 # since these are ExtLinkText, not MagicLinkText
11152 Magic links: use appropriate serialization for "almost" magic links.
11154 X[[Special:BookSources/0978739256|foo]]
11156 X[https://tools.ietf.org/html/rfc1234 foo]
11158 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11159 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11162 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11163 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11167 Magic links: All disabled (T47942)
11169 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11175 <p>ISBN 0-306-40615-2
11186 Nonexistent template
11188 {{thistemplatedoesnotexist}}
11190 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11195 Template with invalid target containing tags
11197 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11199 <p>{{a<b>b</b>|foo|a=b|a = b}}
11204 Template with invalid target containing unclosed tag
11206 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11208 <p>{{a<b>|foo|a=b|a = b}}</b>
11213 Template with invalid target containing wikilink
11217 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11220 <p><span typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"[[Main Page]]"},"params":{},"i":0}}]}'>{{</span><a rel="mw:WikiLink" href="./Main_Page" about="#mwt1">Main Page</a><span about="#mwt1">}}</span></p>
11224 Template with just whitespace in it, T70421
11228 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</p>
11234 This is a test template
11242 <p>This is a test template
11247 Template with explicit namespace
11251 <p>This is a test template
11259 This is a test template with parameter {{{param}}}
11265 {{paramtest|param=foo}}
11267 <p>This is a test template with parameter foo
11272 Template:paramtestnum
11274 [[{{{1}}}|{{{2}}}]]
11278 Template unnamed parameter
11280 {{paramtestnum|Main Page|the main page}}
11282 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11287 Template:templatesimple
11293 Template:templateredirect
11295 #redirect [[Template:templatesimple]]
11299 Template:templateasargtestnum
11305 Template:templateasargtest
11307 {{template{{{templ}}}}}
11311 Template:templateasargtest2
11317 Template with template name as unnamed argument
11319 {{templateasargtestnum|templatesimple}}
11326 Template with template name as argument
11328 {{templateasargtest|templ=simple}}
11335 Template with template name as argument (2)
11337 {{templateasargtest2|templ=templatesimple}}
11344 Template:templateasargtestdefault
11346 {{{{{templ|templatesimple}}}}}
11356 Template with default value
11358 {{templateasargtestdefault}}
11365 Template with default value (value set)
11367 {{templateasargtestdefault|templ=templa}}
11376 {{templateredirect}}
11381 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11385 Template with argument in separate line
11387 {{ templateasargtest |
11395 Template with complex template as argument
11398 param ={{ templateasargtest |
11399 templ = simple }}}}
11401 <p>This is a test template with parameter (test)
11406 Templates with templated name
11408 {{{{echo|echo}}|foo}}
11409 {{{{echo|inner list}} }}
11413 <ul><li>item 1</li></ul>
11416 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|echo}}","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
11417 <ul about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|inner list}} ","href":"./Template:Inner_list"},"params":{},"i":0}}]}'><li>item 1</li></ul>
11420 ## Regression test; the output here isn't really that interesting.
11422 Templates with templated name and top level template args
11424 {{1{{2{{{3}}}|4=5}}}}
11426 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1{{2{{{3}}}|4=5}}"},"params":{},"i":0}}]}'>{{1{{2{{{3}}}|4=5}}}}</p>
11429 # Parsoid markup is deliberate "broken". This is an edge case.
11430 # See long comment in TemplateHandler.js:convertAttribsToString.
11432 Templates with invalid templated targets
11443 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11448 Template with thumb image (with link in description)
11450 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11452 This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
11455 <p>This is a test template with parameter </p><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
11457 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"paramtest","href":"./Template:Paramtest"},"params":{"param":{"wt":"[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]"}},"i":0}}]}'>This is a test template with parameter </p><figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" about="#mwt1" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Noimage.png" ><img resource="./File:Noimage.png" src="./Special:FilePath/Noimage.png" height="220" width="220"/></a><figcaption><a rel="mw:WikiLink" href="./No_link" title="No link">link</a> <a rel="mw:WikiLink" href="./No_link" title="No link">caption</a></figcaption></figure>
11461 Template:complextemplate
11463 {{{1}}} {{paramtest|
11464 param ={{{param}}}}}
11468 Template with complex arguments
11471 param ={{ templateasargtest |
11472 templ = simple }}|[[Template:complextemplate|link]]}}
11474 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11479 T2553: link with two variables in a piped link
11482 |[[{{{1}}}|{{{2}}}]]
11487 <td>[[{{{1}}}|{{{2}}}]]
11492 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{},"i":0}}]}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"2"},"params":{},"i":0}}]}'>{{{2}}}</span>]]</td></tr>
11498 Abort table cell attribute parsing on wikilink
11501 |testing [[one|two]] |three||four
11502 |testing one two |three||four
11503 |testing="[[one|two]]" |three||four
11508 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11514 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11520 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> |three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td>
11521 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'>three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td>
11522 <td>testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" |three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td></tr>
11527 Don't abort table cell attribute parsing if wikilink is found in template arg
11530 |Test {{#tag:ref|One two "[[three]]" four}}
11534 <tbody><tr><td>Test <ref about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:ref","function":"tag"},"params":{"1":{"wt":"One two \"[[three]]\" four"}},"i":0}}]}'>One two "<a rel="mw:WikiLink" href="./Three" title="Three">three</a>" four</ref></td></tr>
11539 Magic variable as template parameter
11541 {{paramtest|param={{SITENAME}}}}
11543 <p>This is a test template with parameter MediaWiki
11550 [[{{{param}}}|link]]
11554 Template parameter as link source
11556 {{linktest|param=Main Page}}
11558 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11563 Template:paramtest2
11565 including another template, {{paramtest|param={{{arg}}}}}
11569 Template passing argument to another template
11571 {{paramtest2|arg='hmm'}}
11573 <p>including another template, This is a test template with parameter 'hmm'
11584 Template as link source
11588 [[{{linktest2}}|Main Page]]
11590 [[{{linktest2}}]]Page
11592 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11593 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11594 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11612 Template infinite loop
11616 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11621 Template from main namespace
11630 Template from non-includable namespace
11632 wgNonincludableNamespaces=10
11636 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11651 T2529: Template with table, not included at beginning of line
11670 T2523: Template shouldn't eat newline (or add an extra one before table)
11690 T2041: Template parameters shown as broken links
11699 Template with targets containing wikilinks
11705 {{[[{{echo|foo}}]]}}
11707 {{{{echo|[[foo}}]]}}
11709 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11710 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11714 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11715 <p>{{<a typeof="mw:ExpandedAttrs" rel="mw:WikiLink" href="./Foo" title="Foo" data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>"}]]}'>foo</a>}}</p>
11716 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11726 Templates: Double quotes as template target
11733 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11737 ## This test is about making sure Parsoid's data-mw is well formed in the
11738 ## face of multiple templates with intersecting and overlapping ranges. The
11739 ## wikitext itself is wretched.
11741 Templates with intersecting and overlapping ranges
11752 </table><p>ho</p><table>
11756 </td></tr></tbody></table>
11758 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]],"firstWikitextNode":"table"}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ha</p>"}},"i":0}},"\n","{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ho</p>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}}hi"}},"i":2}},"\n|}"]}'>ha</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11760 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11762 <tbody><tr><td>hi</td></tr>
11767 Template:MSGNW test
11769 ''None'' of '''this''' should be
11771 but rather passed unmodified
11779 # hmm, fix this or just deprecate msgnw and document its behavior?
11783 {{msgnw:MSGNW test}}
11785 <p>''None'' of '''this''' should be
11787  but rather passed unmodified
11788 {{test}}
11792 <!-- comment -->
11799 {{int:youhavenewmessages|lots of money|not!}}
11801 <p>You have lots of money (not!).
11806 int keyword - non-existing message
11817 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11821 <includeonly> and <noinclude> being included
11832 <onlyinclude>Foo</onlyinclude>bar
11836 <onlyinclude> being included
11848 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11852 <onlyinclude> and <includeonly> being included
11861 <includeonly> and <noinclude> on a page
11863 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11870 Un-closed <noinclude>
11877 <onlyinclude> on a page
11879 <onlyinclude>Foo</onlyinclude>bar
11886 Un-closed <onlyinclude>
11893 Self-closed noinclude, includeonly, onlyinclude tags
11904 Unbalanced includeonly and noinclude tags
11908 |b</noinclude></noinclude>
11909 |c</noinclude></includeonly>
11910 |d</includeonly></includeonly>
11919 <td>c</includeonly>
11921 <td>d</includeonly></includeonly>
11927 Template:Includeonly section
11930 ==Includeonly section==
11936 T8563: Edit link generation for section shown by <includeonly>
11938 {{includeonly section}}
11940 <h2><span class="mw-headline" id="Includeonly_section">Includeonly section</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-1" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
11941 <h2><span class="mw-headline" id="Section_T-1">Section T-1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-2" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
11945 # Uses same input as the contents of [[Template:Includeonly section]]
11947 T8563: Section extraction for section shown by <includeonly>
11952 ==Includeonly section==
11960 T8563: Edit link generation for section suppressed by <includeonly>
11963 ==Includeonly section==
11967 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
11972 T8563: Section extraction for section suppressed by <includeonly>
11977 ==Includeonly section==
11985 Un-closed <includeonly>
11990 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11993 ## We used to, but no longer wt2wt this test since the default serializer
11994 ## will normalize the include directives to serialize on their own line.
11995 ## Selser will take care of preserving formatting in scenarios where they
11996 ## intermingled with other wikitext.
11998 Includes and comments at SOL
12000 parsoid=wt2html,html2html
12002 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12009 <includeonly>can have stuff</includeonly>===here===
12012 <h2><span class="mw-headline" id="hu">hu</span></h2>
12017 <h3><span class="mw-headline" id="here">here</span></h3>
12020 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment --><h2 id="hu">hu</h2>
12022 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12024 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12027 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3 id="here">here</h3>
12031 # TODO: test with DOM fragment reuse!
12033 Parsoid: DOM fragment reuse
12035 parsoid=wt2wt,wt2html
12037 a{{echo|b<table></table>c}}d
12049 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b<table></table>c"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
12051 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b\n<table></table>\nc"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><span about="#mwt2">
12052 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12053 </span><p about="#mwt2">cd</p>
12055 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n\n<table></table>\n\nb"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>a</p><span about="#mwt3">
12057 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12059 </span><p about="#mwt3">b</p>
12063 Parsoid: Merge double tds (T52603)
12068 |{{echo|{{!}} foo}}
12072 <tr><td about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":0}}]}'> foo</td></tr>
12077 Parsoid: Merge double tds in nested transclusion content (T52603)
12083 |{{echo|{{!}} foo}}
12087 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\n{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":1}},"\n|}\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}'>
12089 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12095 ### <includeonly> and <noinclude> in attributes
12098 0. includeonly around the entire attribute
12100 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12102 <p><span id="v2">bar</span>
12107 1. includeonly in html attr key
12109 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12111 <p><span id="foo">bar</span>
12116 2. includeonly in html attr value
12118 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12119 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12121 <p><span id="v1">bar</span>
12122 <span id="v1">bar</span>
12127 3. includeonly in part of an attr value
12129 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12131 <p><span style="color:red;">bar</span>
12136 4. includeonly in table attributes
12160 ### Preprocessor precedence tests
12161 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12163 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12165 Preprocessor precedence 1: link is rightmost opening
12171 But close-brace is not a valid character in a link title:
12174 However, we can still tell this was handled as a link in the preprocessor:
12175 {{echo|[[Foo}}|bar]]|bat}}
12177 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12178 </p><p>But close-brace is not a valid character in a link title:
12180 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12184 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12185 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12186 <p>However, we can still tell this was handled as a link in the preprocessor: <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo}}|bar]]"},"2":{"wt":"bat"}},"i":0}}]}'>[[Foo}}|bar]]</span></p>
12190 Preprocessor precedence 2: template is rightmost opening
12199 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12203 Preprocessor precedence 3: language converter is rightmost opening
12219 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12220 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12221 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12225 Preprocessor precedence 4: left-most angle bracket
12236 Template:Precedence5
12242 Preprocessor precedence 5: tplarg takes precedence over template
12244 {{Precedence5|Bullet}}
12246 <ul><li>Bar</li></ul>
12249 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12253 Preprocessor precedence 6: broken link is rightmost opening
12259 {{echo|[[Foo|bar|bat=baz}}
12262 </p><p>{{echo|[[Foo|bar|bat=baz}}
12265 <p>{{echo|[[Foo}}</p>
12266 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12269 # This next test exposes a difference between PHP and Parsoid:
12270 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12271 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12272 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12273 # outer `[[Foo` extends until the `y]]`
12274 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12275 # intermediate result (after template expansion), and link processing
12276 # happens on this intermediate result, which moves the wikilink
12277 # boundary leftward to `[[Foo|Bar]]`
12278 # 2b) Parsoid works in a single step, so it's going to keep the
12279 # wikilink as extending to the `y]]`
12280 # 3a) Then PHP does linktrail processing which slurps up the trailing
12281 # `xy` inside the link.
12282 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12283 # `z` inside the link.
12284 # This is "correct" behavior. Parsoid's basic worldview is that the
12285 # `]]` inside the template shouldn't be allowed to leak out to affect
12286 # the surrounding wikilink. PHP may match Parsoid (in the future)
12287 # if you use {{#balance}} (T114445).
12290 Preprocessor precedence 7: broken template is rightmost opening
12296 [[Foo|{{echo|Bar]]-x}}-y]]-z
12298 Careful: linktrails can move the end of the wikilink:
12299 [[Foo|{{echo|y']]a}}l]]l
12301 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12302 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12303 </p><p>Careful: linktrails can move the end of the wikilink:
12304 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12307 <p>[[Foo|{{echo|Bar]]</p>
12308 <p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar]]-x"}},"i":0}}]}'>Bar]]-x</span>-y</a>-z</p>
12309 <p>Careful: linktrails can move the end of the wikilink:
12310 <a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"y']]a"}},"i":0}}]}'>y']]a</span>ll</a></p>
12314 Preprocessor precedence 8: broken language converter is rightmost opening
12325 Template:Preprocessor_precedence_9
12330 ;7: {{{{{{{4}}}}}}}
12334 Preprocessor precedence 9: groups of braces
12336 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12342 <ul><li>Bar</li></ul>
12346 <dd>{Bullet}</dd></dl>
12349 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 9","href":"./Template:Preprocessor_precedence_9"},"params":{"1":{"wt":"Four"},"2":{"wt":"Bullet"},"3":{"wt":"1"},"4":{"wt":"2"}},"i":0}}]}'>
12354 </dl><ul about="#mwt1">
12356 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12365 Template:Preprocessor_precedence_10
12372 ;6: -{{{{{{4}}}}}}-
12373 ;7: -{{{{{{{5}}}}}}}-
12377 Preprocessor precedence 10: groups of braces with leading dash
12381 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12387 <ul><li>Bar-</li></ul>
12394 <ul><li>Bar-</li></ul>
12401 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 10","href":"./Template:Preprocessor_precedence_10"},"params":{"1":{"wt":"Three"},"2":{"wt":"raw2"},"3":{"wt":"Bullet"},"4":{"wt":"1"},"5":{"wt":"2"}},"i":0}}]}'>
12403 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12406 </dl><ul about="#mwt1">
12408 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12412 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12415 </dl><ul about="#mwt1">
12417 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12421 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12426 Preprocessor precedence 11: found during visual diff testing
12428 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12430 {{echo|-{{echo|-{{echo|x}}}}}}
12432 {{echo|-{{echo|x}}}}
12434 <p><span>-<span>-x</span></span>
12439 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"#tag:span","function":"tag"},"params":{"1":{"wt":"-{{#tag:span|-{{echo|x}}}}"}},"i":0}}]}'>-<span>-x</span></span></p>
12441 <p about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|-{{echo|x}}}}"}},"i":0}}]}'>--x</p>
12443 <p about="#mwt7" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|x}}"}},"i":0}}]}'>-x</p>
12447 Preprocessor precedence 12: broken language converter closed by brace.
12451 This form breaks the template, which is unfortunate:
12452 *{{echo|foo-{bar}bat}}
12454 But if the broken language converter markup is inside an extension
12455 tag, nothing bad happens:
12456 *<nowiki>foo-{bar}bat</nowiki>
12457 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12458 *<pre>foo-{bar}bat</pre>
12459 *{{echo|<pre>foo-{bar}bat</pre>}}
12461 <tag>foo-{bar}bat</tag>
12462 {{echo|<tag>foo-{bar}bat</tag>}}
12465 <p>This form breaks the template, which is unfortunate:
12467 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12468 <p>But if the broken language converter markup is inside an extension
12469 tag, nothing bad happens:
12471 <ul><li>foo-{bar}bat</li>
12472 <li>foo-{bar}bat</li>
12473 <li><pre>foo-{bar}bat</pre></li>
12474 <li><pre>foo-{bar}bat</pre></li></ul>
12475 <pre>'foo-{bar}bat'
12479 <pre>'foo-{bar}bat'
12484 <p>This form breaks the template, which is unfortunate:</p>
12486 <li>{{echo|foo-{bar}bat}}</li>
12488 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12490 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12491 <li><span typeof="mw:Transclusion mw:Nowiki" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>foo-{bar}bat</nowiki>"}},"i":0}}]}'>foo-{bar}bat</span></li>
12492 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12493 <li><pre typeof="mw:Transclusion mw:Extension/pre" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre>foo-{bar}bat</pre>"}},"i":0}}]}'>foo-{bar}bat</pre></li>
12495 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'></pre> <pre typeof="mw:Extension/tag mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tag>foo-{bar}bat</tag>"}},"i":0}}]}'></pre>
12499 Preprocessor precedence 13: broken language converter in external link
12503 *[http://example.com/-{foo Example in URL]
12504 *[http://example.com Example in -{link} description]
12505 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12507 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12508 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12509 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12512 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12513 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12514 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12519 Preprocessor precedence 14: broken language converter in comment
12521 *<!--{{foo}}-->...should be ok
12522 *<!---{{foo}}-->...extra dashes
12523 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12525 <ul><li>...should be ok</li>
12526 <li>...extra dashes</li>
12527 <li>foobat...should be ok</li></ul>
12530 <li><!--{{foo}}-->...should be ok</li>
12531 <li><!---{{foo}}-->...extra dashes</li>
12532 <li><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<!-- -{bar} -->bat"}},"i":0}}]}'>foo</span><span about="#mwt1"><!-- -{bar} --></span><span about="#mwt1">bat</span>...should be ok</li>
12537 Preprocessor precedence 15: broken brace markup in headings
12539 wgFragmentMode=[ 'html5', 'legacy' ]
12543 __NOTOC__ __NOEDITSECTION__
12552 ===5 foo{{{bar 5===
12557 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12560 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12563 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12566 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12569 <h3><span id="5_foo.7B.7B.7Bbar_5"></span><span class="mw-headline" id="5_foo{{{bar_5">5 foo{{{bar 5</span></h3>
12572 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12576 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12577 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12579 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12581 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12583 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12585 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12587 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12592 Preprocessor precedence 16: matching closing braces to opening braces
12597 -{{{echo|foo}}bar}-
12602 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>bar"}}'></span></p>
12606 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12615 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12619 Preprocessor precedence 18: another rightmost wins scenario
12623 {{ -{{{{1|tplarg}}} }} }-
12625 <p>{{ -{tplarg }} }-
12628 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12632 Preprocessor precedence 19: break syntax
12645 ### Token Stream Patcher tests
12647 ### These tests won't always pass wt2wt and other modes because
12648 ### on serialization, the table will be output on a new line.
12649 ### For now, we are blacklisting them, and using this to test selser.
12653 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12655 parsoid=wt2html,wt2wt
12657 {{echo|}}{| width = '100%'
12661 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12662 <tbody><tr><td>foo</td></tr>
12666 ## We used to, but no longer wt2wt this test since the default serializer
12667 ## will normalize the include directives to serialize on their own line.
12668 ## Selser will take care of preserving formatting in scenarios where they
12669 ## intermingled with other wikitext.
12671 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12675 <includeonly>a</includeonly>{| {{{b}}}
12679 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[31,38,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"b\"},\"params\":{},\"i\":0}}]}'>{{{b}}}</span>"},{"html":""}]]}'>
12680 <tbody><tr><td>c</td></tr>
12685 Table wikitext syntax outside wiki-tables
12689 ! not a table heading
12692 | class="foo bar" | baz
12700 ! not a table heading
12703 | class="foo bar" | baz
12712 ### Testing parsing of templates where a template arg
12713 ### has the same name as the template itself.
12719 {{{quote|{{{1}}}}}}
12723 Templates: Template Name/Arg clash: 1. Use of positional param
12732 Templates: Template Name/Arg clash: 2. Use of named param
12734 {{quote|quote=foo}}
12741 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12750 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12754 Templates: 1. Simple use
12763 Templates: 2. Inside a block tag
12765 <div>{{echo|Foo}}</div>
12766 <blockquote>{{echo|Foo}}</blockquote>
12769 <blockquote>Foo</blockquote>
12773 <blockquote><p>Foo</p></blockquote>
12777 Templates: P-wrapping: 1a. Templates on consecutive lines
12788 Templates: P-wrapping: 1b. Templates on consecutive lines
12802 Templates: P-wrapping: 1c. Templates on consecutive lines
12805 {{echo|bar}} <div>baz</div>
12814 bar </p><div>baz</div>
12818 Templates: P-wrapping: 1d. Template preceded by comment-only line
12827 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12831 Templates: Inline Text: 1. Multiple template uses
12833 {{echo|Foo}}bar{{echo|baz}}
12840 Templates: Inline Text: 2. Back-to-back template uses
12842 {{echo|Foo}}{{echo|bar}}
12849 Templates: Block Tags: 1. Multiple template uses
12851 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12853 <div>Foo</div><div>bar</div><div>baz</div>
12858 Templates: Block Tags: 2. Back-to-back template uses
12860 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12862 <div>Foo</div><div>bar</div>
12866 ## This is an edge case relating to paragraph wrapping.
12867 ## Note that Parsoid fails to match Remex because it's using the closing tag
12868 ## as a heuristic to determine if it's in a block, rather than SAX based events.
12870 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12877 b</p><p class="mw-empty-elt"></p>
12879 <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">
12880 </span><span about="#mwt1">b</span><p about="#mwt1" data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
12884 Templates: Links: 1. Simple example
12886 {{echo|[[Foo|bar]]}}
12888 <p><a href="/wiki/Foo" title="Foo">bar</a>
12893 Templates: Links: 2. Generation of link href
12895 [[{{echo|Foo}}|bar]]
12897 <p><a href="/wiki/Foo" title="Foo">bar</a>
12902 Templates: Links: 3. Generation of part of a link href
12904 [[Fo{{echo|o}}|bar]]
12906 [[Foo{{echo|bar}}]]
12908 [[Foo{{echo|bar}}baz]]
12910 [[Foo{{echo|bar}}|bar]]
12912 [[:Foo{{echo|bar}}]]
12914 [[:Foo{{echo|bar}}|bar]]
12916 <p><a href="/wiki/Foo" title="Foo">bar</a>
12917 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12918 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12919 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12920 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12921 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12926 Templates: Links: 4. Multiple templates generating link href
12928 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12930 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12935 Templates: Links: 5. Generation of link text
12937 [[Foo|{{echo|bar}}]]
12939 <p><a href="/wiki/Foo" title="Foo">bar</a>
12944 Templates: Links: 5. Nested templates (only outermost template should be marked)
12946 {{echo|[[{{echo|Foo}}|bar]]}}
12948 <p><a href="/wiki/Foo" title="Foo">bar</a>
12953 Templates: HTML Tag: 1. Generation of HTML attr. key
12955 <div {{echo|style}}="color:red;">foo</div>
12957 <div style="color:red;">foo</div>
12962 Templates: HTML Tag: 2. Generation of HTML attr. value
12964 <div style={{echo|'color:red;'}}>foo</div>
12966 <div style="color:red;">foo</div>
12971 Templates: HTML Tag: 3. Generation of HTML attr key and value
12973 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12975 <div style="color:red;">foo</div>
12980 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12982 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12984 <div title="This is a long title with just one piece templated">foo</div>
12989 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12991 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12993 <div title="This is a long title with just one piece templated">foo</div>
12998 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13000 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13002 <div title="This is a long title with just one piece templated">foo</div>
13006 # SSS FIXME: While it is great we added support for all this,
13007 # do we want to make this part of the spec? Maybe we want to
13008 # deprecate this kind of usage in the future?
13010 Templates: HTML Tag: 7. Generation of partial attribute key string
13012 <div st{{echo|yle}}="color:red;">foo</div>
13014 <div style="color:red;">foo</div>
13019 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13021 <div {{echo|1=id="v1"}}>bar</div>
13023 <div id="v1">bar</div>
13028 Templates: HTML Tag: 9. Multiple template-generated attributes
13030 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13032 <div id="v1" title="foo">bar</div>
13037 Templates: Support for templates generating attributes and content
13039 {| {{mixed_attr_content_template}}
13044 <table style="color:red;" title="T48811">
13054 <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|}"]}'>
13063 Template:attribute_from_template
13069 Table cell with attribute before expanded attribute
13072 | align="center" {{attribute_from_template}} |456
13076 <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>
13081 1. Entities and nowikis inside templated attributes should be handled correctly
13083 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13085 <div style="background:#f9f9f9;">foo</div>
13088 <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>
13092 2. Entities and nowikis inside templated attributes should be handled correctly
13095 |{{table_attribs_3}}
13100 <td style="background:#f9f9f9;">Foo
13105 <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>
13110 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13113 |{{table_attribs_3}}
13118 <td style="background:#f9f9f9;">Foo
13122 <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}}]}'>
13123 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13129 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13132 |{{table_attribs_6}} hi
13137 <td style="background: red;">hi
13142 <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>
13147 Templates: HTML Tables: 1. Generating start of a HTML table
13149 {{echo|<table><tr><td>foo</td>}}</tr></table>
13151 <table><tr><td>foo</td></tr></table>
13156 Templates: HTML Tables: 2a. Generating middle of a HTML table
13158 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13160 <table><tr><td>foo</td></tr></table>
13165 Templates: HTML Tables: 2b. Generating middle of a HTML table
13167 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13169 <table><tr><td>foo</td></tr></table>
13174 Templates: HTML Tables: 3. Generating end of a HTML table
13176 <table><tr>{{echo|<td>foo</td></tr></table>}}
13178 <table><tr><td>foo</td></tr></table>
13183 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13185 {{echo|<table>}}<tr><td>foo</td></tr></table>
13187 <table><tr><td>foo</td></tr></table>
13192 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13194 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13196 <table><tr><td>foo</td></tr></table>
13201 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13203 <table><tr>{{echo|<td>}}foo</td></tr></table>
13205 <table><tr><td>foo</td></tr></table>
13210 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13212 <table><tr><td>foo{{echo|</td>}}</tr></table>
13214 <table><tr><td>foo</td></tr></table>
13219 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13221 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13223 <table><tr><td>foo</td></tr></table>
13228 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13230 <table><tr><td>foo</td></tr>{{echo|</table>}}
13232 <table><tr><td>foo</td></tr></table>
13237 Templates: HTML Tables: 5. Proper fostering of categories from inside
13239 parsoid=wt2html,wt2wt
13241 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13242 <!--Two categories (T52330)-->
13243 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13245 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13246 <!--Two categories (T52330)-->
13247 <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>
13251 Templates: Wiki Tables: 1a. Fostering of entire template content
13259 <tr><td></td></tr></table>
13264 <table><tbody><tr><td></td></tr></tbody></table>
13266 <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">
13272 Templates: Wiki Tables: 1b. Fostering of entire template content
13285 <tr><td></td></tr></table>
13293 <tbody><tr><td></td></tr></tbody></table>
13295 <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|}"]}'>
13297 </div><table about="#mwt3">
13303 Templates: Wiki Tables: 2. Fostering of partial template content
13313 <tr><td></td></tr></table>
13318 <div>b</div><table>
13319 <tbody><tr><td></td></tr></tbody></table>
13321 <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">
13328 Templates: Wiki Tables: 3. td-content via multiple templates
13331 {{echo|{{pipe}}a}}{{echo|b}}
13342 Templates: Wiki Tables: 4. Templated tags, no content
13348 <tr><td></td></tr></table>
13353 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13367 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13380 ## This test case is very specific to Parsoid's internals
13381 ## and is hence only tested for Parsoid's code. Parsoid uses
13382 ## a <meta> marker tag for <ref> tags and they are expanded
13383 ## much later. We are verifying that this <meta> tag usage
13384 ## doesn't prevent foster parenting.
13386 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13388 {{PartialTable}}<ref>foo</ref>
13393 <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">
13397 <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>
13401 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13411 <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{{!}}}"]}'>
13412 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13416 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13421 Templates: Lists: Multi-line list-items via templates
13423 *{{echo|a {{nonexistent|
13425 *{{echo|b {{nonexistent|
13428 <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>
13429 <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>
13434 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13436 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13438 <p><i>ab</i>c<i>d</i>e
13443 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13444 (PHP parser generates misnested html)
13446 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13448 <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>
13452 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13453 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13455 parsoid=wt2html,wt2wt
13457 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13459 <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>
13460 <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>
13461 <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>
13465 Templates: Ugly nesting: 4. Divs opened/closed across templates
13467 a<div>b{{echo|c</div>d}}e
13472 <p>a</p><div>bc</div><p>de
13477 Templates: Ugly templates: 3. newline-only template parameter
13486 # This looks like a bug: a single newline triggers p/br for some reason.
13488 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13497 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13498 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13500 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13506 <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
13507 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13511 # T66017 -- ugly wikitext with fostered content generates two template ranges
13512 # that are "identical" and generate nesting cycles in the algorithm
13514 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13516 {{echo|<table><tr><td><table>}}
13520 <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"}'>
13521 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13522 </table></td></tr></tbody></table>
13526 Templates: Parameters substituted at the top-level
13528 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13532 <p><i>who</i> me? <b>never!</b>
13536 <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>
13538 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13542 Templates: Param with empty arg in the final position
13546 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13550 Parser Functions: 1. Simple example
13559 Parser Functions: 2. Nested use (only outermost should be marked up)
13567 ## Note that the templates inside the references are not wrapped
13569 Template nested in extension tag in template
13571 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13572 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13575 <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>
13576 <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>
13577 <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>
13581 ### Pre-save transform tests
13584 pre-save transform: subst:
13590 This is a test template
13594 pre-save transform: normal template
13604 pre-save transform: nonexistent template
13608 {{thistemplatedoesnotexist}}
13610 {{thistemplatedoesnotexist}}
13614 pre-save transform: subst magic variables
13623 # This is T2089, which I fixed. -- wtm
13625 pre-save transform: subst: templates with parameters
13629 {{subst:paramtest|param="something else"}}
13631 This is a test template with parameter "something else"
13635 Template:nowikitest
13637 <nowiki>'''not wiki'''</nowiki>
13641 pre-save transform: nowiki in subst (T3188)
13645 {{subst:nowikitest}}
13647 <nowiki>'''not wiki'''</nowiki>
13651 Template:commenttest
13653 This template has <!-- a comment --> in it.
13657 pre-save transform: comment in subst (T3936)
13661 {{subst:commenttest}}
13663 This template has <!-- a comment --> in it.
13667 pre-save transform: unclosed tag
13671 <nowiki>'''not wiki'''
13673 <nowiki>'''not wiki'''
13677 pre-save transform: mixed tag case
13681 <NOwiki>'''not wiki'''</noWIKI>
13683 <NOwiki>'''not wiki'''</noWIKI>
13687 pre-save transform: unclosed comment in <nowiki>
13691 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13693 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13696 # Leading @ in this template definition works around a limitation
13697 # in parsoid's parserTests which otherwise strips the <span> from the
13698 # result (confusing it for a template wrapper)
13702 @<span onmouseover="alert('crap')">Oh no</span>
13706 (confirming safety of fix for subst T3936)
13708 {{Template:dangerous}}
13710 <p>@<span>Oh no</span>
13715 pre-save transform: comment containing gallery (T7024)
13719 <!-- <gallery>data</gallery> -->
13721 <!-- <gallery>data</gallery> -->
13725 pre-save transform: comment containing extension
13729 <!-- <tag>data</tag> -->
13731 <!-- <tag>data</tag> -->
13735 pre-save transform: comment containing nowiki
13739 <!-- <nowiki>data</nowiki> -->
13741 <!-- <nowiki>data</nowiki> -->
13745 pre-save transform: <noinclude> in subst (T5298)
13755 pre-save transform: <onlyinclude> in subst (T5298)
13759 {{subst:Includes2}}
13767 {{<includeonly>subst:</includeonly>Includes}}
13771 Template:SafeSubstTest
13773 {{<includeonly>safesubst:</includeonly>Includes}}
13777 T24297: safesubst: works during PST
13781 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13787 T24297: safesubst: works during normal parse
13796 subst: does not work during normal parse
13800 <p>{{subst:Includes}}
13805 pre-save transform: context links ("pipe trick")
13809 [[Article (context)|]]
13812 [[Bar:Article (context)|]]
13813 [[:Bar:Article (context)|]]
13815 [[|Article (context)]]
13819 [[Article (context)|Article]]
13820 [[Bar:Article|Article]]
13821 [[:Bar:Article|Article]]
13822 [[Bar:Article (context)|Article]]
13823 [[:Bar:Article (context)|Article]]
13825 [[Article (context)]]
13826 [[Bar:X (Y) Z|X (Y) Z]]
13827 [[:Bar:X (Y) Z|X (Y) Z]]
13831 pre-save transform: context links ("pipe trick") with interwiki prefix
13835 [[interwiki:Article|]]
13836 [[:interwiki:Article|]]
13837 [[interwiki:Bar:Article|]]
13838 [[:interwiki:Bar:Article|]]
13840 [[interwiki:Article|Article]]
13841 [[:interwiki:Article|Article]]
13842 [[interwiki:Bar:Article|Bar:Article]]
13843 [[:interwiki:Bar:Article|Bar:Article]]
13847 pre-save transform: context links ("pipe trick") with parens in title
13849 pst title=[[Somearticle (context)]]
13853 [[Article (context)|Article]]
13857 pre-save transform: context links ("pipe trick") with comma in title
13859 pst title=[[Someplace, Somewhere]]
13862 [[Otherplace, Elsewhere|]]
13863 [[Otherplace, Elsewhere, Anywhere|]]
13865 [[Otherplace, Somewhere|Otherplace]]
13866 [[Otherplace, Elsewhere|Otherplace]]
13867 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13871 pre-save transform: context links ("pipe trick") with parens and comma
13873 pst title=[[Someplace (IGNORED), Somewhere]]
13876 [[Otherplace (place), Elsewhere|]]
13878 [[Otherplace, Somewhere|Otherplace]]
13879 [[Otherplace (place), Elsewhere|Otherplace]]
13883 pre-save transform: context links ("pipe trick") with comma and parens
13885 pst title=[[Who, me? (context)]]
13888 [[Me, Myself, and I (1937 song)|]]
13890 [[Yes, you. (context)|Yes, you.]]
13891 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13895 pre-save transform: context links ("pipe trick") with namespace
13897 pst title=[[Ns:Somearticle]]
13901 [[Ns:Article|Article]]
13905 pre-save transform: context links ("pipe trick") with namespace and parens
13907 pst title=[[Ns:Somearticle (context)]]
13911 [[Ns:Article (context)|Article]]
13915 pre-save transform: context links ("pipe trick") with namespace and comma
13917 pst title=[[Ns:Somearticle, Context, Whatever]]
13921 [[Ns:Article, Context, Whatever|Article]]
13925 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13927 pst title=[[Ns:Somearticle, Context (context)]]
13931 [[Ns:Article (context)|Article]]
13935 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13937 pst title=[[Ns:Somearticle (IGNORED), Context]]
13941 [[Ns:Article, Context|Article]]
13945 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13949 [[Article(context)|]]
13950 [[Bar:Article(context)|]]
13951 [[:Bar:Article(context)|]]
13952 [[|Article(context)]]
13956 [[Article(context)|Article]]
13957 [[Bar:Article(context)|Article]]
13958 [[:Bar:Article(context)|Article]]
13959 [[Article(context)]]
13960 [[Bar:X(Y)Z|X(Y)Z]]
13961 [[:Bar:X(Y)Z|X(Y)Z]]
13965 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13969 [[Article (context)|]]
13970 [[Bar:Article (context)|]]
13971 [[:Bar:Article (context)|]]
13972 [[|Article (context)]]
13976 [[Article (context)|Article]]
13977 [[Bar:Article (context)|Article]]
13978 [[:Bar:Article (context)|Article]]
13979 [[Article (context)]]
13980 [[Bar:X (Y) Z|X (Y) Z]]
13981 [[:Bar:X (Y) Z|X (Y) Z]]
13985 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13989 [[Article(context)|]]
13990 [[Bar:Article(context)|]]
13991 [[:Bar:Article(context)|]]
13992 [[|Article(context)]]
13996 [[Article(context)|Article]]
13997 [[Bar:Article(context)|Article]]
13998 [[:Bar:Article(context)|Article]]
13999 [[Article(context)]]
14000 [[Bar:X(Y)Z|X(Y)Z]]
14001 [[:Bar:X(Y)Z|X(Y)Z]]
14005 pre-save transform: context links ("pipe trick") with commas (T23660)
14009 [[Article (context), context|]]
14010 [[Article (context),context|]]
14011 [[Bar:Article (context), context|]]
14012 [[Bar:Article (context),context|]]
14013 [[:Bar:Article (context), context|]]
14014 [[:Bar:Article (context),context|]]
14016 [[Article (context), context|Article]]
14017 [[Article (context),context|Article]]
14018 [[Bar:Article (context), context|Article]]
14019 [[Bar:Article (context),context|Article]]
14020 [[:Bar:Article (context), context|Article]]
14021 [[:Bar:Article (context),context|Article]]
14025 Parsoid: backwards pipe trick
14032 <p>[[|<b>bar</b>]]</p>
14036 pre-save transform: trim trailing empty lines
14040 Empty lines are trimmed
14046 Empty lines are trimmed
14050 pre-save transform: Signature expansion
14057 * <noinclude>~~~</noinclude>
14058 * <includeonly>~~~</includeonly>
14059 * <onlyinclude>~~~</onlyinclude>
14061 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14062 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14063 * 00:02, 1 January 1970 (UTC)
14064 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14065 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14066 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14071 ParserOutput flags from signature expansion (T84843)
14078 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14079 flags=user-signature
14084 pre-save transform: Signature expansion in nowiki tags (T2093)
14090 <nowiki>~~~~</nowiki>
14092 <includeonly><nowiki>~~~~</nowiki></includeonly>
14094 <noinclude><nowiki>~~~~</nowiki></noinclude>
14096 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14098 {{subst:Foo}} shall be converted to FOO
14100 As well as inside noinclude/onlyinclude
14101 <noinclude>{{subst:Foo}}</noinclude>
14102 <onlyinclude>{{subst:Foo}}</onlyinclude>
14104 But not inside includeonly
14105 <includeonly>{{subst:Foo}}</includeonly>
14109 <nowiki>~~~~</nowiki>
14111 <includeonly><nowiki>~~~~</nowiki></includeonly>
14113 <noinclude><nowiki>~~~~</nowiki></noinclude>
14115 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14117 FOO shall be converted to FOO
14119 As well as inside noinclude/onlyinclude
14120 <noinclude>FOO</noinclude>
14121 <onlyinclude>FOO</onlyinclude>
14123 But not inside includeonly
14124 <includeonly>{{subst:Foo}}</includeonly>
14128 Parsoid: Recognize nowiki with trailing space in tags
14132 <nowiki ><div>[[foo]]</nowiki >
14140 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14147 Parsoid: Recognize nowiki with odd capitalization
14151 <noWikI ><div>[[foo]]</Nowiki >
14153 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14158 Parsoid: Escape nowiki with trailing space in tags
14162 <p><nowiki > foo </nowiki ></p>
14163 <p>a<nowiki />b</p>
14164 <p>c<nowiki/ >d</p>
14166 <nowiki > foo </nowiki >
14174 Parsoid: Escape weird noWikI capitalizations
14178 <p><noWikI > foo </NoWikI ></p>
14180 <noWikI > foo </NoWikI >
14184 ### Message transform tests
14187 message transform: magic variables
14197 message transform: should not transform wiki markup
14207 message transform: <noinclude> in transcluded template (T6926)
14217 message transform: <onlyinclude> in transcluded template (T6926)
14227 {{#special:}} page name, known
14231 {{#special:Recentchanges}}
14233 Special:RecentChanges
14237 {{#special:}} page name with subpage, known
14241 {{#special:Recentchanges/param}}
14243 Special:RecentChanges/param
14247 {{#special:}} page name, unknown
14251 {{#special:foobar nonexistent}}
14253 Special:Foobar nonexistent
14257 {{#speciale:}} page name, known
14261 {{#speciale:Recentchanges}}
14263 Special:RecentChanges
14267 {{#speciale:}} page name with subpage, known
14271 {{#speciale:Recentchanges/param}}
14273 Special:RecentChanges/param
14277 {{#speciale:}} page name, unknown
14281 {{#speciale:foobar nonexistent}}
14283 Special:Foobar_nonexistent
14289 ### For Parsoid-specific tests, see
14290 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14295 parsoid=wt2html,wt2wt,html2html
14297 [[Image:foobar.jpg]]
14299 <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>
14302 <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>
14306 Serialize simple image with span wrapper
14310 <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>
14312 [[File:Foobar.jpg]]
14316 Simple image (using File: namespace, now canonical)
14318 [[File:Foobar.jpg]]
14320 <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>
14323 <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>
14327 Right-aligned image
14329 [[File:Foobar.jpg|right]]
14331 <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>
14334 <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>
14340 [[File:Foobar.jpg|right|Caption text]]
14342 <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>
14345 <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>
14349 Image with caption, T55312 #1
14351 [[File:Foobar.jpg|right|Caption page stuff]]
14353 <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>
14356 <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>
14360 Image with caption, T55312 #2
14362 [[File:Foobar.jpg|right|Caption page=]]
14364 <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>
14367 <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>
14371 Image with caption, T55312 #3
14373 [[File:Foobar.jpg|right|Caption page=stuff]]
14375 <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>
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><figcaption>Caption page=stuff</figcaption></figure>
14382 Image caption with pipe entity
14384 [[File:Foobar.jpg|thumb|one | two]]
14385 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14387 <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>
14388 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one <i>two</i> | three</div></div></div>
14391 <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>
14392 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <i>two</i> <span typeof="mw:Entity">|</span> three</figcaption></figure>
14396 Allow empty links in image captions (T62753)
14400 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14405 <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>
14408 <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>
14410 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14411 </figcaption></figure>
14415 Titles in unlinked images (T23454)
14417 [[File:Foobar.jpg|link=|stuff]]
14419 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14422 <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>
14426 Link with empty target
14435 Image with link trail
14437 Linktrails should not work for images: [[File:Foobar.jpg]]s
14439 <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
14442 <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>
14446 Image with empty attribute
14448 parsoid=wt2html,wt2wt,html2html
14450 [[File:Foobar.jpg|right||Caption text]]
14452 <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>
14455 <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>
14459 1. Block image with individual attributes from templates
14461 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14463 <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>
14466 <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>
14470 2. Block Image with individual attributes from templates
14472 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14474 <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>
14477 <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>
14481 3. Inline image with individual attributes from templates
14483 [[File:Foobar.jpg|{{echo|50px}}]]
14485 <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>
14488 <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>
14491 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14492 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14494 Image with multiple attributes from the same template
14496 [[File:Foobar.jpg|{{image_attribs}}]]
14498 <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>
14501 <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>
14505 Image with link tails
14509 123[[File:Foobar.jpg]]456
14510 123[[File:Foobar.jpg|right]]456
14511 123[[File:Foobar.jpg|thumb]]456
14513 <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
14515 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
14516 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
14519 <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
14521 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
14522 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
14525 <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>
14526 <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>
14527 <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>
14531 Image with multiple captions -- only last one is accepted
14533 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14535 <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>
14538 <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>
14542 Image with multiple widths -- use last
14544 [[File:Foobar.jpg|200px|300px|caption]]
14546 <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>
14549 <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>
14553 Image with multiple alignments -- use first (T50664)
14557 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14559 [[File:Foobar.jpg|middle|text-top|caption]]
14561 <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>
14562 <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>
14565 <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>
14566 <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>
14570 Image with width attribute at different positions
14572 [[File:Foobar.jpg|200px|right|Caption]]
14573 [[File:Foobar.jpg|right|200px|Caption]]
14574 [[File:Foobar.jpg|right|Caption|200px]]
14576 <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>
14577 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14578 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14581 <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>
14582 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14583 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14586 # a sad bit of backward-compatibility
14588 Image with size specified with pxpx (T15500, T53628)
14590 parsoid=wt2html,wt2wt,html2html
14592 [[File:Foobar.jpg|20pxpx]]
14593 [[File:Foobar.jpg|200x20pxpx]]
14595 <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>
14596 <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>
14599 <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>
14603 Image with link parameter, wiki target
14605 [[File:Foobar.jpg|link=Main Page]]
14607 <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>
14610 <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>
14613 # parsoid T51293 (part 1)
14615 Image with link parameter, URL target
14617 [[File:Foobar.jpg|link=http://example.com/]]
14619 <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>
14622 <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>
14625 # parsoid T51293 (part 2)
14627 Image with link parameter, protocol-less URL target
14629 [[File:Foobar.jpg|link=//example.com/]]
14631 <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>
14634 <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>
14638 Escaping non-block captions (T107435)
14641 "modes": ["wt2wt"],
14643 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14647 [[Image:Foobar.jpg|caption]]
14649 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14652 # wgExternalLinkTarget not supported by Parsoid
14654 Image with link parameter, wgExternalLinkTarget
14656 [[Image:foobar.jpg|link=http://example.com/]]
14658 wgExternalLinkTarget='foobar'
14660 <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>
14665 Image with link parameter, wgNoFollowLinks set to false
14667 [[Image:foobar.jpg|link=http://example.com/]]
14669 wgNoFollowLinks=false
14671 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14676 Image with link parameter, wgNoFollowDomainExceptions
14678 [[Image:foobar.jpg|link=http://example.com/]]
14680 wgNoFollowDomainExceptions='example.com'
14682 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14686 # wgExternalLinkTarget not supported by Parsoid
14688 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14690 [[Image:foobar.jpg|link=http://example.com/|Title]]
14692 wgExternalLinkTarget='foobar'
14694 <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>
14699 Image with empty link parameter
14701 [[File:Foobar.jpg|link=]]
14703 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14706 <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>
14710 Image with link parameter (wiki target) and unnamed parameter
14712 [[File:Foobar.jpg|link=Main_Page|Title]]
14714 <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>
14717 <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>
14721 Image with link parameter (URL target) and unnamed parameter
14723 [[File:Foobar.jpg|link=http://example.com/|Title]]
14725 <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>
14728 <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>
14732 Thumbnail image with link parameter
14735 parsoid=wt2html,wt2wt,html2html
14737 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14739 <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>
14742 <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>
14746 Manually-specified thumbnail image
14750 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14752 <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>
14755 <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>
14759 Manually-specified thumbnail image with explicit link to wiki page
14762 parsoid=wt2html,wt2wt,html2html
14764 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14766 <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>
14769 <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>
14773 Manually-specified thumbnail image with explicit link to url
14776 parsoid=wt2html,wt2wt,html2html
14778 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14780 <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>
14783 <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>
14787 Manually-specified thumbnail image with explicit no link
14790 parsoid=wt2html,wt2wt,html2html
14792 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14794 <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>
14797 <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>
14801 Manually-specified thumbnail image with explicit link and alt text
14804 parsoid=wt2html,wt2wt,html2html
14806 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14808 <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>
14811 <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>
14815 Image with frame and link
14817 parsoid=wt2html,wt2wt,html2html
14819 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14821 <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>
14824 <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>
14828 Image with frame and link and explicit alt
14830 parsoid=wt2html,wt2wt,html2html
14832 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14834 <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>
14837 <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>
14841 Image with wiki markup in implicit alt
14843 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14845 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14847 <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>
14848 </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>
14851 <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>
14853 <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>
14857 Alt image option should handle most kinds of wikitext without barfing
14859 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14861 <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>
14864 <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>
14868 Image with table with attributes in caption
14870 parsoid=wt2html,html2html
14872 [[File:Foobar.jpg|thumb|
14879 <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>
14880 <table class="123">
14881 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14884 </figcaption></figure>
14888 Image with table with rows from templates in caption
14890 [[File:Foobar.jpg|thumb|
14896 <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>
14898 <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>
14900 </figcaption></figure>
14904 Image with nested tables in caption
14906 [[File:Foobar.jpg|thumb|Foo<br />
14915 <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}'/>
14919 <tbody><tr><td>z</td></tr>
14920 </tbody></table></td></tr>
14922 </figcaption></figure>
14926 Image with heading and horizontal rule in caption
14928 [[File:Foobar.jpg|thumb|
14934 <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>
14937 <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>
14938 <h3 id="Testing">Testing</h3>
14940 <hr data-parsoid='{"extra_dashes":10}'/>
14941 </figcaption></figure>
14944 ###################
14945 # Conflicting image format options.
14946 # First option specified should 'win'.
14947 # All three cases in each test should be identical.
14950 Image with 'frameless' first.
14952 parsoid=wt2html,wt2wt,html2html
14954 [[File:Foobar.jpg|frameless|caption]]
14956 [[File:Foobar.jpg|frameless|frame|caption]]
14958 [[File:Foobar.jpg|frameless|thumb|caption]]
14960 <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>
14961 </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>
14962 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
14965 <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>
14966 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
14967 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
14971 Image with 'frame' first.
14973 parsoid=wt2html,wt2wt,html2html
14975 [[File:Foobar.jpg|frame|caption]]
14976 [[File:Foobar.jpg|frame|frameless|caption]]
14977 [[File:Foobar.jpg|frame|thumb|caption]]
14979 <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>
14980 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
14981 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
14984 <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>
14985 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
14986 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
14990 Image with 'thumb' first.
14992 parsoid=wt2html,wt2wt,html2html
14994 [[File:Foobar.jpg|thumb|caption]]
14995 [[File:Foobar.jpg|thumb|frameless|caption]]
14996 [[File:Foobar.jpg|thumb|frame|caption]]
14998 <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>
14999 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15000 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15003 <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>
15004 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15005 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15008 ###################
15010 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15011 # and https://phabricator.wikimedia.org/T64258
15012 # Foobar has actual size of 1941x220
15013 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15014 # a scalable format.
15015 # 2. Framed images always ignore size options; always render at default size.
15016 # 3. "Unspecified format" and border are the only types which can be
15020 Image: unspecified format and border enlarge
15022 parsoid=wt2html,wt2wt,html2html
15024 [[File:Foobar.jpg|2000px]]
15026 [[File:Foobar.jpg|border|2000px]]
15028 <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>
15029 </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>
15032 <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>
15033 <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>
15037 Image: "unspecified format" and border reduce
15039 parsoid=wt2html,wt2wt,html2html
15041 [[File:Foobar.jpg|1000px]]
15043 [[File:Foobar.jpg|border|1000px]]
15045 <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>
15046 </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>
15049 <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>
15050 <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>
15054 Image: thumbs reduce
15056 parsoid=wt2html,wt2wt,html2html
15058 [[File:Foobar.jpg|thumb|50px]]
15060 <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>
15063 <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>
15067 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15069 parsoid=wt2html,wt2wt,html2html
15071 [[File:Foobar.jpg|thumb|2000px]]
15073 [[File:Foobar.svg|thumb|2000px]]
15075 <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>
15076 <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>
15079 <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>
15080 <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>
15084 Image: frameless can reduce in size
15086 parsoid=wt2html,wt2wt,html2html
15088 [[File:Foobar.jpg|frameless|50px]]
15090 <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>
15093 <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>
15097 Image: bitmap frameless can't be enlarged past original size, but vector can
15099 parsoid=wt2html,wt2wt,html2html
15101 [[File:Foobar.jpg|frameless|2000px]]
15103 [[File:Foobar.svg|frameless|2000px]]
15105 <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>
15106 </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>
15109 <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>
15110 <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>
15114 Image: framed images are always unscaled.
15116 parsoid=wt2html,wt2wt,html2html
15118 [[File:Foobar.jpg|frame]]
15120 [[File:Foobar.jpg|frame|50px]]
15122 [[File:Foobar.jpg|frame|50x50px]]
15124 [[File:Foobar.jpg|frame|2000px]]
15126 <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>
15127 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15128 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15129 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15132 <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>
15133 <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>
15134 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15135 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15138 ###################
15141 Link to image page- image page normally doesn't exists, hence edit link
15142 Add test with existing image page
15143 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15147 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15152 T20784 Link to non-existent image page with caption should use caption as link text
15154 [[:Image:test|caption]]
15156 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15161 Frameless image caption with a free URL
15163 [[File:Foobar.jpg|http://example.com]]
15165 <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>
15168 <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>
15172 Thumbnail image caption with a free URL
15176 [[File:Foobar.jpg|thumb|http://example.com]]
15178 <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>
15181 <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>
15185 Thumbnail image caption with a free URL and explicit alt
15188 parsoid=wt2html,wt2wt,html2html
15190 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15192 <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>
15195 <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>
15199 SVG thumbnails with no language set
15202 [[File:Foobar.svg|thumb|caption]]
15204 <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>
15207 <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>
15211 SVG thumbnails with language de
15213 parsoid=wt2html,wt2wt,html2html
15215 [[File:Foobar.svg|thumb|caption|lang=de]]
15217 <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>
15220 <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>
15224 SVG thumbnails with invalid language code
15226 parsoid=wt2html,wt2wt,html2html
15228 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15230 <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>
15233 <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>
15237 T3887: A ISBN with a thumbnail
15239 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15241 <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>
15244 <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>
15248 T3887: A RFC with a thumbnail
15250 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15252 <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>
15255 <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>
15259 T3887: A mailto link with a thumbnail
15261 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15263 <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>
15266 <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>
15269 # Pending resolution to T2368
15271 T2648: Frameless image caption with a link
15273 [[File:Foobar.jpg|text with a [[link]] in it]]
15275 <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>
15278 <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>
15282 T2648: Frameless image caption with a link (suffix)
15284 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15286 <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>
15289 <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>
15293 T2648: Frameless image caption with an interwiki link
15295 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15297 <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>
15300 <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>
15304 T2648: Frameless image caption with a piped interwiki link
15306 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15308 <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>
15311 <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>
15315 T107474: Frameless image caption with <nowiki>
15317 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15319 <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>
15323 Escape HTML special chars in image alt text
15325 [[File:Foobar.jpg|& < > "]]
15327 <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>
15330 <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>
15334 Escape HTML special chars in image alt text with LanguageConverter
15338 [[File:Foobar.jpg|& < > "]]
15340 <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>
15343 <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>
15347 Entities in file name and attributes
15349 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15351 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15354 <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>
15358 T2499: Alt text should have Ӓ, not &1234;
15360 [[File:Foobar.jpg|♀]]
15362 <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>
15365 <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>
15369 Broken image caption with link
15371 parsoid=wt2html,wt2wt,html2html
15373 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15375 <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.
15378 <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>
15382 Image caption containing another image
15384 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15386 <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>
15389 <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>
15393 Image: caption containing a newline
15395 [[File:Foobar.jpg|This
15398 <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>
15401 <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>
15405 Image: caption containing leading space
15406 (The leading space should not trigger nowiki escaping in wt2wt mode)
15408 [[File:Foobar.jpg|thumb| bar]]
15410 <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>
15413 <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>
15416 # html/php output not have newlines after table, td, th, etc. because
15417 # Linker::makeThumbLink2() replaces the newlines with spaces since
15418 # the table is inside a caption.
15419 # FIXME: Verify if that circa 2004 fix is still required.
15421 Image: caption containing a table
15423 parsoid=wt2html,wt2wt,html2html
15425 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15431 and some more text.]]
15433 <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>
15436 <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
15439 <tr><th>Foo</th><th>Bar</th></tr>
15442 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15446 T5090: External links other than http: in image captions
15448 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15450 <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>
15453 <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>
15459 parsoid=wt2html,wt2wt,html2html
15461 [[Image:foobar.jpg|a|class=b]]
15463 <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>
15466 <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>
15470 Localized image handling (1).
15472 parsoid=wt2html,wt2wt,html2html
15475 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15477 <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>
15480 <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>
15484 Localized image handling (2).
15487 parsoid=wt2html,wt2wt,html2html
15490 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15492 <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>
15495 <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>
15499 Localized image handling (3).
15504 <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>
15506 [[File:Foobar.jpg|بندانگشتی]]
15510 "border", "frameless" and "class" attributes on an image.
15513 parsoid=wt2html,wt2wt,html2html
15515 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15517 <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>
15520 <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>
15523 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15525 Invalid image attributes (T64500)
15528 parsoid=wt2html,wt2wt,html2html
15530 [[File:Foobar.jpg|thumb|float|left|caption]]
15532 [[File:Foobar.jpg|thumb|righ|caption]]
15534 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15536 <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>
15537 <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>
15538 <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>
15541 <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>
15542 <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>
15543 <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>
15549 #REDIRECT [[File:Barfoo.jpg]]
15552 # FIXME: Parsoid should run this test -- but we'd need to teach the
15553 # mockAPI about the redirected Barfoo.jpg image.
15557 [[Image:Barfoo.jpg]]
15559 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15564 Missing image with uploads disabled
15568 [[File:Foobaz.jpg]]
15570 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15573 <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>
15576 # Parsoid-specific testing for images
15577 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15578 # Currently imperfect due to a flaw in the Parsoid testrunner
15580 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15584 Parsoid-specific image handling - simple image with size and middle alignment
15586 [[File:Foobar.jpg|middle|50px]]
15588 <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>
15592 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
15594 parsoid=wt2wt,wt2html,html2html
15596 [[Image:Foobar.jpg|middle|50px]]
15598 <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>
15602 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
15604 [[File:Foobar.jpg|50px|middle]]
15606 <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>
15610 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
15612 parsoid=wt2html,wt2wt,html2html
15614 [[Image:Foobar.jpg|50px|middle]]
15616 <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>
15620 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15622 [[File:Foobar.jpg|500x10px|baseline|caption]]
15624 <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>
15628 Parsoid-specific image handling - simple image with border and size spec
15630 [[File:Foobar.jpg|50px|border|caption]]
15632 <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>
15636 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15638 parsoid=wt2html,html2html
15640 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15642 <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>
15646 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
15648 parsoid=wt2html,html2html
15650 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15652 <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>
15656 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15658 parsoid=wt2html,html2html
15660 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15662 <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>
15666 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
15668 parsoid=wt2html,html2html
15670 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15672 <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>
15676 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
15678 parsoid=wt2html,wt2wt,html2html
15680 [[File:Foobar.jpg|frame|500x50px|caption]]
15682 <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>
15686 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
15688 parsoid=wt2html,html2html
15690 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15692 <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>
15696 Parsoid-specific image handling - frameless image with specific size, border, and caption
15698 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15700 <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>
15704 Parsoid-specific image handling - simple image with a formatted caption
15706 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15708 <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>
15712 Parsoid-specific image handling - caption with a template in it
15714 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15716 <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>
15720 Parsoid-specific image handling - caption with unbalanced tags in it
15722 parsoid=wt2html,wt2wt,html2html
15725 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15729 <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>
15734 Parsoid-specific image handling - empty caption (1)
15736 parsoid=wt2html,wt2wt
15738 [[File:Foobar.jpg|thumb|]]
15740 <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>
15743 # empty captions don't get serialized unless we're in the "round trip" case
15745 Parsoid-specific image handling - empty caption (2)
15749 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15750 <a href="./File:Foobar.jpg">
15751 <img resource="./File:Foobar.jpg"
15752 src="//example.com/images/3/3a/Foobar.jpg"
15753 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15754 height="25" width="220"/>
15756 <figcaption></figcaption>
15759 [[File:Foobar.jpg|thumb]]
15763 Parsoid-specific image handling - whitespace caption
15765 [[File:Foobar.jpg|thumb| ]]
15767 <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>
15771 Parsoid-specific image handling - lang option
15774 [[File:Foobar.svg|lang=de|caption]]
15778 <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>
15782 ## Edge case bugs in Parsoid from T93580
15784 T93580: 1. Templated <ref> inside block images
15786 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15790 <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>
15792 <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>
15796 T93580: 2. <ref> inside inline images
15798 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15802 <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>
15804 <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>
15808 T93580: 3. Templated <ref> inside inline images
15810 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15814 <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>
15816 <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>
15823 Subpage test/subpage
15831 subpage title=[[Subpage test]]
15835 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15840 Subpage noslash link
15842 subpage title=[[Subpage test]]
15846 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15851 Subpage test/1/2/subpage
15857 Relative subpage noslash link
15859 parsoid=wt2wt,wt2html,html2html
15860 subpage title=[[Subpage test/1/2/3/4]]
15866 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15867 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15870 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15871 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15875 Parsoid: dot-slash prefixed wikilinks
15885 </p><p>[[././baz/]]
15890 </p><p>[[././baz/]]
15895 Render invalid page names as plain text (T53090)
15907 [[foo[http://example.com]xyz]]
15909 [[{{echo|./../foo}}|bar]]
15910 [[{{echo|foo/.}}|bar]]
15911 [[{{echo|foo/..}}|bar]]
15912 [[{{echo|foo~~~~bar}}]]
15913 [[{{echo|foo>bar}}]]
15914 [[{{echo|foo././bar}}]]
15915 [[{{echo|foo{bar}}]]
15916 [[{{echo|foo}bar}}]]
15917 [[{{echo|foo[bar}}]]
15918 [[{{echo|foo]bar}}]]
15919 [[{{echo|foo<bar}}]]
15921 <p>[[./../foo|bar]]
15931 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15932 </p><p>[[./../foo|bar]]
15945 <p>[[./../foo|bar]]
15955 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
15957 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15958 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15959 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15960 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15961 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15962 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15963 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15964 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15965 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15966 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15967 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<bar"}},"i":0}}]}'>foo<bar</span>]]</p>
15975 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15980 T2561: {{/Subpage}}
15982 subpage title=[[Page]]
15986 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15994 Category:MediaWiki User's Guide
16002 [[:Category:MediaWiki User's Guide]]
16004 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16013 [[Category:MediaWiki User's Guide]]
16015 cat=MediaWiki_User's_Guide sort=
16017 <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"}}'/>
16021 PAGESINCATEGORY invalid title fatal (r33546 fix)
16023 {{PAGESINCATEGORY:<bogus>}}
16030 Category with different sort key
16034 [[Category:MediaWiki User's Guide|Foo]]
16036 cat=MediaWiki_User's_Guide sort=Foo
16038 <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"}}'/>
16042 Category with identical sort key
16046 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16048 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16050 <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"}}'/>
16054 Category with empty sort key
16059 [[Category:MediaWiki User's Guide|]]
16061 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16065 Category with empty sort key and parentheses
16070 [[Category:Foo (bar)|]]
16072 [[Category:Foo (bar)|Foo]]
16076 Category with link tail
16081 123[[Category:Foo]]456
16083 123[[Category:Foo]]456
16087 Category with template
16092 [[Category:{{echo|Foo}}]]
16094 [[Category:{{echo|Foo}}]]
16098 Category with template in sort key
16103 [[Category:Foo|{{echo|Bar}}]]
16105 [[Category:Foo|{{echo|Bar}}]]
16109 Category with template in sort key and title
16114 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16116 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16119 ## We used to, but no longer wt2wt this test since the default serializer
16120 ## will normalize all categories to serialize on their own line.
16121 ## This wikitext usage is going to be fairly uncommon in production and
16122 ## selser will take care of preserving formatting in those scenarios.
16124 Category / paragraph interactions
16128 Foo [[Category:Baz]] Bar
16130 Foo [[Category:Baz]]
16138 [[Category:Baz]] Bar
16151 {{echo|[[Category:Baz]]}}
16164 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16165 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16166 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16167 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16168 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16169 <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}}]}'/>
16170 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16173 ## We used to, but no longer wt2wt this test since the default serializer
16174 ## will normalize all categories to serialize on their own line.
16175 ## This wikitext usage is going to be fairly uncommon in production and
16176 ## selser will take care of preserving formatting in those scenarios.
16178 ## The whitespace on the empty line is part of the test. Please do not delete
16180 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16186 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16188 {{echo|[[Category:Foo]] and so should this!}}
16190 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16195 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16197 <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>
16200 ## Parsoid will not try to wt2wt this while preserving newlines because
16201 ## it suppresses excess newlines within list items -- and we don't want to
16202 ## introduce a special case just for categories, which is, in reality somewhat
16203 ## odd behavior -- categories are unlikely to be used in list items like this
16204 ## in top-level pages and are only likely to show up in template-generated
16205 ## list items where this RT-ing is a non-issue.
16207 ## The whitespace on the empty line is part of the test. Please do not delete
16209 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16215 [[Category:Foo]] and this should be part of the same list item
16218 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16220 <ul><li>This and this should be part of the same list item</li>
16221 <li>So should this and this should be part of the same list item</li></ul>
16224 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16225 <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>
16229 ## Newlines and categories that follow the last item of a list
16230 ## are treated differently because this (list followed by categories)
16231 ## is an extremely common pattern on wikis.
16233 3. Categories and newlines: newline suppression for last list item should RT properly
16254 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16256 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16257 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16259 <dl><dd>c</dd></dl>
16261 <link rel="mw:PageProp/Category" href="./Category:C"/>
16263 <dl><dt>d</dt></dl>
16265 <link rel="mw:PageProp/Category" href="./Category:D"/>
16269 4. Categories and newlines: newline suppression for last list item should RT properly
16277 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16279 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16282 ## only wt2html for this to make sure the algo only applies to the rightmost path
16284 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16297 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16299 <ul><li>d</li></ul></li></ul>
16300 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16303 ## We used to, but no longer wt2wt this test since the default serializer
16304 ## will normalize all categories to serialize on their own line.
16305 ## This wikitext usage is going to be fairly uncommon in production and
16306 ## selser will take care of preserving formatting in those scenarios.
16308 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16312 *a [[Category:Foo]]
16314 <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>
16317 # This test also demonstrates because of newline+category tunneling
16318 # through the list hander, template wrapping doesn't expand to the
16319 # containing list when the list item swallows the category.
16321 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16326 <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
16327 </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>
16331 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16335 {{echo|[[Category:Foo]]
16339 <ul><li>a</li></ul>
16341 <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">
16342 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16343 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16347 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16351 [[Category:Bar]]<!--boo1--> <!--boo2-->
16352 [[Category:Baz]]<!--boo3--> <!--boo4-->
16354 <ul><li>a</li></ul>
16356 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16357 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16361 Categories and newlines: should behave properly with linkprefix (T87753)
16376 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16377 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16381 No regressions on internal links following category (T174639)
16383 parsoid=wt2html,html2html
16385 [[Category:Foo]]<div>a
16390 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16393 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16395 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16398 # Note that Parsoid differs slightly from PHP due to T175421
16400 11. Special case where only newlines separate links (T175416)
16402 parsoid=wt2html,html2html
16406 [[Foo]][[es:Alimento]]
16411 <a href="/wiki/Foo" title="Foo">Foo</a>
16412 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16415 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16417 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16419 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16423 Category links with multiple namespaces
16425 [[Category:Project:Foo]]
16427 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16431 Parsoid: Serialize link to category page with colon escape
16437 [[:Category:Foo|Bar]]
16440 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16441 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16445 # We used to, but no longer wt2wt this test since the default serializer
16446 # will normalize all categories to serialize on their own line.
16447 # This wikitext usage is going to be fairly uncommon in production and
16448 # selser will take care of preventing whitespace insertion if this
16449 # occurs in an article.
16451 # html2html disabled for the same reason (whitespace insertion between
16454 # html2wt disabled because it localizes the "Category" namespace.
16456 Link prefix/suffixes aren't applied to category links
16466 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16470 Link prefix/suffixes aren't applied to language links
16480 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16484 Parsoid: Serialize link to file page with colon escape
16490 [[:File:Foo.png|Bar]]
16493 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16494 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16499 Parsoid: Serialize a genuine category link without colon escape
16504 [[Category:Foo|Bar]]
16506 <link rel="mw:PageProp/Category" href="./Category:Foo">
16507 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16511 Normalize hrefs properly before testing for invalid link targets (T72894)
16515 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16517 [[Category:Toxine bactérienne]]
16521 Parsoid: Defaultsort
16523 {{DEFAULTSORT:Foo}}
16525 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16528 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16529 # But, this is a limitation of our representation and is documented in
16530 # TemplateHandler.js in processSpecialMagicWord
16532 Parsoid: Defaultsort (template-generated)
16534 {{{{echo|DEFAULTSORT}}:Foo}}
16536 <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"}]]}'/>
16540 ### Inter-language links
16543 Interlanguage links
16551 es:Alimento fr:Nourriture zh:食品
16553 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16554 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16555 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16559 Duplicate interlanguage links (T26502)
16570 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16571 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16572 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16573 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16580 Basic section headings
16587 ===Smaller headline===
16590 <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>
16593 <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>
16596 <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>
16602 Section headings with TOC
16605 ===Subheadline 1===
16606 =====Skipping a level=====
16607 ======Skipping a level======
16611 ===Another headline===
16613 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16615 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16617 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16619 <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>
16621 <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>
16628 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16630 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16636 <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 <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>
16638 <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>
16639 <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>
16640 <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>
16643 <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>
16648 TOC anchors don't collide
16656 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16658 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16659 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16660 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16661 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16665 <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>
16666 <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>
16667 <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>
16668 <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>
16672 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16673 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16675 Handling of sections up to level 6 and beyond
16680 ==Level 2 Heading==
16681 ===Level 3 Heading===
16682 ====Level 4 Heading====
16683 =====Level 5 Heading=====
16684 ======Level 6 Heading======
16685 =======Level 7 Heading=======
16686 ========Level 8 Heading========
16687 =========Level 9 Heading=========
16688 ==========Level 10 Heading==========
16690 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16692 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16694 <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>
16696 <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>
16698 <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>
16700 <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>
16702 <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>
16703 <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>
16704 <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>
16705 <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>
16706 <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>
16720 <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>
16721 <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>
16722 <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>
16723 <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>
16724 <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>
16725 <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>
16726 <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>
16727 <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>
16728 <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>
16729 <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>
16732 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16733 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16734 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16735 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16736 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16737 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16738 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16739 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16740 <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>
16741 <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>
16745 TOC regression (T11764)
16749 ====title 1.1.1====
16754 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16756 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16758 <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>
16760 <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>
16763 <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>
16766 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16768 <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>
16774 <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>
16775 <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>
16776 <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>
16777 <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>
16778 <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>
16779 <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>
16784 TOC for heading containing <span id="..."></span> (T96153)
16787 ==<span id="old-anchor"></span>New title==
16789 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16791 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16795 <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>
16800 TOC with wgMaxTocLevel=3 (T8204)
16806 ====title 1.1.1====
16811 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16813 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16815 <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>
16816 <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>
16819 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16821 <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>
16827 <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>
16828 <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>
16829 <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>
16830 <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>
16831 <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>
16832 <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>
16837 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16843 ====Section 1.1.1====
16844 ====Section 1.1.1.1====
16847 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16849 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16851 <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>
16854 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16858 <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>
16859 <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>
16860 <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>
16861 <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>
16862 <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>
16868 Resolving duplicate section names
16873 <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>
16874 <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>
16879 Resolving duplicate section names with differing case (T12721)
16884 <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>
16885 <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>
16897 Template with sections, __NOTOC__
16904 <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>
16905 <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>
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=Template:Sections&action=edit&section=T-2" title="Template:Sections">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
16907 <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>
16912 __NOEDITSECTION__ keyword
16918 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16919 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16924 Link inside a section heading
16926 ==Section with a [[Main Page|link]] in it==
16928 <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>
16933 TOC regression (T14077)
16940 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16942 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16944 <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>
16947 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16951 <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>
16952 <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>
16953 <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>
16958 T3219 URL next to image (good)
16960 http://example.com [[File:Foobar.jpg]]
16962 <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>
16965 <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>
16968 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16970 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16972 parsoid=wt2html,html2html
16975 The line above must have a trailing space!
16978 But just in case it doesn't...
16980 <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>
16981 <p>The line above must have a trailing space!
16983 <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>
16984 <p>But just in case it doesn't...
16987 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16988 <p>The line above must have a trailing space!</p>
16989 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16991 <p>But just in case it doesn't...</p>
16995 Header with special characters (T27462)
16997 The tooltips shall not show entities to the user (ie. be double escaped)
17014 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17016 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17018 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17019 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17020 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17021 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17022 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17026 <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>
17029 <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>
17032 <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>
17035 <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>
17038 <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>
17042 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17044 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17047 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17050 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17053 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17056 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17061 Header with space, plus and underscore as entity
17063 Id should not contain + for spaces
17065 ==Space between Text==
17068 ==Space-Entity between Text==
17071 ==Plus+between+Text==
17074 ==Plus-Entity+between+Text==
17077 ==Underscore_between_Text==
17080 ==Underscore-Entity_between_Text==
17083 [[#Space between Text]]
17084 [[#Space-Entity between Text]]
17085 [[#Plus+between+Text]]
17086 [[#Plus-Entity+between+Text]]
17087 [[#Underscore_between_Text]]
17088 [[#Underscore-Entity_between_Text]]
17090 <p>Id should not contain + for spaces
17092 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17094 <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>
17095 <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>
17096 <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>
17097 <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>
17098 <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>
17099 <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>
17103 <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>
17106 <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>
17109 <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>
17112 <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>
17115 <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>
17118 <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>
17120 </p><p><a href="#Space_between_Text">#Space between Text</a>
17121 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17122 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17123 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17124 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17125 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17128 <p>Id should not contain + for spaces</p>
17130 <h2 id="Space_between_Text">Space between Text</h2>
17133 <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>
17136 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17139 <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>
17142 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17145 <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>
17148 <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>
17149 <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>
17150 <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>
17151 <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>
17152 <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>
17153 <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>
17156 # Parsoid html2wt disabled because it adds padding spaces around =
17158 Headers with excess '=' characters
17159 (Are similar tests necessary beyond the 1st level?)
17161 parsoid=wt2html,wt2wt,html2html
17165 =''italic'' heading==
17166 ==''italic'' heading=
17168 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17170 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17171 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17172 <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>
17173 <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>
17177 <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>
17178 <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>
17179 <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>
17180 <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>
17183 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17184 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17185 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17186 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17190 HTML headers vs TOC (T25393)
17191 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17203 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17205 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17207 <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>
17208 <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>
17211 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17213 <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>
17214 <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>
17220 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17221 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17222 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17223 <h1><span class="mw-headline" id="Header_2">Header 2
17225 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17226 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17229 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17230 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17231 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17233 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17235 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17236 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17237 <meta property="mw:PageProp/noeditsection"/>
17241 Single-line or multiline-comments can follow headings
17243 parsoid=wt2html,wt2wt
17251 <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>
17252 <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>
17253 <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>
17256 <h2 id="foo">foo</h2><!---->
17257 <h2 id="bar">bar</h2><!--c1-->
17258 <h2 id="baz">baz</h2><!--
17264 T3219 URL next to image (broken)
17266 http://example.com[[File:Foobar.jpg]]
17268 <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>
17271 <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>
17275 T3186 news: in the middle of text
17277 http://en.wikinews.org/wiki/Wikinews:Workplace
17279 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17285 Namespaced link must have a title
17294 Namespaced link must have a title (bad fragment version)
17296 [[Project:#fragment]]
17298 <p>[[Project:#fragment]]
17304 ### HTML tags and HTML attributes
17308 div with no attributes
17310 <div>HTML rocks</div>
17312 <div>HTML rocks</div>
17317 div with double-quoted attribute
17319 <div id="rock">HTML rocks</div>
17321 <div id="rock">HTML rocks</div>
17326 div with single-quoted attribute
17328 <div id='rock'>HTML rocks</div>
17330 <div id="rock">HTML rocks</div>
17335 div with unquoted attribute
17337 <div id=rock>HTML rocks</div>
17339 <div id="rock">HTML rocks</div>
17344 div with illegal double attributes
17346 <div id="a" id="b">HTML rocks</div>
17348 <div id="b">HTML rocks</div>
17353 div with empty attribute value, space before equals
17355 parsoid=wt2html,html2html
17357 <div class =>HTML rocks</div>
17359 <div class="">HTML rocks</div>
17362 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17366 div with multiple empty attribute values
17368 wgFragmentMode=[ 'html5', 'legacy' ]
17370 parsoid=wt2html,html2html
17372 <div id= title=>HTML rocks</div>
17374 <div id="title=">HTML rocks</div>
17377 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17380 # FIXME Parsoid doesn't actually match PHP here.
17381 # Probably we should use the synthetic <foo /> or <indicator>
17382 # extensions for this test, which are enabled when running parser tests.
17384 Extension tag in attribute value
17386 <span title="<translate>123</translate>">ok</span>
17387 !! html/php+disabled
17388 <p><span title="<translate>123</translate>">ok</span>
17391 <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>
17395 table with multiple empty attribute values
17397 parsoid=wt2html,html2html
17403 <table title="id=">
17409 <table title="id=">
17410 <tbody><tr><td>hi</td></tr>
17415 div with braces in attribute value
17417 <div title="{}">Foo</div>
17419 <div title="{}">Foo</div>
17422 <div title="{}">Foo</div>
17426 div with empty attribute value, no space before equals
17428 parsoid=wt2html,html2html
17430 <div class=>HTML rocks</div>
17432 <div class="">HTML rocks</div>
17435 <div class="">HTML rocks</div>
17439 HTML multiple attributes correction
17441 <p class="error" class="awesome">Awesome!</p>
17443 <p class="awesome">Awesome!</p>
17448 Table multiple attributes correction
17451 !+ class="error" class="awesome"|status
17456 <th class="awesome">status
17464 <DIV ID="x">HTML ROCKS</DIV>
17466 <div id="x">HTML ROCKS</div>
17471 Non-ASCII pseudo-tags are rendered as text
17480 Pseudo-tag with URL 'name' renders as url link
17482 <http://example.com/>
17484 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17489 text with amp in the middle of nowhere
17493 <p>Remember AT&T?
17498 text with character entity: eacute
17500 I always thought é was a cute letter.
17502 <p>I always thought é was a cute letter.
17507 text with entity-escaped character entity-like string: eacute
17509 I always thought &eacute; was a cute letter.
17511 <p>I always thought &eacute; was a cute letter.
17516 text with undefined character entity: xacute
17518 I always thought &xacute; was a cute letter.
17520 <p>I always thought &xacute; was a cute letter.
17527 <data value="5">five</data>
17528 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17529 <mark>This highlighted text</mark>
17531 <p><data value="5">five</data>
17532 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17533 <mark>This highlighted text</mark>
17538 HTML tag with leading space is parsed as text
17542 <p>< div>foo< /div>
17546 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17547 ## the HTML5 parsing spec.
17549 Element with broken attribute syntax
17553 <div style=" style="123">hi</div>
17556 <div style="123">hi</div>
17560 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17561 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17565 ### Nesting tests (see T43545, T52604, T53081)
17568 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17569 # Note that html2wt is considerably more difficult if we use <b> in
17570 # the test case, instead of <small>
17572 Ensure that HTML adoption agency algorithm is properly implemented.
17574 <small>X<small>Y</small>Z</small>
17576 <p><small>X<small>Y</small>Z</small>
17580 # This was T43545 in the PHP parser.
17584 <kbd>X<kbd>Y</kbd>Z</kbd>
17586 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17590 # The following cases were T53081 in the PHP parser.
17591 # Note that there are some other nestable tags (b, i, etc) which are
17592 # not covered; see T53081 for discussion.
17597 <em>X<em>Y</em>Z</em>
17599 <p><em>X<em>Y</em>Z</em>
17604 Nesting of <strong>
17606 <strong>X<strong>Y</strong>Z</strong>
17608 <p><strong>X<strong>Y</strong>Z</strong>
17617 <p><q>X<q>Y</q>Z</q>
17624 <ruby>X<ruby>Y</ruby>Z</ruby>
17626 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17633 <bdo>X<bdo>Y</bdo>Z</bdo>
17635 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17647 [[Media:Foobar.jpg]]
17648 [[Media:Video.ogv]]
17649 [[:Media:Video.ogv]]
17651 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17652 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17653 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17656 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17657 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17658 <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>
17662 Media link with text
17664 [[Media:Foobar.jpg|A neat file to look at]]
17666 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17669 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17672 # FIXME: this is still bad HTML tag nesting
17673 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17674 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17676 Media link with nasty text
17678 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17680 <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>
17683 <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>
17685 <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>
17690 Media link to nonexistent file (T3702)
17692 [[Media:No such.jpg]]
17693 [[Media:No_such file.jpg]]
17695 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17696 <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>
17699 <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>
17700 <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>
17704 Image link to nonexistent file (T3850 - good)
17706 [[File:No_such.jpg]]
17708 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17711 <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>
17715 :Image link to nonexistent file (T3850 - bad)
17717 [[:Image:No such.jpg]]
17719 <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>
17722 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17726 Character reference normalization in link text (T3938)
17728 [[Main Page|this&that]]
17730 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17737 Test for unicode normalization
17739 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17743 (T21451) Links should refer to the normalized form.
17751 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17752 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17753 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17754 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17755 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17760 Empty attribute crash test (T4067)
17762 <font color="">foo</font>
17764 <p><font color="">foo</font>
17769 Empty attribute crash test single-quotes (T4067)
17771 <font color=''>foo</font>
17773 <p><font color="">foo</font>
17778 Attribute test: equals, then nothing
17780 parsoid=wt2html,html2html
17782 <font color=>foo</font>
17784 <p><font color="">foo</font>
17787 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17791 Attribute test: unquoted value
17793 parsoid=wt2html,html2html
17795 <font color=x>foo</font>
17797 <p><font color="x">foo</font>
17800 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17804 Attribute test: unquoted but illegal value (hash)
17806 <font color=#x>foo</font>
17808 <p><font color="#x">foo</font>
17812 # Parsoid does not serialize to empty attribute syntax,
17813 # so wt2wt and html2wt cases are skipped
17815 Attribute test: no value (T54330)
17817 parsoid=wt2html,html2html
17819 <font color>foo</font>
17821 <p><font color="">foo</font>
17824 <p><font color="">foo</font></p>
17828 T4095: link with three closing brackets
17832 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17835 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17839 T4095: link with pipe and three closing brackets
17841 [[Main Page|link]]]
17843 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17846 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17850 T4095: link with pipe and three closing brackets, version 2
17852 [[Main Page|[http://example.com/]]]
17854 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17857 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17866 Template:Dangerous attribute
17868 " onmouseover="alert(document.cookie)
17872 Template:Dangerous style attribute
17874 border-size: expression(alert(document.cookie))
17880 <div style="float: right; {{{1}}}">Magic div</div>
17884 T4304: HTML attribute safety (safe template; regression T4309)
17886 <div title="{{test}}"></div>
17888 <div title="This is a test template"></div>
17891 <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>
17894 # Parsoid has enough context to handle this case
17896 T4304: HTML attribute safety (dangerous template; 2309)
17898 <div title="{{dangerous attribute}}"></div>
17900 <div title=""></div>
17903 <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>
17907 T4304: HTML attribute safety (dangerous style template; 2309)
17909 <div style="{{dangerous style attribute}}"></div>
17911 <div style="/* insecure input */"></div>
17914 <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>
17918 T4304: HTML attribute safety (safe parameter; 2309)
17920 {{div style|width: 200px}}
17922 <div style="float: right; width: 200px">Magic div</div>
17925 <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>
17929 T4304: HTML attribute safety (unsafe parameter; 2309)
17931 {{div style|width: expression(alert(document.cookie))}}
17933 <div style="/* insecure input */">Magic div</div>
17936 <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>
17939 ## Parsoid output here differs; needs investigation.
17941 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17943 {{div style|"><script>alert(document.cookie)</script>}}
17945 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17949 ## Parsoid output here differs; needs investigation.
17951 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17953 {{div style|" ><script>alert(document.cookie)</script>}}
17955 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17960 T4304: HTML attribute safety (link)
17962 <div title="[[Main Page]]"></div>
17964 <div title="[[Main Page]]"></div>
17967 <div title="[[Main Page]]"></div>
17971 T4304: HTML attribute safety (italics)
17973 <div title="''foobar''"></div>
17975 <div title="''foobar''"></div>
17980 T4304: HTML attribute safety (bold)
17982 <div title="'''foobar'''"></div>
17984 <div title="'''foobar'''"></div>
17989 T4304: HTML attribute safety (ISBN)
17991 <div title="ISBN 1234567890"></div>
17993 <div title="ISBN 1234567890"></div>
17998 T4304: HTML attribute safety (RFC)
18000 <div title="RFC 1234"></div>
18002 <div title="RFC 1234"></div>
18007 T4304: HTML attribute safety (PMID)
18009 <div title="PMID 1234567890"></div>
18011 <div title="PMID 1234567890"></div>
18016 T4304: HTML attribute safety (web link)
18018 <div title="http://example.com/"></div>
18020 <div title="http://example.com/"></div>
18025 T4304: HTML attribute safety (named web link)
18027 <div title="[http://example.com/ link]"></div>
18029 <div title="[http://example.com/ link]"></div>
18032 <div title="[http://example.com/ link]"></div>
18036 T5244: HTML attribute safety (extension; safe)
18038 <div style="<nowiki>background:blue</nowiki>"></div>
18040 <div style="background:blue"></div>
18043 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18047 T5244: HTML attribute safety (extension; unsafe)
18049 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18051 <div style="/* insecure input */"></div>
18054 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18057 # More MSIE fun discovered by Tom Gilder
18060 MSIE CSS safety test: spurious slash
18062 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18064 <div style="/* insecure input */">evil</div>
18067 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18071 MSIE CSS safety test: hex code
18073 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18075 <div style="/* insecure input */">evil</div>
18078 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18082 MSIE CSS safety test: comment in url
18084 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18086 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18089 <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>
18093 MSIE CSS safety test: comment in expression
18095 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18097 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18100 <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>
18104 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18106 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18108 <p style="/* invalid control char */">A</p>
18111 <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>
18115 MSIE 6 CSS safety test: Fullwidth (T57332)
18117 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18118 <div style="top:EXPRESSION(alert())">B</div>
18120 <p style="/* insecure input */">A</p>
18121 <div style="/* insecure input */">B</div>
18124 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18125 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18129 MSIE 6 CSS safety test: IPA extensions (T57332)
18131 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18132 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18134 <div style="/* insecure input */">A</div>
18135 <p style="/* insecure input */">B</p>
18138 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18139 <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>
18143 MSIE 6 CSS safety test: sup/sub script (T57332)
18145 <div style="background-image:url⁽javascript:alert())">A</div>
18146 <div style="background-image:url₍javascript:alert())">B</div>
18147 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18149 <div style="/* insecure input */">A</div>
18150 <div style="/* insecure input */">B</div>
18151 <p style="/* insecure input */">C</p>
18154 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18155 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18156 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18162 parsoid=wt2html,html2html
18165 title="data:text/html,<img src=1 onerror=alert(1)>"
18166 style="-o-link:attr(title);-o-link-source:current">X</div>
18168 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18171 <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>
18175 MSIE 6 CSS safety test: Repetition markers (T57332)
18177 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18178 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18179 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18180 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18181 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18182 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18183 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18185 <p style="/* insecure input */">A</p>
18186 <p style="/* insecure input */">B</p>
18187 <p style="/* insecure input */">C</p>
18188 <p style="/* insecure input */">D</p>
18189 <p style="/* insecure input */">E</p>
18190 <p style="/* insecure input */">F</p>
18191 <p style="/* insecure input */">G</p>
18194 <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>
18195 <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>
18196 <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>
18197 <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>
18198 <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>
18199 <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>
18200 <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>
18204 Table attribute legitimate extension
18207 !+ style="<nowiki>color:blue</nowiki>"|status
18212 <th style="color:blue">status
18218 Table attribute safety
18221 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18226 <th style="/* insecure input */">status
18232 CSS line continuation 1
18234 <div style="background-image: u\ rl(test.jpg);"></div>
18236 <div style="/* insecure input */"></div>
18241 CSS line continuation 2
18243 <div style="background-image: u\ rl(test.jpg); "></div>
18245 <div style="/* invalid control char */"></div>
18256 Expansion of multi-line templates in attribute values (T8255)
18258 <div style="background: {{identity|#00FF00}}">-</div>
18260 <div style="background: #00FF00">-</div>
18265 Expansion of multi-line templates in attribute values (T8255 sanity check)
18267 <div style="background:
18270 <div style="background: #00FF00">-</div>
18273 <div style="background:
18278 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18280 <div style="background: #00FF00">-</div>
18282 <div style="background: #00FF00">-</div>
18287 Tags which are hidden from tidiers cannot pass through the Sanitizer
18289 <mw:toc><script>alert();</script></mw:toc>
18291 <p><mw:toc><script>alert();</script></mw:toc>
18296 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18300 Parser hook: empty input
18311 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18314 ## Don't expect parsoid to rt this form.
18316 Parser hook: empty input using terminated empty elements
18318 parsoid=wt2html,html2html
18329 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18333 Parser hook: empty input using terminated empty elements (space before)
18344 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18348 Parser hook: basic input
18359 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18362 ## Don't expect parsoid to rt this form.
18364 Parser hook: case insensitive
18366 parsoid=wt2html,html2html
18377 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18380 ## Don't expect parsoid to rt this form.
18382 Parser hook: case insensitive, redux
18384 parsoid=wt2html,html2html
18395 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18399 Parser hook: nested tags
18401 <tag><tag></tag></tag>
18410 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18414 Parser hook: basic arguments
18416 <tag width="200" height="100" depth="50" square=""></tag>
18429 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18432 ## Don't expect parsoid to rt this form.
18434 Parser hook: basic arguments, variations
18436 parsoid=wt2html,html2html
18438 <tag width=200 height = "100" depth = '50' square></tag>
18451 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18455 Parser hook: argument containing a forward slash (T7344)
18457 <tag filename="/tmp/bla"></tag>
18462 'filename' => '/tmp/bla',
18467 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18470 ## Don't expect parsoid to rt this form.
18472 Parser hook: empty input using terminated empty elements (T4374)
18474 parsoid=wt2html,html2html
18486 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18489 ## </tag> should be output literally since there is no matching tag that begins it
18490 ## Don't expect parsoid to rt this form.
18492 Parser hook: basic arguments using terminated empty elements (T4374)
18496 <tag width=200 height = "100" depth = '50' square/>
18513 <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
18517 ## Don't expect parsoid to rt this form.
18519 Parser hook: Don't allow unclosed extension tags
18525 this is a '''test'''
18527 <p>test <tag>123
18528 </p><p>this is a <b>test</b>
18531 <p>test <tag>123</p>
18533 <p>this is a <b>test</b></p>
18537 Parser hook: horizontal rule inside extension tag that outputs <pre>
18558 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18562 Parser hook: static parser hook not inside a comment
18564 <statictag>hello, world</statictag>
18566 <statictag action="flush" />
18572 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18573 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18577 Parser hook: static parser hook inside a comment
18579 <!-- <statictag>hello, world</statictag> -->
18580 <statictag action="flush" />
18585 <!-- <statictag>hello, world</statictag> -->
18586 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18589 # Nested template calls; this case was broken by Parser.php rev 1.506,
18593 Template:One-parameter
18595 (My parameter is: {{{1}}})
18599 Template:Map-one-parameter
18601 {{{{{1}}}|{{{2}}}}}
18605 Nested template calls
18607 {{Map-one-parameter|One-parameter|param}}
18609 <p>(My parameter is: param)
18618 # Remex wraps empty tag runs with p-tags.
18619 # Parsoid strips them out during p-wrapping.
18621 Sanitizer: Closing of open tags
18623 <s></s><table></table>
18625 <p><s></s></p><table></table>
18627 <s></s><table></table>
18631 Sanitizer: Closing of open but not closed tags
18640 Sanitizer: Closing of closed but not open tags
18646 <p class="mw-empty-elt">
18652 Sanitizer: Closing of closed but not open table tags
18656 Table not started</td></tr></table>
18658 <p>Table not started
18663 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18665 wgFragmentMode=[ 'html5', 'legacy' ]
18667 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18669 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18672 <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>
18676 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18678 wgFragmentMode=[ 'legacy' ]
18680 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18682 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18686 # In HTML5, the restrictions are that id must contain at least one character,
18687 # and must not contain any space characters.
18689 Sanitizer: Validating the contents of the id attribute (T6515)
18693 <br id="" /><br id="a space" />
18698 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18700 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18704 <br id="foo" /><br id="foo" />
18706 Something need to be done. foo-2 ?
18710 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18713 <meta itemprop="hello" content="world">
18714 <meta http-equiv="refresh" content="5">
18715 <meta itemprop="hello" http-equiv="refresh" content="5">
18716 <link itemprop="hello" href="{{SERVER}}">
18717 <link rel="stylesheet" href="{{SERVER}}">
18718 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18722 <p> <meta itemprop="hello" content="world" />
18723 <meta http-equiv="refresh" content="5">
18724 <meta itemprop="hello" content="5" />
18725 <link itemprop="hello" href="http://example.org" />
18726 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18727 <link itemprop="hello" href="http://example.org" />
18734 Sanitizer: Strip comments from CSS attributes
18736 parsoid=wt2html,wt2wt
18738 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18740 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18743 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18747 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18749 [[meatball:Soft"Security]]
18751 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18754 <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>
18758 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18760 [[meatball:Foo<Bar]]
18761 [[meatball:Foo>Bar]]
18762 [[meatball:Foo<bar]]
18763 [[meatball:Foo>bar]]
18765 <p>[[meatball:Foo<Bar]]
18766 [[meatball:Foo>Bar]]
18767 [[meatball:Foo<bar]]
18768 [[meatball:Foo>bar]]
18771 <p>[[meatball:Foo<Bar]]
18772 [[meatball:Foo>Bar]]
18773 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18774 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18778 Language converter: output gets cut off unexpectedly (T7757)
18782 this bit is safe: }-
18784 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18786 then we get cut off here: }-
18788 all additional text is vanished
18790 <p>this bit is safe: }-
18791 </p><p>but if we add a conversion instance: xxx
18792 </p><p>then we get cut off here: }-
18793 </p><p>all additional text is vanished
18796 <p>this bit is safe: }-</p>
18797 <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>
18798 <p>then we get cut off here: }-</p>
18799 <p>all additional text is vanished</p>
18803 Language converter glossary rules inside attributes (T119158)
18805 language=sr variant=sr-el
18807 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18809 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18812 </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>
18815 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18817 <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>
18821 Self closed html pairs (T7487)
18823 <center><font id="bug" />Centered text</center>
18824 <div><font id="bug2" />In div text</div>
18826 <center><font id="bug"></font>Centered text</center>
18827 <div><font id="bug2"></font>In div text</div>
18831 Punctuation: nbsp before exclamation
18835 <p>C'est grave !
18840 Punctuation: CSS !important (T13874)
18842 <div style="width:50% !important">important</div>
18844 <div style="width:50% !important">important</div>
18849 Punctuation: CSS ! important (T13874; with space after)
18851 <div style="width:50% ! important">important</div>
18853 <div style="width:50% ! important">important</div>
18858 HTML bullet list, closed tags (T7497)
18871 <ul data-parsoid='{"stx":"html"}'>
18872 <li data-parsoid='{"stx":"html"}'>One</li>
18873 <li data-parsoid='{"stx":"html"}'>Two</li>
18879 HTML bullet list, unclosed tags (T7497)
18891 <ul data-parsoid='{"stx":"html"}'>
18892 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18893 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18899 HTML ordered list, closed tags (T7497)
18912 <ol data-parsoid='{"stx":"html"}'>
18913 <li data-parsoid='{"stx":"html"}'>One</li>
18914 <li data-parsoid='{"stx":"html"}'>Two</li>
18920 HTML ordered list, unclosed tags (T7497)
18933 <ol data-parsoid='{"stx":"html"}'>
18934 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18935 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18941 HTML nested bullet list, closed tags (T7497)
18964 <ul data-parsoid='{"stx":"html"}'>
18965 <li data-parsoid='{"stx":"html"}'>One</li>
18966 <li data-parsoid='{"stx":"html"}'>Two:
18967 <ul data-parsoid='{"stx":"html"}'>
18968 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18969 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18976 HTML nested bullet list, open tags (T7497)
18998 HTML nested ordered list, closed tags (T7497)
19023 HTML nested ordered list, open tags (T7497)
19060 HTML ordered list item with parameters oddity
19062 <ol><li id="fragment">One</li>
19065 <ol><li id="fragment">One</li>
19070 # parsoid doesn't explicitly mark autonumbered links, see T55505
19072 T7918: autonumbering
19074 [http://first/] [http://second] [ftp://ftp]
19078 [mailto:enclosed@mail.tld With target]
19080 [mailto:enclosed@mail.tld]
19082 mailto:inline@mail.tld
19084 <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>
19085 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19086 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19087 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19088 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19091 <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>
19092 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19093 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19094 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19095 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19100 # Security and HTML correctness
19101 # From Nick Jenkins' fuzz testing
19105 Fuzz testing: Parser13
19119 # Note that Parsoid output differs from the PHP parser here: the PHP
19120 # parser breaks the URL for the magic word, while in Parsoid the URL
19121 # production takes precedence.
19123 Fuzz testing: Parser14
19128 <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>
19129 http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
19131 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19137 <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>
19138 http://</p><div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
19140 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19144 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19145 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19149 Fuzz testing: Parser14-table
19151 parsoid=wt2html,html2html
19156 <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>
19157 <table style="__TOC__">
19162 <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>
19163 <table style="__TOC__">
19170 <table style="__TOC__"></table>
19173 # Known to produce bogus xml (extra </td>)
19174 # Don't add the html/php section since it generates broken HTML
19176 Fuzz testing: Parser16
19193 Fuzz testing: Parser21
19196 !irc://{{ftp://a" onmouseover="alert('hello world');"
19201 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19211 Fuzz testing: Parser22
19213 http://===r:::https://b
19217 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19225 # Known to produce bad XML for now
19227 Fuzz testing: Parser24
19234 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19235 <br style="onmouseover='alert(document.cookie);' " />
19237 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19242 <u class="|">}}}} >
19243 <br style="onmouseover='alert(document.cookie);'" />
19245 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19253 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19254 <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>"}'/>}}}} >
19255 <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}'>
19259 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19262 # Note: the current result listed for this is not what the original one was,
19263 # but the original bug was JavaScript injection, which is fixed in any case.
19264 # It's not clear that the original result listed was any more correct than the
19265 # current one. Original result:
19268 # <li class="||">
19269 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19271 Fuzz testing: Parser25 (T8055)
19277 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19279 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19282 <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"]}'>
19283 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19287 Fuzz testing: URL adjacent extension (with space, clean)
19289 http://example.com <nowiki>junk</nowiki>
19291 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19294 <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>
19298 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19300 http://example.com<nowiki>junk</nowiki>
19302 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19305 <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>
19309 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19311 http://example.com<pre>junk</pre>
19313 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19316 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19318 <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>
19322 Fuzz testing: image with bogus manual thumbnail
19324 [[Image:foobar.jpg|thumbnail= ]]
19326 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19329 <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>
19332 # Parsoid will emit the newline literally in wt2wt; see next test case.
19334 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19338 <pre dir=" "></pre>
19340 <pre dir=" "></pre>
19343 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19344 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19348 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19352 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19353 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19363 Templates in extension attributes are not expanded
19365 <pre dir="{{echo|ltr}}"></pre>
19367 <pre dir="{{echo|ltr}}"></pre>
19370 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19374 Parsing optional HTML elements (T8171)
19379 <td> Some tabular data</td>
19380 <td> More tabular data ...
19381 <td> And yet som tabular data</td>
19387 <td> Some tabular data</td>
19388 <td> More tabular data ...
19389 </td><td> And yet som tabular data</td>
19396 Correct handling of <td>, <tr> (T8171)
19401 <td> Some tabular data</td>
19402 <td> More tabular data ...</td>
19403 <td> And yet som tabular data</td>
19409 <td> Some tabular data</td>
19410 <td> More tabular data ...</td>
19411 <td> And yet som tabular data</td>
19419 Parsing crashing regression (fr:JavaScript)
19423 <p></body></x>
19428 Inline wiki vs wiki block nesting
19434 <p><b>Bold paragraph</b>
19435 </p><p>New wiki paragraph
19439 # FIXME: The current php output is documented
19440 # and desired output is the parsoid target.
19442 Inline HTML vs wiki block nesting
19448 <p><b>Bold paragraph
19449 </p><p>New wiki paragraph</b>
19452 <p><b>Bold paragraph</b>
19453 </p><p>New wiki paragraph
19457 # Original result was this:
19458 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19460 # While that might be marginally more intuitive, maybe, the six-apostrophe
19461 # construct is clearly pathological and the result stated here (which is what
19462 # the parser actually does) is about as reasonable as anything.
19464 Mixing markup for italics and bold
19467 '''bold''''''bold''bolditalics'''''
19469 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19477 Article for special page transclusion test
19481 Special page transclusion
19484 {{Special:Prefixindex/Xyzzyx}}
19486 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19492 Special page transclusion twice (T7021)
19495 {{Special:Prefixindex/Xyzzyx}}
19496 {{Special:Prefixindex/Xyzzyx}}
19498 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19500 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19506 Transclusion of default MediaWiki message
19508 {{MediaWiki:Mainpage}}
19515 Transclusion of nonexistent MediaWiki message
19517 {{MediaWiki:Mainpagexxx}}
19519 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19524 Transclusion of MediaWiki message with underscore
19526 {{MediaWiki:history_short}}
19533 Transclusion of MediaWiki message with space
19535 {{MediaWiki:history short}}
19542 Invalid header with following text
19552 Section extraction test (section 0)
19572 Section extraction test (section 1)
19594 Section extraction test (section 2)
19615 Section extraction test (section 3)
19635 Section extraction test (section 4)
19659 Section extraction test (section 5)
19679 Section extraction test (section 6)
19700 Section extraction test (section 7)
19720 Section extraction test (section 8)
19740 Section extraction test (section 9)
19761 Section extraction test (section 10)
19781 Section extraction test (nonexistent section 11)
19800 Section extraction test with bogus heading (section 1)
19805 ==bogus== not a legal section
19809 ==bogus== not a legal section
19813 Section extraction test with bogus heading (section 2)
19818 ==bogus== not a legal section
19825 Section extraction test with comment after heading (section 1)
19837 Section extraction test with comment after heading (section 2)
19849 Section extraction test with bogus <nowiki> heading (section 1)
19854 ==bogus== <nowiki>not a legal section</nowiki>
19858 ==bogus== <nowiki>not a legal section</nowiki>
19862 Section extraction test with bogus <nowiki> heading (section 2)
19867 ==bogus== <nowiki>not a legal section</nowiki>
19873 # Formerly testing for T4587, now resolved by the use of unmarked sections
19874 # instead of respecting commented sections
19876 Section extraction prefixed by comment (section 1)
19887 Section extraction prefixed by comment (section 2)
19897 # Formerly testing for T4607, now resolved by the use of unmarked sections
19898 # instead of respecting HTML-style headings
19900 Section extraction, mixed wiki and html (section 1)
19916 Section extraction, mixed wiki and html (section 2)
19932 # Formerly testing for T5342
19934 Section extraction, heading surrounded by <noinclude>
19938 <noinclude>==unmarked==</noinclude>
19944 # Test behavior of T21910
19946 Sectiion with all-equals
19951 The line above must have a trailing space
19954 But just in case it doesn't...
19958 But just in case it doesn't...
19962 Section replacement test (section 0)
19993 Section replacement test (section 1)
20022 Section replacement test (section 2)
20052 Section replacement test (section 3)
20083 Section replacement test (section 4)
20110 Section replacement test (section 5)
20141 Section replacement test (section 6)
20171 Section replacement test (section 7)
20202 Section replacement test (section 8)
20233 Section replacement test (section 9)
20262 Section replacement test (section 10)
20292 Section replacement test with initial whitespace (T15728)
20296 Preformatted initial line
20300 Preformatted initial line
20307 Section extraction, heading followed by pre with 20 spaces (T8398)
20319 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20332 Section extraction, <pre> around bogus header (T12309)
20349 Section replacement, <pre> around bogus header (T12309)
20370 Handling of 
 in URLs
20374 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20377 <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>
20381 Handling of %0A in URLs
20385 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20388 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20391 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20393 5 quotes, code coverage +1 line
20403 # same html as previous, but wikitext adjusted to match parsoid html2wt
20404 # note that wt2html and html2html will put the <i> before the <b>
20406 5 quotes, code coverage +1 line w/ nowiki (1)
20408 parsoid=wt2wt,html2wt
20410 '''''<nowiki/>'''''
20415 <p><b><i></i></b></p>
20418 # same as previous, just swapping the <i> and <b>
20420 5 quotes, code coverage +1 line w/ nowiki (2)
20422 '''''<nowiki/>'''''
20427 <p><i><b></b></i></p>
20431 Special:Search page linking.
20435 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20440 {{!}} is a magic word
20442 {{!}} is a magic word there and {{!}} is still a magic word here
20443 | is not a magic word here but {{!}} is still a magic word here
20445 <p>| is a magic word there and | is still a magic word here
20446 | is not a magic word here but | is still a magic word here
20449 <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
20450 | 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>
20456 title=[[Parser test]]
20470 *{{SUBJECTPAGENAME}}
20471 *{{SUBJECTPAGENAMEE}}
20474 *{{NAMESPACENUMBER}}
20479 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20481 <ul><li>Parser test</li>
20482 <li>Parser_test</li>
20483 <li>Parser test</li>
20484 <li>Parser_test</li>
20485 <li>Parser test</li>
20486 <li>Parser_test</li>
20487 <li>Parser test</li>
20488 <li>Parser_test</li>
20489 <li>Parser test</li>
20490 <li>Parser_test</li>
20491 <li>Talk:Parser test</li>
20492 <li>Talk:Parser_test</li>
20493 <li>Parser test</li>
20494 <li>Parser_test</li>
20502 <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>
20505 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20508 Gallery with valid attributes
20510 <gallery type="123" summary="345">
20511 File:File:Foobar.jpg
20514 <ul class="gallery mw-gallery-traditional" type="123">
20515 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20516 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20517 <div class="gallerytext">
20523 <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"}}'>
20524 <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>
20528 ## Parsoid thinks the "centre" here is a property, not a caption.
20533 "modes": ["wt2html"],
20534 "nativeGallery": true
20542 image4 |300px| centre
20543 image5.svg| http://///////
20548 <ul class="gallery mw-gallery-traditional">
20549 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20550 <div class="thumb" style="height: 150px;">Image1.png</div>
20551 <div class="gallerytext">
20554 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20555 <div class="thumb" style="height: 150px;">Image2.gif</div>
20556 <div class="gallerytext">
20559 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20560 <div class="thumb" style="height: 150px;">Image3</div>
20561 <div class="gallerytext">
20564 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20565 <div class="thumb" style="height: 150px;">Image4</div>
20566 <div class="gallerytext">
20571 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20572 <div class="thumb" style="height: 150px;">Image5.svg</div>
20573 <div class="gallerytext">
20574 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20578 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20579 <div class="thumb" style="height: 150px;">* image6</div>
20580 <div class="gallerytext">
20586 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20587 <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>
20588 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File: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>
20589 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image3"><img resource="./File:Image3" src="./Special:FilePath/Image3" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20590 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image4"><img resource="./File:Image4" src="./Special:FilePath/Image4" height="300" width="300"/></a></figure-inline></div><div class="gallerytext"></div></li>
20591 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File: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>
20592 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:*_image6"><img resource="./File:*_image6" src="./Special:FilePath/*_image6" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20597 Gallery (with options, html)
20600 "modes": ["wt2html", "html2html"],
20601 "nativeGallery": true
20604 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20605 File:Nonexistent.jpg|caption
20606 File:Nonexistent.jpg
20607 image:foobar.jpg|some '''caption''' [[Main Page]]
20609 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20612 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20613 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20614 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20615 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20616 <div class="gallerytext">
20621 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20622 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20623 <div class="gallerytext">
20626 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20627 <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>
20628 <div class="gallerytext">
20629 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20633 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20634 <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>
20635 <div class="gallerytext">
20638 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20639 <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>
20640 <div class="gallerytext">
20648 <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":{}}'>
20649 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20650 <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>
20651 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
20652 <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>
20653 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
20654 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img 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>
20659 Gallery (with options, extsrc)
20662 "nativeGallery": false
20665 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20666 File:Nonexistent.jpg|caption
20667 File:Nonexistent.jpg
20668 image:foobar.jpg|some '''caption''' [[Main Page]]
20670 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20673 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20674 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20675 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20676 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20677 <div class="gallerytext">
20682 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20683 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20684 <div class="gallerytext">
20687 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20688 <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>
20689 <div class="gallerytext">
20690 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20694 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20695 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="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>
20696 <div class="gallerytext">
20699 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20700 <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>
20701 <div class="gallerytext">
20709 <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"}}'>
20710 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20711 <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>
20712 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
20713 <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>
20714 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
20715 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img 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>
20720 Gallery (without px units)
20722 <gallery widths="70" heights="40">
20726 <ul class="gallery mw-gallery-traditional">
20727 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20728 <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>
20729 <div class="gallerytext">
20735 <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"}}'>
20736 <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>
20741 Gallery (with invalid units)
20743 <gallery widths="70em" heights="40em">
20747 <ul class="gallery mw-gallery-traditional">
20748 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20749 <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>
20750 <div class="gallerytext">
20756 <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"}}'>
20757 <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>
20762 Gallery with link that has fragment
20765 "modes": ["wt2html", "html2html"],
20766 "nativeGallery": true
20770 image:foobar.jpg|link=Main_Page
20771 image:foobar.jpg|link=Main_Page#section
20772 image:foobar.jpg|link=Main Page#section|caption
20775 <ul class="gallery mw-gallery-traditional">
20776 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20777 <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>
20778 <div class="gallerytext">
20781 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20782 <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>
20783 <div class="gallerytext">
20786 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20787 <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>
20788 <div class="gallerytext">
20796 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20797 <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>
20798 <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>
20799 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Main_Page#section"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
20803 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20805 Gallery with template inside caption
20808 "nativeGallery": true
20811 <gallery caption="{{echo|hi}}">
20812 File:Foobar.jpg|{{echo|ho}}
20815 <ul class="gallery mw-gallery-traditional">
20816 <li class='gallerycaption'>{{echo|hi}}</li>
20817 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20818 <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>
20819 <div class="gallerytext">
20827 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20828 <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>
20829 <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>
20834 Gallery with wikitext inside caption
20837 "nativeGallery": true
20841 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20842 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20845 <ul class="gallery mw-gallery-traditional">
20846 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20847 <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>
20848 <div class="gallerytext">
20849 <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>
20853 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20854 <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>
20855 <div class="gallerytext">
20856 <p>This is a test template
20863 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20864 <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>
20865 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><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>
20870 Gallery (with showfilename option)
20873 "nativeGallery": true
20876 <gallery showfilename="">
20877 File:Nonexistent.jpg|caption
20878 File:Nonexistent.jpg
20879 File:Foobar.jpg|some '''caption''' [[Main Page]]
20883 <ul class="gallery mw-gallery-traditional">
20884 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20885 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20886 <div class="gallerytext">
20887 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20892 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20893 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20894 <div class="gallerytext">
20895 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20899 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20900 <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>
20901 <div class="gallerytext">
20902 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20903 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20907 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20908 <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>
20909 <div class="gallerytext">
20910 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20917 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20918 <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>
20919 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a></div></li>
20920 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img 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>
20921 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a></div></li>
20925 ## Should Parsoid be preserving these variations? See T151367
20927 Gallery (with namespace-less filenames)
20930 "modes": ["wt2html", "html2html"],
20931 "nativeGallery": true
20935 File:Nonexistent.jpg
20941 <ul class="gallery mw-gallery-traditional">
20942 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20943 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20944 <div class="gallerytext">
20947 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20948 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20949 <div class="gallerytext">
20952 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20953 <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>
20954 <div class="gallerytext">
20957 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20958 <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>
20959 <div class="gallerytext">
20965 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20966 <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>
20967 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20968 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw: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>
20969 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20974 Gallery override link with wikilink (T36852)
20977 "nativeGallery": true
20981 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20984 <ul class="gallery mw-gallery-traditional">
20985 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20986 <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>
20987 <div class="gallerytext">
20993 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20994 <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>
20999 Gallery override link with absolute external link (T36852)
21002 "nativeGallery": true
21006 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21009 <ul class="gallery mw-gallery-traditional">
21010 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21011 <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>
21012 <div class="gallerytext">
21018 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21019 <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>
21024 Gallery override link with absolute external link with LanguageConverter
21029 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21032 <ul class="gallery mw-gallery-traditional">
21033 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21034 <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>
21035 <div class="gallerytext">
21043 <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"}}'>
21044 <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>
21049 Gallery override link with malicious javascript (T36852)
21052 "modes": ["wt2html", "html2html"],
21053 "nativeGallery": true
21057 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21060 <ul class="gallery mw-gallery-traditional">
21061 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21062 <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>
21063 <div class="gallerytext">
21069 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21070 <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>
21074 # Note that parsoid uses the invalid link as a caption, PHP does not.
21076 Gallery with invalid title as link (T45964)
21079 "modes": ["wt2html", "html2html"],
21080 "nativeGallery": true
21084 File:Foobar.jpg|link=<
21087 <ul class="gallery mw-gallery-traditional">
21088 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21089 <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>
21090 <div class="gallerytext">
21096 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21097 <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>
21102 Serialize gallery without attrs in data-mw
21105 "modes": ["html2wt"],
21106 "nativeGallery": true
21109 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21110 <li class="gallerycaption">123</li>
21111 <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>
21114 <gallery caption="123">
21120 Gallery with class and style attributes
21123 "nativeGallery": true
21126 <gallery class="center" style="text-align: center;">
21130 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21131 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21132 <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>
21133 <div class="gallerytext">
21139 <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":{}}'>
21140 <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>
21145 Gallery in slideshow mode
21148 "nativeGallery": true
21151 <gallery mode="slideshow" showthumbnails="">
21155 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21156 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21157 <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>
21158 <div class="gallerytext">
21164 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21165 <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>
21170 Serialize gallery image captions on a line
21173 "modes": ["html2wt"],
21174 "nativeGallery": true
21177 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21178 <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>
21179 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext">hi<br />ho</div></li>
21183 File:Foobar.jpg| hi ho
21184 File:Foobar.jpg|hi<br />ho
21189 HTML Hex character encoding (spells the word "JavaScript")
21191 parsoid=wt2html,wt2wt,html2html
21193 JavaScript
21195 <p>JavaScript
21198 <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>
21202 HTML Hex character encoding bogus encoding (T28437 regression check)
21206 <p>&#xsee;&#XSEE;
21211 HTML Hex character encoding mixed case
21213 parsoid=wt2html,wt2wt,html2html
21220 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21223 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21224 # Note that U+000C (form feed) is not a valid XML character, so
21225 # it is banned even though allowed in HTML5.
21227 Illegal character references (T106578)
21232 ; Control (low): 
21233 ; Control (high):  Ÿ
21234 ; Surrogate: ��
21235 ; This is an okay astral character: 💩
21243 <dt>Control (low)</dt>
21245 <dt>Control (high)</dt>
21246 <dd>&#x7F; &#x9F;</dd>
21248 <dd>&#xD83D;&#xDCA9;</dd>
21249 <dt>This is an okay astral character</dt>
21250 <dd>💩</dd></dl>
21254 __FORCETOC__ override
21266 ISBN 978-0-1234-56 789
21268 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21271 <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>
21275 ISBN followed by 5 spaces
21286 ISBN ISBN 1234567890
21288 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21291 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21294 # Uppercase X and lowercase x as well
21305 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21306 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21307 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21308 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21309 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21310 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21313 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21314 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21315 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21316 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21317 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21318 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21322 ISBN with empty prefix (parsoid test)
21326 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21329 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21333 T24905: <abbr> followed by ISBN followed by </a>
21335 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21337 <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>
21340 <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>
21348 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21351 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21355 Double RFC with a wiki link
21359 <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>
21362 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21370 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21373 <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>
21377 Centre-aligned image
21379 [[Image:foobar.jpg|centre]]
21381 <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>
21384 <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>
21390 [[Image:foobar.jpg|none]]
21392 <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>
21395 <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>
21399 Width + Height sized image (using px) (height is ignored)
21401 [[Image:foobar.jpg|640x480px]]
21403 <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>
21406 <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>
21410 Width-sized image (using px, no following whitespace)
21412 [[Image:foobar.jpg|640px]]
21414 <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>
21417 <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>
21421 Width-sized image (using px, with following whitespace - test regression from r39467)
21423 [[Image:foobar.jpg|640px ]]
21425 <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>
21428 <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>
21432 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21434 [[Image:foobar.jpg| 640px]]
21436 <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>
21439 <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>
21443 Image with page parameter
21447 [[File:LoremIpsum.djvu|page=2]]
21449 <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>
21452 <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>
21456 Another italics / bold test
21464 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21470 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21473 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21477 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21479 Images with the "|" character in the comment
21481 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21483 <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>
21486 <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>
21490 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21492 <html><script>alert(1);</script></html>
21494 <p><html><script>alert(1);</script></html>
21499 HTML with raw HTML ($wgRawHtml==true)
21503 <html><script>alert(1);</script></html>
21505 <p><script>alert(1);</script>
21510 Parents of subpages, one level up
21512 subpage title=[[Subpage test/L1/L2/L3]]
21516 <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>
21522 Parents of subpages, one level up, not named
21524 subpage title=[[Subpage test/L1/L2/L3]]
21528 <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>
21535 Parents of subpages, two levels up
21537 subpage title=[[Subpage test/L1/L2/L3]]
21543 <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
21544 </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>
21549 Parents of subpages, two levels up, without trailing slash or name.
21551 subpage title=[[Subpage test/L1/L2/L3]]
21560 Parents of subpages, two levels up, with lots of extra trailing slashes.
21562 subpage title=[[Subpage test/L1/L2/L3]]
21566 <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>
21571 Subpage test/L1/L2/L3Sibling
21577 Transclusion of a sibling page (one level up)
21579 subpage title=[[Subpage test/L1/L2/L3]]
21588 Transclusion of a child page
21590 subpage title=[[Subpage test/L1/L2]]
21598 # This is wt2html only in Parsoid because we add <nowiki>
21599 # because of {{..}} and we don't expect to fix that to
21600 # eliminate the nowikis selective for {{..}} markup.
21602 Non-transclusion because of too many up levels
21604 subpage title=[[Subpage test/L1/L2/L3]]
21607 {{../../../../More than parent}}
21609 <p>{{../../../../More than parent}}
21612 <p>{{../../../../More than parent}}</p>
21616 Definition list code coverage
21622 <dl><dt>title  </dt>
21624 <dt>title </dt>
21630 <dl><dt>title <span typeof="mw:Placeholder"> </span></dt><dd>def</dd>
21631 <dt>title<span typeof="mw:Placeholder"> </span></dt><dd>def</dd>
21632 <dt>title</dt><dd>def</dd></dl>
21636 Don't fall for the self-closing div
21638 <div>hello world</div/>
21640 <div>hello world</div>
21649 <p>[[:Template:Msg]]
21658 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21662 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21664 Always escape literal '>' in output, not just after '<'
21678 <p>This is a test template
21679 This is a test template
21691 Inclusion of !userCanEdit() content
21695 <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>
21701 Out-of-order TOC heading levels
21710 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
21712 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21714 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21715 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21718 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21720 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21721 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21727 <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>
21728 <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>
21729 <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>
21730 <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>
21731 <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>
21732 <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>
21738 ISBN with a dummy number
21748 ISBN with space-delimited number
21752 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21755 <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>
21760 ISBN with multiple spaces, no number
21779 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21780 </p><p>ISBN 12345678901
21783 <p>ISBN 123456789</p>
21785 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21787 <p>ISBN 12345678901</p>
21792 ISBN with trailing year (T9110)
21794 ISBN 1-234-56789-0 - 2006
21796 ISBN 1 234 56789 0 - 2006
21798 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21799 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21802 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21804 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21811 wgFragmentMode=[ 'html5', 'legacy' ]
21813 {{anchorencode:foo bar©#%n}}
21818 <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>
21822 anchorencode (legacy)
21824 wgFragmentMode=[ 'legacy' ]
21826 {{anchorencode:foo bar©#%n}}
21828 <p>foo_bar.C2.A9.23.25n
21833 anchorencode trims spaces
21835 wgFragmentMode=[ 'html5', 'legacy' ]
21837 {{anchorencode: __pretty__please__}}
21842 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21846 anchorencode deals with links
21848 wgFragmentMode=[ 'html5', 'legacy' ]
21850 {{anchorencode: [[hello|world]] [[hi]]}}
21855 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21859 anchorencode deals with templates
21861 wgFragmentMode=[ 'html5', 'legacy' ]
21863 {{anchorencode: {{Foo}} x}}
21868 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21872 anchorencode encodes like the TOC generator: (T20431)
21874 wgFragmentMode=[ 'html5', 'legacy' ]
21876 ===_ +:.3A%3A _ &&]] x===
21877 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21880 <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>
21881 <p>+:.3A%3A_&&]]_x
21884 <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>
21885 <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>
21886 <meta property="mw:PageProp/noeditsection"/>
21890 anchorencode encodes like the TOC generator: (T20431) (legacy)
21892 wgFragmentMode=[ 'legacy' ]
21894 ===_ +:.3A%3A&&]]===
21895 {{anchorencode: _ +:.3A%3A&&]] }}
21898 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21899 <p>.2B:.3A.253A.26.26.5D.5D
21904 T8200: blockquotes and paragraph formatting
21925 T10293: Use of center tag ruins paragraph formatting
21946 Parsing of overlapping (improperly nested) inline html tags
21948 <span><s>x</span></s>
21950 <p><span><s>x</span></s></span>
21953 <p><span><s>x</s></span>
21958 ### Language variants related tests
21961 # Parsoid does not mark self-links.
21962 # Parsoid does not convert links; PHP will do any necessary redirects.
21965 Self-link in language variants
21967 title=[[Dunav]] language=sr
21969 Both [[Dunav]] and [[Дунав]] are names for this river.
21971 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21974 <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>
21984 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21986 title=[[Duna]] language=sr
21988 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21990 <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.
21993 <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>
21997 Link to a section of a variant of this title shouldn't be parsed as self-link
21999 title=[[Duna]] language=sr
22001 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22003 <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.
22006 <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>
22010 Link to pages in language variants
22014 Main Page can be written as [[Маин Паге]]
22016 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22019 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22024 Multiple links to pages in language variants
22028 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22030 <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>.
22033 <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>
22038 Simple template in language variants
22044 <p>This is a test template
22050 Template with explicit namespace in language variants
22056 <p>This is a test template
22062 Basic test for template parameter in language variants
22066 {{парамтест|param=foo}}
22068 <p>This is a test template with parameter foo
22073 Simple category in language variants
22077 [[Category:МедиаWики Усер'с Гуиде]]
22079 cat=МедиаWики_Усер'с_Гуиде sort=
22081 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22096 ## We used to, but no longer wt2wt this test since the default serializer
22097 ## will normalize all categories to serialize on their own line.
22098 ## This wikitext usage is going to be fairly uncommon in production and
22099 ## selser will take care of preserving formatting in those scenarios.
22101 Don't convert blue categorylinks to another variant (T35210)
22107 [[A]][[Category:分类]]
22111 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22112 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22116 Stripping -{}- tags (language variants)
22120 Latin proverb: -{Ne nuntium necare}-
22122 <p>Latin proverb: Ne nuntium necare
22125 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22130 Prevent conversion with -{}- tags (language variants)
22132 language=sr variant=sr-ec
22134 Latinski: -{Ne nuntium necare}-
22136 <p>Латински: Ne nuntium necare
22139 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22144 Prevent conversion of text with -{}- tags (language variants)
22146 language=sr variant=sr-ec
22148 Latinski: -{Ne nuntium necare}-
22150 <p>Латински: Ne nuntium necare
22153 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22158 Prevent conversion of links with -{}- tags (language variants)
22160 language=sr variant=sr-ec
22164 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22167 <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>
22172 -{}- tags within headlines (within html for parserConvert())
22174 wgFragmentMode=[ 'html5', 'legacy' ]
22176 language=sr variant=sr-ec
22180 Note that even an unprotected headline ID is not affected by language
22185 <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>
22186 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22189 <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>
22192 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22194 <p>Note that even an unprotected headline ID is not affected by language
22197 <h2 id="Latinski">Latinski</h2>
22201 Explicit definition of language variant alternatives
22203 language=zh variant=zh-tw
22205 -{zh:China;zh-tw:Taiwan}-, not China
22207 <p>Taiwan, not China
22210 <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>
22214 Filter syntax for language variants
22216 language=zh variant=zh-tw
22218 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22220 <p>fooblog, WEBJOURNAL, WEBLOGquux
22223 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22226 # Note that Parsoid post-processing for language variants needs to
22227 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22229 Conversion around HTML tags
22231 language=sr variant=sr-ec
22233 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22234 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22237 <span title="ЛаCтин">ски</span>
22240 <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"}]}'/>
22241 <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>
22245 Explicit session-wise two-way language variant mapping (A flag and - flag)
22247 language=zh variant=zh-tw
22249 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22251 Taiwan is not China.
22253 But -{A|zh:China; zh-tw:Taiwan}- is China,
22255 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22257 and -{China}- is China.
22259 <p>This is Taiwan, but we'll forget that now.
22260 </p><p>Taiwan is not China.
22261 </p><p>But Taiwan is Taiwan,
22262 </p><p>(This should be stripped!)
22263 </p><p>and China is China.
22266 <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>
22267 <p>Taiwan is not China.</p>
22268 <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>
22269 <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>
22270 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22274 Explicit session-wise one-way language variant mapping (A flag and - flag)
22276 language=zh variant=zh-tw
22278 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22280 COUNTRY is China or Taiwan.
22282 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22284 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22286 and -{COUNTRY}- is COUNTRY.
22288 <p>This is Taiwan, but we'll forget that now.
22289 </p><p>COUNTRY is China or Taiwan.
22290 </p><p>But Taiwan is Taiwan,
22291 </p><p>(This should be stripped!)
22292 </p><p>and COUNTRY is COUNTRY.
22295 <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>
22296 <p>COUNTRY is China or Taiwan.</p>
22297 <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>
22298 <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>
22299 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22303 Explicit session-wise two-way language variant mapping (H flag for hide)
22305 language=zh variant=zh-tw
22307 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22311 <p>(This should be stripped!)
22312 </p><p>Taiwan is Taiwan.
22315 <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>
22316 <p>Taiwan is China.</p>
22320 Explicit session-wise one-way language variant mapping (H flag for hide)
22322 language=zh variant=zh-tw
22324 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22326 COUNTRY is Taiwan or China.
22328 <p>(This should be stripped!)
22329 </p><p>Taiwan is Taiwan or China.
22332 <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>
22333 <p>COUNTRY is Taiwan or China.</p>
22336 ## Note that parsoid test runner does not support 'showtitle' option.
22338 Adding explicit conversion rule for title (T flag)
22340 language=zh variant=zh-tw showtitle
22342 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22347 <p>Should be stripped!
22348 </p><p>Taiwan is China.
22351 <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>
22352 <p>Taiwan is China.</p>
22356 Code coverage: T combined with H flag
22358 language=zh variant=zh-tw showtitle
22360 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22365 <p>Should be stripped!
22366 </p><p>Taiwan is Taiwan.
22369 <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>
22370 <p>Taiwan is China.</p>
22374 Code coverage: T with no variants
22376 language=zh variant=zh-tw showtitle
22378 -{H|zh:China; zh-tw:Taiwan}-
22379 Taiwan is China.-{T|Taiwan is China}-
22386 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22387 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22391 Code coverage: rules with no variants
22393 language=zh variant=zh-tw
22395 -{H|zh:China; zh-tw:Taiwan}-
22406 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22408 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22409 Taiwan is China.</p>
22414 Code coverage: D flag for conversion rule
22416 language=zh variant=zh-tw
22418 -{D|zh-cn:XA; zh-tw:YA}-
22419 -{A;D|zh-cn:XB; zh-tw:YB}-
22420 -{D;H|zh-cn:XC; zh-tw:YC}-
22422 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22428 XA XB XC YA YB YC FOO BAR BAT 012345
22433 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22437 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22440 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22441 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22442 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22443 <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>
22444 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22445 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22446 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22447 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22451 Code coverage: N flag for conversion rule
22453 language=zh variant=zh-cn
22463 </p><p>српски (ћирилица)
22466 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22467 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22468 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22471 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22473 Code coverage: N flag for conversion rule (wt2html only)
22475 language=zh variant=zh-cn
22476 parsoid=wt2html,html2html
22483 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22487 Testing that changing the language variant here in the tests actually works
22489 language=zh variant=zh showtitle
22491 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22494 <p>Should be stripped!
22497 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22501 Recursive conversion of alt and title attrs shouldn't clear converter state
22503 language=zh variant=zh-cn
22506 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22507 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22511 Should be stripped<span title="Exclamation">!</span>
22514 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22515 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>
22519 T26072: more test on conversion rule for title
22521 language=zh variant=zh-tw showtitle
22523 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22525 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22528 <p>This should be stripped!
22529 </p><p>This won't take interferes with the title rule.
22532 <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>
22533 <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>
22537 Partly disable title conversion if variant == main language code
22539 language=zh variant=zh title=[[ZH]] showtitle
22541 -{T|zh-cn:CN;zh-tw:TW}-
22547 <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>
22551 Partly disable title conversion if variant == main language code, more
22553 language=zh variant=zh title=[[ZH]] showtitle
22561 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22565 Raw output of variant escape tags (R flag)
22567 language=zh variant=zh-tw
22569 Raw: -{R|zh:China;zh-tw:Taiwan}-
22571 <p>Raw: zh:China;zh-tw:Taiwan
22574 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22577 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22579 Raw output of variant escape tags (R flag) (wt2html only)
22581 language=zh variant=zh-tw
22582 parsoid=wt2html,html2html
22584 -{Variant}- -{D|syntax}- -{D;R|options}-
22586 <p>Variant syntax options
22589 <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>
22593 Nested markup inside raw output of variant escape tags (R flag)
22595 language=zh variant=zh-tw
22597 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22599 <p>Nested raw: nested Taiwan nested
22602 <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>
22606 Nested markup and spaces inside raw output of variant escape tags (R flag)
22608 language=zh variant=zh-tw
22610 X-{ outer -{ inner }- outer }-X
22612 <p>X outer inner outer X
22615 <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>
22619 Templates inside raw output of variant escape tags (R flag)
22621 language=zh variant=zh-tw
22623 Nested raw: -{R|nested {{echo|hi}} templates}-
22625 <p>Nested raw: nested hi templates
22628 <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>
22632 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22634 language=zh variant=zh-cn
22636 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22641 <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>
22645 Conversion rules from [numeric-only string] to [something else] (T48634)
22647 language=zh variant=zh-cn
22649 -{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
22654 <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>
22658 Two-way converter rule entries with an empty value should be ignored (T53551)
22660 language=zh variant=zh-cn
22662 -{H|zh-cn:foo;zh-tw:;}-foobar
22667 <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>
22671 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22673 language=zh variant=zh-cn
22675 -{H|=>zh-cn:foo;}-foobar
22680 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22684 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22686 language=zh variant=zh-cn
22693 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22697 Nested using of manual convert syntax
22699 language=zh variant=zh-hk
22701 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22703 <p>Nested: Hello Hong Kong!
22706 <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>
22710 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22712 language=zh variant=zh-cn
22714 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22716 <p><span title="X">A</span>
22719 <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>
22723 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22725 language=zh variant=zh-cn
22727 -{<span title="-{X}-">A</span>}-
22728 !! html/php+disabled
22729 <p><span title="X">A</span>
22732 <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>
22735 # Parsoid and PHP disagree on how to parse this example: Parsoid
22736 # insists that the content of a language converter element be a valid
22737 # DOM fragment or attribute string
22739 Language converter markup with block content
22741 language=zh variant=zh-cn
22743 <span>a-{b<div>c}-d
22745 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22747 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22752 </span></div></span></div></span>
22754 <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>
22756 <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>
22758 <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>
22762 LanguageConverter selser (1)
22764 language=zh variant=zh-cn
22766 "modes": ["wt2wt", "selser"],
22768 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22778 LanguageConverter selser (2)
22780 language=zh variant=zh-cn
22782 "modes": ["wt2wt", "selser"],
22784 ["span[class='x']", "contents", "text", "-{foo}-"],
22785 ["a", "contents", "text", "-{"],
22786 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22790 <span class="x">TEXT1</span>
22791 [http://example.com TEXT2]
22795 <span class="x"><nowiki>-{foo}-</nowiki></span>
22796 [http://example.com -{]
22797 [[Foo|<nowiki>-{</nowiki>]]
22798 {{1x|<nowiki>-{</nowiki>}}
22801 # Tests LanguageVariantText in ConstrainedText
22803 LanguageConverter selser (3)
22805 language=zh variant=zh-cn
22807 "modes": ["wt2wt", "selser"],
22809 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22810 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22821 |<nowiki/>-{edited}-
22825 # Tests LanguageVariantText._fromSelSer
22827 LanguageConverter selser (4)
22829 language=zh variant=zh-cn
22831 "modes": ["wt2wt", "selser"],
22833 ["td > span.x", "remove"]
22839 |<span class="x">Foo</span>-{Bar}-
22840 ||<span class="x">Foo</span>-{Bar}-
22850 # Since Parsoid is starting to emit canonical wikitext for links,
22851 # [http://example.com http://example.com] will not RT back to that
22853 # Parsoid does not language-convert links (it is done in a
22854 # post-processing step)
22856 Proper conversion of text in external links
22858 language=sr variant=sr-ec
22861 http://www.google.com
22862 gopher://www.google.com
22863 [http://www.google.com http://www.google.com]
22864 [gopher://www.google.com gopher://www.google.com]
22865 [https://www.google.com irc://www.google.com]
22866 [ftp://www.google.com www.google.com/ftp://dir]
22867 [//www.google.com www.google.com]
22869 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22870 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22871 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22872 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22873 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22874 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22875 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22878 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22879 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22880 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
22881 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22882 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22883 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22884 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22888 Do not convert roman numbers to language variants
22890 language=sr variant=sr-ec
22894 <p>Фридрих IV је цар.
22897 <p>Fridrih IV je car.</p>
22901 Unclosed language converter markup "-{"
22912 Don't convert raw rule "-{R|=>}-" to "=>"
22921 <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>
22925 Don't break link parsing if language converter markup is in the caption.
22927 language=sr variant=sr-ec
22929 [[Main Page|-{R|main page}-]]
22931 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22934 <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>
22938 T146304: Don't break template parsing if language converter markup is in the parameter.
22940 language=sr variant=sr-ec
22947 <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>
22951 T146305: Don't break image parsing if language converter markup is in the caption.
22955 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22957 <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>
22960 <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>
22964 T146305: Don't break image parsing if nested language converter markup is in the caption.
22966 language=zh variant=zh-cn
22968 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22970 <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>
22973 <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>
22976 # XXX html2wt disabled because rich markup in alt is not preserved.
22978 Don't break gallery if language converter markup is inside.
22983 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22984 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22987 <ul class="gallery mw-gallery-traditional">
22988 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22989 <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>
22990 <div class="gallerytext">
22991 <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>
22995 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22996 <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>
22997 <div class="gallerytext">
22998 <p>This is a test template
23005 <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"}}'>
23006 <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>
23007 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="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>
23012 T153135: Don't break list handling if language converter markup is in the item.
23014 language=zh variant=zh-cn
23016 ;-{zh-cn:AAA;zh-tw:BBB}-
23020 <dt>foo:bar</dt></dl>
23023 <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>
23024 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23028 // Note that parsoid does not protect colons unless language converter
23029 // markup is properly nested, because it is a backtracking parser.
23031 T153135: Unclosed markup in definition list (code coverage)
23033 language=zh variant=zh-cn
23038 <dl><dt><b>foo:bar</b></dt><b>
23039 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23042 <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}'>
23043 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
23044 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
23049 T153135: Nested language converter markup in definition list (code coverage)
23051 language=zh variant=zh-cn
23053 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23055 <dl><dt>AAA foo:bar bat:baz</dt>
23059 <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>
23060 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23064 # html2wt mode disabled due to <nowiki> insertion.
23066 T153140: Don't break table handling if language converter markup is in the cell.
23068 language=sr variant=sr-ec
23069 parsoid=wt2html,wt2wt,html2html
23086 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23093 Language converter tricky html2wt cases (1)
23096 parsoid=html2wt,wt2wt
23098 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23100 -{<nowiki>}-</nowiki>}-
23107 Language converter tricky html2wt cases (2)
23110 parsoid=html2wt,wt2wt
23114 <nowiki>-{foo}-</nowiki>
23116 <p>-{foo}-
23121 Language converter tricky html2wt cases (3)
23124 parsoid=html2wt,wt2wt
23126 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23127 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23128 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23134 -{<nowiki>-{foo}-</nowiki>}-
23138 </p><p>-{foo}-
23143 Language converter tricky html2wt cases (4)
23146 parsoid=html2wt,wt2wt
23148 <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>
23156 # Note that the <nowiki> escaping added by parsoid for source text,
23157 # destination text, and language names only works on the PHP side
23158 # for *destination text*. (HTML entity escaping wouldn't work
23159 # any better.) This is probably a bug, at least for source texts.
23160 # (For language names PHP uses a precise regexp based on the languages
23161 # it currently knows have variants, which is fragile since this set
23162 # can grow/shrink over time.)
23164 Language converter tricky html2wt cases (5)
23166 language=zh variant=zh-cn
23168 <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>
23169 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23170 <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>
23171 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23174 -{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
23176 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23178 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23180 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23183 !! html/php+disabled
23184 <p>foobat;xyz=>zh-cn:abc
23188 </p><p>a:b=>c 0;zh-tw:bar
23193 T179579: Nowiki and lc interaction
23200 -{123<nowiki>|</nowiki>456}-
23202 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23204 <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>
23208 T2529: Uncovered bullet
23218 T2529: Uncovered bullet in a deeply nested list
23220 *******Foo {{bullet}}
23222 <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>
23228 T2529: Uncovered table already at line-start
23251 T2529: Uncovered bullet in parser function result
23253 *Foo {{lc:{{bullet}} }}
23261 T7678: Double-parsed template argument
23263 {{lc:{{{1}}}|hello}}
23270 T7678: Double-parsed template invocation
23272 {{lc:{{paramtest {{!}} param = hello }} }}
23274 <p>{{paramtest | param = hello }}
23279 Case insensitivity of parser functions for non-ASCII characters (T10143)
23282 title=[[Main Page]]
23284 {{PRVNÍVELKÉ:ěščř}}
23285 {{prvnívelké:ěščř}}
23305 Morwen/13: Unclosed link followed by heading
23312 <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>
23317 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23324 <h1><span class="mw-headline" id="heading">heading</span></h1>
23329 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23336 <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>
23351 Paragraphs inside divs (no extra line breaks)
23363 Paragraphs inside divs (extra line break on open)
23378 Paragraphs inside divs (extra line break on close)
23393 Paragraphs inside divs (extra line break on open and close)
23409 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23410 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23412 Nesting tags, paragraphs on lines which begin with <div>
23414 <div></div><strong>A
23417 <div></div><p><strong>A
23418 </strong></p><strong></strong><p><strong>B</strong>
23427 # T8200: <blockquote> should behave like <div> with respect to line breaks
23429 T8200: paragraphs inside blockquotes (no extra line breaks)
23431 <blockquote>Line one
23433 Line two</blockquote>
23435 <blockquote>Line one
23436 Line two</blockquote>
23439 <blockquote><p>Line one
23440 Line two</p></blockquote>
23444 T8200: paragraphs inside blockquotes (extra line break on open)
23449 Line two</blockquote>
23454 Line two</blockquote>
23460 Line two</p></blockquote>
23463 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23465 T8200: paragraphs inside blockquotes (extra line break on close)
23467 <blockquote>Line one
23472 <blockquote>Line one
23478 <blockquote><p>Line one
23485 T8200: paragraphs inside blockquotes (extra line break on open and close)
23501 ## This is a corner case interaction between the paragraph wrapping in the
23502 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
23503 ## some tags which close paragraphs (and thus prevent wrapping on their line),
23504 ## of which "div" is one, but do p-wrapping inside them. These are referred
23505 ## to as "never suppressing". Remex, for its part, doesn't traverse into
23506 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
23508 Paragraphs inside blockquotes/divs (no extra line breaks)
23510 <blockquote><div>Line one
23512 Line two</div></blockquote>
23514 <blockquote><div>Line one
23515 Line two</div></blockquote>
23520 Paragraphs inside blockquotes/divs (extra line break on open)
23525 Line two</div></blockquote>
23530 Line two</div></blockquote>
23535 Paragraphs inside blockquotes/divs (extra line break on close)
23537 <blockquote><div>Line one
23540 </div></blockquote>
23542 <blockquote><div>Line one
23545 </div></blockquote>
23550 Paragraphs inside blockquotes/divs (extra line break on open and close)
23556 </div></blockquote>
23562 </div></blockquote>
23567 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23569 wgLinkHolderBatchSize=0
23575 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23576 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23577 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23582 Free external link invading image caption
23584 [[Image:Foobar.jpg|thumb|http://x|hello]]
23586 <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>
23589 <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>
23593 T17196: localised external link numbers
23597 [http://en.wikipedia.org/]
23599 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23602 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23606 Multibyte character in padleft
23608 {{padleft:-Hello|7|Æ}}
23613 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23617 Multibyte character in padright
23619 {{padright:Hello-|7|Æ}}
23624 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23628 formatdate parser function
23630 {{#formatdate:2009-03-24}}
23632 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23637 formatdate parser function, with default format
23639 {{#formatdate:2009-03-24|mdy}}
23641 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23646 Spacing of numbers in formatted dates
23648 {{#formatdate:January 15}}
23650 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23655 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
23657 language=nl title=[[MediaWiki:Common.css]]
23659 {{#formatdate:2009-03-24|dmy}}
23661 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23674 Edit comment with link
23678 I like the [[Main Page]] a lot
23680 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23684 Edit comment with link and link text
23688 I like the [[Main Page|best pages]] a lot
23690 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23694 Edit comment with link and link text with suffix
23698 I like the [[Main Page|best page]]s a lot
23700 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23704 Edit comment with section link (non-local, eg in history list)
23706 comment title=[[Main Page]]
23708 /* External links */ removed bogus entries
23710 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23714 Edit comment with section link and text before it (non-local, eg in history list)
23716 comment title=[[Main Page]]
23718 pre-comment text /* External links */ removed bogus entries
23720 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>
23724 Edit comment with section link (local, eg in diff view)
23726 comment local title=[[Main Page]]
23728 /* External links */ removed bogus entries
23730 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23734 Edit comment with subpage link (T16080)
23738 title=[[Subpage test]]
23740 Poked at a [[/subpage]] here...
23742 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23746 Edit comment with subpage link and link text (T16080)
23750 title=[[Subpage test]]
23752 Poked at a [[/subpage|neat little page]] here...
23754 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23758 Edit comment with bogus subpage link in non-subpage NS (T16080)
23761 title=[[Subpage test]]
23763 Poked at a [[/subpage]] here...
23765 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23769 Edit comment with bare anchor link (local, as on diff)
23773 title=[[Main Page]]
23777 <a href="#section">#section</a>
23781 Edit comment with bare anchor link (non-local, as on history)
23784 title=[[Main Page]]
23788 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23792 Anchor starting with underscore
23798 <p><a href="#_ref">One</a>
23801 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23805 Id starting with underscore
23807 <div id="_ref"></div>
23809 <div id="_ref"></div>
23814 Edit comment with link with more than one pipe (T99346)
23818 [[Main Page|Many|pipes]]
23820 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23824 Complex edit comment with link with more than one pipe (T99346)
23828 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23830 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..."
23834 Space normalisation on autocomment (T24784)
23837 title=[[Main Page]]
23839 /* __hello__world__ */
23841 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23845 percent-encoding and + signs in comments (T28410)
23849 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23851 <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>
23854 # Parsoid doesn't support this yet: see T75581
23855 # but it *should* omit the 'src' attribute if the image is bad.
23856 # PHP side of tests was disabled in
23857 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23858 # because of issues in the PHP parserTests infrastructure
23859 # (but the output below is indeed what the PHP side emits)
23861 Bad images - basic functionality
23864 !! html/php+disabled
23866 <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>
23870 Bad images - T18039: text after bad image disappears
23875 !! html/php+disabled
23881 <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>
23886 Verify that displaytitle works (T24501) no displaytitle
23890 wgAllowDisplayTitle=true
23891 wgRestrictDisplayTitle=false
23893 this is not the the title
23896 <p>this is not the the title
23901 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23906 wgAllowDisplayTitle=true
23907 wgRestrictDisplayTitle=false
23909 this is not the the title
23910 {{DISPLAYTITLE:whatever}}
23913 <p>this is not the the title
23918 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23923 wgAllowDisplayTitle=true
23924 wgRestrictDisplayTitle=true
23926 this is not the the title
23927 {{DISPLAYTITLE:whatever}}
23930 <p>this is not the the title
23935 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23940 wgAllowDisplayTitle=true
23941 wgRestrictDisplayTitle=true
23943 this is not the the title
23944 {{DISPLAYTITLE:screen}}
23947 <p>this is not the the title
23952 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23957 wgAllowDisplayTitle=false
23959 this is not the the title
23960 {{DISPLAYTITLE:screen}}
23963 <p>this is not the the title
23964 <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>
23969 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23974 wgAllowDisplayTitle=false
23976 this is not the the title
23979 <p>this is not the the title
23984 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23989 wgAllowDisplayTitle=true
23990 wgRestrictDisplayTitle=true
23992 this is not the the title
23993 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23995 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23996 <p>this is not the the title
24001 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24006 wgAllowDisplayTitle=true
24007 wgRestrictDisplayTitle=true
24009 this is not the the title
24010 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24012 <span style="color: red;">s</span>creen
24013 <p>this is not the the title
24018 Page status indicators: Empty name is invalid
24022 <indicator name=" "></indicator>
24023 <indicator></indicator>
24025 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24026 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24031 Page status indicators: Weird syntaxes that are okay
24035 <indicator name="empty" />
24036 <indicator name="name"></indicator>
24045 Page status indicators: Torture test
24049 <indicator name="01">hello world</indicator>
24050 <indicator name="02">[[Main Page]]</indicator>
24051 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24052 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24053 <indicator name="05">*foo
24055 <indicator name="06"><nowiki>foo</nowiki></indicator>
24056 <indicator name="07"> Preformatted</indicator>
24057 <indicator name="08"><div>Broken tag</indicator>
24058 <indicator name="09">{| class=wikitable
24061 <indicator name="10">Two
24063 paragraphs</indicator>
24066 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24067 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" />
24068 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>
24069 05=<ul><li>foo</li>
24073 07=<pre>Preformatted
24075 08=<div>Broken tag</div>
24077 09=<table class="wikitable">
24094 preload: check <noinclude> and <includeonly>
24098 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24104 preload: check <onlyinclude>
24108 Goodbye <onlyinclude>Hello world</onlyinclude>
24114 preload: can pass tags through if we want to
24118 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24120 <includeonly>Hello world</includeonly>
24124 preload: check that it doesn't try to do tricks
24128 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24130 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24134 Play a bit with r67090 and T5158
24136 <div style="width:50% !important"> </div>
24137 <div style="width:50% !important"> </div>
24138 <div style="width:50% !important"> </div>
24139 <div style="border : solid;"> </div>
24141 <div style="width:50% !important"> </div>
24142 <div style="width:50% !important"> </div>
24143 <div style="width:50% !important"> </div>
24144 <div style="border : solid;"> </div>
24147 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24148 <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>
24149 <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>
24150 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24155 T5158: Test for French spaces in attributes
24157 <br style=" clear : both ; " />
24159 <p><br style="clear : both ;" />
24164 HTML5 data attributes
24166 <span data-foo="bar">Baz</span>
24167 <p data-abc-def_hij="">Quuz</p>
24169 <p><span data-foo="bar">Baz</span>
24171 <p data-abc-def_hij="">Quuz</p>
24174 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24175 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24179 Strip reserved data attributes
24181 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24183 <div data-ok="fred">d</div>
24186 <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>
24190 percent-encoding and + signs in internal links (T28410)
24192 [[User:+%]] [[Page+title%]]
24193 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24194 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24195 [[%33%45]] [[%33%45+]]
24197 <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>
24198 <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>
24199 <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>
24200 <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>
24203 <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>
24204 <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>
24205 <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>
24206 <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>
24210 Special characters in embedded file links (T29679)
24212 [[File:Contains & ampersand.jpg]]
24213 [[File:Does not exist.jpg|Title with & ampersand]]
24215 <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>
24216 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24219 <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>
24220 <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>
24224 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24226 Text's been normalized?
24228 <p>Text's been normalized?
24233 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24235 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24237 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24242 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24244 [http://www.example.org/ ideograms]
24246 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24251 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24253 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24255 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24279 T33098 Template which includes system messages which includes the template
24283 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24284 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24289 T33490 Turkish: ucfirst 'blah'
24300 T33490 Turkish: ucfirst 'ix'
24311 T33490 Turkish: lcfirst 'BLAH'
24322 T33490 Turkish: ucfırst (with a dotless i)
24328 <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>
24333 T33490 ucfırst (with a dotless i) with English language
24339 <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>
24343 # Note that Parsoid doesn't emit an explicit TOC.
24344 # Note also that the html2wt direction tends to emit an extra newline
24345 # between the __TOC__ magicword and the first heading unless *both*
24346 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24350 T28375: TOC with italics
24352 title=[[Main Page]]
24355 ==''Lost'' episodes==
24357 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24359 <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>
24363 <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>
24366 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24367 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24371 T28375: TOC with bold
24373 title=[[Main Page]]
24376 =='''should be bold''' then normal text==
24378 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24380 <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>
24384 <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>
24387 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24388 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24392 T35845: Headings become cursive in TOC when they contain an image
24394 title=[[Main Page]]
24397 ==Image [[Image:foobar.jpg]]==
24399 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24401 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24405 <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>
24408 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24409 <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>
24413 T35845 (2): Headings become bold in TOC when they contain a blockquote
24415 title=[[Main Page]]
24418 ==<blockquote>Quote</blockquote>==
24420 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24422 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24426 <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>
24429 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24431 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24435 <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>
24437 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24438 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24442 Unclosed tags in TOC
24444 wgFragmentMode=[ 'html5', 'legacy' ]
24446 title=[[Main Page]]
24450 <small>Hanc marginis exiguitas non caperet.</small>
24453 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24455 <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>
24459 <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>
24460 <p><small>Hanc marginis exiguitas non caperet.</small>
24464 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24465 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24466 <p><small>Hanc marginis exiguitas non caperet.</small>
24471 Multiple tags in TOC
24474 ==<i>Foo</i> <b>Bar</b>==
24476 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24478 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24480 <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>
24481 <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>
24485 <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>
24486 <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>
24489 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24491 <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>
24492 <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>
24496 <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>
24497 <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>
24499 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24500 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24502 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24505 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24506 # html5 tag parsing.
24508 Tags with parameters in TOC
24513 ==<sup class="in-h2">Hello</sup>==
24515 ==<sup class="a > b">Evilbye</sup>==
24517 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24519 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24520 <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>
24524 <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>
24525 <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>
24528 <meta property="mw:PageProp/toc" />
24529 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24531 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24535 span tags with directionality in TOC
24538 ==<span dir="ltr">C++</span>==
24540 ==<span dir="rtl">זבנג!</span>==
24542 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24544 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24546 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24548 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24550 <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>
24551 <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>
24552 <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>
24553 <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>
24554 <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>
24558 <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>
24559 <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>
24560 <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>
24561 <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>
24562 <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>
24565 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24566 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24567 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24568 <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>
24569 <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>
24570 <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>
24574 T74884: bdi element in ToC
24577 ==<bdi>test</bdi>==
24579 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24581 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24585 <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>
24588 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24589 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24593 T35715: s/strike element in ToC
24596 ==<s>test</s> test <strike>test</strike>==
24598 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24600 <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>
24604 <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>
24607 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24608 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24612 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24617 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24619 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24623 <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>
24626 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24627 <h2 id="x" data-parsoid='{}'>x</h2>
24633 == {{int:headline_sample}} ==
24637 T34057: Title needed when expanding <h> nodes.
24639 title=[[Main Page]]
24643 <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>
24648 Strip marker in urlencode
24650 {{urlencode:x<nowiki/>y}}
24651 {{urlencode:x<nowiki/>y|wiki}}
24652 {{urlencode:x<nowiki/>y|path}}
24653 {{urlencode:x<pre id="one">two</pre>y}}
24681 Strip marker in formatNum
24683 {{formatnum:1<nowiki/>2}}
24684 {{formatnum:1<nowiki/>2|R}}
24692 Check noCommafy in formatNum
24696 {{formatnum:123456.78}}
24697 {{formatnum:123456.78|NOSEP}}
24705 Wrong option for formatNum (T58199)
24707 {{formatnum:1,234.56|Random}}
24708 {{formatnum:1,234.56|EVERYTHING}}
24709 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24718 Strip marker in grammar
24722 {{grammar:elative|foo<nowiki/>bar}}
24729 Strip marker in padleft
24731 {{padleft:|2|x<nowiki/>y}}
24738 Strip marker in padright
24740 {{padright:|2|x<nowiki/>y}}
24747 Strip marker in anchorencode
24749 {{anchorencode:x<nowiki/>y}}
24754 <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>
24758 nowiki inside link inside heading (T20295)
24760 ==[[foo|x<nowiki>y</nowiki>z]]==
24762 <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>
24767 new support for bdi element (T33817)
24769 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24771 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24776 Ignore pipe between table row attributes
24780 |- id=foo | style='color: red'
24788 <tr id="foo" style="color: red">
24795 Language parser function
24804 Padleft and padright (default 0-padding)
24813 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24814 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24818 Padleft and padright (partial fill)
24820 {{padleft:xyz|6|ab}}
24821 {{padright:xyz|6|ab}}
24827 <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>
24828 <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>
24832 Padleft and padright as substr
24834 {{padleft:|3|abcde}}
24835 {{padright:|3|abcde}}
24841 <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>
24842 <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>
24846 Padleft and padright with non-numerical length (T180403)
24848 {{padleft:abcdef|junk}}
24849 {{padright:abcdef|junk}}
24857 Special parser function
24859 {{#special:RandomPage}}
24860 {{#special:BaDtItLe}}
24861 {{#special:Foobar}}
24870 T36939 - Case insensitive link parsing ([HttP://])
24872 [HttP://MediaWiki.Org/]
24874 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24877 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24881 T36939 - Case insensitive link parsing ([HttP:// title])
24883 [HttP://MediaWiki.Org/ MediaWiki]
24885 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24890 T36939 - Case insensitive link parsing (HttP://)
24892 HttP://MediaWiki.Org/
24894 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24897 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24915 <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>
24916 <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>
24917 <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>
24918 <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>
24919 <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>
24925 ### Parsoid-specific tests
24926 ### Parsoid-PHP parser incompatibilities
24929 1. SOL-sensitive wikitext tokens as template-args
24931 parsoid=wt2html,wt2wt
24937 <span about="#mwt1" typeof="mw:Transclusion">
24938 </span><ul about="#mwt1"><li>a</li>
24940 <span about="#mwt2" typeof="mw:Transclusion">
24941 </span><ol about="#mwt2"><li>a</li>
24943 <span about="#mwt3" typeof="mw:Transclusion">
24944 </span><dl about="#mwt3"><dd>a</dd>
24948 #### -----------------------------------------------------------------
24949 #### Parsoid-specific functionality tests
24950 #### -----------------------------------------------------------------
24952 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24953 # We know wt2wt will fail, but we expect selser to pass.
24954 # Due to the nature of our testing, wt2wt and selser tests will enter the
24955 # blacklist and we'll catch selser regressions based on changes to the
24956 # blacklist entries for selser tests.
24958 1. Bad treebuilder fixup of formatting elt is cleaned up
24960 parsoid=wt2html,wt2wt
24965 [[Image:Foobar.jpg|right|Test]]
24972 <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>
24979 2. Bad treebuilder fixup of formatting elt is cleaned up
24981 parsoid=wt2html,wt2wt
24983 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24985 <small>[[Image:Foobar.jpg|right|300px]]</small>
24989 <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>
24991 <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>
24995 3. Bad treebuilder fixup of formatting elt is cleaned up
24997 parsoid=wt2html,wt2wt
24999 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25001 <p><small><b>foo</b></small></p>
25002 <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>
25003 <p><small><b>bar</b></small></p>
25007 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
25009 parsoid=wt2html,wt2wt
25011 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25013 <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>
25016 #### ----------------------------------------------------------------
25017 #### Parsoid-only testing of Parsoid's impl of LST
25018 #### Not implemented yet, see
25019 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25020 #### ----------------------------------------------------------------
25022 ## We still need to support serializing the older format while content is stored.
25024 LST Sections: Backwards compatibility
25027 "suppressErrors": true,
25028 "modes": ["html2wt"]
25031 <section begin="2011-05-16" />
25032 <section end="2014-04-10 (MW 1.23wmf22)" />
25034 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25035 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25039 LST Sections: Newfangled approach
25041 <section begin="2011-05-16" />
25042 <section end="2014-04-10 (MW 1.23wmf22)" />
25044 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
25046 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
25050 #--------- Test stripping of empty nodes in template content ----------
25053 Empty LI and TR nodes should be stripped from template content
25058 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25062 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25075 Empty LI and TR nodes should not be stripped from top-level content
25089 <li class='mw-empty-elt'></li>
25094 <tr class='mw-empty-elt'></tr>
25103 Empty TR nodes should not be stripped if they have any attributes set
25105 {{EmptyTRWithHTMLAttrTest}}
25107 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25108 <tr align='center'></tr>
25109 <tr><td>foo</td></tr>
25110 <tr align='center'></tr>
25111 <tr><td>bar</td></tr>
25115 #### ----------------------------------------------------------------
25116 #### The following section of tests are primarily to test
25117 #### wikitext escaping capabilities of Parsoid. Given that
25118 #### escaping can be done any number of ways, the wikitext (input)
25119 #### is always adjusted to reflect how Parsoid adds nowiki
25122 #### We are marking several tests as parsoid-only since the
25123 #### HTML in the result section is different from what the
25124 #### PHP parser generates for it.
25125 #### ----------------------------------------------------------------
25128 #### --------------- Headings ---------------
25130 #### 1. Nested inside html <h1>=foo=</h1>
25131 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25132 #### 3. Nested inside html with wikitext split by html tags
25133 #### 4. No escape needed
25134 #### 5. Empty headings <h1></h1>
25135 #### 6. Heading chars in SOL context
25136 #### ----------------------------------------
25138 Headings: 0. Unnested
25148 <p>=foo<i>a</i>=</p>
25150 <nowiki>=foo=</nowiki>
25152 <nowiki> </nowiki>=foo=
25154 <nowiki>=foo=</nowiki>
25156 =foo''a''<nowiki>=</nowiki>
25159 # New headings and existing headings are handled differently
25161 Headings: 1. Nested inside html
25169 <h1 data-parsoid=''>=foo=</h1>
25170 <h2 data-parsoid=''>=foo=</h2>
25171 <h3 data-parsoid=''>=foo=</h3>
25172 <h4 data-parsoid=''>=foo=</h4>
25173 <h5 data-parsoid=''>=foo=</h5>
25174 <h6 data-parsoid=''>=foo=</h6>
25182 =<nowiki>=foo=</nowiki>=
25183 ==<nowiki>=foo=</nowiki>==
25184 ===<nowiki>=foo=</nowiki>===
25185 ====<nowiki>=foo=</nowiki>====
25186 =====<nowiki>=foo=</nowiki>=====
25187 ======<nowiki>=foo=</nowiki>======
25192 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25201 <nowiki>*</nowiki>bar
25207 <nowiki>=bar=</nowiki>
25211 Headings: 3. Nested inside html with wikitext split by html tags
25215 <h1>=<b>bold</b>foo=</h1>
25217 = ='''bold'''foo= =
25221 Headings: 4a. No escaping needed (testing just h1 and h2)
25232 <h1><i>=</i>foo=</h1>
25252 Headings: 4b. No escaping needed (inside p-tags)
25269 Headings: 4c. Short headings (1)
25276 <nowiki>===</nowiki>
25282 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25284 Headings: 4d. Short headings (2)
25286 parsoid=wt2html,html2html
25297 <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>
25298 <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>
25299 <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>
25304 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25305 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25306 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25310 Headings: 5. Empty headings
25314 <h1 data-parsoid='{}'></h1>
25316 <h2 data-parsoid='{}'></h2>
25318 <h3 data-parsoid='{}'></h3>
25320 <h4 data-parsoid='{}'></h4>
25322 <h5 data-parsoid='{}'></h5>
25324 <h6 data-parsoid='{}'></h6>
25334 =====<nowiki/>=====
25336 ======<nowiki/>======
25340 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25350 <nowiki>=a=</nowiki>
25352 <nowiki>=a=</nowiki>
25354 <nowiki>=a=</nowiki>
25358 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25371 <nowiki>=a=</nowiki>
25374 <nowiki>=a=</nowiki>
25377 <nowiki>=a=</nowiki>
25382 Headings: 6c. Heading chars in SOL context (leading newline break)
25390 <nowiki>=b=</nowiki>
25394 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25398 <!--c0--><p>=a=</p>
25400 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25402 <!--c0--><nowiki>=a=</nowiki>
25404 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25408 Headings: 6d. Heading chars in SOL context (No escaping needed)
25418 Headings: 7. Insert a newline between new content and headings
25424 <h2 data-parsoid='{}'>A</h2>
25425 <p data-parsoid='{}'>a</p>
25436 Headings: Used as horizontal rule
25438 wgFragmentMode=[ 'html5', 'legacy' ]
25444 <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>
25447 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25450 #### --------------- Lists ---------------
25451 #### 0. Outside nests (*foo, etc.)
25452 #### 1. Nested inside html <ul><li>*foo</li></ul>
25453 #### 2. Inside definition lists
25454 #### 3. Only bullets at start should be escaped
25455 #### 4. No escapes needed
25456 #### 5. No unnecessary escapes
25457 #### 6. Escape bullets in SOL position
25458 #### 7. Escape bullets in a multi-line context
25459 #### ----------------------------------------
25462 Lists: 0. Outside nests
25472 <nowiki>*</nowiki>foo
25474 <nowiki>#</nowiki>foo
25476 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25479 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25480 ## to test wikitext escaping, and insignificant whitespace diffs
25481 ## cause PHP parser tests to barf
25483 Lists: 1. Nested inside html (No unnecessary escapes)
25492 <li data-parsoid='{}'>*foo</li>
25493 <li data-parsoid='{}'>#foo</li>
25494 <li data-parsoid='{}'>:foo</li>
25495 <li data-parsoid='{}'>;foo</li>
25503 <li data-parsoid='{}'>*foo</li>
25504 <li data-parsoid='{}'>#foo</li>
25505 <li data-parsoid='{}'>:foo</li>
25506 <li data-parsoid='{}'>;foo</li>
25513 *<nowiki>*foo</nowiki>
25514 *<nowiki>#foo</nowiki>
25515 *<nowiki>:foo</nowiki>
25516 *<nowiki>;foo</nowiki>
25522 #<nowiki>*foo</nowiki>
25523 #<nowiki>#foo</nowiki>
25524 #<nowiki>:foo</nowiki>
25525 #<nowiki>;foo</nowiki>
25529 Lists: 2. Inside definition lists
25533 <dl><dt>;foo</dt></dl>
25534 <dl><dt>:foo</dt></dl>
25537 <dl><dd>:foo</dd></dl>
25541 ; <nowiki>:foo</nowiki>
25543 ; <nowiki>:foo</nowiki>
25550 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25556 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25560 *<nowiki>*foo</nowiki>''it''*bar
25564 Lists: 4. No escapes needed
25577 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25581 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25595 Lists: 5. No unnecessary escapes
25599 <ul><li> bar <span>[[foo]]</span></li></ul>
25600 <ul><li> =bar <span>[[foo]]</span></li></ul>
25601 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25602 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25603 <ul><li> =bar <span>foo]]</span>=</li></ul>
25604 <ul><li> <s></s>: a</li></ul>
25605 <ul><li> <i>* foo</i></li></ul>
25608 * bar <span><nowiki>[[foo]]</nowiki></span>
25610 * =bar <span><nowiki>[[foo]]</nowiki></span>
25612 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25614 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25616 * =bar <span>foo]]</span>=
25624 Lists: 6. Escape bullets in SOL position
25628 <p><!--cmt-->*foo</p>
25630 <!--cmt--><nowiki>*</nowiki>foo
25634 Lists: 7. Escape bullets in a multi-line context
25643 <nowiki>*</nowiki>b
25647 Lists: 8. Escape colons only if not present in tags
25651 <dl><dt>a:b<i>c:d</i></dt></dl>
25653 ; <nowiki>a:b</nowiki>''c:d''
25656 #### --------------- HRs ---------------
25657 #### 1. Single line
25658 #### -----------------------------------
25661 HRs: 1. Single line
25669 ----<nowiki>----</nowiki>
25674 #### --------------- Tables ---------------
25675 #### 1a. Simple example
25676 #### 1b. No escaping needed (!foo)
25677 #### 1c. No escaping needed (|foo)
25678 #### 1d. No escaping needed (|}foo)
25680 #### 2a. Nested in td (<td>foo|bar</td>)
25681 #### 2b. Nested in td (<td>foo||bar</td>)
25682 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25684 #### 3a. Nested in th (<th>foo!bar</th>)
25685 #### 3b. Nested in th (<th>foo!!bar</th>)
25686 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25690 #### 4c. No escaping needed
25691 #### --------------------------------------
25694 Tables: 1a. Simple example
25702 <nowiki>{|</nowiki>
25707 Tables: 1b. No escaping needed
25718 Tables: 1c. No escaping needed
25729 Tables: 1d. No escaping needed
25740 Tables: 2a. Nested in td
25745 <td>foo|bar</td></tr>
25746 <tr><td>x<div>a|b</div></td>
25750 |<nowiki>foo|bar</nowiki>
25752 |x<div><nowiki>a|b</nowiki></div>
25760 <td>x<div>a|b</div>
25761 </td></tr></tbody></table>
25765 Tables: 2b. Nested in td
25771 <td>a<i>b||c</i></td>
25772 <td>a<i><div>b||c</div></i></td>
25773 </tr></tbody></table>
25776 |<nowiki>foo||bar</nowiki>
25777 |a''<nowiki>b||c</nowiki>''
25778 |a''<div><nowiki>b||c</nowiki></div>''
25787 <td>a<i><div>b||c</div></i>
25793 Tables: 2c. Nested in td -- no escaping needed
25809 Tables: 3a. Nested in th
25825 Tables: 3b. Nested in th
25830 <tr><th>foo!!bar</th>
25831 <th><i>foo|bar</i></th>
25832 <th><i>foo!!bar</i></th>
25833 <th><i><span>foo!!bar</span></i></th>
25834 </tr></tbody></table>
25837 !<nowiki>foo!!bar</nowiki>
25838 !''<nowiki>foo|bar</nowiki>''
25839 !''<nowiki>foo!!bar</nowiki>''
25840 !''<span><nowiki>foo!!bar</nowiki></span>''
25849 <th><i>foo!!bar</i>
25851 <th><i><span>foo!!bar</span></i>
25857 Tables: 3c. Nested in th
25862 <tr><th>foo||bar</th>
25863 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25864 </tr></tbody></table>
25867 !<nowiki>foo||bar</nowiki>
25868 !<nowiki>foo||bar</nowiki>
25881 Tables: 4a. Escape -
25897 |<nowiki>-bar</nowiki>
25902 Tables: 4b. Escape +
25918 |<nowiki>+bar</nowiki>
25923 Tables: 4c. No escaping needed
25928 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25929 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25935 <div>a|b</div></td>
25980 Tables: 4d. No escaping needed
25985 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25986 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25987 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25998 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26008 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26012 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26014 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26016 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26018 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26021 | || align="center" | ||
26031 | {{!}}{{!}} align="center" | ||
26035 ! !! align="center" | !!
26041 <td align="center"></td>
26043 </td></tr></tbody></table>
26048 <td align="center">
26051 </td></tr></tbody></table>
26055 <td align="center"></td>
26057 </td></tr></tbody></table>
26061 <th align="center"></th>
26063 </th></tr></tbody></table>
26067 T97430: Don't emit empty nowiki pairs around marker meta tags
26071 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26072 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26074 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26075 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26079 Unclosed xmlish element in table line shouldn't eat end delimiters
26084 <tbody><tr><td> <foo</td>
26085 <td> bar></td></tr>
26102 #### --------------- Links ----------------
26103 #### 1. Quote marks in link text
26104 #### 2. Wikilinks: Escapes needed
26105 #### 3. Wikilinks: No escapes needed
26106 #### 4. Extlinks: Escapes needed
26107 #### 5. Extlinks: No escapes needed
26108 #### --------------------------------------
26110 Links 1. WikiLinks: No escapes needed
26114 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26115 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26116 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26120 [[Foo|x [Foobar] x]]
26122 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26123 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26124 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26129 Links 2. WikiLinks: Escapes needed
26133 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26134 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26135 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26136 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26137 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26138 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26139 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26140 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26141 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26142 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26144 [[Foo|<nowiki>Foobar]</nowiki>]]
26145 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26146 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26147 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26148 [[Foo|<nowiki>|Bar</nowiki>]]
26149 [[Foo|<nowiki>]]bar</nowiki>]]
26150 [[Foo|<nowiki>[[bar</nowiki>]]
26151 [[Foo|<nowiki>x [[ y</nowiki>]]
26152 [[Foo|<nowiki>x ]] y</nowiki>]]
26153 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26155 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26156 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26157 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26158 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26159 <a href="/wiki/Foo" title="Foo">|Bar</a>
26160 <a href="/wiki/Foo" title="Foo">]]bar</a>
26161 <a href="/wiki/Foo" title="Foo">[[bar</a>
26162 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26163 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26164 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26169 Links 3. WikiLinks: No escapes needed
26173 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26174 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26179 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26180 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26185 Links 4. ExtLinks: Escapes needed
26189 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26190 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26191 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26192 <p>[http://google.com]</p>
26193 <p>[http://google.com google]</p>
26194 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26195 <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>
26197 [http://google.com <nowiki>[google]</nowiki>]
26198 [http://google.com <nowiki>google]</nowiki>]
26199 [http://google.com <nowiki>goog] le</nowiki>]
26201 <nowiki>[http://google.com]</nowiki>
26203 <nowiki>[http://google.com google]</nowiki>
26205 [http://google.com<nowiki>]</nowiki>
26207 [{{echo|http://google.com}}<nowiki>]</nowiki>
26209 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26210 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26211 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26212 </p><p>[http://google.com]
26213 </p><p>[http://google.com google]
26214 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26215 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26220 Links 5. ExtLinks: No escapes needed
26224 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26225 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26227 [http://google.com [google]
26229 [[http://google.com]]
26231 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26232 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26237 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26241 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26242 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26243 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26244 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26245 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26246 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26247 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26248 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26249 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26250 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26251 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26252 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26253 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26256 x<nowiki/>http://example.com<nowiki/>y
26257 http://example.com<nowiki/>?x
26258 http://example.com<nowiki/>&x
26259 http://example.com<nowiki/>'x
26260 http://example.com<nowiki/>,x
26261 http://example.com<nowiki/>.x
26262 http://example.com<nowiki/>;x
26263 http://example.com<nowiki/>:x
26264 http://example.com<nowiki/>;x
26265 http://example.com<nowiki/>!x
26266 http://example.com<nowiki/>=x
26267 http://example.com<nowiki/>(x)
26268 http://example.com(x<nowiki/>)
26272 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26277 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26279 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26280 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26281 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26282 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26283 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26289 "http://example.com"
26290 (http://example.com)
26291 (http://example.com) foo
26292 http://example.com,
26293 http://example.com, foo
26296 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26298 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26299 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26300 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26301 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26302 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26307 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26311 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26312 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26314 http://example.com.,;:!?\
26315 -http://example.com:
26317 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26318 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26323 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26327 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26328 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26329 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26333 X<nowiki/>RFC 123<nowiki/>y
26337 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26341 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26342 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26343 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26350 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26351 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26352 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26357 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26361 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26362 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26363 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26367 X<nowiki/>PMID 123<nowiki/>y
26371 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26375 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26376 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26377 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26384 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26385 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26386 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26391 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26395 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26396 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26397 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26400 ISBN 1234567890<nowiki/>1
26401 ISBN 1234567890<nowiki/>x
26402 a<nowiki/>ISBN 1234567890<nowiki/>b
26406 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26410 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26414 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26419 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26423 <p>this is not a link: http://example.com
26426 this is not a link: <nowiki>http://example.com</nowiki>
26430 Links 15. Link trails can't become link prefixes.
26435 <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>
26437 [[Söfnuður]]-[[00]]
26439 <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>
26443 #### --------------- Quotes ---------------
26444 #### 1. Quotes inside <b> and <i>
26445 #### 2. Link fragments separated by <i> and <b> tags
26446 #### 3. Link fragments inside <i> and <b>
26447 #### 4. No escaping needed
26448 #### --------------------------------------
26450 1a. Quotes inside <b> and <i>
26461 <b>foo'<i>bar'</i>baz</b>
26470 <i>fools'<span> errand</span></i>
26471 <i><span>fool</span>'s errand</i>
26472 '<i>foo</i> bar '<i>baz</i>
26473 a|!*#-:;+-~[]{}b'<i>x</i>
26477 ''<nowiki>''foo''</nowiki>''
26478 ''<nowiki>'''foo'''</nowiki>''
26480 '''<nowiki/>'foo''''
26481 '''<nowiki>''foo''</nowiki>'''
26482 '''<nowiki>'''foo'''</nowiki>'''
26483 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26484 '''foo'''<nowiki/>'s
26490 '''foo'''<nowiki/>'
26491 ''''foo'''<nowiki/>'
26492 ''fools'<span> errand</span>''
26493 ''<span>fool</span>'s errand''
26494 '<nowiki/>''foo'' bar '''baz''
26495 a|!*#-:;+-~[]{}b'''x''
26499 1b. Quotes inside <b> and <i> with other tags on same line
26503 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26504 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26505 <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>
26506 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26507 '<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>
26508 '<i>foo</i> <div title="name">test</div>
26509 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26510 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26511 <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>
26514 '''a'' foo ''[[bar]]''
26515 ''a''' foo ''[[bar]]''
26516 ''a''' foo '''{{echo|[[bar]]}}'''
26517 [[foo]] x'''[[bar]]''
26518 '''foo'' <ref>test</ref>
26519 '''foo'' <div title="name">test</div>
26520 '''foo'' and <br> bar
26525 2. Link fragments separated by <i> and <b> tags
26529 <p>[[<i>foo</i>hello]]</p>
26530 <p>[[<b>foo</b>hello]]</p>
26532 [[''foo''<nowiki>hello]]</nowiki>
26534 [['''foo'''<nowiki>hello]]</nowiki>
26537 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26538 # this is one of the shortcomings of this format
26540 3. Link fragments inside <i> and <b>
26544 <p><i>[[foo</i>]]</p>
26545 <p><b>[[foo</b>]]</p>
26547 ''[[foo''<nowiki>]]</nowiki>
26549 '''[[foo'''<nowiki>]]</nowiki>
26553 4. No escaping needed
26557 <p>'<span><i>bar</i></span>'
26558 '<span><b>bar</b></span>'
26562 '<span>''bar''</span>'
26563 '<span>'''bar'''</span>'
26567 #### ----------- Paragraphs ---------------
26568 #### 1. No unnecessary escapes
26569 #### --------------------------------------
26572 1. No unnecessary escapes
26576 <p>bar <span>[[foo]]</span>
26577 </p><p>=bar <span>[[foo]]</span>
26578 </p><p>[[bar <span>[[foo]]</span>
26579 </p><p>]]bar <span>[[foo]]</span>
26580 </p><p>=bar <span>foo]]</span>=
26583 bar <span><nowiki>[[foo]]</nowiki></span>
26585 =bar <span><nowiki>[[foo]]</nowiki></span>
26587 [[bar <span><nowiki>[[foo]]</nowiki></span>
26589 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26591 =bar <span>foo]]</span><nowiki>=</nowiki>
26594 #### ----------------------- PRE --------------------------
26596 1. Leading whitespace in SOL context should be escaped
26619 <nowiki> </nowiki>a
26621 <nowiki> </nowiki> a
26625 <nowiki> </nowiki> a
26627 <nowiki> </nowiki>a
26630 <nowiki> </nowiki>b
26653 2. Leading whitespace in non-indent-pre contexts should not be escaped
26657 <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>
26658 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26659 <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>
26669 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26688 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26692 <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>
26694 [[File:Foobar.jpg|thumb|caption]]
26698 5. Nowiki escaping should account for indent-pres
26708 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26722 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
26725 "modes": ["html2wt"],
26726 "scrubWikitext": true
26734 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
26735 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
26736 <p> <!--boo-->*foo</p>
26737 <p><!--boo--> *foo</p>
26738 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
26739 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
26755 <nowiki>*</nowiki>foo
26757 <nowiki/><!--boo-->*foo
26759 <!--boo--><nowiki/>*foo
26761 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
26763 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
26766 #### --------------- Behavior Switches --------------------
26769 1. Valid behavior switches should be escaped
26776 <nowiki>__TOC__</nowiki>
26777 ''<nowiki>__TOC__</nowiki>''
26781 2. Invalid behavior switches should not be escaped
26792 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26794 Behavior switches should be SOL-transparent
26798 <meta property="mw:PageProp/toc" />
26800 <!-- this one's bogus -->
26803 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26805 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26809 <!-- this one's bogus -->
26818 #### --------------- HTML tags ---------------
26821 #### 3. multi-line html tag
26822 #### 4. extension tags
26823 #### -----------------------------------------
26829 <a href="http://google.com">google</a>
26831 <a href="http://google.com">google</a>
26839 <ul><li> <div>foo</div></li>
26840 <li> <div style="color:red">foo</div></li>
26841 <li> <td></li></ul>
26844 * <nowiki><div>foo</div></nowiki>
26845 * <nowiki><div style="color:red">foo</div></nowiki>
26846 * <nowiki><td></nowiki>
26850 3. multi-line html tag
26869 <p><ref>foo</ref>
26870 </p><p><ref>bar
26871 </p><p>baz</ref>
26874 <nowiki><ref>foo</ref></nowiki>
26876 <nowiki><ref>bar</nowiki>
26878 baz<nowiki></ref></nowiki>
26882 Parsoid: newline inducing block nodes don't suppress <nowiki>
26888 <nowiki> </nowiki>a
26893 #### --------------- Others ---------------
26899 <p><nowiki>foo</nowiki>
26902 <nowiki>foo</nowiki>
26905 ## The quote-char in the input is necessary for triggering the bug
26907 (T54035) Nowiki-escaping should not get tripped by " :" in text
26916 #----------- End of wikitext escaping tests --------------
26920 Tag-like HTML structures are passed through as text
26942 </p><p>1<d e>f
26947 HTML tag with necessary entities in attributes
26949 <span title="&amp;">foo</span>
26951 <p><span title="&amp;">foo</span>
26956 HTML tag with 'unnecessary' entity encoding in attributes
26958 <span title="&">foo</span>
26960 <p><span title="&">foo</span>
26965 HTML tag with broken attribute value quoting
26967 parsoid=wt2html,html2html
26969 <span title="Hello world>Foo</span>
26971 <p><span title="Hello world">Foo</span>
26974 <p><span title="Hello world">Foo</span></p>
26978 Self-closed tag with broken attribute value quoting
26980 parsoid=wt2html,html2html
26982 <div title="Hello world />Foo
26984 <div title="Hello world"></div><p>Foo
26987 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26991 Table with broken attribute value quoting
26993 parsoid=wt2html,html2html
26996 | title="Hello world|Foo
27001 <td title="Hello world">Foo
27007 <td title="Hello world">Foo
27013 Table with broken attribute value quoting on consecutive lines
27015 parsoid=wt2html,html2html
27018 | title="Hello world|Foo
27019 | style="color:red|Bar
27024 <td title="Hello world">Foo
27026 <td style="color:red">Bar
27032 <td title="Hello world">Foo
27033 </td><td style="color: red">Bar
27034 </td></tr></tbody></table>
27039 Accept empty td cell attribute
27042 | align="center" |foo|| |
27047 <td align="center">foo</td>
27054 Non-empty attributes in th-cells
27057 !Foo!! style="color: red" |Bar
27063 <th style="color: red">Bar
27069 Accept empty attributes in th-cells
27084 Empty table rows go away
27105 ### Parsoid-centric tests for testing RTing of inter-element separators
27106 ### Edge cases not tested by existing parser tests and specific to
27107 ### Parsoid-specific serialization strategies.
27111 RT-ed inter-element separators should be valid separators
27123 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27127 # Parsoid-only test of a DOM pass
27129 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27141 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27142 <p>bar</p></small></td></tr>
27146 <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>
27150 # Note that the "style" attribute is really a template parameter here.
27151 # The = would have to be {{=}} if you wanted the literal.
27153 Empty TD followed by TD with tpl-generated attribute
27158 |{{echo|style='color:red'}}|foo
27172 Indented table with an empty td
27190 ## We have some newline diffs RT-ing this edge case
27191 ## and it is not important enough -- we seem to be emitting
27192 ## at most 2 newlines after a </tr> and this is unrelated to
27193 ## the issue from T85627 that this is testing.
27195 Indented table with blank lines in between (T85627)
27214 Indented block & table
27228 <div data-parsoid='{"stx":"html"}'>foo</div>
27230 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27235 Indent and comment before table row
27250 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27251 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27255 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27257 Empty TR followed by a template-generated TR
27263 {{echo|<tr><td>foo</td></tr>}}
27268 <tr class='mw-empty-elt'></tr>
27269 <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}}]}'>
27274 ## PHP and parsoid output differ for this, and since this is primarily
27275 ## for testing Parsoid's serializer, marking this Parsoid only
27277 Empty TR followed by mixed-ws-comment line should RT correctly
27290 <tr class='mw-empty-elt'></tr>
27293 <!--c--> </tr><!--d-->
27299 Multi-line image caption generated by templates with/without trailing newlines
27301 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27302 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27304 <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>
27305 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a><figcaption>foo\n<span about="#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>
27309 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27313 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27315 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27317 <includeonly>foo</includeonly>
27325 ## PHP emits broken html for this, and since this is primarily
27326 ## a Parsoid serializer test, marking this Parsoid only
27328 Improperly nested inline or quotes tags with whitespace in between
27330 <span> <s>x</span> </s>
27333 <p><span> <s>x</s></span><s> </s>
27334 <b> <i>x</i></b><i> </i>
27339 Encapsulate protected attributes from wt
27341 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27343 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27347 <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>
27349 <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">
27350 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
27354 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27355 ## Having nested or stray pre tags results in the attempt to add duplicates,
27356 ## causing an assertion fail. This test tries to prevent that situation.
27358 Ensure ParagraphWrapper can deal with stray closing pre tags
27368 1. Ensure fostered text content is wrapped in element nodes
27372 <table>hi</table><table>ho</table>
27374 hi<table></table>ho<table></table>
27376 <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>
27380 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27382 parsoid=wt2html,wt2wt
27392 </td></tr></tbody></table>
27394 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||
27395 </span><table data-parsoid='{"stx":"html"}'>
27396 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
27397 </td></tr></tbody></table>
27401 Encapsulation properly handles null DSR information from foster box
27403 parsoid=wt2html,wt2wt
27405 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27407 <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>
27411 1. Encapsulate foster-parented transclusion content
27413 parsoid=wt2wt,wt2html
27415 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27417 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
27419 <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>
27423 2. Encapsulate foster-parented transclusion content
27425 parsoid=wt2wt,wt2html
27427 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27429 <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>
27440 3. Encapsulate foster-parented transclusion content
27442 parsoid=wt2wt,wt2html
27444 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27446 <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>"]}">
27459 4. Encapsulate foster-parented transclusion content
27461 parsoid=wt2wt,wt2html
27463 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27465 <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>"]}">
27478 5. Encapsulate foster-parented transclusion content
27480 parsoid=wt2wt,wt2html
27482 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27484 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27486 <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>
27490 6. Encapsulate foster-parented transclusion content
27492 parsoid=wt2wt,wt2html
27494 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27496 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
27498 <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><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>
27502 7. Encapsulate foster-parented transclusion content
27504 parsoid=wt2wt,wt2html
27506 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27508 <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>
27518 # Note that the wt is broken on purpose: the = should be {{=}} if you
27519 # don't want it to be a template parameter key.
27521 8. Encapsulate foster-parented transclusion content
27523 parsoid=wt2wt,wt2html
27526 }}{|{{echo|style='color:red'}}
27537 </td></tr></tbody></table>
27539 <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">
27540 </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">
27543 </td></tr></tbody></table>
27547 9. Encapsulate foster-parented transclusion content
27549 parsoid=wt2wt,wt2html
27551 <table>{{echo|hi</table>hello}}
27553 hi<table></table><p>hello
27556 <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>
27560 Table in fosterable position
27571 <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">
27573 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27579 # Parsoid only for T66747
27581 Properly encapsulate empty-content transclusions in fosterable positions
27589 <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"}]]}'>
27595 Always encapsulate foster box when template range is expanded to table
27608 T115289: Unclosed table
27610 {{echo|<table>}}<!--c-->[[Category:Two]]
27612 <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>
27616 T115289: Don't migrate newlines out of tables with fostered content
27618 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27620 <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>
27624 T73074: More fostering fun
27626 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27628 <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>
27632 Support <object> element with .data attribute
27636 <object data="test.swf"></object>
27638 <object data="test.swf"></object>
27642 Don't block XML namespace declaration
27644 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27646 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27649 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27652 # -----------------------------------------------------------------
27653 # The following section of tests are primarily to spec requirements
27654 # around Parsoid's serialization (old, new, edited content)
27656 # All these tests are marked Parsoid html2wt and html2html only
27657 # ----------------------------------------------------------------
27660 Ignore rel attribute in a-tags during serialization to url-links
27664 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27665 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27666 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27668 http://en.wikipedia.org/wiki/Foobar
27669 http://en.wikipedia.org/wiki/Foobar
27670 http://en.wikipedia.org/wiki/Foobar
27673 # 'mi' is a localinterwiki prefix as well as a language
27675 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27679 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27685 Parsoid should accept interwiki shortcuts
27689 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27690 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27691 <a href='./fr:Foo'>Foo</a></p>
27692 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27693 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27694 <a href='fr%3AFoo'>Foo</a></p>
27695 <p><a href='FR%3AFoo'>Foo</a>
27696 <a href='./FR:Foo'>Foo</a></p>
27711 Parsoid should not accept invalid interwiki shortcuts
27715 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27716 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27717 <a href='news:Foo'>Foo</a></p>
27726 New wikilinks should be serialized properly
27730 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27731 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27732 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27733 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27734 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27738 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27739 http://en.wikipedia.org/wiki/Foo
27740 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27744 New wiki links (href variations)
27748 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27749 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27750 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27751 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27756 [[Toxine bactérienne]]
27760 New wiki links (content string variations)
27764 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27765 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27766 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27770 [[Foo_bar|./Foo_bar]]
27774 New category links (href variations)
27778 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27779 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27780 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27782 [[Category:Toxine bactérienne]]
27783 [[Category:Toxine bactérienne]]
27784 [[Category:Toxine bactérienne]]
27788 New sol transparent links don't need indent-pre nowiki protection
27793 <link rel="mw:PageProp/redirect" href="./Main_Page">
27794 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27795 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27797 #WEITERLEITUNG [[Main Page]]
27798 <!-- this is good --> [[Category:Good]]
27799 <!-- this is great --> [[Kategorie:Great]]
27803 New interlanguage links (href variations)
27807 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27808 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27809 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27811 [[es:Toxine bactérienne]]
27812 [[es:Toxine_bactérienne]]
27813 [[es:Toxine_bactérienne]]
27817 Image: Modifying size of an image (1)
27820 "modes": ["wt2wt"],
27822 ["img[height]", "attr", "height", "22"],
27823 ["img[width]", "attr", "width", "200"]
27827 [[Image:Foobar.jpg|230x230px]]
27829 [[Image:Foobar.jpg|200x200px]]
27833 Image: Modifying size of an image (2)
27836 "modes": ["wt2wt"],
27838 ["img[height]", "attr", "height", "100"],
27839 ["img[width]", "attr", "width", "500"]
27843 [[Image:Foobar.jpg|230x230px]]
27845 [[Image:Foobar.jpg|500x500px]]
27848 # Change in size is ignored so long as class='mw-default-size'
27850 Image: Modifying size of an image (3)
27853 "modes": ["wt2wt"],
27855 ["figure[class]", "removeClass", "mw-default-size"],
27856 ["figure img", "attr", "height", "19"],
27857 ["figure img", "attr", "width", "170"]
27861 [[Image:Foobar.jpg|thumb]]
27863 [[Image:Foobar.jpg|thumb|170x170px]]
27867 Image: Modifying alignment of an image (T50665)
27870 "modes": ["wt2wt"],
27872 ["figure[class]", "removeClass", "mw-halign-right"],
27873 ["figure[class]", "addClass", "mw-halign-left"]
27877 [[Image:Foobar.jpg|thumb|caption|right]]
27879 [[Image:Foobar.jpg|thumb|caption|left]]
27883 Image: Modifying mw-default-size of an frameless image (T64805)
27886 "modes": ["wt2wt"],
27888 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27892 [[Image:Foobar.jpg|frameless|right]]
27894 [[Image:Foobar.jpg|frameless|right|220x220px]]
27898 Image: Modifying valign of an image (T51221)
27901 "modes": ["wt2wt"],
27903 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27904 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27908 [[File:Foobar.jpg|20px|middle]]
27910 [[File:Foobar.jpg|20px|text-top]]
27914 Image: Modifying alt attribute of an image (T58400)
27917 "modes": ["wt2wt"],
27919 ["img[alt]", "attr", "alt", "some alternate edited text"]
27923 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27925 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27929 Image: Modifying caption of an image
27932 "modes": ["wt2wt"],
27934 ["figcaption", "text", "new caption"]
27938 [[Image:Foobar.jpg|thumb|original caption]]
27940 [[Image:Foobar.jpg|thumb|new caption]]
27944 Image: empty alt attribute (T50924)
27948 [[File:Foobar.jpg|thumb|alt=|bar]]
27950 <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>
27954 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27960 <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>
27962 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27966 Image: Block level image should have \n before and after
27969 [[File:Foobar.jpg|right|thumb|150x150px]]
27973 <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>
27978 Image: New block level image should have \n before and after (existing content)
27981 [[File:Foobar.jpg|right|thumb|150x150px]]
27985 <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>
27990 Image: upright option (parsoid)
27992 [[File:Foobar.jpg|thumb|upright|caption]]
27993 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27994 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27996 <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>
27997 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/110px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="12" width="110"/></a><figcaption>caption</figcaption></figure>
27998 <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>
28002 Image: upright option is ignored on inline and frame images (parsoid)
28004 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28006 <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>
28010 Image: in template parameter with empty parameter
28012 {{echo|[[File:Foobar.jpg|link=]]}}
28014 <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>
28018 Image: from basic HTML (1)
28022 <span typeof="mw:Image">
28023 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28026 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28030 Image: from basic HTML (2)
28034 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28036 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28040 Image: from basic HTML (3)
28044 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28046 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28050 Image: from basic HTML (4)
28054 <img src="./File:Foobar.jpg">
28056 [[File:Foobar.jpg|link=]]
28060 Image: Invalid title as link
28062 [[File:Foobar.jpg|link=<]]
28064 <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>
28067 <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>
28071 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28076 <li><p>foo</p></li>
28083 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28087 <ul> <li>foo</li></ul>
28093 Don't strip leading whitespace when handling indent-pre suppressing tags
28098 <tr><td> indented row</td></tr>
28101 <b>This is very bold of you!</b>
28104 indented cell (no pre-wrapping!)
28114 '''This is very bold of you!'''
28118 indented cell (no pre-wrapping!)
28126 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28148 <nowiki> </nowiki></span>bar2
28151 <nowiki> </nowiki><span>bar</span>
28154 <nowiki> </nowiki><span>foo</span>
28159 Lists: Dont insert newlines in a serialized list item.
28163 <ul><li>a<br>b</li><li>c</li></ul>
28170 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28173 "modes": ["html2wt"],
28174 "scrubWikitext": false
28177 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28178 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28180 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28181 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28183 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28185 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28187 == hello there [[Category:A1]] ==
28189 == [[Category:A2]] hi pal ==
28191 == <!--foo--> [[Category:A3]] how goes it ==
28193 == it goes well [[Category:A4]] <!--bar--> ==
28195 ==howdy [[Category:A5]]==
28201 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28204 "modes": ["html2wt"],
28205 "scrubWikitext": true
28208 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28209 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28211 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28212 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28214 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28222 <!--foo-->[[Category:A3]]
28227 [[Category:A4]] <!--bar-->
28235 Headings: Don't hoist metas that come from templates
28238 "modes": ["html2wt"],
28239 "scrubWikitext": true
28242 <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>
28244 == {{echo|foo [[Category:Foo]]}} ==
28248 Headings: Category in ref isn't hoisted
28251 "modes": ["html2wt"],
28252 "scrubWikitext": true
28255 <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>
28257 <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>
28260 [[Category:Baz]] </ref> ==
28266 Parsoid: Serialize positional parameters with = in them as named parameter
28270 <p about="#mwt1" typeof="mw:Transclusion"
28271 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28273 <p about="#mwt1" typeof="mw:Transclusion"
28274 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28276 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28277 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28278 <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>
28282 {{echo|1=f=oo|2=bar}}
28284 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28285 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28286 {{echo|<nowiki>f=oo</nowiki>|bar}}
28290 Parsoid: Serialize positional parameters with = in extlink as named parameter
28294 <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>
28296 {{echo|1=http://stuff?is=ok}}
28300 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28304 <div>a<p>b</p></div>
28325 Substrings resembling wikitext in hrefs should not get nowiki escapes
28329 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28335 Enforce single-line context in the serializer
28342 <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">
28343 </span><span about="#mwt1">you</span> </h2>
28345 <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>
28347 <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
28348 there</span></li></ol>
28360 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28367 </tbody></table></dd></dl>
28371 == hi {{bogus|there
28382 * foo '''bar''' baz
28394 Serialize new placeholder space without spans
28398 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28400 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28402 <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>
28408 <ref>foo : bar</ref>ok
28412 #-----------------------
28413 # Tag minimization tests
28414 #-----------------------
28417 1. I/B quote minimization: wikitext-only tags should be combined
28421 <p><i>A</i><i>B</i></p>
28422 <p><b>A</b><b>B</b></p>
28423 <p><i>A</i><b><i>B</i></b></p>
28424 <p><b>A</b><i><b>B</b></i></p>
28425 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28426 <p><i><b>A</b></i><i><b>B</b></i></p>
28427 <p><i><b>A</b></i><b><i>B</i></b></p>
28428 <p><b><i>A</i></b><i><b>B</b></i></p>
28448 2. I/B quote minimization: wikitext and html tags should not be combined
28452 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28453 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28457 ''A''<nowiki/>'''<i>B</i>'''
28461 3. I/B quote minimization: templated content stops minimization
28465 <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>
28466 <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>
28468 ''A''{{echo|''B''}}
28470 ''A''{{echo|'''''B'''''}}
28474 4. I/B quote minimization: new content should be mimimized with adjacent old content
28478 <p><i>A</i><i>B</i></p>
28479 <p><b>A</b><b>B</b></p>
28480 <p><i>A</i><b><i>B</i></b></p>
28490 5a. Merge adjacent quote nodes if they've been edited
28493 "modes": ["wt2wt", "selser"],
28495 ["p", "contents", "remove", ":contains('b')"]
28505 5b. Merge adjacent quote nodes if they've been edited
28508 "modes": ["wt2wt", "selser"],
28514 ''a''<span id="x">b</span>''c''
28520 1. Merge adjacent link nodes as long as at least one element is new
28523 "modes": ["html2wt"],
28524 "scrubWikitext": true
28527 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28528 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28529 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28533 [[Football|Foot]][[Football|ball]]
28537 2. Merge adjacent link nodes and enable additional normalizations
28540 "modes": ["html2wt"],
28541 "scrubWikitext": true
28544 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28550 3. Don't merge adjacent link nodes if scrubWikitext is false
28553 "modes": ["html2wt"],
28554 "scrubWikitext": false
28557 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28559 [[Football|Foot]][[Football|ball]]
28563 1. Move format tags outside of WikiLink
28566 "modes": ["html2wt"],
28567 "scrubWikitext": true
28570 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
28571 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
28572 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
28575 '''''[[Football]]'''''
28576 <u>'''''[[Football]]'''''</u>
28580 2. Move format tags outside of WikiLink with mergable A tags
28583 "modes": ["html2wt"],
28584 "scrubWikitext": true
28587 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
28589 '''''[[Football]]'''''
28593 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
28596 "modes": ["html2wt"],
28597 "scrubWikitext": true
28600 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
28602 <font color="red"><u>'''[[Foo]]'''</u></font>
28606 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
28609 "modes": ["html2wt"],
28610 "scrubWikitext": true
28613 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
28614 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
28615 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
28617 [[Foo|<font color="red">Foo</font>]]
28618 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
28619 [[Foo|<span class="Bar">Foo</span>]]
28623 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
28626 "modes": ["selser"],
28627 "scrubWikitext": true,
28629 ["a", "html", "<i>Foo</i>"]
28639 6. Regression test: Manual edit test to ensure diff markers are not lost
28642 "modes": ["selser"],
28643 "scrubWikitext": true,
28645 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
28654 #------------------------------
28655 # End of tag minimization tests
28656 #------------------------------
28659 T56262: New entities
28663 <span typeof="mw:Entity"> </span>
28668 ## Note that there is no wikitext output for 'unknownproperty' ##
28669 ## Unknown magic words are silently dropped ##
28676 <meta property='mw:PageProp/toc' />
28677 <meta property='mw:PageProp/notoc' />
28678 <meta property='mw:PageProp/forcetoc' />
28679 <meta property='mw:PageProp/index' />
28680 <meta property='mw:PageProp/noindex' />
28681 <meta property='mw:PageProp/nogallery' />
28682 <meta property='mw:PageProp/noeditsection' />
28683 <meta property='mw:PageProp/notitleconvert' />
28684 <meta property='mw:PageProp/nocontentconvert' />
28685 <meta property='mw:PageProp/unknownproperty' />
28695 __NOCONTENTCONVERT__
28699 Consecutive <pre>s should not get merged
28701 parsoid=html2wt,html2html
28703 <pre>a</pre><pre>b</pre>
28731 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28735 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28737 [[Special:BookSources/1234567890|ISBN 1234567895]]
28741 Edited RFC links not serializable as RFC links should serialize as extlinks
28745 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28747 [https://tools.ietf.org/html/rfc123 New RFC]
28751 Edited PMID links not serializable as PMID links should serialize as extlinks
28755 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28757 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28761 WTS of autolinks with trailing/surrounding context
28765 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28766 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28767 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28768 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28769 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28770 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28772 http://cscott.net'''foo'''
28774 http://cscott.net<b>foo</b>
28776 '''http://cscott.net'''
28778 '''http://cscott.net '''
28780 '''http://cscott.net<nowiki/>x'''
28782 http://cscott.net<nowiki/>x
28786 WTS of autolinks with nowikis (round-trip)
28788 x<nowiki/>http://cscott.net<nowiki/>x
28790 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28793 # this is the "easy" test because it leaves in place all the
28794 # data-parsoid information indicating this is an autolink
28796 WTS of autolinks with escapes (editing)
28799 "modes": ["wt2wt"],
28801 [ "span", "remove" ]
28805 x<nowiki/>http://cscott.net<nowiki/>x
28807 x<nowiki/>http://cscott.net<nowiki/>x
28811 WTS of edited autolink-like text (T103364)
28814 "modes": ["wt2wt"],
28816 [ "span[typeof]", "removeAttr", "typeof" ]
28820 Not a link: <nowiki>http://example.com</nowiki>.
28822 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28826 WTS of newly-authored autolink-like text (T103364)
28830 <p>http://example.com is not a link.</p>
28832 <nowiki>http://example.com</nowiki> is not a link.
28836 WTS of autolink-like text after an autolink (T108563)
28840 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28842 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28846 Magic links inside links (not autolinked)
28848 [[Foo|http://example.com]]
28851 [[Foo|ISBN 123456789x]]
28853 [http://foo.com http://example.com]
28854 [http://foo.com RFC 1234]
28855 [http://foo.com PMID 1234]
28856 [http://foo.com ISBN 123456789x]
28858 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28859 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28860 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28861 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28862 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28863 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28864 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28865 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28868 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28869 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28870 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28871 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28873 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28874 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28875 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28876 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28880 Magic links inside image captions (autolinked)
28882 [[File:Foobar.jpg|thumb|http://example.com]]
28883 [[File:Foobar.jpg|thumb|RFC 1234]]
28884 [[File:Foobar.jpg|thumb|PMID 1234]]
28885 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28887 <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>
28888 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a></div></div></div>
28889 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div></div></div>
28890 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div></div></div>
28892 <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>
28893 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></figcaption></figure>
28894 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></figcaption></figure>
28895 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/123456789X" rel="mw:WikiLink">ISBN 123456789x</a></figcaption></figure>
28899 WTS of magic word text (T109371)
28904 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28905 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28907 <nowiki>RFC 1234</nowiki>
28909 [http://foo.com RFC 1234]
28915 Edited Redirect link should emit a non-piped wikitext link
28919 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28925 T75121: Infer extension name from typeOf if data-mw is not present
28927 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28929 <div typeOf="mw:Extension/foo"></div>
28934 # Note that the <p> wrapping isn't present in PHP parser output
28935 # The important thing for this test is that P-wrapping doesn't
28936 # interfere with the <nowiki> protection for leading - in <td>
28937 # (which isn't necessary for <th>).
28939 T88318: p-wrapped dash in table.
28941 parsoid=html2wt,wt2wt
28944 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28945 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28946 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28953 |<nowiki>-</nowiki>
28954 |<nowiki>- </nowiki>
28974 <td><small>-</small>
28981 </td></tr></tbody></table>
28985 T149209: WTS: Handle newlines in table cells properly
28993 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28995 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29001 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29003 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29025 T149209: Selser: Handle newlines in table cells properly
29028 "modes": ["selser"],
29030 [ "#h1", "html", "a\nb\n" ],
29031 [ "#h2", "html", "a\nb\n" ],
29032 [ "#c1", "html", "a\nb\n" ],
29033 [ "#c2", "html", "<p>a</p>" ],
29034 [ "#c3", "html", "<p>a</p>" ],
29035 [ "#c4", "html", "edit-me<p>a</p>" ]
29040 ! id="h1" |edit-me!!1
29042 ! id="h2" |edit-me||2
29044 | id="c1" |edit-me||3
29046 | id="c2" |edit-me||4
29048 | id="c3" |edit-me||p||q||r
29050 | id="c4" |edit-me||p||q||r
29079 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29084 <td id='mwAc'>foo</td>
29085 <td id='serialize-this'>bar</td>
29090 | id="serialize-this" |bar
29095 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29099 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29101 <div id="hello">ok</div>
29105 Testing serialization after deletion in references
29108 "modes": ["wt2wt"],
29114 hi <ref><div id="x">ho</div></ref>
29124 Testing serialization after deletion of table cells
29127 "modes": ["wt2wt", "selser"],
29135 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29145 Testing selser after addition of new row before first row (T125419)
29148 "modes": ["wt2wt", "selser"],
29150 [ "tr", "before", "<tr><td>X</td></tr>" ]
29166 Serialize new table rows in a HTML table using HTML tags
29169 "modes": ["wt2wt", "selser"],
29171 [ "tr", "before", "<tr><td>X</td></tr>" ]
29175 <table><tr><td>a</td></tr></table>
29177 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29181 Serialize new table cells in a HTML row using HTML tags
29184 "modes": ["wt2wt", "selser"],
29186 [ "td", "before", "<td>X</td>" ]
29190 <table><tr><td>a</td></tr></table>
29192 <table><tr><td>X</td><td>a</td></tr></table>
29196 Serialize wikitext list items as HTML list items when embedded in a HTML list
29200 <ul data-parsoid='{"stx": "html"}'>
29201 <li data-parsoid='{}'>a</li>
29211 # SSS FIXME: Is this actually a good thing given the
29212 # odd nested list output that is generated by MW?
29213 # <ul><li>foo<ul>..</ul></li></ul> instead of
29214 # <ul><li>foo</li><ul>..</ul></ul>
29216 Wikitext lists can be nested inside HTML lists
29220 <ul data-parsoid='{"stx": "html"}'>
29221 <li data-parsoid='{"stx": "html"}'>a
29222 <ul><li>b</li></ul>
29226 <ul data-parsoid='{"stx": "html"}'>
29228 <ul><li>y</li></ul>
29249 "modes": ["wt2wt"],
29251 [ "#xyz", "before", "<b>before</b> stuff " ],
29252 [ "#xyz", "after", " stuff <i>after</i>" ],
29253 [ "#xyz", "html", "x <b>y</b> z" ]
29257 <span id="xyz">hello</span>
29259 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29263 Never serialize a-tag as html, regardless of what data-parsoid has to say
29265 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29267 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29272 ## SSS FIXME: This is broken output nevertheless.
29273 ## What might be a reasonable non-broken output for this?
29274 ## This is an edge case unlikely to be seen in production
29275 ## that I am not wasting more time on this right now.
29277 Never serialize a-tag as html, no matter what attributes it has
29279 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29281 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29283 [http://boo.org http://boohoo.org]
29286 # Misnested is an indication that selser can reuse the source but these have
29287 # shown to sneak through on occasion. See T101768.
29288 # The original wikitext here is: [http://test.com [[one]] two three]
29290 Strip span tags added to mark misnested links
29294 <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>
29296 [http://test.com][[one]] two three
29300 Catch regression when unpacking misnested links
29304 {{echo|hi}}[http://example.com [[ho]]]
29306 <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>
29310 Catch regression when unpacking with trailing content
29312 {{echo|Foo <references/> bar}}
29314 <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>
29318 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29322 <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|}"]}'>
29334 ## This test verifies the presence and computation of this attribute indirectly
29335 ## by making an edit and ensuring that the serialization is correct (which it would be
29336 ## only if firstWikitextNode is properly set).
29338 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
29341 "modes": ["wt2wt"],
29343 [ "div#x", "remove" ],
29344 [ "div", "before", "<div>new</div>" ]
29348 <div id="x">foo</div>
29350 {{echo|<div>boo</div>
29358 {{echo|<div>boo</div>
29364 # --------------------------------------------
29365 # Tests spec'ing wikitext serialization norms |
29366 # --------------------------------------------
29369 Serialize multi-line indent-pre starting with wikitext syntax
29383 1. Categories should always be serialized on their own line
29387 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
29395 2. Categories that are part of templates should not introduce a line break
29397 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
29399 <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>
29402 # Careful while editing these next 2 tests. There are \u200f characters
29403 # before and after the <link> tags in the HTML and following some
29404 # of the categories in wikitext
29405 # Do not remove these characters in edits.
29407 # As part of the serialization, these bidi characters will get stripped.
29409 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
29412 "modes": ["html2wt"],
29413 "scrubWikitext": true
29416 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
29417 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
29420 [[קטגוריה: שיטות משפט]]
29424 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
29427 "modes": ["html2wt"],
29428 "scrubWikitext": true
29431 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
29438 Lists: Add space after bullets
29445 <li><span> baz</span></li>
29450 * <span> baz</span>
29454 1. Headings: Add space before/after == (T53744)
29461 <h2><span> baz</span></h2>
29469 == <span> baz</span> ==
29473 2. Headings: Add space before/after == even after hoisted content
29476 "modes": ["html2wt"],
29477 "scrubWikitext": true
29480 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29488 1. Headings: suppress newly created empty headings
29491 "modes": ["html2wt"],
29492 "scrubWikitext": true
29500 2. Headings: don't suppress empty headings if scrubWikitext is false
29510 3. Headings: suppress empty headings on edits
29513 "modes": ["selser"],
29514 "scrubWikitext": true,
29520 ==<span id="x">foo</span>==
29525 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29528 "modes": ["html2wt"],
29529 "scrubWikitext": true
29532 <h2>foo<br/>bar</h2>
29533 <h2>foo <span><br/>bar</span> baz</h2>
29537 == foo <span> bar</span> baz ==
29541 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29544 "modes": ["html2wt"],
29545 "scrubWikitext": false
29548 <h2>foo<br/>bar</h2>
29554 1. WT Quote Tags: suppress newly created empty style tags
29557 "modes": ["html2wt"],
29558 "scrubWikitext": true
29566 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29572 ''<nowiki/>'''''<nowiki/>'''
29576 3. WT Quote Tags: suppress empty style tags on edits
29579 "modes": ["selser"],
29580 "scrubWikitext": true,
29586 '''<span id="x">foo</span>'''
29591 1. Anchors: suppress newly created empty anchors
29594 "modes": ["html2wt"],
29595 "scrubWikitext": true
29598 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29603 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29606 "modes": ["html2wt"],
29607 "scrubWikitext": false
29610 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29616 3. Anchors: suppress empty anchors on edits
29619 "modes": ["selser"],
29620 "scrubWikitext": true,
29626 [[Test|<span id="x">foo</span>]]
29631 3a. Anchors: do not suppress numbered extlinks
29634 "modes": ["wt2wt"],
29635 "scrubWikitext": true
29640 <a rel="mw:ExtLink" href="http://foo.com"></a>
29644 3b. Anchors: do not suppress numbered extlinks
29647 "modes": ["wt2wt"],
29648 "scrubWikitext": true,
29654 [http://foo.com <span id="x">foo</span>]
29660 Normalizations should be restricted to edited content
29663 "modes": ["selser"],
29664 "scrubWikitext": true,
29666 [ "h1", "before", "<i></i>"]
29680 1. Multiple normalizations (html2wt)
29683 "modes": ["html2wt"],
29684 "scrubWikitext": true
29688 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29689 </a><b><i></i></b>x</p>
29698 2. Multiple normalizations (selser)
29701 "modes": ["selser"],
29702 "scrubWikitext": true,
29704 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29708 <span id="x">foo</span>
29710 <span id="x">foo</span>
29716 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29719 "modes": ["html2wt"],
29720 "scrubWikitext": true
29732 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29739 <nowiki> </nowiki>hi
29741 <nowiki> </nowiki> hello
29745 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29748 "modes": ["html2wt"],
29749 "scrubWikitext": true
29758 baz bang</td></tr></table>
29764 bar<span>boo</span></p>
29780 bar<span>boo</span>
29784 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29787 "modes": ["selser"],
29788 "scrubWikitext": true,
29790 [ "p", "html", " a\n b" ]
29801 1. New links that end in spaces
29804 "modes": ["html2wt"],
29805 "scrubWikitext": false
29808 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29809 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29810 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29812 [[Berlin ]]<nowiki/>is the capital of Germany.
29816 [[Boston ]] is a city.
29820 2. New links that end in spaces
29823 "modes": ["html2wt"],
29824 "scrubWikitext": true
29827 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29828 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29829 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29831 [[Berlin]] is the capital of Germany.
29835 [[Boston]] is a city.
29839 1. Table cells with escapable prefixes
29842 "modes": ["html2wt"],
29843 "scrubWikitext": false
29847 <tr><td>a</td></tr>
29848 <tr><td>-</td></tr>
29849 <tr><td>+</td></tr>
29855 |<nowiki>-</nowiki>
29857 |<nowiki>+</nowiki>
29862 2. Table cells with escapable prefixes
29865 "modes": ["html2wt"],
29866 "scrubWikitext": true
29870 <tr><td>a</td></tr>
29871 <tr><td>-</td></tr>
29872 <tr><td>+</td></tr>
29885 3a. Table cells with escapable prefixes after edits
29888 "modes": ["selser"],
29889 "scrubWikitext": true,
29891 [ "table tbody tr:first-child td:first-child", "remove"]
29905 3b. Table cells with escapable prefixes after edits
29908 "modes": ["selser"],
29909 "scrubWikitext": true,
29911 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29918 |<span id="x">foo</span>+
29927 # FIXME: This test will fail because
29928 # normalization doesn't realize that the id attribute
29929 # will eliminate the escapable scenario
29931 4a. Table cells without escapable prefixes after edits
29934 "modes": ["selser"],
29935 "scrubWikitext": true,
29937 [ "#x", "html", "-" ]
29950 ## This tests normalizer's ability to discriminate between
29951 ## cells having identical content.
29953 4b. Table cells without escapable prefixes after edits
29956 "modes": ["selser"],
29957 "scrubWikitext": true,
29959 [ "td", "html", "-" ]
29972 ## This tests normalizer's ability to not be tripped by
29973 ## comments (and whitespace)
29975 4c. Table cells without escapable prefixes after edits
29978 "modes": ["selser"],
29979 "scrubWikitext": true,
29981 [ "table tbody tr td:first-child", "remove" ]
29996 ## This tests normalizer's ability to handle HTML cells
29998 4d. Table cells without escapable prefixes after edits
30001 "modes": ["selser"],
30002 "scrubWikitext": true,
30004 [ "td", "html", "-" ]
30009 <tr><td>a</td></tr>
30013 <tr><td>-</td></tr>
30017 ## T111151 Remove font elements without attributes
30019 5a. font tags without attributes should be dropped in scrubWikitext mode
30022 "modes": ["html2wt"],
30023 "scrubWikitext": true
30027 <font><font>bar</font></font>
30028 <font class="x">boo</font>
30032 <font class="x">boo</font>
30036 5b. font tags should not be dropped without scrubWikitext being enabled
30039 "modes": ["html2wt"],
30040 "scrubWikitext": false
30049 Escape nowiki DOM elements
30053 <nowiki><i>foo</i></nowiki>
30055 <nowiki>''foo''</nowiki>
30058 # This is meant to be an interim fix while we go about figuring out
30059 # how to not introduce these trailing <nowiki/>s in the first place.
30061 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30065 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30067 <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>
30068 <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>
30082 New list is serialized on newlines
30086 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30090 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30092 The quick brown fox jumps over the lazy dog.
30098 The quick onyx goblin jumps over the lazy dwarf.
30102 New lists in formatting elements serialized w/o newlines
30114 <small><ul><li>hi</li></ul></small>
30126 New list in table doesn't need newlines
30130 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30139 # ---------------------------------------------------
30140 # End of tests spec'ing wikitext serialization norms |
30141 # ---------------------------------------------------
30145 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30153 <td><b>c</b><p>d</p></td>
30172 Anchor without href scenarios
30174 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30177 <a class="no">dice</a>
30182 <span name="foo"></span>
30186 New transclusion added after a list should be serialized after the list
30190 <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>
30196 # -----------------------------------------------------------------
30197 # End of section for Parsoid-only html2wt tests for serialization
30199 # -----------------------------------------------------------------
30201 # -----------------------------------------------------------------
30202 # The following section of tests are primarily to spec behavior of
30203 # the selective serializer. All these tests have manual selser
30204 # changes. The automated selser changes for all tests handle the
30205 # wide variation of changes, but these tests here capture specs
30206 # deterministically.
30207 # ----------------------------------------------------------------
30211 Selser: New comments should not be lost
30214 "modes": ["selser"],
30216 [ "#a", "after", "<!--c1-->" ],
30217 [ "#b", "before", "<!--c2-->" ]
30221 <span id="a">a</span>
30223 <span id="b">b</span>
30225 <span id="a">a</span><!--c1-->
30227 <!--c2--><span id="b">b</span>
30232 Selser: Check for validity of DSR before using it
30235 "modes": ["selser"],
30237 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30241 <span id="a">a</span>
30243 {{DISPLAYTITLE:foo}}
30244 <span id="a">a</span>
30248 1. DOMDiff: Changes to <ref> content should be looked up using id
30251 "modes": ["selser"],
30253 ["#X", "after", "bar"],
30254 ["#Y", "after", "baz"]
30258 X <ref><span id="X">foo</span></ref>
30261 <ref name="a"><span id="Y">foo</span></ref>
30264 X <ref><span id="X">foo</span>bar</ref>
30267 <ref name="a"><span id="Y">foo</span>baz</ref>
30272 2. DOMDiff: Changes to <ref> content should be looked up using id
30275 "modes": ["selser"],
30277 ["#Z", "after", "bar"]
30281 A <ref>foo bar for a</ref>
30282 B <ref group="X" name="b" />
30286 <references group="X">
30287 <ref name="b"><span id="Z">foo</span></ref>
30290 A <ref>foo bar for a</ref>
30291 B <ref group="X" name="b" />
30295 <references group="X">
30296 <ref name="b"><span id="Z">foo</span>bar</ref>
30301 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30304 "modes": ["selser"],
30306 [ "div:first-child", "text", "bar" ]
30310 <div style="{{1x|color:red;}}%">foo</div>
30312 <div style="{{1x|color:red;}}%">bar</div>
30324 <li class="mw-empty-elt"></li>
30325 <li class="mw-empty-elt"></li>
30332 [[File:Thumb.png|thumb]]
30334 <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>
30336 <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>
30340 unclosed internal link XSS (T137264)
30342 [[#%3Cscript%3Ealert(1)%3C/script%3E|
30344 <p>[[#<script>alert(1)</script>|
30347 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
30351 Validating that <style> isn't eaten by tidy (T167349)
30356 <style>.foo::before { content: "<foo>"; }</style>
30357 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30361 <style>.foo::before { content: "<foo>"; }</style>
30362 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30367 Validating that <style> isn't wrapped in a paragraph (T186965)
30371 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30373 <style>.foo::before { content: "<foo>"; }</style>
30375 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30377 But if it's on a line with other content, let it be wrapped.
30379 <style>.foo::before { content: "<foo>"; }</style> bar
30381 foo <style>.foo::before { content: "<foo>"; }</style>
30383 foo <style>.foo::before { content: "<foo>"; }</style> bar
30385 And the same if we have non-paragraph-breaking whitespace
30388 <style>.foo::before { content: "<foo>"; }</style>
30391 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30393 <style>.foo::before { content: "<foo>"; }</style>
30394 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30395 <p>But if it's on a line with other content, let it be wrapped.
30396 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
30397 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
30398 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
30399 </p><p>And the same if we have non-paragraph-breaking whitespace
30401 <style>.foo::before { content: "<foo>"; }</style>
30407 Validating that <link> isn't wrapped in a paragraph (T186965)
30411 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30413 <link rel="foo" href="bar"/>
30415 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30417 But if it's on a line with other content, let it be wrapped.
30419 <link rel="foo" href="bar"/> bar
30421 foo <link rel="foo" href="bar"/>
30423 foo <link rel="foo" href="bar"/> bar
30425 And the same if we have non-paragraph-breaking whitespace
30428 <link rel="foo" href="bar"/>
30431 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30433 <link rel="foo" href="bar"/>
30434 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30435 <p>But if it's on a line with other content, let it be wrapped.
30436 </p><p><link rel="foo" href="bar"/> bar
30437 </p><p>foo <link rel="foo" href="bar"/>
30438 </p><p>foo <link rel="foo" href="bar"/> bar
30439 </p><p>And the same if we have non-paragraph-breaking whitespace
30441 <link rel="foo" href="bar"/>
30447 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
30449 wgFragmentMode=[ 'html5', 'legacy' ]
30451 ==A&B&C&amp;D&amp;amp;E==
30452 [[#A&B&C&amp;D&amp;amp;E]]
30454 <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>
30455 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
30458 <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>
30459 <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>
30463 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
30465 wgFragmentMode=[ 'legacy' ]
30467 ==A&B&C&amp;D&amp;amp;E==
30468 [[#A&B&C&amp;D&amp;amp;E]]
30470 <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>
30471 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
30476 Decoding of HTML entities in embedded HTML tags
30478 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30480 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30483 <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>
30487 Decoding of HTML entities in indicator names for IDs (T104196)
30489 parsoid=wt2html,html2html
30492 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30494 1&2&3&4&amp;5=Indicator
30497 <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>
30500 # this version of the test strips out the ambiguity so Parsoid rts cleanly
30502 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
30506 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30508 1&2&3&4&amp;5=Indicator
30511 <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>
30514 # This fragment mode is what Parsoid supports.
30516 HTML5 ids: fallback to legacy
30518 wgFragmentMode=[ 'html5', 'legacy' ]
30530 ==Hey < # " > % : '==
30531 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30533 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30535 <!-- These two links should produce identical HTML -->
30536 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30539 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30541 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30542 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30543 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30544 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30545 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30546 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30550 <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>
30551 <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>
30552 <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>
30553 <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>
30554 <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>
30555 <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>
30556 <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>
30557 </p><p>💩 <span id="💩"></span>
30558 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30561 <h2 id="Foo_bar">Foo bar</h2>
30563 <h2 id="foo_Bar_2">foo Bar</h2>
30565 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30567 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30569 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30571 <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>
30572 <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>
30574 <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>
30576 <!-- These two links should produce identical HTML -->
30577 <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>
30580 # Parsoid doesn't support this mode
30582 HTML5 ids: legacy with a fallback to modern
30584 wgFragmentMode=[ 'legacy', 'html5' ]
30596 ==Hey < # " > % : '==
30597 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30599 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30601 <!-- These two links should produce identical HTML -->
30602 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30605 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30607 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30608 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30609 <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>
30610 <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>
30611 <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>
30612 <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>
30616 <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>
30617 <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>
30618 <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>
30619 <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>
30620 <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>
30621 <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>
30622 <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>
30623 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30624 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30628 # Parsoid doesn't support this mode.
30630 HTML5 ids: no legacy
30632 wgFragmentMode=[ 'html5' ]
30644 ==Hey < # " > % : '==
30645 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30647 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30649 <!-- These two links should produce identical HTML -->
30650 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30653 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30655 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30656 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30657 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30658 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30659 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30660 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30664 <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>
30665 <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>
30666 <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>
30667 <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>
30668 <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>
30669 <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>
30670 <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>
30671 </p><p>💩 <span id="💩"></span>
30672 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30677 T90902: Normalize weird characters in section IDs
30679 wgFragmentMode=[ 'html5', 'legacy' ]
30685 <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>
30686 <p><a href="#Foo_bar">#Foo bar</a>
30689 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30690 <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>
30694 T51672: Test for brackets in attributes of elements in external link texts
30696 [http://example.com/ link <span title="title with [brackets]">span</span>]
30697 [http://example.com/ link <span title="title with [brackets]">span</span>]
30700 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30701 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30704 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30705 <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>
30709 T72875: Test for brackets in attributes of elements in internal link texts
30711 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30712 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30715 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30716 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30719 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30720 <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>
30724 T179544: {{anchorencode:}} output should be always usable in links
30726 wgFragmentMode=[ 'html5' ]
30728 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30730 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30733 <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>
30736 ## ------------------------------
30737 ## Parsoid section-wrapping tests
30738 ## ------------------------------
30740 Section wrapping for well-nested sections (no leading content)
30743 "wrapSections": true
30764 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30767 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30770 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30773 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30776 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30779 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30786 Section wrapping for well-nested sections (with leading content)
30789 "wrapSections": true
30794 Para 2 with a <div>nested in it</div>
30807 <section data-mw-section-id="0"><p>Para 1.</p>
30809 <p>Para 2 with a </p><div>nested in it</div>
30813 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30816 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30819 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30822 </section></section>
30826 Section wrapping with template-generated sections (good nesting 1)
30829 "wrapSections": true
30846 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30849 <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">
30850 </span><p about="#mwt1">b</p>
30851 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30854 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30858 # In this example, the template scope is mildly expanded to incorporate the
30859 # trailing newline after the transclusion since that is part of section 1.1.1
30861 Section wrapping with template-generated sections (good nesting 2)
30864 "wrapSections": true,
30865 "modes": ["wt2html", "wt2wt"]
30880 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30883 <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">
30884 </span><p about="#mwt1">b</p><span about="#mwt1">
30885 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30886 </span><p about="#mwt1">d</p><span about="#mwt1">
30887 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30891 # In this example, the template scope is mildly expanded to incorporate the
30892 # trailing newline after the transclusion since that is part of section 1.2.1
30894 Section wrapping with template-generated sections (good nesting 3)
30897 "wrapSections": true,
30898 "modes": ["wt2html", "wt2wt"]
30916 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30919 <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">
30920 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
30921 </span><p about="#mwt1">b</p><span about="#mwt1">
30922 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30923 </span><p about="#mwt1">c</p><span about="#mwt1">
30924 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30925 </span><p about="#mwt1">d</p><span about="#mwt1">
30926 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
30930 # Because of section-wrapping and template-wrapping interactions,
30931 # the scope of the template is expanded so that the template markup
30932 # is valid in the presence of <section> tags.
30933 # This exercises the s1 is null scenario in the wrapSections code
30935 Section wrapping with template-generated sections (bad nesting 1)
30938 "wrapSections": true
30952 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30955 <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"]}'>
30956 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
30957 </span><p about="#mwt1">b
30958 </p><span about="#mwt1">
30960 </span><p about="#mwt1">c</p><span about="#mwt1">
30961 </span></section></div></section>
30964 # Because of section-wrapping and template-wrapping interactions,
30965 # the scope of the template is expanded so that the template markup
30966 # is valid in the presence of <section> tags.
30967 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30969 Section wrapping with template-generated sections (bad nesting 2)
30972 "wrapSections": true
30990 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30993 </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">
30994 </span><p about="#mwt1">b</p><span about="#mwt1">
30995 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
30996 </span><p about="#mwt1">c</p><span about="#mwt1">
30998 </span><p about="#mwt1">d</p><span about="#mwt1">
31000 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
31004 # Because of section-wrapping and template-wrapping interactions,
31005 # additional template wrappers are added to <section> tags
31006 # so that template wrapping semantics are valid whether section
31007 # tags are retained or stripped. But, the template scope can expand
31008 # greatly when accounting for section tags.
31009 # This exercises the s1 and s2 are in different subtrees scenario
31011 Section wrapping with template-generated sections (bad nesting 3)
31014 "wrapSections": true,
31015 "modes": ["wt2html", "wt2wt"]
31033 <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>
31036 <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">
31037 </span><p about="#mwt1">b</p><span about="#mwt1">
31038 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
31039 </span><p about="#mwt1">c</p>
31042 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
31047 Section wrapping with uneditable lead section + div wrapping multiple sections
31050 "wrapSections": true
31055 <div style="border:1px solid red;">
31072 <section data-mw-section-id="-1"><p>foo</p>
31074 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31075 <section data-mw-section-id="1"><h1 id="1">1</h1>
31078 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31081 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31085 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31088 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31090 </section></section>
31094 Section wrapping with editable lead section + div overlapping multiple sections
31097 "wrapSections": true
31104 <div style="border:1px solid red;">
31121 <section data-mw-section-id="0"><p>foo</p>
31123 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31125 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31128 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31131 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31136 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31139 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31141 </section></section>
31145 HTML header tags should not be wrapped in section tags
31148 "wrapSections": true
31161 <section data-mw-section-id="0"><p>foo</p>
31163 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31165 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31167 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31169 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31173 Lead section containing only whitespace and comments.
31176 "wrapSections": true
31180 <!-- this is a comment, presumably significant to editors -->
31187 <section data-mw-section-id="0" data-parsoid="{}">
31188 <!-- this is a comment, presumably significant to editors -->
31189 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31192 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31197 Pseudo-sections emitted by templates should have id -2
31200 "wrapSections": true
31210 <section data-mw-section-id="-1"><p>foo</p>
31211 </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}}]}'>
31212 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31213 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31214 </section></div><span about="#mwt1">
31218 ##########################################################################
31219 Tests demonstrating white-space insensitivity in input wikitext
31220 for wikitext headings, wikitext list items, and wikitext table captions,
31221 headings, and cells. HTML versions of the same should preserve whitespace.
31222 ##########################################################################
31224 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31227 "modes": ["wt2html"],
31228 "preserveIEW": true
31232 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31233 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31234 == <!--Headings with fallback ids--> Личная жизнь ==
31235 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31236 ; <!--term to define--> term : <!--term's definition--> definition
31238 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31240 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31242 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31244 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
31246 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
31249 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31252 <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>
31253 <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>
31254 <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>
31255 <ul><li>List item</li></ul>
31256 <dl><dt>term </dt>
31257 <dd>definition</dd></dl>
31259 <caption>Table Caption
31262 <th>Table Heading 1</th>
31263 <th>Table Heading 2
31266 <td>Table Cell 1</td>
31270 <td>class="foo"</td>
31274 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
31275 </td></tr></tbody></table>
31278 <td>Table Cell 1</td>
31280 </td></tr></tbody></table> foo</dd></dl>
31282 <meta property="mw:PageProp/notoc">
31283 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
31284 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
31285 <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>
31286 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
31287 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
31289 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
31291 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
31293 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31295 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
31297 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
31300 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31301 </tbody></table><p> foo </p><!--c1--></dd></dl>
31304 # Looks like <caption> is not accepted in HTML
31306 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
31309 "modes": ["wt2html"],
31310 "preserveIEW": true
31314 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31315 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31317 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
31318 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
31321 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
31322 <ul><li> List item </li></ul>
31324 <tbody><tr><th> Table Heading </th><th></th></tr>
31325 <tr><td> Table Cell </td><th></th></tr>
31328 <meta property="mw:PageProp/notoc"/>
31329 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31330 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31332 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
31333 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
31338 Do not trim whitespace in links and quotes
31341 "modes": ["wt2html"],
31342 "preserveIEW": true
31345 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
31346 [[Foo| some text ]]
31348 <p>foo <i> italic </i> and <b> bold </b>
31349 <a href="/wiki/Foo" title="Foo"> some text </a>
31352 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
31353 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
31357 Remove p tags surrounding a single element in a figcaption
31361 [[File:Foobar.jpg|right|200x200px|Caption]]
31363 <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>
31367 Selser preserves lack of newline before list and allows newline after the list
31370 "modes": ["selser"],
31371 "scrubWikitext": true,
31373 [ "ul", "after", "<p>footer</p>" ]
31390 Selser does not introduce newlines between unedited paragraph preceding the list
31393 "modes": ["selser"],
31395 [ "table tbody tr td p:last-child", "empty" ]
31417 Selser does not introduce newlines between unedited paragraph following the list
31420 "modes": ["selser"],
31422 [ "table tbody tr td p:first-child", "empty" ]
31444 Remove a list item but do not insert newline above list
31447 "modes": ["selser"],
31449 [ "ul li:last-child", "remove" ]