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
1467 ### Special characters
1471 Bare pipe character (T54363)
1480 Bare pipe character from a template (T54363)
1489 ### <nowiki> test cases
1493 <nowiki> unordered list
1495 <nowiki>* This is not an unordered list item.</nowiki>
1497 <p>* This is not an unordered list item.
1500 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1506 <nowiki>Lorem ipsum dolor
1514 <p>Lorem ipsum dolor
1523 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1533 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1535 <nowiki><span class="error"></nowiki>
1537 <p><span class="error">
1540 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1546 :There is not nowiki.
1547 :There is <nowiki>nowiki</nowiki>.
1549 #There is not nowiki.
1550 #There is <nowiki>nowiki</nowiki>.
1552 *There is not nowiki.
1553 *There is <nowiki>nowiki</nowiki>.
1555 <dl><dd>There is not nowiki.</dd>
1556 <dd>There is nowiki.</dd></dl>
1557 <ol><li>There is not nowiki.</li>
1558 <li>There is nowiki.</li></ol>
1559 <ul><li>There is not nowiki.</li>
1560 <li>There is nowiki.</li></ul>
1563 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1564 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1566 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1567 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1569 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1570 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1574 Entities inside <nowiki>
1576 <nowiki><</nowiki>
1581 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1585 Entities inside template parameters
1592 <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>
1596 Properly escape nowiki when combined with other wiki markup
1600 <p>* </nowiki> tag</p>
1602 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1606 T93824: Put escaped HTML tags inside nowiki
1610 <p><h2>foo</h2></p>
1612 <nowiki><h2>foo</h2></nowiki>
1616 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1620 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1621 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1622 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1624 This text: L'[[Foo]]
1625 This text: L<nowiki>''</nowiki>[[Foo]]
1626 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1629 # This test fails because wikitext whitespace is not normalized before comparing.
1631 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1635 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1638 This text : L<nowiki>''</nowiki>[[Foo]]
1641 # This test and the next one are html2wt only as they test that incorrect wikitext
1642 # passed in template arguments gets escaped or wrapped in nowikis where required.
1644 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1648 <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>
1649 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1651 {{echo|foo{{!}}bar}}
1652 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1656 T53961: Output correct nowikis in template arguments
1660 <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>
1661 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1662 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1663 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1664 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1667 {{echo|<nowiki>a }} b</nowiki>}}
1668 {{echo|<nowiki>a [[ b</nowiki>}}
1669 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1670 {{echo|a <nowiki>}</nowiki>}}
1674 Cases where "!!" needs nowiki protection
1679 <tr><th>this needs protection !! here</th></tr>
1683 <tr><th>this does not need
1684 protection !! here</th></tr>
1688 !<nowiki>this needs protection !! here</nowiki>
1701 Comments and Indent-Pre
1703 <!-- comment 1 --> asdf
1705 <!-- comment 1 --> asdf
1708 <!-- comment 1 --> asdf
1709 <!-- comment 2 -->xyz
1711 <!-- comment 1 --> asdf
1712 <!-- comment 2 --> xyz
1768 asdf<!-- comment 1 -->jkl
1778 <!-- foo --> b <!-- bar -->
1792 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1798 Comment semantics and delimiters
1800 <!-- --><!----><!-----><!------>
1804 <!-- --><!----><!-----><!------>
1808 Comment semantics and delimiters, redux
1810 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1811 -- foo -- funky huh? ... -->
1815 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1816 -- foo -- funky huh? ... -->
1820 Comment semantics and delimiters: directors cut
1822 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1823 everything starting with < followed by !-- until the first -- and > we see,
1824 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1830 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1831 everything starting with < followed by !-- until the first -- and > we see,
1832 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1837 Comment semantics: nesting
1839 <!--<!-- no, we're not going to do anything fancy here -->-->
1844 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1847 # Parsoid closes the unclosed comment, even if it means a slight
1850 Comment semantics: unclosed comment at end
1852 parsoid=wt2html,html2html
1854 <!--This comment will run out to the end of the document
1858 <!--This comment will run out to the end of the document-->
1862 Comment semantics: normalize comments to play nice with XML and browsers
1864 <!-- Browsers --!> think this is closed -->
1865 <!--> This would normally be text -->
1866 <!---> As would this -->
1867 <!-- XML doesn't like trailing dashes -------->
1868 <!-- Nor doubled hyphens -- anywhere in the data -->
1869 But this is not a comment.
1871 <p>But this is not a comment.
1874 <!-- Browsers --!> think this is closed -->
1875 <!--> This would normally be text -->
1876 <!---> As would this -->
1877 <!-- XML doesn't like trailing dashes -------->
1878 <!-- Nor doubled hyphens -- anywhere in the data -->
1879 <p>But this is not a comment.</p>
1883 Comment semantics: round-trip even text which contains encoded -->
1885 <!-- hello & goodbye - > --> --&gt; --&xx -->
1887 <!-- hello & goodbye - > --> --&gt; --&xx -->
1891 Comment in template title
1900 Comment on its own line post-expand
1912 Comment on its own line post-expand with non-significant whitespace
1924 post-expand include size being exceeded
1928 {{echo3|1234567890}}
1930 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1935 max template depth being reached
1939 {{echo with depth|too deep!}}
1941 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1946 multiple templates that are redirects
1957 Multiple comments should still parse as SOL-transparent
1959 parsoid=wt2html,wt2wt
1962 <!--c2--><!--c3--><!--c4-->*b
1971 <!--c2--><!--c3--><!--c4-->
1977 ## Make sure ">" gets escaped in comments to avoid XSS
1979 IE conditional comments
1982 <script>alert('hi');</script>
1985 <!--[if lt IE 9]>
1986 <script>alert('hi');</script>
1991 ### paragraph wrapping tests
2007 Block tag on one line (<div>)
2017 <p>a </p><div>foo</div>
2023 No p-wrappable content
2025 parsoid=wt2html,html2html
2027 <span><div>x</div></span>
2028 <span><s><div>x</div></s></span>
2029 <small><em></em></small><span><s><div>x</div></s></span>
2031 <span><div>x</div></span>
2032 <span><s><div>x</div></s></span>
2033 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2036 # T177612: Parsoid-only test
2038 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2040 {{echo|<span><div>x</div></span>}}
2043 <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>
2048 Block tag on one line (<blockquote>)
2050 parsoid=wt2html,html2html
2052 a <blockquote>foo</blockquote>
2056 a <blockquote>foo</blockquote>
2060 <p>a </p><blockquote><p>foo</p></blockquote>
2066 Block tag on both lines (<div>)
2076 <p>a </p><div>foo</div><p>
2077 b </p><div>foo</div>
2081 Block tag on both lines (<blockquote>)
2083 parsoid=wt2html,html2html
2085 a <blockquote>foo</blockquote>
2087 b <blockquote>foo</blockquote>
2089 a <blockquote>foo</blockquote>
2090 b <blockquote>foo</blockquote>
2093 <p>a </p><blockquote><p>foo</p></blockquote><p>
2094 b </p><blockquote><p>foo</p></blockquote>
2098 Multiple lines without block tags
2119 x </p><div>foo</div><p> z
2124 Empty lines between lines with block tags
2159 </p><div>b</div><p>d
2164 <div data-parsoid='{"stx":"html"}'></div>
2167 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2170 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2172 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2175 <div data-parsoid='{"stx":"html"}'>e</div>
2179 Unclosed HTML p-tags should be handled properly
2186 <div><p>foo</p></div>
2191 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2196 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2197 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2200 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2204 a [[Category:A1]] [[Category:A2]]
2209 <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"/>
2213 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2219 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2223 No paragraph necessary for SOL transparent template
2225 <span><div>foo</div></span>
2228 <span><div>foo</div></span>
2229 {{echo|[[Category:Foo]]}}
2231 <span><div>foo</div></span>
2232 <span><div>foo</div></span>
2235 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2236 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2238 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2239 <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}}]}'/>
2243 Avoid expanding multiline sol transparent template ranges unnecessarily
2261 <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">
2264 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2268 Paragraph wrapping following unclosed table
2270 parsoid=wt2html,html2html
2291 </td></tr></tbody></table>
2297 <table data-parsoid='{"autoInsertedEnd":true}'>
2298 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2300 </tbody></table><table>
2301 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2312 Paragraph wrapping suppressed in html p
2314 parsoid=wt2html,html2html
2334 <p data-parsoid='{"stx":"html"}'>
2345 Dangling table row doesn't prevent p-wrapping
2347 parsoid=wt2html,html2html
2355 <tbody><tr><td>hi</td></tr>
2356 <tr class="mw-empty-elt"></tr>
2357 </tbody></table><p> ho</p>
2361 ### Preformatted text
2371 And a [[Main Page|link]]
2377 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2382 Tabs don't trigger preformatted text
2386 This is preformatted text.
2392 <pre>This is preformatted text.
2397 preformatted text.</p>
2398 <pre>This is preformatted text.
2403 Space before tab needs nowiki pre protection
2409 <nowiki> </nowiki> a
2413 Ident preformatting with inline content
2424 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2441 Regression with preformatted in <center>
2455 T54763: Preformatted in <blockquote>
2461 indented cell (no pre-wrapping!)
2471 <p> indented cell (no pre-wrapping!)
2479 T53086: Double newlines in blockquotes should be turned into paragraphs
2496 T17491: <ins>/<del> in blockquote
2501 Foo <del>bar</del> <ins>baz</ins> quux
2505 <p>Foo <del>bar</del> <ins>baz</ins> quux
2511 <p>Foo <del>bar</del> <ins>baz</ins> quux
2517 T17491: <ins>/<del> in blockquote (2)
2521 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2524 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2528 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2533 <pre> with attributes (T5202)
2535 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2537 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2542 <pre> with width attribute (T5202)
2544 <pre width="8">Narrow screen goodies</pre>
2546 <pre width="8">Narrow screen goodies</pre>
2551 <pre> with forbidden attribute (T5202)
2553 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2555 <pre width="8">Narrow screen goodies</pre>
2560 Entities inside <pre>
2569 <pre> with forbidden attribute values (T5202)
2571 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2573 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2578 <nowiki> inside <pre> (T15238)
2586 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2594 <pre><nowiki>Foo</nowiki></pre>
2599 <nowiki> inside of #tag:pre
2601 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2603 <pre>Foo →bar</pre>
2606 <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>
2609 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2610 ## aren't enclosed in nowikis.
2612 <nowiki> and <pre> preference (first one wins)
2643 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2648 <p><span typeof="mw:Nowiki">
2656 </pre> inside nowiki
2658 <nowiki></pre></nowiki>
2665 Empty pre; pre inside other HTML tags (T56946)
2682 <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
2684 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2688 HTML pre followed by indent-pre
2701 <p><pre>foo</pre></p>
2703 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2705 <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>
2709 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2717 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2727 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2739 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2760 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2764 {{echo| foo}}{{echo| bar}}
2769 {{echo|<!--cmt--> foo}}
2771 <!--cmt-->{{echo| foo}}
2773 {{echo|{{echo| }}bar}}
2791 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2827 ## Hmm, should Parsoid rt this?
2829 Pres with newline attributes
2831 parsoid=wt2html,html2html
2836 <pre class="one two">hi</pre>
2839 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2843 Things that look like <pre> tags aren't treated as such
2845 Barack Obama <President> of the United States
2846 <President></President>
2848 <p>Barack Obama <President> of the United States
2849 <President></President>
2853 ## Remex doesn't account for fostered content.
2855 Handle broken pre-like tags (T66025)
2859 {{echo|<pre <pre>x</pre>}}
2861 <table><pre </table>
2864 <table><pre </table>
2868 <pre <table></table>
2870 <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>
2872 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'><pre </p><table data-parsoid='{"stx":"html"}'></table>
2876 Parsoid: handle pre with space after attribute
2880 <pre style="width:50%;" >{{echo|foo}}</pre>
2882 <pre style="width:50%;">{{echo|foo}}</pre>
2885 <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>
2888 # TODO / maybe: fix wt2wt for this
2890 Parsoid: Don't paragraph-wrap fosterable content
2923 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2927 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2955 #--------------------------------------------------------------------
2956 # Transclusion parameter whitespace stripping tests
2957 # Behavior is different for positional and named parameters
2958 #--------------------------------------------------------------------
2960 Templates: Strip leading and trailing whitespace from named-param values
2964 {{echo|1= {{echo|b}} }}
2982 Templates: Don't strip whitespace from positional-param values
2986 {{echo|{{echo|b}} }}
3026 Templates: Don't recognize targets split by newlines
3042 Templates: Recognize targets when newlines and comments don't split the target
3047 <!--X--> ech<!--X-->o<!--X-->
3055 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech<!--X-->o<!--X--> \n <!--X--> <!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3059 Templates: Handle empty comment-and-ws-only lines correctly
3062 <!--should be ignored-->
3063 <!--should be ignored as well-->
3070 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n<!--should be ignored-->\n <!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
3074 Templates: Handle comments in the target
3077 <!-- should be ignored -->
3081 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3084 {{echo<!-- should be ignored -->
3087 {{echo<!-- should be ignored -->|foo}}
3089 {{<!-- should be ignored -->echo|foo}}
3098 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3100 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3102 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3104 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3106 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3110 Templates: Handle comments in parameter names (T69657)
3113 <!-- should be ignored -->
3117 <!-- should be ignored -->
3120 {{echo|1<!-- should be ignored -->=foo}}
3122 {{echo|<!-- should be ignored -->1=foo}}
3130 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3132 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
3134 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3136 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
3140 Templates: Other wikitext in parameter names (T69657)
3147 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3151 Templates: With colons
3155 <p>Template with colon
3158 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"With: Colon","href":"./Template:With:_Colon"},"params":{},"i":0}}]}'>Template with colon</p>
3161 #--------------------------------------------------------------------
3162 # Transclusion parameter escaping tests
3163 #--------------------------------------------------------------------
3166 Templates: Parsoid parameter escaping test 1
3168 {{echo|[foo]|{{echo|[bar]}}}}
3173 <p about="#mwt1" typeof="mw:Transclusion"
3174 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3178 Parsoid: Pipes in external links in template parameter
3180 {{echo|[{{echo|http://example.com}} link]}}
3182 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3185 <p><a rel="mw:ExtLink" class="external text" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
3189 Parsoid: pipe in transclusion parameter
3191 {{echo|http://foo.com/a|b}}
3193 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3196 <p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
3200 Parsoid: Pipe in external link target and content in template parameter
3202 parsoid=html2wt,wt2wt
3204 {{echo|[http://foo.com/a|b a|b]}}
3206 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3209 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3210 typeof="mw:Transclusion"
3211 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3212 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3216 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3220 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3222 <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>
3226 Templates: Don't escape already nowiki-escaped text in template parameters
3228 parsoid=html2wt,wt2wt
3230 {{echo|foo<nowiki>|</nowiki>bar}}
3231 {{echo|<nowiki><div></nowiki>}}
3232 {{echo|<nowiki></nowiki>}}
3239 <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>
3240 <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>
3241 <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>
3247 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3249 parsoid=html2wt,wt2wt
3251 {{echo|{{echo|1=bar}}}}
3256 <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>
3261 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3268 <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>
3273 Templates: Preserve blank parameter names
3280 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3284 Templates: Preserve blank parameter names in other positions
3286 {{blank_param|bar|=foo}}
3292 <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
3297 ### Parsoid-centric tests for testing RT edge cases for pre
3301 1a. Indent-Pre and Comments
3314 1b. Indent-Pre and Comments
3327 1c. Indent-Pre and Comments
3340 1d. Indent-Pre and Comments
3341 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3354 2a. Indent-Pre and tables
3375 2b. Indent-Pre and tables
3391 2c. Indent-Pre and tables (T44252)
3408 2d. Indent-Pre and tables
3425 <tbody><tr><td> b</td></tr>
3430 2e. Indent-Pre and table-line syntax
3443 2f. Indent-pre started by table-line syntax
3462 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3467 Text that should be rendered preformatted
3475 <pre>Text that should be rendered preformatted
3484 2h. Indent pre in tables
3486 parsoid=wt2html,html2html
3529 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3531 </td></tr></tbody></table>
3535 3a. Indent-Pre and block tags (single-line html)
3537 parsoid=wt2html,html2html
3541 c <blockquote> foo </blockquote>
3546 c <blockquote> foo </blockquote>
3547 <pre><span> foo </span>
3550 <p> a </p><p> foo </p><p>
3551 b </p><div> foo </div><p>
3552 c </p><blockquote><p> foo </p></blockquote>
3553 <pre><span> foo </span>
3556 <p> a </p><p data-parsoid='{"stx":"html"}'> foo </p><p>
3557 b </p><div data-parsoid='{"stx":"html"}'> foo </div><p>
3558 c </p><blockquote data-parsoid='{"stx":"html"}'><p> foo </p></blockquote>
3559 <pre><span data-parsoid='{"stx":"html"}'> foo </span></pre>
3563 3b. Indent-Pre and block tags (multi-line html)
3566 <!-- comment --> b <div> foo </div>
3568 <pre>a <span>foo</span>
3573 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3574 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3576 <pre>a <span>foo</span>
3578 b </p><div> foo </div>
3582 3c. Indent-Pre and block tags (pre-content on separate line)
3646 4. Indent-Pre and extension tags
3648 parsoid=wt2html,html2html
3657 <p> a </p><pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3661 5. Indent-Pre and html pre
3663 <pre class="123">hi</pre>
3665 <pre class="123">hi</pre>
3668 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3672 Render paragraphs when indent-pre is suppressed in blocklevels
3689 4. Multiple spaces at start-of-line
3707 ## NOTE: the leading white-space chars on empty line are significant
3709 5a. White-space in indent-pre
3721 ## NOTE: the leading white-space chars on empty line are significant
3723 5b. White-space in indent-pre
3742 5c. White-space in indent-pre
3755 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3778 7a. Indent-pre and category links
3780 parsoid=wt2html,wt2wt
3782 [[Category:foo]] <!-- No pre-wrapping -->
3783 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3786 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3787 <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 -->
3790 ## We used to, but no longer wt2wt this test since the default serializer
3791 ## will normalize all categories to serialize on their own line.
3792 ## This wikitext usage is going to be fairly uncommon in production and
3793 ## selser will take care of preserving formatting in those scenarios.
3795 7b. Indent-pre and category links
3800 [[Category:foo]] {{echo|b}}
3802 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3803 <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>
3807 Indent-Pre: Newlines in comments shouldn't affect sol state
3822 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3826 HTML-pre: 1. embedded newlines
3858 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3860 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3863 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3868 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3876 HTML-pre: big spaces
3912 <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"}}'>
3931 HTML-pre: 2: indented text
3944 HTML-pre: 3: other wikitext
3963 <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
3972 ### Definition lists
3980 <dd>Definition</dd></dl>
3985 Definition list for indentation only
3989 <dl><dd>Indented text</dd></dl>
3994 Definition list with no space
3999 <dd>Definition</dd></dl>
4004 Definition list with URL link
4006 ;http://example.com/ :definition
4008 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
4009 <dd>definition</dd></dl>
4014 Definition list with bracketed URL link
4016 ;[http://www.example.com/ Example]:Something about it
4018 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4019 <dd>Something about it</dd></dl>
4024 Definition list with wikilink containing colon
4026 ;[[Help:FAQ]]:The least-read page on Wikipedia
4028 <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>
4029 <dd>The least-read page on Wikipedia</dd></dl>
4033 # At Brion's and JeLuF's insistence... :)
4035 Definition list with news link containing colon
4037 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4039 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
4040 <dd>This isn't even a real newsgroup!</dd></dl>
4043 <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>
4047 Malformed definition list with colon
4049 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4051 <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>
4056 Definition lists: colon in external link text
4058 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4060 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
4061 <dd>OK, I made that up</dd></dl>
4066 Definition lists: colon in HTML attribute
4068 ;<b style="display: inline">bold</b>
4070 <dl><dt><b style="display: inline">bold</b></dt></dl>
4075 Definition lists: self-closed tag
4077 ;one<br/>two :two-line fun
4079 <dl><dt>one<br />two</dt>
4080 <dd>two-line fun</dd></dl>
4085 Definition lists: ignore colons inside tags
4087 ;one <b>two : tag <i>fun:</i>:</b>:def
4089 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4095 Definition lists: excess closed tags
4097 ;one</b>two :bad tag fun
4100 <dd>bad tag fun</dd></dl>
4104 <dd>bad tag fun</dd>
4109 T13748: Literal closing tags
4113 <dd>test test test test test</dd>
4115 <dd>test test test test test</dd>
4120 <dd>test test test test test</dd>
4122 <dd>test test test test test</dd>
4128 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4137 <dd>description</dd></dl>
4138 <ul><li>unordered</li></ul>
4144 Definition list with empty definition and following paragraph
4157 Nested definition lists using html syntax
4170 Definition Lists: No nesting: Multiple dd's
4183 Definition Lists: Indentation: Regular
4191 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4196 Definition Lists: Indentation: Missing 1st level
4202 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4207 Definition Lists: Indentation: Multi-level indent
4211 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4216 Definition Lists: Hacky use to indent tables
4223 should be left alone
4225 <dl><dd><dl><dd><table>
4230 </td></tr></table></dd></dl></dd></dl>
4232 should be left alone
4237 Definition Lists: Hacky use to indent tables (with content following table)
4242 |} <!--c1--> this text should be part of the dl
4249 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4256 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4260 Definition Lists: Hacky use to indent tables, with comments (T65979)
4268 should be left alone
4271 <dl><dd><dl><dd><table><tr>
4274 </tr></table><!-- bar --></dd></dl></dd></dl>
4276 should be left alone</p>
4280 Definition Lists: Hacky use to indent tables, with comment before table
4288 <dl><dd><dl><dd><!-- foo --><table><tr>
4290 </tr></table></dd></dl></dd></dl>
4293 # The trailing whitespace in this test is to catch a regression in
4294 # Parsoid after T54473.
4296 Definition Lists: Hacky use to indent tables (WS-insensitive)
4305 </td></tr></table></dd></dl>
4309 <tbody><tr><td>a</td></tr>
4310 </tbody></table></dd></dl>
4313 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4314 ## as an empty dt item. It also ignores all but the last ";" when followed
4315 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4316 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4319 ## Ex: ";;t2 ::d2" is transformed into:
4331 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4332 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4343 ## All Parsoid only definition list tests have this difference.
4345 ## See also: https://phabricator.wikimedia.org/T8569
4346 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4349 Table / list interaction: indented table with lists in table contents
4371 </td></tr></table></dd></dl>
4376 Table / list interaction: lists nested in tables nested in indented lists
4399 </td></tr></table></dd></dl>
4406 Definition Lists: Nesting: Multi-level (Parsoid only)
4434 Definition Lists: Nesting: Test 2
4441 <dl><dd>d2</dd></dl></dd></dl>
4446 Definition Lists: Nesting: Test 3
4451 <dl><dd><dl><dt>t1</dt>
4453 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4458 Definition Lists: Nesting: Test 4
4463 <dl><dd><dl><dd><dl><dt>t3</dt>
4464 <dd>d3</dd></dl></dd></dl></dd></dl>
4469 ## The Parsoid team believes the following three test exposes a
4470 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4471 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4472 ## It also exposes a "misfeature" in tidy, which doesn't like
4473 ## <dl> tags with a single <dt> child; it converts the <dt> into
4474 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4476 Definition Lists: Mixed Lists: Test 1
4482 <dl><dd><dl><dt><ul><li>foo</li>
4483 <li>bar</li></ul></dt></dl>
4484 <dl><dt>baz</dt></dl></dd></dl>
4487 <dl><dd><dl><dt><ul><li>foo</li>
4488 <li>bar</li></ul></dt></dl>
4489 <dl><dt>baz</dt></dl></dd></dl>
4507 Definition Lists: Mixed Lists: Test 2
4512 <ul><li><dl><dd>d1</dd>
4513 <dd>d2</dd></dl></li></ul>
4519 Definition Lists: Mixed Lists: Test 3
4524 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4525 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4531 Definition Lists: Mixed Lists: Test 4
4536 <ul><li><dl><dt>d1</dt>
4539 <dd>d4</dd></dl></li></ul>
4545 Definition Lists: Mixed Lists: Test 5
4551 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4557 Definition Lists: Mixed Lists: Test 6
4562 <ol><li><ul><li><dl><dd>d1
4563 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4569 Definition Lists: Mixed Lists: Test 7
4574 <dl><dd><ul><li>d1</li>
4575 <li>d2</li></ul></dd></dl>
4581 Definition Lists: Mixed Lists: Test 8
4586 <dl><dd><ul><li>d1</li></ul>
4587 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4593 Definition Lists: Mixed Lists: Test 9
4597 <ul><li><dl><dt>foo</dt>
4598 <dd>bar</dd></dl></li></ul>
4604 Definition Lists: Mixed Lists: Test 10
4608 <ul><li><ol><li><dl><dt>foo</dt>
4609 <dd>bar</dd></dl></li></ol></li></ul>
4613 # The Parsoid team disagrees with the PHP parser's seemingly-random
4614 # rules regarding dd/dt on the next few tests. Parsoid is more
4615 # consistent, and recognizes the shared nesting and keeps the
4616 # still-open tags around until the nesting is complete.
4618 # This is a regression test for T175099
4620 Definition Lists: Mixed Lists: Test 11
4627 <ul><li>b</li></ul></dd></dl>
4631 <dd><ul><li>b</li></ul></dd></dl>
4634 # FIXME: Maybe get rid of this test?
4636 Definition Lists: Mixed Lists: Test 12
4641 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4642 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4644 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4647 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4648 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4650 <dd>baz</dd></dl></li></ol></li></ul>
4668 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4673 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4682 Definition Lists: Mixed Lists: Test 13
4687 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4688 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4689 <dl><dt>boo </dt>
4690 <dd>baz</dd></dl></li></ol></li></ul>
4693 # FIXME: Maybe get rid of this test?
4695 # * The test is wrong, there are two colons where there should be :;
4696 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4698 Definition Lists: Weird Ones: Test 1
4700 *#;*::;;foo :bar (who uses this?)
4702 <ul><li><ol><li><dl><dt>foo</dt>
4703 <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>
4721 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4733 Definition Lists: colons occurring in tags
4750 <dt><span>a:b</span></dt>
4751 <dt><div>a:b</div></dt>
4752 <dt><div>a</div></dt>
4756 <dt><i>a:b</i></dt></dl>
4757 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4759 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4761 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4762 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4763 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4764 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4766 <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>
4767 <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>
4768 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4771 # Parsoid's output differs here again because it shares
4772 # nesting between the two lists unlike the PHP parser.
4773 # Unsure which is more desirable.
4775 Definition Lists: colons and tables 1
4787 </td></tr></table></dd></dl>
4791 </td></tr></table></dd></dl>
4797 </td></tr></table></dd>
4801 </td></tr></table></dd></dl>
4804 # FIXME: Does this need a html/php section?
4806 Definition Lists: template interaction
4808 ::{{definition_list}}
4811 ::{{definition_list}}
4816 <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">
4817 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4819 <dl><dd data-parsoid='{}'>one
4820 <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">
4821 </span><dd about="#mwt2">two
4823 <dd>three</dd></dl></dd>
4824 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4832 External links: non-bracketed
4834 Non-bracketed: http://example.com
4836 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4840 # parsoid doesn't explicitly mark autonumbered links, see T55505
4842 External links: numbered
4844 Numbered: [http://example.com]
4845 Numbered: [http://example.net]
4846 Numbered: [http://example.com]
4848 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4849 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4850 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4853 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4854 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4855 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4859 External links: specified text
4861 Specified text: [http://example.com link]
4863 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4868 External links: trail
4870 Linktrails should not work for external links: [http://example.com link]s
4872 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4877 External links: dollar sign in URL
4879 http://example.com/1$2345
4881 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4885 # parsoid doesn't explicitly mark autonumbered links, see T55505
4887 External links: dollar sign in URL (autonumber)
4889 [http://example.com/1$2345]
4891 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4894 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4898 External links: open square bracket forbidden in URL (T6377)
4900 parsoid=wt2html,wt2wt,html2html
4902 http://example.com/1[2345
4904 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4907 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4911 External links: open square bracket forbidden in URL (named) (T6377)
4913 parsoid=wt2html,html2html
4915 [http://example.com/1[2345]
4917 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4920 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4923 # parsoid adds a space before the link name
4925 External links: open square bracket forbidden in URL (named) (T6377)
4928 [http://example.com/1 [2345]
4930 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4935 External links: nowiki in URL link text (T8230)
4937 [http://example.com/ <nowiki>''example site''</nowiki>]
4939 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4944 External links: newline forbidden in text (T8230 regression check)
4946 [http://example.com/ first
4949 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4955 External links: Pipe char between url and text
4957 [http://example.com | link]
4959 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4964 External links: protocol-relative URL in brackets
4966 [//example.com/ Test]
4968 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4972 # parsoid doesn't explicitly mark autonumbered links, see T55505
4974 External links: protocol-relative URL in brackets without text
4978 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4981 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4985 External links: protocol-relative URL in free text is left alone
4989 <p>//example.com/Foo
4994 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4996 foo//example.com/Foo
4998 <p>foo//example.com/Foo
5002 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
5004 External links: with no contents
5006 parsoid=wt2html,wt2wt
5008 [http://en.wikipedia.org/wiki/Foo]
5010 [[wikipedia:Foo|Bar]]
5012 [[wikipedia:Foo|<span>Bar</span>]]
5014 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
5015 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
5016 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
5019 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
5020 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
5021 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
5025 External links: Free with trailing punctuation
5035 http://example.com/url_with_(brackets)
5036 (http://example.com/url_without_brackets)
5037 http://example.com/url_with_entity&
5038 http://example.com/url_with_entity&
5039 http://example.com/url_with_entity&
5040 http://example.com/url_with_entity
5041 http://example.com/url_with_entity 
5042 http://example.com/url_with_entity 
5043 http://example.com/url_with_entity<
5044 http://example.com/url_with_entity<
5045 http://example.com/url_with_entity<
5047 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5048 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5049 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5050 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5051 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5052 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5053 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5054 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5055 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5056 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5057 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5058 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5059 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5060 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5061 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5062 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5063 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5064 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5065 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5068 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5069 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5070 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5071 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5072 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5073 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5074 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5075 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5076 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5077 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5078 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5079 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5080 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5081 <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>
5082 <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>
5083 <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>
5084 <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>
5085 <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>
5086 <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>
5090 External links: tricky Parsoid html2html case
5092 parsoid=wt2html,wt2wt,html2html
5094 http://example.com/url_with_entity&amp;
5096 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5099 <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>
5103 External links: Free with trailing quotes (T113666)
5105 '''News:''' Stuff here
5109 <p><b>News:</b> Stuff here
5110 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5113 <p><b>News:</b> Stuff here</p>
5114 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5118 External links: with entity
5120 [http:// www.librarieswithoutborders.org Libraries without borders]
5122 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5125 <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>
5129 External links: Lone protocols are never linked (T105697)
5148 External links: No preceding word characters allowed (T67278)
5150 NOPEhttp://example.com
5151 N0http://example.com
5152 ok:http://example.com
5153 ok-http://example.com
5155 <p>NOPEhttp://example.com
5156 N0http://example.com
5157 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5158 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5163 External links: nofollow domain exception
5165 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5167 <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>.
5174 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5176 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5181 External image from https
5183 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5185 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5190 External image (when not allowed)
5192 wgAllowExternalImages=0
5194 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5196 <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>
5201 Link to non-http image, no img tag
5203 Link to non-http image, no img tag: ftp://example.com/test.jpg
5205 <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>
5210 External links: terminating separator
5212 Terminating separator: http://example.com/thing,
5214 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5219 External links: intervening separator
5221 Intervening separator: http://example.com/1,2,3
5223 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5228 External links: old bug with URL in query
5230 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5232 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5237 External links: old URL-in-URL bug, mixed protocols
5239 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5241 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5245 # Since Parsoid is starting to emit canonical wikitext for links,
5246 # [http://example.com http://example.com] will not RT back to that
5249 External links: URL in text
5253 URL in text: [http://example.com http://example.com]
5255 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5258 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5262 External links: Clickable images
5264 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5266 <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>
5269 <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>
5273 External links: raw ampersand
5275 Old & use: http://x&y
5277 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5282 External links: encoded ampersand
5284 Old & use: http://x&y
5286 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5289 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5293 External links: encoded equals (T8102)
5295 http://example.com/?foo=bar
5297 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5300 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5304 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5305 ## does it number them. As discussed in T55505, we can identify
5306 ## autonumbered links via CSS.
5310 External links: [raw ampersand]
5312 Old & use: [http://x&y]
5314 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5317 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5320 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5321 # mode will return the [raw ampersand] wikitext
5323 External links: [encoded ampersand]
5325 parsoid=wt2html,wt2wt,html2html
5327 Old & use: [http://x&y]
5329 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5332 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5336 External links: [raw equals]
5338 [http://example.com/?foo=bar]
5340 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5343 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5346 # note that parsoid html is identical to [raw equals] case; so html2wt
5347 # mode will return the [raw equals] wikitext
5349 External links: [encoded equals] (T8102)
5351 parsoid=wt2html,wt2wt,html2html
5353 [http://example.com/?foo=bar]
5355 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5358 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5361 # xxx parsoid strips the IDN character, so the round-trip tests will
5362 # obviously fail and are disabled. --cscott
5364 External links: [IDN ignored character reference in hostname; strip it right off]
5366 parsoid=wt2html,wt2wt,html2html
5368 [http://e‌xample.com/]
5370 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5373 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5376 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5377 # Where an external link could easily circumvent the sanitization of the text of
5378 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5379 # test demands a higher standard. That's a bit strange.
5383 # http://example.com -> [http://example.com|http://example.com]
5384 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5386 # The first example is sanitized, but the second is not. Any security benefits
5387 # from this production are trivial to circumvent. Either remove this test and
5388 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5389 # the test accordingly.
5393 # xxx parsoid strips the IDN character, so the round-trip tests will
5394 # obviously fail and are disabled. --cscott
5396 External links: IDN ignored character reference in hostname; strip it right off
5398 parsoid=wt2html,html2html
5400 http://e‌xample.com/
5402 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5405 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5409 External links: www.jpeg.org (T2554)
5413 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5417 # parsoid doesn't explicitly mark autonumbered links, see T55505
5419 External links: URL within URL (T2002)
5421 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5423 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5426 <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>
5430 T2361: URL inside bracketed URL
5432 [http://www.example.com/foo http://www.example.com/bar]
5434 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5439 T2361: URL within URL, not bracketed
5441 http://www.example.com/foo?=http://www.example.com/bar
5443 <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>
5448 T2289: ">"-token in URL-tail
5450 http://www.example.com/<hello>
5452 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5457 T2289: literal ">"-token in URL-tail
5459 http://www.example.com/<b>html</b>
5461 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5464 <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>
5468 T2289: ">"-token in bracketed URL
5470 [http://www.example.com/<hello> stuff]
5472 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5477 T2289: literal ">"-token in bracketed URL
5479 [http://www.example.com/<b>html</b> stuff]
5481 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5486 T2289: literal double quote at end of URL
5488 http://www.example.com/"hello"
5490 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5495 T2289: literal double quote in bracketed URL
5497 [http://www.example.com/"hello" stuff]
5499 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5504 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5506 [http://www.example.com test]
5508 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5513 External links: link text with spaces
5515 [http://www.example.com a b c]
5516 [http://www.example.com ''a'' ''b'']
5518 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5519 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5523 # Note edge case difference between PHP and Parsoid here.
5525 External links: wiki links within external link (T5695)
5527 parsoid=wt2html,html2html
5529 [http://example.com [[wikilink]] embedded in ext link]
5531 [http://example.com test [[wikilink]] embedded in ext link]
5533 <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>
5534 </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>
5537 <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>
5538 <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>
5542 T2787: Links with one slash after the url protocol are invalid
5546 [http:/example.com title]
5548 <p>http:/example.com
5549 </p><p>[http:/example.com title]
5554 Bracketed external links with template-generated invalid target
5556 [{{echo|http:/example.com}} title]
5558 <p>[http:/example.com title]
5562 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5564 Broken wikilinks (but not external links) prevent templates from closing
5568 [http://example.com x
5570 {{echo|[http://example.com x}}
5576 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5577 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5579 </p><p>{{echo|[[Foo}}
5582 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5583 <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>
5585 <p>{{echo|[[Foo}}</p>
5589 Wikilinks with embedded newlines are not broken
5600 <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>
5612 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5616 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5617 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5621 T4702: Mismatched <i>, <b> and <a> tags are invalid
5623 ''[http://example.com text'']
5624 [http://example.com '''text]'''
5625 ''Something [http://example.com in italic'']
5626 ''Something [http://example.com mixed''''', even bold]'''
5627 '''''Now [http://example.com both''''']
5629 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5630 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5631 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5632 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5633 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5641 http://www.example.com/?title=AT%26T
5643 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5646 <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>
5649 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5650 # % is actually legal in HTML5. Any change in output would need testing though.
5652 T6781, T7267: %25 in URL
5654 http://www.example.com/?title=100%25_Bran
5656 <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>
5659 <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>
5663 T6781, T7267: %28, %29 in URL
5665 http://www.example.com/?title=Ben-Hur_%281959_film%29
5667 <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>
5670 <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>
5675 T6781: %26 in autonumber URL
5677 [http://www.example.com/?title=AT%26T]
5679 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5682 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5686 T6781, T7267: %26 in autonumber URL
5688 [http://www.example.com/?title=100%25_Bran]
5690 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5693 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5697 T6781, T7267: %28, %29 in autonumber URL
5699 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5701 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5704 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5709 T6781: %26 in bracketed URL
5711 [http://www.example.com/?title=AT%26T link]
5713 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5716 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5720 T6781, T7267: %25 in bracketed URL
5722 [http://www.example.com/?title=100%25_Bran link]
5724 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5729 T6781, T7267: %28, %29 in bracketed URL
5731 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5733 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5736 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5740 External link containing a period in the anchor. (T65947)
5742 [//foo.org/bar#baz. bang]
5744 [//foo.org/bar. bang]
5746 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5747 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5750 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5751 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5755 External link containing a single quote. (T65947)
5759 [//foo.org/bar'baz bang]
5761 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5762 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5765 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5766 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5770 External link containing double-single-quotes in text '' (T6598 sanity check)
5772 Some [http://example.com/ pretty ''italics'' and stuff]!
5774 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5779 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5781 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5783 <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>
5787 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5789 External link containing double-single-quotes with no space separating the url from text in italics
5791 [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]].]
5793 <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>.
5796 <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>
5800 External link with comments in link text
5802 [http://www.google.com Google <!-- comment -->]
5804 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5807 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5811 External link to bare IPv4 address
5813 [http://192.168.0.1 Link]
5815 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5818 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5822 URL-encoding in URL functions (single parameter)
5824 {{localurl:Some page|amp=&}}
5826 <p>/index.php?title=Some_page&amp=&
5831 URL-encoding in URL functions (multiple parameters)
5833 {{localurl:Some page|q=?&=&}}
5835 <p>/index.php?title=Some_page&q=?&amp=&
5842 http://example.com/index.php?foozoid%5B%5D=bar
5844 http://example.com/index.php?foozoid[]=bar
5846 <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>
5847 </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>
5850 <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>
5852 <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>
5856 IPv6 urls, autolink format (T23261)
5858 http://[2404:130:0:1000::187:2]/index.php
5860 Examples from RFC 2373, section 2.2:
5862 *http://[1080::8:800:200C:417A]/unicast
5863 *http://[FF01::101]/multicast
5864 *http://[::1]/loopback
5865 *http://[::]/unspecified
5866 *http://[::13.1.68.3]/ipv4compat
5867 *http://[::FFFF:129.144.52.38]/ipv4compat
5869 Examples from RFC 2732, section 2:
5871 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5872 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5873 *http://[3ffe:2a00:100:7031::1]
5874 *http://[1080::8:800:200C:417A]/foo
5875 *http://[::192.9.5.5]/ipng
5876 *http://[::FFFF:129.144.52.38]:80/index.html
5877 *http://[2010:836B:4179::836B:4179]
5879 <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>
5880 </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:
5882 <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>
5883 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5884 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5885 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5886 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5887 <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>
5888 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5890 <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>
5891 <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>
5892 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5893 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5894 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5895 <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>
5896 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5899 <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>
5901 <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>
5902 <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>
5903 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5904 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5905 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5906 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5907 <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>
5909 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5910 <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>
5911 <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>
5912 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5913 <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>
5914 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5915 <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>
5916 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5920 IPv6 urls, bracketed format (T23261)
5922 [http://[2404:130:0:1000::187:2]/index.php test]
5924 Examples from RFC 2373, section 2.2:
5926 *[http://[1080::8:800:200C:417A] unicast]
5927 *[http://[FF01::101] multicast]
5928 *[http://[::1]/ loopback]
5929 *[http://[::] unspecified]
5930 *[http://[::13.1.68.3] ipv4compat]
5931 *[http://[::FFFF:129.144.52.38] ipv4compat]
5933 Examples from RFC 2732, section 2:
5935 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5936 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5937 *[http://[3ffe:2a00:100:7031::1] 3]
5938 *[http://[1080::8:800:200C:417A]/foo 4]
5939 *[http://[::192.9.5.5]/ipng 5]
5940 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5941 *[http://[2010:836B:4179::836B:4179] 7]
5943 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5944 </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:
5946 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5947 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5948 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5949 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5950 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5951 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5952 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5954 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5955 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5956 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5957 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5958 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5959 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5960 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5963 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5965 <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>
5966 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5967 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5968 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5969 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5970 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5971 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5973 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5974 <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>
5975 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5976 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5977 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5978 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5979 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5980 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5984 Non-extlinks in brackets
5993 [{{echo|foo}} ''bar'']
5994 [{{echo|foo}}l's] errand
5995 [{{echo|foo}}l's errand]
5997 [url=http://example.com]
5998 [http:// bare protocols don't count]
6011 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
6012 [http:// bare protocols don't count]
6020 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6021 [<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]
6022 [<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>]
6023 [<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
6024 [<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]
6025 [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>]
6026 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6027 [http:// bare protocols don't count]</p>
6031 Percent encoding in external links
6033 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6035 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6038 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6042 Use url link syntax for links where the content is equal the link target
6046 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6049 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6053 Parenthesis in external links, especially URL links
6057 http://example.com/test)
6059 http://example.com/(test)
6061 http://example.com/((test)
6063 (http://example.com/(test))
6065 (http://example.com/(test)))))
6067 http://example.com/a)b
6069 [http://example.com) foo]
6071 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6072 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6073 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6074 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6075 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6076 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6077 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6078 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6081 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6082 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6083 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6084 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6085 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6086 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6087 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6088 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6092 Parenthesis in external links, w/ transclusion or comment
6094 (http://example.com/{{echo|hi}})
6096 (http://example.com<!-- hi -->)
6098 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6099 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6102 <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>
6104 <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>
6108 Serialize <a> tags with invalid link targets as plain text
6110 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6112 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6113 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6114 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6115 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6118 <nowiki>*</nowiki>text
6119 <nowiki>[[foo]]</nowiki>
6120 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6124 mw:ExtLink -vs- mw:WikiLink (T94723)
6128 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6129 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6130 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6131 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6133 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6134 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6142 [[:en:European_Robin|European Robin]]
6143 [[:en:European_Robin|European Robin]]
6147 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6151 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6153 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6164 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6166 Normal text. '''''Bold italic text.''''' Normal text.
6168 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6169 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6174 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6175 # parser strips. The wikitext contains just the first half of the bold
6178 Unclosed and unmatched quotes
6180 '''''Bold italic text '''with bold deactivated''' in between.'''''
6182 '''''Bold italic text ''with italic deactivated'' in between.'''''
6186 ..spanning two paragraphs (should not work).'''
6188 '''Bold tag left open
6190 ''Italic tag left open
6194 <!-- Unmatching number of opening, closing tags: -->
6195 '''This year''''s election ''should'' beat '''last year''''s.
6197 ''Tom'''s car is bigger than ''Susan'''s.
6199 Plain ''italic'''s plain
6201 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6202 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6203 </p><p><b>Bold text..</b>
6204 </p><p>..spanning two paragraphs (should not work).
6205 </p><p><b>Bold tag left open</b>
6206 </p><p><i>Italic tag left open</i>
6208 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6209 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6210 </p><p>Plain <i>italic'</i>s plain
6213 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6214 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6215 </p><p><b>Bold text..</b>
6216 </p><p>..spanning two paragraphs (should not work).<b></b>
6217 </p><p><b>Bold tag left open</b>
6218 </p><p><i>Italic tag left open</i>
6221 <!-- Unmatching number of opening, closing tags: -->
6222 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6223 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6224 </p><p>Plain <i>italic'</i>s plain
6231 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6234 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6235 # is the bare minimum required by the spec, see:
6236 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6237 # Parsoid team replies: empty table tags are legal in HTML5
6239 A table with no data.
6252 A table with stray table end tags on start tag line (wt2html)
6256 {|style="color: red;"|}
6258 {|style="color: red;" |}
6262 {|style="color: red;"|} id="foo"
6266 {|style="color: red;" |} id="foo"
6270 <table style="color: red;"></table>
6272 <table style="color: red;">
6278 <table style="color: red;" id="foo">
6284 <table style="color: red;" id="foo">
6293 A table with no data (take 2)
6301 # A table with nothing but a caption is invalid XHTML, we might want to render
6302 # this as <p>caption</p>
6303 # Parsoid team replies: table with only a caption is legal in HTML5
6305 A table with nothing but a caption
6313 </caption><tr><td></td></tr></table>
6316 <table><caption>caption</caption></table>
6320 A table with caption with default-spaced attributes and a table row
6323 |+ style="color: red;" |caption1
6329 <caption style="color: red;">caption1
6338 A table with captions with non-default spaced attributes and a table row
6341 |+style="color: red;"|caption2
6342 |+ style="color: red;"|caption3
6348 <caption style="color: red;">caption2
6350 <caption style="color: red;">caption3
6359 Table td-cell syntax variations
6364 |style='color:red;'|baz
6365 |style='color:red;'||baz
6372 <td>foo bar foo</td>
6375 <td style="color:red;">baz
6377 <td>style='color:red;'</td>
6405 Simple table but with multiple dashes for row wikitext
6424 Multiplication table
6426 {| border="1" cellpadding="2"
6427 |+Multiplication table
6447 <table border="1" cellpadding="2">
6448 <caption>Multiplication table
6495 Accept "||" in table headings
6510 Accept "!!" in table data
6524 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6529 Accept "||" in indented table headings
6539 </th></tr></table></dd></dl>
6544 Accept "!!" in templates
6558 <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>
6562 Accept "!!" in table headings after newline
6579 <p>b!!c</p></th></tr>
6584 Accept "!!" in table data of mixed wikitext / html syntax
6588 <tr><td>b!!c</td></tr>
6594 </th></tr><tr><td>b!!c</td></tr>
6598 <tbody><tr><th>a</th></tr>
6599 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6604 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6621 Accept "| !" at start of line in tables (ignore !-attribute)
6625 |!style="color:red"|bar
6637 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 +/-
6641 |style='color:red;'|+1
6642 |style='color:blue;'|-1
6654 <td style="color:red;">+1
6656 <td style="color:blue;">-1
6680 |rowspan=2|Cell 2, row 1 (and 2)
6691 <td rowspan="2">Cell 2, row 1 (and 2)
6709 {| bgcolor=#ABCDEF border=2
6714 |the original table again
6722 <table bgcolor="#ABCDEF" border="2">
6730 <td>the original table again
6736 Invalid attributes in table cell (T3830)
6750 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6754 |title="foo<nowiki>|</nowiki>" |bar
6755 |title="foo<nowiki>|</nowiki>" bar
6762 <td title="foo|">bar
6764 <td>title="foo|" bar
6769 <tbody><tr><td title="foo">bar</td>
6770 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6771 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6775 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6776 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6777 # *2wt modes will fail.
6779 Table security: embedded pipes
6781 parsoid=wt2html,html2html
6784 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6788 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6789 <td>]" onmouseover="alert(document.cookie)">test
6797 <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>
6801 Element attributes with double ! should not be broken up by <th>
6804 !hi <div class="!!">ha</div> ho
6809 <th>hi <div class="!!">ha</div> ho
6814 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6819 ! and || in element attributes should not be parsed as <th>/<td>
6822 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6827 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6832 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6836 # FIXME: The output seems broken. Filed as T110268.
6838 ! and || in td attributes should not be parsed as <th>/<td>
6843 |style="color: red !important;" data-contrived="put this here ||"|foo
6848 <td>style="color: red !important;" data-contrived="put this here</td>
6854 <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>
6859 Break on | in element attribute in template
6861 parsoid=wt2html,html2html
6863 {{echo|1=<div class="hi|ho">ha</div>}}
6865 <p>ho">ha</div>
6868 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</p>
6872 Break on | in element attribute name in template
6874 {{echo|<div cla|ss="hiho">ha</div>}}
6876 <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>
6880 Don't break on | in extension attribute in template
6882 {{echo|<ref name="hi|ho">ha</ref>}}
6886 <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>
6888 <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>
6891 ## We don't support roundtripping of these attributes in Parsoid.
6892 ## Selective serialization takes care of preventing dirty diffs.
6893 ## But, on edits, we dirty-diff the invalid attribute text.
6895 Invalid text in table attributes should be discarded
6899 {| <span>boo</span> style='border:1px solid black'
6900 | <span>boo</span> style='color:blue' |1
6901 |<span>boo</span> style='color:blue'|2
6904 <table style="border:1px solid black">
6906 <td style="color:blue">1
6908 <td style="color:blue">2
6912 <table style="border:1px solid black">
6914 <td style="color:blue">1</td>
6915 <td style="color:blue">2</td>
6921 Invalid text in table attributes should be preserved by selective serializer
6924 "modes": ["selser"],
6926 ["td:first-child", "text", "abc"],
6927 ["td + td", "text", "xyz"]
6931 {| <span>boo</span> style='border:1px solid black'
6932 | <span>boo</span> style='color:blue' | 1
6933 |<span>boo</span> style='color:blue'| 2
6936 {| <span>boo</span> style='border:1px solid black'
6937 | <span>boo</span> style='color:blue' | abc
6938 |<span>boo</span> style='color:blue'| xyz
6943 1. Template-generated table cell attributes and cell content
6948 || {{table_attribs_5}}
6949 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6950 |align=center {{table_attribs}}
6951 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6956 <td style="color:red;">Foo
6958 <td style="color:red;">Foo
6960 <td>style="color:red;"</td>
6963 <td style="color:red;">Foo
6965 <td align="center" style="color:red;">Foo
6967 <td align="center" style="color:red;">Foo
6973 2. Template-generated table cell attributes and cell content
6976 |{{table_attribs_2}}
6981 <td style="color:red;">Foo
6989 <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>
6990 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6995 3. Template-generated table cell attributes and cell content
6998 !align=center {{table_header_cells}}
7000 |align=center {{table_cells}}
7005 <th align="center" style="color:red;">Foo</th>
7006 <th style="color:red;"><i>Bar</i></th>
7007 <th style="color:brown;"><i>Foo</i> and Baz
7010 <td align="center" style="color:red;">Foo</td>
7011 <td style="color:red;"><i>Bar</i></td>
7012 <td style="color:brown;"><i>Foo</i> and Baz
7017 <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>
7018 <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>
7023 4. Template-generated table cell attributes and cell content inside a templated table
7026 !align=center {{table_header_cells}}
7028 |align=center {{table_cells}}
7033 <th align="center" style="color:red;">Foo</th>
7034 <th style="color:red;"><i>Bar</i></th>
7035 <th style="color:brown;"><i>Foo</i> and Baz
7038 <td align="center" style="color:red;">Foo</td>
7039 <td style="color:red;"><i>Bar</i></td>
7040 <td style="color:brown;"><i>Foo</i> and Baz
7044 <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}}]}'>
7045 <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>
7047 <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>
7051 ## Edge case fix to prevent future regressions
7053 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7056 |{{table_attribs_7}}
7061 <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>
7063 <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>
7067 Table with row followed by newlines and table heading
7069 parsoid=wt2html,html2html
7087 Table with empty line following the start tag
7089 parsoid=wt2html,html2html
7107 Table attributes with empty value
7109 parsoid=wt2html,html2html
7122 <tbody><tr><td style="">hello</td></tr>
7127 Wikitext table with a lot of comments
7150 Wikitext table comments represented in parsoid dom
7152 {|<!--c1--><!--c2-->
7161 </td></tr></tbody></table>
7163 <table><!--c1--><!--c2-->
7164 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7165 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7170 Wikitext table with double-line table cell
7187 Table cell with a single comment
7204 Table-cell after a comment-only-empty-line
7221 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7223 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7229 Build table with {{!}}
7231 {{{!}} class="wikitable"
7234 {{!}}- style="color:red;"
7235 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7238 <table class="wikitable">
7244 <tr style="color:red;">
7246 <td style="color:red;">second data
7252 Build table with pipe as data
7254 {| class="wikitable"
7257 |- style="color:red;"
7258 |data|| style="color:red;" |second data
7260 | style="color:red;" |data with | || style="color:red;" | second data with |
7262 ||data with | |||second data with |
7265 <table class="wikitable">
7271 <tr style="color:red;">
7273 <td style="color:red;">second data
7276 <td style="color:red;">data with |</td>
7277 <td style="color:red;">second data with |
7280 <td>data with |</td>
7281 <td>second data with |
7287 Build table with wikilink
7289 {| class="wikitable"
7290 !header||second header
7291 |- style="color:red;"
7292 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7294 |data||second data [[Main Page|link|text with pipe]]
7297 <table class="wikitable">
7302 <tr style="color:red;">
7303 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7304 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7308 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7313 # The expected HTML structure in this test is debatable. The PHP parser does
7314 # not parse this kind of table at all. The main focus for Parsoid is on
7315 # round-tripping, so this output is ok for now. TODO: revisit!
7317 Wikitext table with html-syntax row
7327 <td>foo</td></tr></tbody></table>
7330 ## Remex doesn't account for fostered content.
7332 Fostered content in tables: Plain text
7352 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7355 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7359 Fostered content in tables: Lists
7361 parsoid=wt2html,html2html
7374 <ul><li>a</li></ul><table>
7379 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7380 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7382 </tr></tbody></table>
7386 Template generated table cell with attributes
7390 {{table_attribs_4}} ||a||b
7396 <td style="background-color:#DC241f;" width="10px"></td>
7399 </td></tr></tbody></table>
7402 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7403 <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>
7407 Parsoid: Round-trip tables directly followed by content (T53219)
7409 parsoid=wt2html,wt2wt
7422 </td></tr></tbody></table><p> bar
7426 </td></tr></tbody></table><p><b>quux</b>
7431 Parsoid: Default to a newline after tables in new content (T53219)
7436 <tr><td>foo</td></tr></tbody></table> bar
7438 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7443 <nowiki> </nowiki>bar
7451 Parsoid: Row-syntax table headings followed by comment & table cells
7453 parsoid=wt2html,wt2wt
7457 <!-- foo --> ||baz||quux
7471 <tbody><tr><th>foo</th><th>bar
7472 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7477 Parsoid: Recover better from broken table attributes
7491 </td></tr></tbody></table>
7496 <p>foo</p></td></tr>
7501 Tables: Digest broken attributes on table and tr tag
7512 <tr class='mw-empty-elt'></tr>
7513 <tr class='mw-empty-elt'></tr>
7518 Table with missing opening <tr> tag
7520 parsoid=wt2html,wt2wt
7528 <tbody><tr><td>foo</td>
7533 # T137406: Whitespace in the HTML
7535 1. Generate correct wikitext for tables with thead/tbody/tfoot
7540 <caption>Test</caption>
7602 </td></tr></tbody></table>
7605 # T137406: No whitespace in the HTML
7607 2. Generate correct wikitext for tables with thead/tbody/tfoot
7611 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7621 Wikitext tables can be nested inside HTML tables
7625 <table data-parsoid='{"stx":"html"}'>
7628 <tr><td>foo</td></tr>
7646 Plain link, capitalized
7650 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7655 Plain link, uncapitalized
7659 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7666 [[Main Page|The Main Page]]
7668 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7673 Piped link with comment in link text
7675 [[Main Page|The Main<!--front--> Page]]
7677 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7682 Piped link with multiple pipe characters in link text
7684 [[Main Page||The|Main|Page|]]
7686 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7689 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7693 Piped link with no link text
7695 [[Thomas Bek (bishop of St David's)|]]
7697 <p>[[Thomas Bek (bishop of St David's)|]]
7700 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7704 Piped link with empty link text
7706 [[Main Page|<nowiki/>]] - empty nowiki
7707 [[Main Page| ]] - empty space
7708 [[Main Page| ]] - empty non breaking space
7710 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7711 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7712 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7715 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7716 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7717 <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>
7725 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7730 Broken link with fragment
7732 [[Zigzagzogzagzig#zug]]
7734 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7739 Special page link with fragment
7741 [[Special:Version#anchor]]
7743 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7748 Nonexistent special page link with fragment
7750 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7752 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7759 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7761 <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>
7768 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7770 <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>!!!
7781 T45661: Piped links with identical prefixes
7783 [[prefixed article|prefixed articles with spaces]]
7785 [[prefixed article|prefixed articlesaoeu]]
7787 [[Main Page|Main Page test]]
7789 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7790 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7791 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7797 Link with HTML entity in suffix / tail
7799 [[Main Page]]", [[Main Page]]a
7801 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7804 <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>
7808 Link with 3 brackets
7819 Link with 4 brackets
7823 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7828 Piped link with 3 brackets
7830 [[[main page|the main page]]]
7832 <p>[[[main page|the main page]]]
7837 Piped link with extlink-like text
7840 [[Main Page|This is a [bar]]]
7843 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7844 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7845 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7848 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7849 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7850 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7854 Link with multiple pipes
7856 [[Main Page|The|Main|Page]]
7858 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7863 Anchor containing a #. (T65430)
7865 wgFragmentMode=[ 'html5', 'legacy' ]
7867 [[Main Page#And#Link]]
7869 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7872 <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>
7878 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7880 <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>
7885 Link with space in namespace
7887 [[User talk:Foo bar]]
7889 <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>
7894 MemoryAlpha:AlphaTest
7896 This is an article in the MemoryAlpha namespace
7897 (which shadows the memoryalpha interwiki link).
7901 Namespace takes precedence over interwiki link (T53680)
7903 [[MemoryAlpha:AlphaTest]]
7905 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7909 # The previous test doesn't work correctly in html2*, due to not recognizing the
7910 # link as an internal one. This one checks for the correct behavior.
7912 Link to namespace preferred over interwiki with correct rel attribute
7914 parsoid=html2wt,html2html
7916 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7918 [[MemoryAlpha:AlphaTest]]
7922 Piped link to namespace
7924 [[Meta:Disclaimers|The disclaimers]]
7926 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7933 [[Usually caused by a typo (oops}]]
7935 <p>[[Usually caused by a typo (oops}]]
7942 Just a test of an article title containing a percent.
7946 Link containing % (not as a hex sequence)
7949 [[7% Solution|7%25 Solution]]
7951 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7952 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7955 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7956 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7959 # note that the parsoid HTML is identical to the previous test output,
7960 # so the previous test ensures that the html2wt mode will generate the
7961 # "not as a hex sequence" wikitext.
7963 Link containing % as a single hex sequence interpreted to char
7965 parsoid=wt2wt,wt2html,html2html
7968 [[7%25 Solution|7%25 Solution]]
7970 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7971 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7974 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7975 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7979 Link containing % as a double hex sequence interpreted to hex sequence
7983 <p>[[7%2525 Solution]]
7987 ## Example for such a section: == < ==
7989 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7991 wgFragmentMode=[ 'html5', 'legacy' ]
7993 [[%23%3c]][[%23%3e]]
7995 <p><a href="#<">#<</a><a href="#>">#></a>
7998 <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>
8001 ## Example for such a section: == < ==
8003 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
8005 wgFragmentMode=[ 'legacy' ]
8007 [[%23%3c]][[%23%3e]]
8009 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
8014 Link containing "<#" and ">#" as a hex sequences
8016 [[%3c%23]][[%3e%23]]
8018 <p>[[%3c%23]][[%3e%23]]
8023 Link containing an equals sign
8025 [[Special:BookSources/isbn=4-00-026157-6]]
8027 <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>
8030 <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>
8036 Just a test of an article title containing a tilde.
8039 # note that links containing signatures, like [[Foo~~~~]], are
8040 # massaged by the pre-save transform (PST) and so the tildes are never
8041 # seen by the parser.
8043 Link containing a tilde
8047 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8050 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8054 Link containing double-single-quotes '' (T6598)
8056 [[Lista d''e paise d''o munno]]
8058 <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>
8061 <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>
8065 Link containing double quotes and spaces
8069 <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>
8072 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8076 File containing double quotes and spaces
8078 [[File:Cool "Gator".png]]
8080 <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>
8084 Redirect containing double quotes and spaces
8086 #REDIRECT [[Cool "Gator"]]
8088 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8092 Link containing double-single-quotes '' in text (T6598 sanity check)
8094 Some [[Link|pretty ''italics'' and stuff]]!
8096 <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>!
8099 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8103 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8105 ''Some [[Link|pretty ''italics'' and stuff]]!''
8107 <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>
8112 Link with double quotes in title part (literal) and alternate part (interpreted)
8114 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8118 [[''Pentecoste''|Pentecoste]]
8120 [[''Pentecoste''|''Pentecoste'']]
8122 <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>
8123 </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>
8124 </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>
8125 </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>
8128 <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>
8129 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8130 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8131 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8135 Broken image links with HTML captions (T41700)
8137 [[File:Nonexistent|<script></script>]]
8138 [[File:Nonexistent|100x100px|<script></script>]]
8139 [[File:Nonexistent|<]]
8140 [[File:Nonexistent|a<i>b</i>c]]
8142 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8143 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8144 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8145 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8148 <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>
8149 <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>
8150 <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>
8151 <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>
8157 [[http://www.example.com]]
8159 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8162 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8166 Plain link to URL with link text
8168 [[http://www.example.com Link text]]
8170 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8175 Plain link to protocol-relative URL
8177 [[//www.example.com]]
8179 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8182 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8186 Plain link to protocol-relative URL with link text
8188 [[//www.example.com Link text]]
8190 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8195 Plain link to page with question mark in title
8201 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8202 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8206 # I'm fairly sure the expected result here is wrong.
8207 # We want these to be URL links, not pseudo-pages with URLs for titles....
8208 # However the current output is also pretty screwy.
8211 # I'm changing it to match the current output--it arguably makes more
8212 # sense in the light of the test above. Old expected result was:
8213 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8215 # But I think this test is bordering on "garbage in, garbage out" anyway.
8220 Piped link to URL: [[http://www.example.com|an example URL]]
8222 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8225 <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>
8229 Plain link in template argument
8233 {{echo|[http://www.example.com |123]}}
8235 {{echo|[[http://www.example.com |123]]}}
8237 {{echo|[[http://www.example.com |123]}}
8239 {{echo|[http://www.example.com |123]]}}
8241 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8242 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8243 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8244 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8247 <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>
8249 <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>
8251 <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>
8253 <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>
8257 T2002: [[page|http://url/]] should link to page, not http://url/
8259 [[Main Page|http://url/]]
8261 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8264 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8267 # Parsoid does not mark self-links, by design.
8269 T2337: Escaped self-links should be bold
8273 [[Bug462]] [[Bug462]]
8275 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8278 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8282 Self-link to section should not be bold
8286 [[Main Page#section]]
8288 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8299 Self-link to numeric title
8305 <p><a class="mw-selflink selflink">0</a>
8310 Link to numeric-equivalent title
8316 <p><a href="/wiki/00" title="00">00</a>
8321 <nowiki> inside a link
8323 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8325 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8330 Non-breaking spaces in title
8332 [[ Main Page ]]
8334 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8338 # Add new article for the test below so that it doesn't red-link
8346 Multiple spaces in titles should normalize to a single underscore
8348 parsoid=wt2html,wt2wt
8354 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8355 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8356 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8359 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8360 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8361 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8366 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8372 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8377 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8383 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8388 Internal link with en linktrail: no apostrophes (T29473)
8394 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8399 Internal link with ca linktrail with apostrophes (T29473)
8405 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8410 Internal link with kaa linktrail with apostrophes (T29473)
8416 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8421 Link with multiple ":" in a subpage-supporting namespace (T65636)
8423 [[User:Foo/Test/63636:Bar|Test]]
8425 <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>
8428 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8431 ## Mainly a sanity check for Parsoid
8433 Handle title parsing for subpages
8453 Link to a subpage from a namespace other than main
8460 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8463 <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>
8467 Ensure that transclusion titles are not url-decoded
8469 subpage title=[[Test]]
8472 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8474 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8477 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8481 Purely hash wikilink
8483 title=[[User:Test/123]]
8488 <p><a href="#a">b</a>
8491 <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>
8495 Serialization of purely hash wikilink
8497 title=[[User:Test/123]]
8501 <p><a href="#a">[[</a></p>
8503 [[#a|<nowiki>[[</nowiki>]]
8505 <p><a href="#a">[[</a>
8510 1. Interaction of linktrail and template encapsulation
8514 <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>
8518 2. Interaction of linktrail and template encapsulation
8522 {{echo|Some [[Fool]]}}s
8524 <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>
8528 3. Interaction of linktrail and template encapsulation
8532 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8534 <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>
8544 Internal link with is link prefix
8548 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8550 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8561 Internal link with is link trail and link prefix
8565 [[mótmælendatrú|xxx]]ar
8567 mótmælenda[[söfnuður]]
8568 mótmælenda[[söfnuður|söfnuðir]]
8569 mótmælenda[[söfnuður|söfnuðir]]xxx
8571 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8572 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8573 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8574 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8575 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8580 Parsoid link trail escaping
8582 parsoid=html2wt,html2html
8584 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8590 Parsoid link prefix escaping
8593 parsoid=html2wt,html2html
8595 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8597 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8601 Parsoid link bracket escaping
8603 parsoid=html2wt,html2html
8605 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8606 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8607 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8608 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8609 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8610 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8618 [[[<nowiki/>[[Test]]]]]
8622 [[[[[<nowiki/>[[Test]]]]]]]
8626 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8634 [http://wp.org ''foo'']
8636 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8637 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8638 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8639 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8644 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8646 [[Foo|{{echo|a}} b {{echo|c}}]]
8648 <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>
8652 Link with angle bracket after anchor
8654 wgFragmentMode=[ 'html5', 'legacy' ]
8658 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8661 <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>
8665 Link with angle bracket after anchor (legacy)
8667 wgFragmentMode=[ 'legacy' ]
8671 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8676 ### Interwiki links (see maintenance/interwiki.sql)
8680 Inline interwiki link
8682 parsoid=wt2html,wt2wt,html2html
8684 [[MeatBall:SoftSecurity]]
8686 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8689 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8693 Inline interwiki link with empty title (T4372)
8695 parsoid=wt2html,wt2wt,html2html
8699 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8702 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8705 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8707 Interwiki link encoding conversion (T3636)
8709 parsoid=wt2html,wt2wt
8711 *[[Wikipedia:ro:Olteniţa]]
8712 *[[Wikipedia:ro:Olteniţa]]
8714 <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>
8715 <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>
8719 <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>
8720 <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>
8724 <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>
8725 <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>
8730 Interwiki link with fragment (T4130)
8732 [[MeatBall:SoftSecurity#foo]]
8734 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8739 Link scenarios with escaped fragments
8741 wgFragmentMode=[ 'html5', 'legacy' ]
8744 [[Foo#Is this great?]]
8745 [[meatball:Foo#Is this great?]]
8747 <p><a href="#Is_this_great?">#Is this great?</a>
8748 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8749 <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>
8752 <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>
8753 <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>
8754 <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>
8758 Link scenarios with escaped fragments (legacy)
8760 wgFragmentMode=[ 'legacy' ]
8763 [[Foo#Is this great?]]
8764 [[meatball:Foo#Is this great?]]
8766 <p><a href="#Is_this_great.3F">#Is this great?</a>
8767 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8768 <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>
8772 # Ideally the wikipedia: prefix here should be proto-relative too
8773 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8774 # define the 'en' prefix, and originally the test used 'wikipedia',
8775 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8778 Different interwiki prefixes mapping to the same URL
8786 [[:wikipedia:Foo|Foo]]
8788 [[wikipedia:en:Foo]]
8790 [[:wikipedia:en:Foo]]
8794 <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>
8796 <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>
8798 <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>
8800 <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>
8802 <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>
8804 <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>
8806 <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>
8810 Interwiki links that cannot be represented in wiki syntax
8813 [[meatball:ok#foo|ok with fragment]]
8814 [[meatball:ok_as_well?|ok ending with ? mark]]
8815 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8816 [http://de.wikipedia.org/wiki/#foo is just fragment]
8819 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8820 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8821 <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>
8822 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8823 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8826 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8827 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8828 <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>
8829 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8830 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8834 Interwiki links: trail
8836 [[wikipedia:Foo|Ba]]r
8838 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8841 <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>
8845 Local interwiki link
8847 parsoid=wt2html,wt2wt,html2html
8849 [[local:Template:Foo]]
8851 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8854 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8857 # Parsoid does not mark self-links, by design.
8859 Local interwiki link: self-link to current page
8862 parsoid=wt2html,wt2wt,html2html
8866 <p><a class="mw-selflink selflink">local:Main Page</a>
8869 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8873 Local interwiki link: prefix only (T66167)
8875 parsoid=wt2html,wt2wt,html2html
8879 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8882 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8886 Local interwiki link: with additional interwiki prefix (T63357)
8888 parsoid=wt2html,wt2wt,html2html
8890 [[local:meatball:Hello]]
8892 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8895 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8899 Multiple local interwiki link prefixes
8901 [[local:local:local:local:mi:local:Foo]]
8903 parsoid=wt2html,wt2wt,html2html
8905 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8908 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8912 ### Interlanguage links
8913 ### Language links (so that searching for '### language' matches..)
8925 <p>Blah blah blah</p>
8926 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8929 ## parsoid html2wt will lose the space variations
8931 Interlanguage link with spacing
8933 parsoid=wt2html,wt2wt,html2html
8941 <p>Blah blah blah</p>
8942 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8946 Double interlanguage link
8955 <p>Blah blah blah</p>
8956 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8957 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8960 ## parsoid html2wt will lose the space variations
8962 Interlanguage link variations
8964 parsoid=wt2html,wt2wt,html2html
8974 <p>Blah blah blah</p>
8975 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8976 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8977 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8981 Escaping of interlanguage links (T129218, T156308)
8985 [[ : zh : Chinese ]]
8988 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8989 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8993 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8994 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8998 Multiple colons escaping interlanguage links
9006 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9011 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9013 [[:::es:Spanish]]</p>
9016 ## parsoid html2wt will normalize the space to _
9018 Space and question mark encoding in interlanguage links (T95473)
9020 parsoid=wt2html,wt2wt,html2html
9028 <p>Blah blah blah</p>
9029 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9033 Interlanguage link, with prefix links
9043 <p>Blah blah blah</p>
9044 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9048 Double interlanguage link, with prefix links (T10897)
9059 <p>Blah blah blah</p>
9060 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9061 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9065 "Extra" interlanguage links (T34189 / gerrit 111390)
9073 <p>Blah blah blah</p>
9074 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9077 ## PHP parser tests script needs an update
9078 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9080 Language links render as inline links if $wgInterwikiMagic=false
9082 wgInterwikiMagic=false
9083 parsoid=wt2html,wt2wt,html2html
9088 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9091 ## PHP parser tests script needs an update
9092 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9094 Language links render as inline links in the Talk namespace
9097 parsoid=wt2html,wt2wt,html2html
9102 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9106 Parsoid-specific test: Wikilinks with should RT properly
9112 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9117 Parsoid T55221: Wikilinks should be properly entity-escaped
9119 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9121 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9122 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9124 He&nbsp;llo [[Foo|He&nbsp;llo]]
9126 He&nbsp;llo He&nbsp;llo
9128 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9129 </p><p>He&nbsp;llo He&nbsp;llo
9133 # html2wt will fail because of title normalization without data-parsoid
9135 Parsoid: handle constructor well
9137 parsoid=wt2html,wt2wt
9143 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9144 </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>
9147 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9149 <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>
9153 Template parameter named "constructor"
9155 {{echo| constructor = |hi}}
9157 <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>
9166 # Note that `ko` isn't a known interlanguage prefix
9168 Parsoid: recognize interlanguage links without a target page
9178 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9180 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9183 # Note that `ko` isn't a known interwiki prefix
9185 Parsoid: recognize interwiki links without a target page
9187 parsoid=wt2html,wt2wt,html2html
9193 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9194 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9197 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9198 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9202 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9206 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9209 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9213 Interlanguage link with preceding local interwiki link (T70085)
9215 parsoid=wt2html,wt2wt,html2html
9218 [[local:es:Spanish]]
9221 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9225 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9229 Looks like an interlanguage link, but is actually a local interwiki
9231 parsoid=wt2html,wt2wt,html2html
9237 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9241 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9245 ### Redirects, Parsoid-only
9249 1. Simple redirect to page
9251 #REDIRECT [[Main Page]]
9253 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9257 2. Other redirect variants
9259 #REDIRECT [[Main_Page]]
9261 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9264 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9265 # This tests the Parsoid bail-out code.
9267 3. Other redirect variants
9271 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9273 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9277 4. Redirect to a templated destination
9279 #REDIRECT [[{{echo|Foo}}bar]]
9281 <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"}]]}'/>
9287 parsoid=wt2html,wt2wt
9292 <li>REDIRECT [[]]</li></ol>
9296 Optional colon in #REDIRECT
9298 # the colon is archaic syntax. we support it for wt2html, but we
9299 # don't care that it roundtrips back to the modern syntax.
9300 parsoid=wt2html,html2html
9302 #REDIRECT:[[Main Page]]
9304 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9308 Whitespace in #REDIRECT with optional colon
9310 # the colon and gratuitous whitespace is archaic syntax. we support
9311 # it for wt2html, but we don't care that it roundtrips back to the
9312 # modern syntax (without extra whitespace)
9313 parsoid=wt2html,html2html
9320 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9324 Piped link in #REDIRECT
9326 # content after piped link is ignored. we support this syntax,
9327 # but don't care that the piped link is lost when we roundtrip this.
9330 #REDIRECT [[Main Page|bar]]
9332 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9336 Redirect to category (T104502)
9338 parsoid=wt2html,wt2wt
9340 #REDIRECT [[Category:Foo]]
9342 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9346 Redirect to category with URL encoding (T104502)
9350 #REDIRECT [[Category%3AFoo]]
9352 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9356 Redirect to category page
9358 #REDIRECT [[:Category:Foo]]
9360 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9364 Redirect to image page (1)
9366 #REDIRECT [[File:Wiki.png]]
9368 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9372 Redirect to image page (2)
9374 #REDIRECT [[Image:Wiki.png]]
9376 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9379 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9380 # Next test confirms this.
9382 Redirect to language (1) (T104918)
9384 parsoid=wt2html,wt2wt,html2html
9386 #REDIRECT [[en:File:Wiki.png]]
9388 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9392 Redirect to language (2) (T104918)
9394 #REDIRECT [[:en:File:Wiki.png]]
9396 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9400 Redirect to interwiki (T104918)
9402 #REDIRECT [[meatball:File:Wiki.png]]
9404 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9408 Non-English #REDIRECT
9412 #TILVÍSUN [[Main Page]]
9414 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9418 Redirect syntax under text isn't considered a redirect
9422 #redirect [[Main Page]]
9425 <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>
9433 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9440 Redirect followed by block on the same line
9444 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9446 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9450 Redirect followed by a newline
9452 #REDIRECT [[Main Page]]
9455 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9460 Redirect followed by multiple newlines
9462 #REDIRECT [[Main Page]]
9467 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9474 Drop duplicate redirects
9478 <link rel="mw:PageProp/redirect" href="./Foo"/>
9479 <link rel="mw:PageProp/redirect" href="./Bar"/>
9480 <link rel="mw:PageProp/redirect" href="./Baz"/>
9499 Broken br tag sanitization
9507 # TODO: Fix html2html mode (T53055)!
9509 Parsoid: Broken br tag recognition
9523 Incorrecly removing closing slashes from correctly formed XHTML
9525 <br style="clear:both;" />
9527 <p><br style="clear:both;" />
9532 Failing to transform badly formed HTML into correct XHTML
9534 <br style="clear: left;">
9535 <br style="clear: right;">
9536 <br style="clear: both;">
9538 <p><br style="clear: left;" />
9539 <br style="clear: right;" />
9540 <br style="clear: both;" />
9544 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9545 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9547 Handling html with a div self-closing tag
9556 <p><div title />
9560 <p><div title=bar />
9561 <div title=bar/>
9563 <div title="bar/"></div>
9567 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9568 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9569 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9570 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9571 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9572 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9576 Handling html with a br self-closing tag
9603 Horizontal ruler (should it add that extra space?)
9612 foo </p><hr /><p> bar
9617 Horizontal ruler -- 4+ dashes render hr
9626 Horizontal ruler -- eats additional dashes on the same line
9635 Horizontal ruler -- does not collapse dashes on consecutive lines
9646 Horizontal ruler -- <4 dashes render as plain text
9655 Horizontal ruler -- Supports content following dashes on same line
9667 ### Block-level elements
9676 <ul><li>Common list</li>
9678 <li>item 3</li></ul>
9689 <ol><li>Numbered list</li>
9691 <li>item 3</li></ol>
9695 # the switch from level 3 to ordered should not introduce a newline between
9706 ***#Number on level 4
9708 **#Number on level 3
9709 **#Number on level 3
9713 #**Level 3, but ordered
9716 <ol><li>with numbers</li></ol>
9717 <ul><li>and bullets</li></ul>
9718 <ol><li>and numbers</li></ol></li>
9720 <ul><li>bullet level 2
9721 <ul><li>bullet level 3
9722 <ol><li>Number on level 4</li></ol></li></ul></li>
9724 <ol><li>Number on level 3</li>
9725 <li>Number on level 3</li></ol></li></ul>
9726 <ol><li>number level 2</li></ol></li>
9728 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9729 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9734 1. Nested mixed wikitext and html list
9737 *<ul><li>ho</li></ul>
9742 <li><ul><li>ho</li></ul></li>
9744 <ul><li>ho</li></ul></li></ul>
9748 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9750 <ul><li>ho</li></ul></li></ul>
9754 2. Nested mixed wikitext and html list (incompatible)
9757 :{{echo|<li>ho</li>}}
9760 <dd><li>ho</li></dd></dl>
9764 <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>
9774 <ul><li>bar</li></ul></li></ul>
9784 <ul><li><ul><li>foo</li></ul></li>
9790 Nested lists 3 (first element empty)
9796 <ul><li>bar</li></ul></li></ul>
9801 Nested lists 4 (first element empty)
9806 <ul><li><ul><li></li></ul></li>
9812 Nested lists 5 (both elements empty)
9817 <ul><li><ul><li></li></ul></li>
9823 Nested lists 6 (both elements empty)
9829 <ul><li></li></ul></li></ul>
9834 Nested lists 7 (skip initial nesting levels)
9838 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9843 Nested lists 8 (multiple nesting transitions)
9851 <ul><li><ul><li>bar</li></ul></li>
9852 <li>baz</li></ul></li>
9858 Nested lists 9 (extension interaction)
9864 <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>
9868 1. Lists with start-of-line-transparent tokens before bullets: Comments
9881 Nested lists 10 (list and span siblings: wt2wt regression)
9886 <ul><li>a <span>x</span>
9887 <ul><li>b <span>y</span></li></ul></li></ul>
9891 2. Lists with start-of-line-transparent tokens before bullets: Template close
9896 <ul><li>foo bar</li>
9902 List items are not parsed correctly following a <pre> block (T2785)
9908 <ul><li><pre>foo</pre></li>
9909 <li><pre>bar</pre></li>
9913 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9914 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9918 # FIXME: Might benefit from a html/parsoid since this has a template
9920 List items from template
9931 *notSOL{{inner list}}
9935 <li>item 2</li></ul>
9938 <li>item 2</li></ul>
9942 <li>item 2</li></ul>
9947 List interrupted by empty line or heading
9955 <ul><li>foo</li></ul>
9956 <ul><li><ul><li>bar</li></ul></li></ul>
9957 <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>
9958 <ul><li>Another list item</li></ul>
9963 Multiple list tags generated by templates
9982 <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
9983 </li><li about="#mwt1">b
9984 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9988 Multiple newlines in between HTML list items don't induce paragraph wrapping
10001 <dd>ho<div>123</div>
10017 <dd>ho<div>123</div>
10025 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10028 <!--This line will NOT split the list-->
10030 <!--This line will NOT split the list either-->
10032 <!--foo--> <!----> <!--This line NOT split the list either-->
10043 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10046 <!--This line will NOT split the list-->
10048 <!--This line will NOT split the list either-->
10050 <!--foo--> <!----> <!--This line NOT split the list
10061 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10062 # That pass could possibly be removed.
10064 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10066 parsoid=wt2html,wt2wt
10070 *{{echo|<li>templated li-hack}}
10071 *<!--foo--><li> unsupported li-hack with preceding comments
10074 <li><li>not a li-hack
10079 <li class="mw-empty-elt"></li><li>li-hack</li>
10080 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10081 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10083 <li class="mw-empty-elt"></li><li>not a li-hack
10088 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10089 <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>
10090 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10092 <ul data-parsoid='{"stx":"html"}'>
10093 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10100 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10129 Parsoid: Test of whitespace serialization with Templated bullets
10136 <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>
10140 # ------------------------------------------------------------------------
10141 # The next set of tests are about Parsoid's ability to handle badly nested
10142 # tags (parse, minimize scope of fixup, and roundtrip back)
10143 # ------------------------------------------------------------------------
10145 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10146 # Parsoid's list handling is more aware of block structure.
10148 Unbalanced closing block tags break a list
10155 <ul><li>a</li></ul></div><div>
10167 Unbalanced closing non-block tags don't break a list
10169 parsoid=wt2html,html2html
10177 <ul><li>a<span></span></li>
10180 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></p>
10181 <ul><li>a<span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></li>
10185 # Parsoid does some post-dom-building cleanup
10186 # which is why its output differs from Remex.
10188 Unclosed formatting tags that straddle lists are closed and reopened
10190 parsoid=wt2html,wt2wt,html2html
10195 <ol><li><s> a</s></li><s>
10196 </s><li><s>b </s></li></ol>
10198 <ol><li><s> a</s></li>
10199 <li><s>b </s></li></ol>
10202 # Output is ugly because of all the misnested tag fixups.
10204 1. List embedded in a formatting tag
10211 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10214 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
10215 <ul><li data-parsoid='{}'>foo</li></ul></small>
10216 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p>
10219 # Output is ugly because of all the misnested tag fixups.
10221 2. List embedded in a formatting tag in a misnested way
10228 </small></p><small></small><ul><small><li>a</li>
10229 </small><li><small>b</small></li></ul>
10231 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><p></p>
10232 <ul><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'><li>a</li></small>
10233 <li><small data-parsoid='{"stx":"html","autoInsertedStart":true}'>b</small></li></ul>
10240 # Note that the current date is hard-coded as
10241 # 1970-01-01T00:02:03Z (a Thursday)
10242 # when running parser tests. The timezone is also fixed to GMT, so
10243 # local date will be identical to current date.
10246 Magic Word: {{CURRENTDAY}}
10255 Magic Word: {{CURRENTDAY2}}
10264 Magic Word: {{CURRENTDAYNAME}}
10273 Magic Word: {{CURRENTDOW}}
10282 Magic Word: {{CURRENTMONTH}}
10291 Magic Word: {{CURRENTMONTH1}}
10300 Magic Word: {{CURRENTMONTHABBREV}}
10302 {{CURRENTMONTHABBREV}}
10309 Magic Word: {{CURRENTMONTHNAME}}
10311 {{CURRENTMONTHNAME}}
10318 Magic Word: {{CURRENTMONTHNAMEGEN}}
10320 {{CURRENTMONTHNAMEGEN}}
10327 Magic Word: {{CURRENTTIME}}
10336 Magic Word: {{CURRENTHOUR}}
10345 Magic Word: {{CURRENTWEEK}} (T6594)
10354 Magic Word: {{CURRENTYEAR}}
10363 Magic Word: {{CURRENTTIMESTAMP}}
10365 {{CURRENTTIMESTAMP}}
10372 Magic Words LOCAL (UTC)
10376 *{{LOCALMONTHNAME}}
10377 *{{LOCALMONTHNAMEGEN}}
10378 *{{LOCALMONTHABBREV}}
10387 *{{LOCALTIMESTAMP}}
10402 <li>19700101000203</li></ul>
10407 Magic Word: {{FULLPAGENAME}}
10409 title=[[User:Ævar Arnfjörð Bjarmason]]
10410 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10414 <p>User:Ævar Arnfjörð Bjarmason
10419 Magic Word: {{FULLPAGENAMEE}}
10421 title=[[User:Ævar Arnfjörð Bjarmason]]
10422 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10426 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10431 Magic Word: {{TALKSPACE}}
10433 title=[[User:Ævar Arnfjörð Bjarmason]]
10434 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10443 Magic Word: {{TALKSPACE}}, same namespace
10445 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10446 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10455 Magic Word: {{TALKSPACE}}, main namespace
10457 title=[[Parser Test]]
10458 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10467 Magic Word: {{TALKSPACEE}}
10469 title=[[User:Ævar Arnfjörð Bjarmason]]
10470 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10479 Magic Word: {{SUBJECTSPACE}}
10481 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10482 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10491 Magic Word: {{SUBJECTSPACE}}, same namespace
10493 title=[[User:Ævar Arnfjörð Bjarmason]]
10494 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10503 Magic Word: {{SUBJECTSPACE}}, main namespace
10505 title=[[Parser Test]]
10506 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10514 Magic Word: {{SUBJECTSPACEE}}
10516 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10517 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10526 Magic Word: {{NAMESPACE}}
10528 title=[[User:Ævar Arnfjörð Bjarmason]]
10529 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10538 Magic Word: {{NAMESPACEE}}
10540 title=[[User:Ævar Arnfjörð Bjarmason]]
10541 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10550 Magic Word: {{NAMESPACENUMBER}}
10552 title=[[User:Ævar Arnfjörð Bjarmason]]
10553 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10555 {{NAMESPACENUMBER}}
10562 Magic Word: {{SUBPAGENAME}}
10564 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10565 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10574 Magic Word: {{SUBPAGENAMEE}}
10576 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10577 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10586 Magic Word: {{ROOTPAGENAME}}
10588 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10589 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10593 <p>Ævar Arnfjörð Bjarmason
10598 Magic Word: {{ROOTPAGENAMEE}}
10600 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10601 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10605 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10610 Magic Word: {{BASEPAGENAME}}
10612 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10613 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10617 <p>Ævar Arnfjörð Bjarmason
10622 Magic Word: {{BASEPAGENAMEE}}
10624 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10625 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10629 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10634 Magic Word: {{TALKPAGENAME}}
10636 title=[[User:Ævar Arnfjörð Bjarmason]]
10637 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10641 <p>User talk:Ævar Arnfjörð Bjarmason
10646 Magic Word: {{TALKPAGENAMEE}}
10648 title=[[User:Ævar Arnfjörð Bjarmason]]
10649 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10653 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10658 Magic Word: {{SUBJECTPAGENAME}}
10660 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10661 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10663 {{SUBJECTPAGENAME}}
10665 <p>User:Ævar Arnfjörð Bjarmason
10670 Magic Word: {{SUBJECTPAGENAMEE}}
10672 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10673 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10675 {{SUBJECTPAGENAMEE}}
10677 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10682 Magic Word: {{NUMBEROFFILES}}
10684 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10693 Magic Word: {{PAGENAME}}
10695 title=[[User:Ævar Arnfjörð Bjarmason]]
10696 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10700 <p>Ævar Arnfjörð Bjarmason
10705 Magic Word: {{PAGENAME}} with metacharacters
10707 title=[['foo & bar = baz']]
10708 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10712 <p><i>'foo & bar = baz'</i>
10717 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10719 title=[[*RFC 1234 http://example.com/]]
10720 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10724 <p>*RFC 1234 http://example.com/
10729 Magic Word: {{PAGENAMEE}}
10731 title=[[User:Ævar Arnfjörð Bjarmason]]
10732 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10736 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10741 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10743 title=[[*RFC 1234 http://example.com/]]
10744 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10748 <p>*RFC_1234_http://example.com/
10753 Magic Word: {{REVISIONID}}
10755 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10762 flags=vary-revision-id
10766 Magic Word: {{SCRIPTPATH}}
10768 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10776 Magic Word: {{STYLEPATH}}
10778 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10787 Magic Word: {{SERVER}}
10789 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10793 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10798 Magic Word: {{SERVERNAME}}
10800 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10809 Magic Word: {{SITENAME}}
10811 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10820 Magic Word: {{PAGELANGUAGE}}
10823 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10832 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10834 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10843 Case-sensitive magic words, when cased differently, should just be template transclusions
10850 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10851 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10852 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10853 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10858 Case-insensitive magic words should still work with weird casing.
10868 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10872 # From plwiki:PLOS_ONE
10874 Parsoid: Page property magic word with magic word contents
10876 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10878 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"DISPLAYTITLE:<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Main Page</span></i>"}]]}'/>
10881 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10882 # But, this is a limitation of our representation and is documented in
10883 # TemplateHandler.js in processSpecialMagicWord
10885 Parsoid: Template-generated DISPLAYTITLE
10887 {{{{echo|DISPLAYTITLE}}:Foo}}
10891 wgAllowDisplayTitle=true
10892 wgRestrictDisplayTitle=false
10897 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:ExpandedAttrs" data-parsoid='{"pi":[[]]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DISPLAYTITLE\"}},\"i\":0}}]}'>DISPLAYTITLE</span>:Foo"}]]}'/>
10901 Namespace 1 {{ns:1}}
10910 Namespace 1 {{ns:01}}
10919 Namespace 0 {{ns:0}} (T6783)
10927 Namespace 0 {{ns:00}} (T6783)
10935 Namespace -1 {{ns:-1}}
10944 Namespace User {{ns:User}}
10953 Namespace User talk {{ns:User_talk}}
10962 Namespace User talk {{ns:uSeR tAlK}}
10971 Namespace File {{ns:File}}
10980 Namespace File {{ns:Image}}
10989 Namespace (lang=de) Benutzer {{ns:User}}
11000 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11006 <p>Benutzer Diskussion
11013 {{urlencode:hi world?!}}
11014 {{urlencode:hi world?!|WIKI}}
11015 {{urlencode:hi world?!|PATH}}
11016 {{urlencode:hi world?!|QUERY}}
11026 Magic Word: prioritize type info over data-parsoid
11030 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11036 Magic Word: serialize on separate line (parsoid)
11038 parsoid=wt2wt,html2wt
11044 foo<meta property="mw:PageProp/notoc"/>bar
11048 Magic Word: rt non-english wikis
11055 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11059 __proto__ is treated as normal wikitext (T105997)
11071 Magic links: internal link to RFC (T2479)
11075 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11078 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11082 Magic links: RFC (T2479)
11086 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11089 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11093 Magic links: RFC (T67278)
11095 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11097 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
11100 <p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
11104 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11106 RFC      822
11110 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11115 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 822</a>
11121 Magic links: ISBN (T3937)
11125 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11128 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11132 Magic links: ISBN (T67278)
11134 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11136 <p>This is <a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11139 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
11143 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11145 ISBN      978 0 316 09811 3
11151 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11158 <p><a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 978<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>0<span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>316<span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span>09811<span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>3</a>
11166 Magic links: PMID incorrectly converts space to underscore
11170 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11173 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11177 Magic links: PMID (T67278)
11179 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11181 <p>This is <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.
11184 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
11188 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11190 PMID      1234
11194 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11199 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 1234</a>
11204 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11205 # since these are ExtLinkText, not MagicLinkText
11207 Magic links: use appropriate serialization for "almost" magic links.
11209 X[[Special:BookSources/0978739256|foo]]
11211 X[https://tools.ietf.org/html/rfc1234 foo]
11213 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11214 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11217 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11218 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11222 Magic links: All disabled (T47942)
11224 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11230 <p>ISBN 0-306-40615-2
11241 Nonexistent template
11243 {{thistemplatedoesnotexist}}
11245 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11250 Template with invalid target containing tags
11252 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11254 <p>{{a<b>b</b>|foo|a=b|a = b}}
11259 Template with invalid target containing unclosed tag
11261 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11263 <p>{{a<b>|foo|a=b|a = b}}</b>
11268 Template with invalid target containing wikilink
11272 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11275 <p><span typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"[[Main Page]]"},"params":{},"i":0}}]}'>{{</span><a rel="mw:WikiLink" href="./Main_Page" about="#mwt1">Main Page</a><span about="#mwt1">}}</span></p>
11279 Template with just whitespace in it, T70421
11283 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</p>
11289 This is a test template
11297 <p>This is a test template
11302 Template with explicit namespace
11306 <p>This is a test template
11314 This is a test template with parameter {{{param}}}
11320 {{paramtest|param=foo}}
11322 <p>This is a test template with parameter foo
11327 Template:paramtestnum
11329 [[{{{1}}}|{{{2}}}]]
11333 Template unnamed parameter
11335 {{paramtestnum|Main Page|the main page}}
11337 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11342 Template:templatesimple
11348 Template:templateredirect
11350 #redirect [[Template:templatesimple]]
11354 Template:templateasargtestnum
11360 Template:templateasargtest
11362 {{template{{{templ}}}}}
11366 Template:templateasargtest2
11372 Template with template name as unnamed argument
11374 {{templateasargtestnum|templatesimple}}
11381 Template with template name as argument
11383 {{templateasargtest|templ=simple}}
11390 Template with template name as argument (2)
11392 {{templateasargtest2|templ=templatesimple}}
11399 Template:templateasargtestdefault
11401 {{{{{templ|templatesimple}}}}}
11411 Template with default value
11413 {{templateasargtestdefault}}
11420 Template with default value (value set)
11422 {{templateasargtestdefault|templ=templa}}
11431 {{templateredirect}}
11436 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11440 Template with argument in separate line
11442 {{ templateasargtest |
11450 Template with complex template as argument
11453 param ={{ templateasargtest |
11454 templ = simple }}}}
11456 <p>This is a test template with parameter (test)
11461 Templates with templated name
11463 {{{{echo|echo}}|foo}}
11464 {{{{echo|inner list}} }}
11468 <ul><li>item 1</li></ul>
11471 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|echo}}","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
11472 <ul about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|inner list}} ","href":"./Template:Inner_list"},"params":{},"i":0}}]}'><li>item 1</li></ul>
11475 ## Regression test; the output here isn't really that interesting.
11477 Templates with templated name and top level template args
11479 {{1{{2{{{3}}}|4=5}}}}
11481 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1{{2{{{3}}}|4=5}}"},"params":{},"i":0}}]}'>{{1{{2{{{3}}}|4=5}}}}</p>
11484 # Parsoid markup is deliberate "broken". This is an edge case.
11485 # See long comment in TemplateHandler.js:convertAttribsToString.
11487 Templates with invalid templated targets
11498 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11503 Template with thumb image (with link in description)
11505 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11507 This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
11510 <p>This is a test template with parameter </p><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
11512 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"paramtest","href":"./Template:Paramtest"},"params":{"param":{"wt":"[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]"}},"i":0}}]}'>This is a test template with parameter </p><figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" about="#mwt1" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Noimage.png" ><img resource="./File:Noimage.png" src="./Special:FilePath/Noimage.png" height="220" width="220"/></a><figcaption><a rel="mw:WikiLink" href="./No_link" title="No link">link</a> <a rel="mw:WikiLink" href="./No_link" title="No link">caption</a></figcaption></figure>
11516 Template:complextemplate
11518 {{{1}}} {{paramtest|
11519 param ={{{param}}}}}
11523 Template with complex arguments
11526 param ={{ templateasargtest |
11527 templ = simple }}|[[Template:complextemplate|link]]}}
11529 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11534 T2553: link with two variables in a piped link
11537 |[[{{{1}}}|{{{2}}}]]
11542 <td>[[{{{1}}}|{{{2}}}]]
11547 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{},"i":0}}]}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"2"},"params":{},"i":0}}]}'>{{{2}}}</span>]]</td></tr>
11553 Abort table cell attribute parsing on wikilink
11556 |testing [[one|two]] |three||four
11557 |testing one two |three||four
11558 |testing="[[one|two]]" |three||four
11563 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11569 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11575 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> |three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td>
11576 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'>three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td>
11577 <td>testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" |three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td></tr>
11582 Don't abort table cell attribute parsing if wikilink is found in template arg
11585 |Test {{#tag:ref|One two "[[three]]" four}}
11589 <tbody><tr><td>Test <ref about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:ref","function":"tag"},"params":{"1":{"wt":"One two \"[[three]]\" four"}},"i":0}}]}'>One two "<a rel="mw:WikiLink" href="./Three" title="Three">three</a>" four</ref></td></tr>
11594 Magic variable as template parameter
11596 {{paramtest|param={{SITENAME}}}}
11598 <p>This is a test template with parameter MediaWiki
11605 [[{{{param}}}|link]]
11609 Template parameter as link source
11611 {{linktest|param=Main Page}}
11613 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11618 Template:paramtest2
11620 including another template, {{paramtest|param={{{arg}}}}}
11624 Template passing argument to another template
11626 {{paramtest2|arg='hmm'}}
11628 <p>including another template, This is a test template with parameter 'hmm'
11639 Template as link source
11643 [[{{linktest2}}|Main Page]]
11645 [[{{linktest2}}]]Page
11647 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11648 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11649 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11667 Template infinite loop
11671 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11676 Template from main namespace
11685 Template from non-includable namespace
11687 wgNonincludableNamespaces=10
11691 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11706 T2529: Template with table, not included at beginning of line
11725 T2523: Template shouldn't eat newline (or add an extra one before table)
11745 T2041: Template parameters shown as broken links
11754 Template with targets containing wikilinks
11760 {{[[{{echo|foo}}]]}}
11762 {{{{echo|[[foo}}]]}}
11764 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11765 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11769 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11770 <p>{{<a typeof="mw:ExpandedAttrs" rel="mw:WikiLink" href="./Foo" title="Foo" data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>"}]]}'>foo</a>}}</p>
11771 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11781 Templates: Double quotes as template target
11788 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11792 ## This test is about making sure Parsoid's data-mw is well formed in the
11793 ## face of multiple templates with intersecting and overlapping ranges. The
11794 ## wikitext itself is wretched.
11796 Templates with intersecting and overlapping ranges
11807 </table><p>ho</p><table>
11811 </td></tr></tbody></table>
11813 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]],"firstWikitextNode":"table"}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ha</p>"}},"i":0}},"\n","{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ho</p>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}}hi"}},"i":2}},"\n|}"]}'>ha</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11815 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11817 <tbody><tr><td>hi</td></tr>
11822 Template:MSGNW test
11824 ''None'' of '''this''' should be
11826 but rather passed unmodified
11834 # hmm, fix this or just deprecate msgnw and document its behavior?
11838 {{msgnw:MSGNW test}}
11840 <p>''None'' of '''this''' should be
11842  but rather passed unmodified
11843 {{test}}
11847 <!-- comment -->
11854 {{int:youhavenewmessages|lots of money|not!}}
11856 <p>You have lots of money (not!).
11861 int keyword - non-existing message
11872 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11876 <includeonly> and <noinclude> being included
11887 <onlyinclude>Foo</onlyinclude>bar
11891 <onlyinclude> being included
11903 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11907 <onlyinclude> and <includeonly> being included
11916 <includeonly> and <noinclude> on a page
11918 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11925 Un-closed <noinclude>
11932 <onlyinclude> on a page
11934 <onlyinclude>Foo</onlyinclude>bar
11941 Un-closed <onlyinclude>
11948 Self-closed noinclude, includeonly, onlyinclude tags
11959 Unbalanced includeonly and noinclude tags
11963 |b</noinclude></noinclude>
11964 |c</noinclude></includeonly>
11965 |d</includeonly></includeonly>
11974 <td>c</includeonly>
11976 <td>d</includeonly></includeonly>
11982 Template:Includeonly section
11985 ==Includeonly section==
11991 T8563: Edit link generation for section shown by <includeonly>
11993 {{includeonly section}}
11995 <h2><span class="mw-headline" id="Includeonly_section">Includeonly section</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-1" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
11996 <h2><span class="mw-headline" id="Section_T-1">Section T-1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-2" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12000 # Uses same input as the contents of [[Template:Includeonly section]]
12002 T8563: Section extraction for section shown by <includeonly>
12007 ==Includeonly section==
12015 T8563: Edit link generation for section suppressed by <includeonly>
12018 ==Includeonly section==
12022 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
12027 T8563: Section extraction for section suppressed by <includeonly>
12032 ==Includeonly section==
12040 Un-closed <includeonly>
12045 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
12048 ## We used to, but no longer wt2wt this test since the default serializer
12049 ## will normalize the include directives to serialize on their own line.
12050 ## Selser will take care of preserving formatting in scenarios where they
12051 ## intermingled with other wikitext.
12053 Includes and comments at SOL
12055 parsoid=wt2html,html2html
12057 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12064 <includeonly>can have stuff</includeonly>===here===
12067 <h2><span class="mw-headline" id="hu">hu</span></h2>
12072 <h3><span class="mw-headline" id="here">here</span></h3>
12075 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment --><h2 id="hu">hu</h2>
12077 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12079 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12082 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3 id="here">here</h3>
12086 # TODO: test with DOM fragment reuse!
12088 Parsoid: DOM fragment reuse
12090 parsoid=wt2wt,wt2html
12092 a{{echo|b<table></table>c}}d
12104 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b<table></table>c"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
12106 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b\n<table></table>\nc"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><span about="#mwt2">
12107 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12108 </span><p about="#mwt2">cd</p>
12110 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n\n<table></table>\n\nb"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>a</p><span about="#mwt3">
12112 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12114 </span><p about="#mwt3">b</p>
12118 Parsoid: Merge double tds (T52603)
12123 |{{echo|{{!}} foo}}
12127 <tr><td about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":0}}]}'> foo</td></tr>
12132 Parsoid: Merge double tds in nested transclusion content (T52603)
12138 |{{echo|{{!}} foo}}
12142 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\n{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":1}},"\n|}\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}'>
12144 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12150 ### <includeonly> and <noinclude> in attributes
12153 0. includeonly around the entire attribute
12155 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12157 <p><span id="v2">bar</span>
12162 1. includeonly in html attr key
12164 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12166 <p><span id="foo">bar</span>
12171 2. includeonly in html attr value
12173 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12174 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12176 <p><span id="v1">bar</span>
12177 <span id="v1">bar</span>
12182 3. includeonly in part of an attr value
12184 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12186 <p><span style="color:red;">bar</span>
12191 4. includeonly in table attributes
12215 ### Preprocessor precedence tests
12216 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12218 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12220 Preprocessor precedence 1: link is rightmost opening
12226 But close-brace is not a valid character in a link title:
12229 However, we can still tell this was handled as a link in the preprocessor:
12230 {{echo|[[Foo}}|bar]]|bat}}
12232 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12233 </p><p>But close-brace is not a valid character in a link title:
12235 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12239 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12240 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12241 <p>However, we can still tell this was handled as a link in the preprocessor: <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo}}|bar]]"},"2":{"wt":"bat"}},"i":0}}]}'>[[Foo}}|bar]]</span></p>
12245 Preprocessor precedence 2: template is rightmost opening
12254 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12258 Preprocessor precedence 3: language converter is rightmost opening
12274 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12275 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12276 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12280 Preprocessor precedence 4: left-most angle bracket
12291 Template:Precedence5
12297 Preprocessor precedence 5: tplarg takes precedence over template
12299 {{Precedence5|Bullet}}
12301 <ul><li>Bar</li></ul>
12304 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12308 Preprocessor precedence 6: broken link is rightmost opening
12314 {{echo|[[Foo|bar|bat=baz}}
12317 </p><p>{{echo|[[Foo|bar|bat=baz}}
12320 <p>{{echo|[[Foo}}</p>
12321 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12324 # This next test exposes a difference between PHP and Parsoid:
12325 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12326 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12327 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12328 # outer `[[Foo` extends until the `y]]`
12329 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12330 # intermediate result (after template expansion), and link processing
12331 # happens on this intermediate result, which moves the wikilink
12332 # boundary leftward to `[[Foo|Bar]]`
12333 # 2b) Parsoid works in a single step, so it's going to keep the
12334 # wikilink as extending to the `y]]`
12335 # 3a) Then PHP does linktrail processing which slurps up the trailing
12336 # `xy` inside the link.
12337 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12338 # `z` inside the link.
12339 # This is "correct" behavior. Parsoid's basic worldview is that the
12340 # `]]` inside the template shouldn't be allowed to leak out to affect
12341 # the surrounding wikilink. PHP may match Parsoid (in the future)
12342 # if you use {{#balance}} (T114445).
12345 Preprocessor precedence 7: broken template is rightmost opening
12351 [[Foo|{{echo|Bar]]-x}}-y]]-z
12353 Careful: linktrails can move the end of the wikilink:
12354 [[Foo|{{echo|y']]a}}l]]l
12356 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12357 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12358 </p><p>Careful: linktrails can move the end of the wikilink:
12359 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12362 <p>[[Foo|{{echo|Bar]]</p>
12363 <p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar]]-x"}},"i":0}}]}'>Bar]]-x</span>-y</a>-z</p>
12364 <p>Careful: linktrails can move the end of the wikilink:
12365 <a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"y']]a"}},"i":0}}]}'>y']]a</span>ll</a></p>
12369 Preprocessor precedence 8: broken language converter is rightmost opening
12380 Template:Preprocessor_precedence_9
12385 ;7: {{{{{{{4}}}}}}}
12389 Preprocessor precedence 9: groups of braces
12391 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12397 <ul><li>Bar</li></ul>
12401 <dd>{Bullet}</dd></dl>
12404 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 9","href":"./Template:Preprocessor_precedence_9"},"params":{"1":{"wt":"Four"},"2":{"wt":"Bullet"},"3":{"wt":"1"},"4":{"wt":"2"}},"i":0}}]}'>
12409 </dl><ul about="#mwt1">
12411 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12420 Template:Preprocessor_precedence_10
12427 ;6: -{{{{{{4}}}}}}-
12428 ;7: -{{{{{{{5}}}}}}}-
12432 Preprocessor precedence 10: groups of braces with leading dash
12436 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12442 <ul><li>Bar-</li></ul>
12449 <ul><li>Bar-</li></ul>
12456 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 10","href":"./Template:Preprocessor_precedence_10"},"params":{"1":{"wt":"Three"},"2":{"wt":"raw2"},"3":{"wt":"Bullet"},"4":{"wt":"1"},"5":{"wt":"2"}},"i":0}}]}'>
12458 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12461 </dl><ul about="#mwt1">
12463 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12467 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12470 </dl><ul about="#mwt1">
12472 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12476 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12481 Preprocessor precedence 11: found during visual diff testing
12483 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12485 {{echo|-{{echo|-{{echo|x}}}}}}
12487 {{echo|-{{echo|x}}}}
12489 <p><span>-<span>-x</span></span>
12494 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"#tag:span","function":"tag"},"params":{"1":{"wt":"-{{#tag:span|-{{echo|x}}}}"}},"i":0}}]}'>-<span>-x</span></span></p>
12496 <p about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|-{{echo|x}}}}"}},"i":0}}]}'>--x</p>
12498 <p about="#mwt7" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|x}}"}},"i":0}}]}'>-x</p>
12502 Preprocessor precedence 12: broken language converter closed by brace.
12506 This form breaks the template, which is unfortunate:
12507 *{{echo|foo-{bar}bat}}
12509 But if the broken language converter markup is inside an extension
12510 tag, nothing bad happens:
12511 *<nowiki>foo-{bar}bat</nowiki>
12512 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12513 *<pre>foo-{bar}bat</pre>
12514 *{{echo|<pre>foo-{bar}bat</pre>}}
12516 <tag>foo-{bar}bat</tag>
12517 {{echo|<tag>foo-{bar}bat</tag>}}
12520 <p>This form breaks the template, which is unfortunate:
12522 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12523 <p>But if the broken language converter markup is inside an extension
12524 tag, nothing bad happens:
12526 <ul><li>foo-{bar}bat</li>
12527 <li>foo-{bar}bat</li>
12528 <li><pre>foo-{bar}bat</pre></li>
12529 <li><pre>foo-{bar}bat</pre></li></ul>
12530 <pre>'foo-{bar}bat'
12534 <pre>'foo-{bar}bat'
12539 <p>This form breaks the template, which is unfortunate:</p>
12541 <li>{{echo|foo-{bar}bat}}</li>
12543 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12545 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12546 <li><span typeof="mw:Transclusion mw:Nowiki" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>foo-{bar}bat</nowiki>"}},"i":0}}]}'>foo-{bar}bat</span></li>
12547 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12548 <li><pre typeof="mw:Transclusion mw:Extension/pre" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre>foo-{bar}bat</pre>"}},"i":0}}]}'>foo-{bar}bat</pre></li>
12550 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'></pre> <pre typeof="mw:Extension/tag mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tag>foo-{bar}bat</tag>"}},"i":0}}]}'></pre>
12554 Preprocessor precedence 13: broken language converter in external link
12558 *[http://example.com/-{foo Example in URL]
12559 *[http://example.com Example in -{link} description]
12560 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12562 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12563 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12564 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12567 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12568 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12569 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12574 Preprocessor precedence 14: broken language converter in comment
12576 *<!--{{foo}}-->...should be ok
12577 *<!---{{foo}}-->...extra dashes
12578 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12580 <ul><li>...should be ok</li>
12581 <li>...extra dashes</li>
12582 <li>foobat...should be ok</li></ul>
12585 <li><!--{{foo}}-->...should be ok</li>
12586 <li><!---{{foo}}-->...extra dashes</li>
12587 <li><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<!-- -{bar} -->bat"}},"i":0}}]}'>foo</span><span about="#mwt1"><!-- -{bar} --></span><span about="#mwt1">bat</span>...should be ok</li>
12592 Preprocessor precedence 15: broken brace markup in headings
12594 wgFragmentMode=[ 'html5', 'legacy' ]
12598 __NOTOC__ __NOEDITSECTION__
12607 ===5 foo{{{bar 5===
12612 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12615 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12618 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12621 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12624 <h3><span id="5_foo.7B.7B.7Bbar_5"></span><span class="mw-headline" id="5_foo{{{bar_5">5 foo{{{bar 5</span></h3>
12627 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12631 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12632 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12634 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12636 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12638 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12640 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12642 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12647 Preprocessor precedence 16: matching closing braces to opening braces
12652 -{{{echo|foo}}bar}-
12657 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>bar"}}'></span></p>
12661 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12670 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12674 Preprocessor precedence 18: another rightmost wins scenario
12678 {{ -{{{{1|tplarg}}} }} }-
12680 <p>{{ -{tplarg }} }-
12683 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12687 Preprocessor precedence 19: break syntax
12700 ### Token Stream Patcher tests
12702 ### These tests won't always pass wt2wt and other modes because
12703 ### on serialization, the table will be output on a new line.
12704 ### For now, we are blacklisting them, and using this to test selser.
12708 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12710 parsoid=wt2html,wt2wt
12712 {{echo|}}{| width = '100%'
12716 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12717 <tbody><tr><td>foo</td></tr>
12721 ## We used to, but no longer wt2wt this test since the default serializer
12722 ## will normalize the include directives to serialize on their own line.
12723 ## Selser will take care of preserving formatting in scenarios where they
12724 ## intermingled with other wikitext.
12726 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12730 <includeonly>a</includeonly>{| {{{b}}}
12734 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[31,38,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"b\"},\"params\":{},\"i\":0}}]}'>{{{b}}}</span>"},{"html":""}]]}'>
12735 <tbody><tr><td>c</td></tr>
12740 Table wikitext syntax outside wiki-tables
12744 ! not a table heading
12747 | class="foo bar" | baz
12755 ! not a table heading
12758 | class="foo bar" | baz
12767 ### Testing parsing of templates where a template arg
12768 ### has the same name as the template itself.
12774 {{{quote|{{{1}}}}}}
12778 Templates: Template Name/Arg clash: 1. Use of positional param
12787 Templates: Template Name/Arg clash: 2. Use of named param
12789 {{quote|quote=foo}}
12796 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12805 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12809 Templates: 1. Simple use
12818 Templates: 2. Inside a block tag
12820 <div>{{echo|Foo}}</div>
12821 <blockquote>{{echo|Foo}}</blockquote>
12824 <blockquote>Foo</blockquote>
12828 <blockquote><p>Foo</p></blockquote>
12832 Templates: P-wrapping: 1a. Templates on consecutive lines
12843 Templates: P-wrapping: 1b. Templates on consecutive lines
12857 Templates: P-wrapping: 1c. Templates on consecutive lines
12860 {{echo|bar}} <div>baz</div>
12869 bar </p><div>baz</div>
12873 Templates: P-wrapping: 1d. Template preceded by comment-only line
12882 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12886 Templates: Inline Text: 1. Multiple template uses
12888 {{echo|Foo}}bar{{echo|baz}}
12895 Templates: Inline Text: 2. Back-to-back template uses
12897 {{echo|Foo}}{{echo|bar}}
12904 Templates: Block Tags: 1. Multiple template uses
12906 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12908 <div>Foo</div><div>bar</div><div>baz</div>
12913 Templates: Block Tags: 2. Back-to-back template uses
12915 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12917 <div>Foo</div><div>bar</div>
12921 ## Parsoid drops empty elements in templates.
12923 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12930 b</p><p class="mw-empty-elt"></p>
12932 <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">
12933 </span><p about="#mwt1">b</p>
12937 Templates: Links: 1. Simple example
12939 {{echo|[[Foo|bar]]}}
12941 <p><a href="/wiki/Foo" title="Foo">bar</a>
12946 Templates: Links: 2. Generation of link href
12948 [[{{echo|Foo}}|bar]]
12950 <p><a href="/wiki/Foo" title="Foo">bar</a>
12955 Templates: Links: 3. Generation of part of a link href
12957 [[Fo{{echo|o}}|bar]]
12959 [[Foo{{echo|bar}}]]
12961 [[Foo{{echo|bar}}baz]]
12963 [[Foo{{echo|bar}}|bar]]
12965 [[:Foo{{echo|bar}}]]
12967 [[:Foo{{echo|bar}}|bar]]
12969 <p><a href="/wiki/Foo" title="Foo">bar</a>
12970 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12971 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12972 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12973 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12974 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12979 Templates: Links: 4. Multiple templates generating link href
12981 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12983 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12988 Templates: Links: 5. Generation of link text
12990 [[Foo|{{echo|bar}}]]
12992 <p><a href="/wiki/Foo" title="Foo">bar</a>
12997 Templates: Links: 5. Nested templates (only outermost template should be marked)
12999 {{echo|[[{{echo|Foo}}|bar]]}}
13001 <p><a href="/wiki/Foo" title="Foo">bar</a>
13006 Templates: HTML Tag: 1. Generation of HTML attr. key
13008 <div {{echo|style}}="color:red;">foo</div>
13010 <div style="color:red;">foo</div>
13015 Templates: HTML Tag: 2. Generation of HTML attr. value
13017 <div style={{echo|'color:red;'}}>foo</div>
13019 <div style="color:red;">foo</div>
13024 Templates: HTML Tag: 3. Generation of HTML attr key and value
13026 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13028 <div style="color:red;">foo</div>
13033 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13035 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13037 <div title="This is a long title with just one piece templated">foo</div>
13042 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13044 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13046 <div title="This is a long title with just one piece templated">foo</div>
13051 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13053 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13055 <div title="This is a long title with just one piece templated">foo</div>
13059 # SSS FIXME: While it is great we added support for all this,
13060 # do we want to make this part of the spec? Maybe we want to
13061 # deprecate this kind of usage in the future?
13063 Templates: HTML Tag: 7. Generation of partial attribute key string
13065 <div st{{echo|yle}}="color:red;">foo</div>
13067 <div style="color:red;">foo</div>
13072 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13074 <div {{echo|1=id="v1"}}>bar</div>
13076 <div id="v1">bar</div>
13081 Templates: HTML Tag: 9. Multiple template-generated attributes
13083 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13085 <div id="v1" title="foo">bar</div>
13090 Templates: Support for templates generating attributes and content
13092 {| {{mixed_attr_content_template}}
13097 <table style="color:red;" title="T48811">
13107 <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|}"]}'>
13116 Template:attribute_from_template
13122 Table cell with attribute before expanded attribute
13125 | align="center" {{attribute_from_template}} |456
13129 <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>
13134 1. Entities and nowikis inside templated attributes should be handled correctly
13136 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13138 <div style="background:#f9f9f9;">foo</div>
13141 <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>
13145 2. Entities and nowikis inside templated attributes should be handled correctly
13148 |{{table_attribs_3}}
13153 <td style="background:#f9f9f9;">Foo
13158 <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>
13163 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13166 |{{table_attribs_3}}
13171 <td style="background:#f9f9f9;">Foo
13175 <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}}]}'>
13176 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13182 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13185 |{{table_attribs_6}} hi
13190 <td style="background: red;">hi
13195 <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>
13200 Templates: HTML Tables: 1. Generating start of a HTML table
13202 {{echo|<table><tr><td>foo</td>}}</tr></table>
13204 <table><tr><td>foo</td></tr></table>
13209 Templates: HTML Tables: 2a. Generating middle of a HTML table
13211 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13213 <table><tr><td>foo</td></tr></table>
13218 Templates: HTML Tables: 2b. Generating middle of a HTML table
13220 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13222 <table><tr><td>foo</td></tr></table>
13227 Templates: HTML Tables: 3. Generating end of a HTML table
13229 <table><tr>{{echo|<td>foo</td></tr></table>}}
13231 <table><tr><td>foo</td></tr></table>
13236 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13238 {{echo|<table>}}<tr><td>foo</td></tr></table>
13240 <table><tr><td>foo</td></tr></table>
13245 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13247 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13249 <table><tr><td>foo</td></tr></table>
13254 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13256 <table><tr>{{echo|<td>}}foo</td></tr></table>
13258 <table><tr><td>foo</td></tr></table>
13263 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13265 <table><tr><td>foo{{echo|</td>}}</tr></table>
13267 <table><tr><td>foo</td></tr></table>
13272 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13274 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13276 <table><tr><td>foo</td></tr></table>
13281 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13283 <table><tr><td>foo</td></tr>{{echo|</table>}}
13285 <table><tr><td>foo</td></tr></table>
13290 Templates: HTML Tables: 5. Proper fostering of categories from inside
13292 parsoid=wt2html,wt2wt
13294 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13295 <!--Two categories (T52330)-->
13296 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13298 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13299 <!--Two categories (T52330)-->
13300 <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>
13303 ## Remex doesn't account for fostered content.
13305 Templates: Wiki Tables: 1a. Fostering of entire template content
13313 <tr><td></td></tr></table>
13318 <table><tbody><tr><td></td></tr></tbody></table>
13320 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}},"\n|}"]}'>a</p><table about="#mwt2">
13326 Templates: Wiki Tables: 1b. Fostering of entire template content
13339 <tr><td></td></tr></table>
13347 <tbody><tr><td></td></tr></tbody></table>
13349 <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|}"]}'>
13351 </div><table about="#mwt3">
13356 ## Remex doesn't account for fostered content.
13358 Templates: Wiki Tables: 2. Fostering of partial template content
13368 <tr><td></td></tr></table>
13373 <div>b</div><table>
13374 <tbody><tr><td></td></tr></tbody></table>
13376 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n<div>b</div>"}},"i":0}},"\n|}"]}'>a</p><div about="#mwt2">b</div><table about="#mwt2">
13383 Templates: Wiki Tables: 3. td-content via multiple templates
13386 {{echo|{{pipe}}a}}{{echo|b}}
13397 Templates: Wiki Tables: 4. Templated tags, no content
13403 <tr><td></td></tr></table>
13408 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13422 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13435 ## This test case is very specific to Parsoid's internals
13436 ## and is hence only tested for Parsoid's code. Parsoid uses
13437 ## a <meta> marker tag for <ref> tags and they are expanded
13438 ## much later. We are verifying that this <meta> tag usage
13439 ## doesn't prevent foster parenting.
13441 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13443 {{PartialTable}}<ref>foo</ref>
13448 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><sup about="#mwt3" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","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></p><table about="#mwt2">
13452 <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">foo</span></li></ol>
13456 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13466 <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{{!}}}"]}'>
13467 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13471 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13476 Templates: Lists: Multi-line list-items via templates
13478 *{{echo|a {{nonexistent|
13480 *{{echo|b {{nonexistent|
13483 <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>
13484 <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>
13489 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13491 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13493 <p><i>ab</i>c<i>d</i>e
13498 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13499 (PHP parser generates misnested html)
13501 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13503 <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>
13507 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13508 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13510 parsoid=wt2html,wt2wt
13512 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13514 <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>
13515 <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>
13516 <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>
13520 Templates: Ugly nesting: 4. Divs opened/closed across templates
13522 a<div>b{{echo|c</div>d}}e
13527 <p>a</p><div>bc</div><p>de
13532 Templates: Ugly templates: 3. newline-only template parameter
13541 # This looks like a bug: a single newline triggers p/br for some reason.
13543 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13552 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13553 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13555 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13561 <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
13562 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13566 # T66017 -- ugly wikitext with fostered content generates two template ranges
13567 # that are "identical" and generate nesting cycles in the algorithm
13569 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13571 {{echo|<table><tr><td><table>}}
13575 <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"}'>
13576 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13577 </table></td></tr></tbody></table>
13581 Templates: Parameters substituted at the top-level
13583 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13587 <p><i>who</i> me? <b>never!</b>
13591 <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>
13593 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13597 Templates: Param with empty arg in the final position
13601 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13605 Parser Functions: 1. Simple example
13614 Parser Functions: 2. Nested use (only outermost should be marked up)
13622 ## Note that the templates inside the references are not wrapped
13624 Template nested in extension tag in template
13626 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13627 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13630 <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>
13631 <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>
13632 <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>
13636 ### Pre-save transform tests
13639 pre-save transform: subst:
13645 This is a test template
13649 pre-save transform: normal template
13659 pre-save transform: nonexistent template
13663 {{thistemplatedoesnotexist}}
13665 {{thistemplatedoesnotexist}}
13669 pre-save transform: subst magic variables
13678 # This is T2089, which I fixed. -- wtm
13680 pre-save transform: subst: templates with parameters
13684 {{subst:paramtest|param="something else"}}
13686 This is a test template with parameter "something else"
13690 Template:nowikitest
13692 <nowiki>'''not wiki'''</nowiki>
13696 pre-save transform: nowiki in subst (T3188)
13700 {{subst:nowikitest}}
13702 <nowiki>'''not wiki'''</nowiki>
13706 Template:commenttest
13708 This template has <!-- a comment --> in it.
13712 pre-save transform: comment in subst (T3936)
13716 {{subst:commenttest}}
13718 This template has <!-- a comment --> in it.
13722 pre-save transform: unclosed tag
13726 <nowiki>'''not wiki'''
13728 <nowiki>'''not wiki'''
13732 pre-save transform: mixed tag case
13736 <NOwiki>'''not wiki'''</noWIKI>
13738 <NOwiki>'''not wiki'''</noWIKI>
13742 pre-save transform: unclosed comment in <nowiki>
13746 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13748 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13751 # Leading @ in this template definition works around a limitation
13752 # in parsoid's parserTests which otherwise strips the <span> from the
13753 # result (confusing it for a template wrapper)
13757 @<span onmouseover="alert('crap')">Oh no</span>
13761 (confirming safety of fix for subst T3936)
13763 {{Template:dangerous}}
13765 <p>@<span>Oh no</span>
13770 pre-save transform: comment containing gallery (T7024)
13774 <!-- <gallery>data</gallery> -->
13776 <!-- <gallery>data</gallery> -->
13780 pre-save transform: comment containing extension
13784 <!-- <tag>data</tag> -->
13786 <!-- <tag>data</tag> -->
13790 pre-save transform: comment containing nowiki
13794 <!-- <nowiki>data</nowiki> -->
13796 <!-- <nowiki>data</nowiki> -->
13800 pre-save transform: <noinclude> in subst (T5298)
13810 pre-save transform: <onlyinclude> in subst (T5298)
13814 {{subst:Includes2}}
13822 {{<includeonly>subst:</includeonly>Includes}}
13826 Template:SafeSubstTest
13828 {{<includeonly>safesubst:</includeonly>Includes}}
13832 T24297: safesubst: works during PST
13836 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13842 T24297: safesubst: works during normal parse
13851 subst: does not work during normal parse
13855 <p>{{subst:Includes}}
13860 pre-save transform: context links ("pipe trick")
13864 [[Article (context)|]]
13867 [[Bar:Article (context)|]]
13868 [[:Bar:Article (context)|]]
13870 [[|Article (context)]]
13874 [[Article (context)|Article]]
13875 [[Bar:Article|Article]]
13876 [[:Bar:Article|Article]]
13877 [[Bar:Article (context)|Article]]
13878 [[:Bar:Article (context)|Article]]
13880 [[Article (context)]]
13881 [[Bar:X (Y) Z|X (Y) Z]]
13882 [[:Bar:X (Y) Z|X (Y) Z]]
13886 pre-save transform: context links ("pipe trick") with interwiki prefix
13890 [[interwiki:Article|]]
13891 [[:interwiki:Article|]]
13892 [[interwiki:Bar:Article|]]
13893 [[:interwiki:Bar:Article|]]
13895 [[interwiki:Article|Article]]
13896 [[:interwiki:Article|Article]]
13897 [[interwiki:Bar:Article|Bar:Article]]
13898 [[:interwiki:Bar:Article|Bar:Article]]
13902 pre-save transform: context links ("pipe trick") with parens in title
13904 pst title=[[Somearticle (context)]]
13908 [[Article (context)|Article]]
13912 pre-save transform: context links ("pipe trick") with comma in title
13914 pst title=[[Someplace, Somewhere]]
13917 [[Otherplace, Elsewhere|]]
13918 [[Otherplace, Elsewhere, Anywhere|]]
13920 [[Otherplace, Somewhere|Otherplace]]
13921 [[Otherplace, Elsewhere|Otherplace]]
13922 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13926 pre-save transform: context links ("pipe trick") with parens and comma
13928 pst title=[[Someplace (IGNORED), Somewhere]]
13931 [[Otherplace (place), Elsewhere|]]
13933 [[Otherplace, Somewhere|Otherplace]]
13934 [[Otherplace (place), Elsewhere|Otherplace]]
13938 pre-save transform: context links ("pipe trick") with comma and parens
13940 pst title=[[Who, me? (context)]]
13943 [[Me, Myself, and I (1937 song)|]]
13945 [[Yes, you. (context)|Yes, you.]]
13946 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13950 pre-save transform: context links ("pipe trick") with namespace
13952 pst title=[[Ns:Somearticle]]
13956 [[Ns:Article|Article]]
13960 pre-save transform: context links ("pipe trick") with namespace and parens
13962 pst title=[[Ns:Somearticle (context)]]
13966 [[Ns:Article (context)|Article]]
13970 pre-save transform: context links ("pipe trick") with namespace and comma
13972 pst title=[[Ns:Somearticle, Context, Whatever]]
13976 [[Ns:Article, Context, Whatever|Article]]
13980 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13982 pst title=[[Ns:Somearticle, Context (context)]]
13986 [[Ns:Article (context)|Article]]
13990 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13992 pst title=[[Ns:Somearticle (IGNORED), Context]]
13996 [[Ns:Article, Context|Article]]
14000 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14004 [[Article(context)|]]
14005 [[Bar:Article(context)|]]
14006 [[:Bar:Article(context)|]]
14007 [[|Article(context)]]
14011 [[Article(context)|Article]]
14012 [[Bar:Article(context)|Article]]
14013 [[:Bar:Article(context)|Article]]
14014 [[Article(context)]]
14015 [[Bar:X(Y)Z|X(Y)Z]]
14016 [[:Bar:X(Y)Z|X(Y)Z]]
14020 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14024 [[Article (context)|]]
14025 [[Bar:Article (context)|]]
14026 [[:Bar:Article (context)|]]
14027 [[|Article (context)]]
14031 [[Article (context)|Article]]
14032 [[Bar:Article (context)|Article]]
14033 [[:Bar:Article (context)|Article]]
14034 [[Article (context)]]
14035 [[Bar:X (Y) Z|X (Y) Z]]
14036 [[:Bar:X (Y) Z|X (Y) Z]]
14040 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14044 [[Article(context)|]]
14045 [[Bar:Article(context)|]]
14046 [[:Bar:Article(context)|]]
14047 [[|Article(context)]]
14051 [[Article(context)|Article]]
14052 [[Bar:Article(context)|Article]]
14053 [[:Bar:Article(context)|Article]]
14054 [[Article(context)]]
14055 [[Bar:X(Y)Z|X(Y)Z]]
14056 [[:Bar:X(Y)Z|X(Y)Z]]
14060 pre-save transform: context links ("pipe trick") with commas (T23660)
14064 [[Article (context), context|]]
14065 [[Article (context),context|]]
14066 [[Bar:Article (context), context|]]
14067 [[Bar:Article (context),context|]]
14068 [[:Bar:Article (context), context|]]
14069 [[:Bar:Article (context),context|]]
14071 [[Article (context), context|Article]]
14072 [[Article (context),context|Article]]
14073 [[Bar:Article (context), context|Article]]
14074 [[Bar:Article (context),context|Article]]
14075 [[:Bar:Article (context), context|Article]]
14076 [[:Bar:Article (context),context|Article]]
14080 Parsoid: backwards pipe trick
14087 <p>[[|<b>bar</b>]]</p>
14091 pre-save transform: trim trailing empty lines
14095 Empty lines are trimmed
14101 Empty lines are trimmed
14105 pre-save transform: Signature expansion
14112 * <noinclude>~~~</noinclude>
14113 * <includeonly>~~~</includeonly>
14114 * <onlyinclude>~~~</onlyinclude>
14116 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14117 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14118 * 00:02, 1 January 1970 (UTC)
14119 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14120 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14121 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14126 ParserOutput flags from signature expansion (T84843)
14133 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14134 flags=user-signature
14139 pre-save transform: Signature expansion in nowiki tags (T2093)
14145 <nowiki>~~~~</nowiki>
14147 <includeonly><nowiki>~~~~</nowiki></includeonly>
14149 <noinclude><nowiki>~~~~</nowiki></noinclude>
14151 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14153 {{subst:Foo}} shall be converted to FOO
14155 As well as inside noinclude/onlyinclude
14156 <noinclude>{{subst:Foo}}</noinclude>
14157 <onlyinclude>{{subst:Foo}}</onlyinclude>
14159 But not inside includeonly
14160 <includeonly>{{subst:Foo}}</includeonly>
14164 <nowiki>~~~~</nowiki>
14166 <includeonly><nowiki>~~~~</nowiki></includeonly>
14168 <noinclude><nowiki>~~~~</nowiki></noinclude>
14170 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14172 FOO shall be converted to FOO
14174 As well as inside noinclude/onlyinclude
14175 <noinclude>FOO</noinclude>
14176 <onlyinclude>FOO</onlyinclude>
14178 But not inside includeonly
14179 <includeonly>{{subst:Foo}}</includeonly>
14183 Parsoid: Recognize nowiki with trailing space in tags
14187 <nowiki ><div>[[foo]]</nowiki >
14195 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14202 Parsoid: Recognize nowiki with odd capitalization
14206 <noWikI ><div>[[foo]]</Nowiki >
14208 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14213 Parsoid: Escape nowiki with trailing space in tags
14217 <p><nowiki > foo </nowiki ></p>
14218 <p>a<nowiki />b</p>
14219 <p>c<nowiki/ >d</p>
14221 <nowiki > foo </nowiki >
14229 Parsoid: Escape weird noWikI capitalizations
14233 <p><noWikI > foo </NoWikI ></p>
14235 <noWikI > foo </NoWikI >
14239 ### Message transform tests
14242 message transform: magic variables
14252 message transform: should not transform wiki markup
14262 message transform: <noinclude> in transcluded template (T6926)
14272 message transform: <onlyinclude> in transcluded template (T6926)
14282 {{#special:}} page name, known
14286 {{#special:Recentchanges}}
14288 Special:RecentChanges
14292 {{#special:}} page name with subpage, known
14296 {{#special:Recentchanges/param}}
14298 Special:RecentChanges/param
14302 {{#special:}} page name, unknown
14306 {{#special:foobar nonexistent}}
14308 Special:Foobar nonexistent
14312 {{#speciale:}} page name, known
14316 {{#speciale:Recentchanges}}
14318 Special:RecentChanges
14322 {{#speciale:}} page name with subpage, known
14326 {{#speciale:Recentchanges/param}}
14328 Special:RecentChanges/param
14332 {{#speciale:}} page name, unknown
14336 {{#speciale:foobar nonexistent}}
14338 Special:Foobar_nonexistent
14344 ### For Parsoid-specific tests, see
14345 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14350 parsoid=wt2html,wt2wt,html2html
14352 [[Image:foobar.jpg]]
14354 <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>
14357 <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>
14361 Serialize simple image with span wrapper
14365 <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>
14367 [[File:Foobar.jpg]]
14371 Simple image (using File: namespace, now canonical)
14373 [[File:Foobar.jpg]]
14375 <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>
14378 <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>
14382 Right-aligned image
14384 [[File:Foobar.jpg|right]]
14386 <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>
14389 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
14395 [[File:Foobar.jpg|right|Caption text]]
14397 <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>
14400 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
14404 Image with caption, T55312 #1
14406 [[File:Foobar.jpg|right|Caption page stuff]]
14408 <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>
14411 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page stuff</figcaption></figure>
14415 Image with caption, T55312 #2
14417 [[File:Foobar.jpg|right|Caption page=]]
14419 <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>
14422 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=</figcaption></figure>
14426 Image with caption, T55312 #3
14428 [[File:Foobar.jpg|right|Caption page=stuff]]
14430 <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>
14433 <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>
14437 Image caption with pipe entity
14439 [[File:Foobar.jpg|thumb|one | two]]
14440 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14442 <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>
14443 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one <i>two</i> | three</div></div></div>
14446 <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>
14447 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <i>two</i> <span typeof="mw:Entity">|</span> three</figcaption></figure>
14451 Allow empty links in image captions (T62753)
14455 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14460 <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>
14463 <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>
14465 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14466 </figcaption></figure>
14470 Titles in unlinked images (T23454)
14472 [[File:Foobar.jpg|link=|stuff]]
14474 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14477 <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>
14481 Link with empty target
14490 Image with link trail
14492 Linktrails should not work for images: [[File:Foobar.jpg]]s
14494 <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
14497 <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>
14501 Image with empty attribute
14503 parsoid=wt2html,wt2wt,html2html
14505 [[File:Foobar.jpg|right||Caption text]]
14507 <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>
14510 <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>
14514 1. Block image with individual attributes from templates
14516 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14518 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
14521 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#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>
14525 2. Block Image with individual attributes from templates
14527 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14529 <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>
14532 <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>
14536 3. Inline image with individual attributes from templates
14538 [[File:Foobar.jpg|{{echo|50px}}]]
14540 <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>
14543 <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>
14546 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14547 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14549 Image with multiple attributes from the same template
14551 [[File:Foobar.jpg|{{image_attribs}}]]
14553 <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>
14556 <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>
14560 Image with link tails
14564 123[[File:Foobar.jpg]]456
14565 123[[File:Foobar.jpg|right]]456
14566 123[[File:Foobar.jpg|thumb]]456
14568 <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
14570 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
14571 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
14574 <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
14576 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
14577 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
14580 <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>
14581 <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
14582 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>
14586 Image with multiple captions -- only last one is accepted
14588 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14590 <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>
14593 <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>
14597 Image with multiple widths -- use last
14599 [[File:Foobar.jpg|200px|300px|caption]]
14601 <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>
14604 <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>
14608 Image with multiple alignments -- use first (T50664)
14612 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14614 [[File:Foobar.jpg|middle|text-top|caption]]
14616 <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>
14617 <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>
14620 <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>
14621 <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>
14625 Image with width attribute at different positions
14627 [[File:Foobar.jpg|200px|right|Caption]]
14628 [[File:Foobar.jpg|right|200px|Caption]]
14629 [[File:Foobar.jpg|right|Caption|200px]]
14631 <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>
14632 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14633 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14636 <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>
14637 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14638 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14641 # a sad bit of backward-compatibility
14643 Image with size specified with pxpx (T15500, T53628)
14645 parsoid=wt2html,wt2wt,html2html
14647 [[File:Foobar.jpg|20pxpx]]
14648 [[File:Foobar.jpg|200x20pxpx]]
14650 <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>
14651 <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>
14654 <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>
14658 Image with link parameter, wiki target
14660 [[File:Foobar.jpg|link=Main Page]]
14662 <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>
14665 <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>
14668 # parsoid T51293 (part 1)
14670 Image with link parameter, URL target
14672 [[File:Foobar.jpg|link=http://example.com/]]
14674 <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>
14677 <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>
14680 # parsoid T51293 (part 2)
14682 Image with link parameter, protocol-less URL target
14684 [[File:Foobar.jpg|link=//example.com/]]
14686 <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>
14689 <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>
14693 Escaping non-block captions (T107435)
14696 "modes": ["wt2wt"],
14698 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14702 [[Image:Foobar.jpg|caption]]
14704 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14707 # wgExternalLinkTarget not supported by Parsoid
14709 Image with link parameter, wgExternalLinkTarget
14711 [[Image:foobar.jpg|link=http://example.com/]]
14713 wgExternalLinkTarget='foobar'
14715 <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>
14720 Image with link parameter, wgNoFollowLinks set to false
14722 [[Image:foobar.jpg|link=http://example.com/]]
14724 wgNoFollowLinks=false
14726 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14731 Image with link parameter, wgNoFollowDomainExceptions
14733 [[Image:foobar.jpg|link=http://example.com/]]
14735 wgNoFollowDomainExceptions='example.com'
14737 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14741 # wgExternalLinkTarget not supported by Parsoid
14743 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14745 [[Image:foobar.jpg|link=http://example.com/|Title]]
14747 wgExternalLinkTarget='foobar'
14749 <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>
14754 Image with empty link parameter
14756 [[File:Foobar.jpg|link=]]
14758 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14761 <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>
14765 Image with link parameter (wiki target) and unnamed parameter
14767 [[File:Foobar.jpg|link=Main_Page|Title]]
14769 <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>
14772 <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>
14776 Image with link parameter (URL target) and unnamed parameter
14778 [[File:Foobar.jpg|link=http://example.com/|Title]]
14780 <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>
14783 <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>
14787 Thumbnail image with link parameter
14790 parsoid=wt2html,wt2wt,html2html
14792 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14794 <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>
14797 <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>
14801 Manually-specified thumbnail image
14805 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14807 <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>
14810 <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>
14814 Manually-specified thumbnail image with explicit link to wiki page
14817 parsoid=wt2html,wt2wt,html2html
14819 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14821 <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>
14824 <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>
14828 Manually-specified thumbnail image with explicit link to url
14831 parsoid=wt2html,wt2wt,html2html
14833 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14835 <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>
14838 <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>
14842 Manually-specified thumbnail image with explicit no link
14845 parsoid=wt2html,wt2wt,html2html
14847 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14849 <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>
14852 <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>
14856 Manually-specified thumbnail image with explicit link and alt text
14859 parsoid=wt2html,wt2wt,html2html
14861 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14863 <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>
14866 <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>
14870 Image with frame and link
14872 parsoid=wt2html,wt2wt,html2html
14874 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14876 <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>
14879 <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>
14883 Image with frame and link and explicit alt
14885 parsoid=wt2html,wt2wt,html2html
14887 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14889 <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>
14892 <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>
14896 Image with wiki markup in implicit alt
14898 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14900 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14902 <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>
14903 </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>
14906 <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>
14908 <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>
14912 Alt image option should handle most kinds of wikitext without barfing
14914 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14916 <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>
14919 <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>
14923 Image with table with attributes in caption
14925 parsoid=wt2html,html2html
14927 [[File:Foobar.jpg|thumb|
14934 <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>
14935 <table class="123">
14936 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14939 </figcaption></figure>
14943 Image with table with rows from templates in caption
14945 [[File:Foobar.jpg|thumb|
14951 <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>
14953 <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>
14955 </figcaption></figure>
14959 Image with nested tables in caption
14961 [[File:Foobar.jpg|thumb|Foo<br />
14970 <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}'/>
14974 <tbody><tr><td>z</td></tr>
14975 </tbody></table></td></tr>
14977 </figcaption></figure>
14981 Image with heading and horizontal rule in caption
14983 [[File:Foobar.jpg|thumb|
14989 <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>
14992 <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>
14993 <h3 id="Testing">Testing</h3>
14995 <hr data-parsoid='{"extra_dashes":10}'/>
14996 </figcaption></figure>
14999 ###################
15000 # Conflicting image format options.
15001 # First option specified should 'win'.
15002 # All three cases in each test should be identical.
15005 Image with 'frameless' first.
15007 parsoid=wt2html,wt2wt,html2html
15009 [[File:Foobar.jpg|frameless|caption]]
15011 [[File:Foobar.jpg|frameless|frame|caption]]
15013 [[File:Foobar.jpg|frameless|thumb|caption]]
15015 <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>
15016 </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>
15017 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
15020 <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>
15021 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
15022 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
15026 Image with 'frame' first.
15028 parsoid=wt2html,wt2wt,html2html
15030 [[File:Foobar.jpg|frame|caption]]
15031 [[File:Foobar.jpg|frame|frameless|caption]]
15032 [[File:Foobar.jpg|frame|thumb|caption]]
15034 <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>
15035 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15036 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15039 <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>
15040 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
15041 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
15045 Image with 'thumb' first.
15047 parsoid=wt2html,wt2wt,html2html
15049 [[File:Foobar.jpg|thumb|caption]]
15050 [[File:Foobar.jpg|thumb|frameless|caption]]
15051 [[File:Foobar.jpg|thumb|frame|caption]]
15053 <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>
15054 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15055 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15058 <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>
15059 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15060 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15063 ###################
15065 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15066 # and https://phabricator.wikimedia.org/T64258
15067 # Foobar has actual size of 1941x220
15068 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15069 # a scalable format.
15070 # 2. Framed images always ignore size options; always render at default size.
15071 # 3. "Unspecified format" and border are the only types which can be
15075 Image: unspecified format and border enlarge
15077 parsoid=wt2html,wt2wt,html2html
15079 [[File:Foobar.jpg|2000px]]
15081 [[File:Foobar.jpg|border|2000px]]
15083 <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>
15084 </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>
15087 <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>
15088 <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>
15092 Image: "unspecified format" and border reduce
15094 parsoid=wt2html,wt2wt,html2html
15096 [[File:Foobar.jpg|1000px]]
15098 [[File:Foobar.jpg|border|1000px]]
15100 <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>
15101 </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>
15104 <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>
15105 <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>
15109 Image: thumbs reduce
15111 parsoid=wt2html,wt2wt,html2html
15113 [[File:Foobar.jpg|thumb|50px]]
15115 <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>
15118 <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>
15122 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15124 parsoid=wt2html,wt2wt,html2html
15126 [[File:Foobar.jpg|thumb|2000px]]
15128 [[File:Foobar.svg|thumb|2000px]]
15130 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
15131 <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>
15134 <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>
15135 <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>
15139 Image: frameless can reduce in size
15141 parsoid=wt2html,wt2wt,html2html
15143 [[File:Foobar.jpg|frameless|50px]]
15145 <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>
15148 <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>
15152 Image: bitmap frameless can't be enlarged past original size, but vector can
15154 parsoid=wt2html,wt2wt,html2html
15156 [[File:Foobar.jpg|frameless|2000px]]
15158 [[File:Foobar.svg|frameless|2000px]]
15160 <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>
15161 </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>
15164 <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>
15165 <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>
15169 Image: framed images are always unscaled.
15171 parsoid=wt2html,wt2wt,html2html
15173 [[File:Foobar.jpg|frame]]
15175 [[File:Foobar.jpg|frame|50px]]
15177 [[File:Foobar.jpg|frame|50x50px]]
15179 [[File:Foobar.jpg|frame|2000px]]
15181 <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>
15182 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15183 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15184 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15187 <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>
15188 <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>
15189 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15190 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15193 ###################
15196 Link to image page- image page normally doesn't exists, hence edit link
15197 Add test with existing image page
15198 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15202 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15207 T20784 Link to non-existent image page with caption should use caption as link text
15209 [[:Image:test|caption]]
15211 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15216 Frameless image caption with a free URL
15218 [[File:Foobar.jpg|http://example.com]]
15220 <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>
15223 <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>
15227 Thumbnail image caption with a free URL
15231 [[File:Foobar.jpg|thumb|http://example.com]]
15233 <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>
15236 <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>
15240 Thumbnail image caption with a free URL and explicit alt
15243 parsoid=wt2html,wt2wt,html2html
15245 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15247 <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>
15250 <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>
15254 SVG thumbnails with no language set
15257 [[File:Foobar.svg|thumb|caption]]
15259 <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>
15262 <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>
15266 SVG thumbnails with language de
15268 parsoid=wt2html,wt2wt,html2html
15270 [[File:Foobar.svg|thumb|caption|lang=de]]
15272 <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>
15275 <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>
15279 SVG thumbnails with invalid language code
15281 parsoid=wt2html,wt2wt,html2html
15283 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15285 <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>
15288 <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>
15292 T3887: A ISBN with a thumbnail
15294 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15296 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
15299 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/1235467890" rel="mw:WikiLink">ISBN 1235467890</a></figcaption></figure>
15303 T3887: A RFC with a thumbnail
15305 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15307 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
15310 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is <a href="https://tools.ietf.org/html/rfc12354" rel="mw:ExtLink" class="external mw-magiclink">RFC 12354</a></figcaption></figure>
15314 T3887: A mailto link with a thumbnail
15316 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15318 <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>
15321 <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>
15324 # Pending resolution to T2368
15326 T2648: Frameless image caption with a link
15328 [[File:Foobar.jpg|text with a [[link]] in it]]
15330 <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>
15333 <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>
15337 T2648: Frameless image caption with a link (suffix)
15339 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15341 <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>
15344 <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>
15348 T2648: Frameless image caption with an interwiki link
15350 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15352 <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>
15355 <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>
15359 T2648: Frameless image caption with a piped interwiki link
15361 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15363 <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>
15366 <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>
15370 T107474: Frameless image caption with <nowiki>
15372 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15374 <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>
15378 Escape HTML special chars in image alt text
15380 [[File:Foobar.jpg|& < > "]]
15382 <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>
15385 <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>
15389 Escape HTML special chars in image alt text with LanguageConverter
15393 [[File:Foobar.jpg|& < > "]]
15395 <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>
15398 <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>
15402 Entities in file name and attributes
15404 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15406 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15409 <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>
15413 T2499: Alt text should have Ӓ, not &1234;
15415 [[File:Foobar.jpg|♀]]
15417 <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>
15420 <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>
15424 Broken image caption with link
15426 parsoid=wt2html,wt2wt,html2html
15428 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15430 <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.
15433 <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>
15437 Image caption containing another image
15439 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15441 <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>
15444 <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>
15448 Image: caption containing a newline
15450 [[File:Foobar.jpg|This
15453 <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>
15456 <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>
15460 Image: caption containing leading space
15461 (The leading space should not trigger nowiki escaping in wt2wt mode)
15463 [[File:Foobar.jpg|thumb| bar]]
15465 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" 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>
15468 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> bar</figcaption></figure>
15471 # html/php output not have newlines after table, td, th, etc. because
15472 # Linker::makeThumbLink2() replaces the newlines with spaces since
15473 # the table is inside a caption.
15474 # FIXME: Verify if that circa 2004 fix is still required.
15476 Image: caption containing a table
15478 parsoid=wt2html,wt2wt,html2html
15480 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15486 and some more text.]]
15488 <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>
15491 <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
15494 <tr><th>Foo</th><th>Bar</th></tr>
15497 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15501 T5090: External links other than http: in image captions
15503 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15505 <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>
15508 <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>
15514 parsoid=wt2html,wt2wt,html2html
15516 [[Image:foobar.jpg|a|class=b]]
15518 <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>
15521 <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>
15525 Localized image handling (1).
15527 parsoid=wt2html,wt2wt,html2html
15530 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15532 <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>
15535 <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>
15539 Localized image handling (2).
15542 parsoid=wt2html,wt2wt,html2html
15545 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15547 <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>
15550 <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>
15554 Localized image handling (3).
15559 <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>
15561 [[File:Foobar.jpg|بندانگشتی]]
15565 "border", "frameless" and "class" attributes on an image.
15568 parsoid=wt2html,wt2wt,html2html
15570 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15572 <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>
15575 <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>
15578 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15580 Invalid image attributes (T64500)
15583 parsoid=wt2html,wt2wt,html2html
15585 [[File:Foobar.jpg|thumb|float|left|caption]]
15587 [[File:Foobar.jpg|thumb|righ|caption]]
15589 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15591 <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>
15592 <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>
15593 <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>
15596 <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>
15597 <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>
15598 <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>
15604 #REDIRECT [[File:Barfoo.jpg]]
15607 # FIXME: Parsoid should run this test -- but we'd need to teach the
15608 # mockAPI about the redirected Barfoo.jpg image.
15612 [[Image:Barfoo.jpg]]
15614 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15619 Missing image with uploads disabled
15623 [[File:Foobaz.jpg]]
15625 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15628 <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>
15631 # Parsoid-specific testing for images
15632 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15633 # Currently imperfect due to a flaw in the Parsoid testrunner
15635 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15639 Parsoid-specific image handling - simple image with size and middle alignment
15641 [[File:Foobar.jpg|middle|50px]]
15643 <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>
15647 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
15649 parsoid=wt2wt,wt2html,html2html
15651 [[Image:Foobar.jpg|middle|50px]]
15653 <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>
15657 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
15659 [[File:Foobar.jpg|50px|middle]]
15661 <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>
15665 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
15667 parsoid=wt2html,wt2wt,html2html
15669 [[Image:Foobar.jpg|50px|middle]]
15671 <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>
15675 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15677 [[File:Foobar.jpg|500x10px|baseline|caption]]
15679 <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>
15683 Parsoid-specific image handling - simple image with border and size spec
15685 [[File:Foobar.jpg|50px|border|caption]]
15687 <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>
15691 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15693 parsoid=wt2html,html2html
15695 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15697 <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>
15701 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
15703 parsoid=wt2html,html2html
15705 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15707 <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>
15711 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15713 parsoid=wt2html,html2html
15715 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15717 <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>
15721 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
15723 parsoid=wt2html,html2html
15725 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15727 <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>
15731 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
15733 parsoid=wt2html,wt2wt,html2html
15735 [[File:Foobar.jpg|frame|500x50px|caption]]
15737 <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>
15741 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
15743 parsoid=wt2html,html2html
15745 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15747 <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>
15751 Parsoid-specific image handling - frameless image with specific size, border, and caption
15753 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15755 <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>
15759 Parsoid-specific image handling - simple image with a formatted caption
15761 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15763 <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>
15767 Parsoid-specific image handling - caption with a template in it
15769 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15771 <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>
15775 Parsoid-specific image handling - caption with unbalanced tags in it
15777 parsoid=wt2html,wt2wt,html2html
15780 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15784 <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>
15789 Parsoid-specific image handling - empty caption (1)
15791 parsoid=wt2html,wt2wt
15793 [[File:Foobar.jpg|thumb|]]
15795 <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>
15798 # empty captions don't get serialized unless we're in the "round trip" case
15800 Parsoid-specific image handling - empty caption (2)
15804 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15805 <a href="./File:Foobar.jpg">
15806 <img resource="./File:Foobar.jpg"
15807 src="//example.com/images/3/3a/Foobar.jpg"
15808 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15809 height="25" width="220"/>
15811 <figcaption></figcaption>
15814 [[File:Foobar.jpg|thumb]]
15818 Parsoid-specific image handling - whitespace caption
15820 [[File:Foobar.jpg|thumb| ]]
15822 <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>
15826 Parsoid-specific image handling - lang option
15829 [[File:Foobar.svg|lang=de|caption]]
15833 <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>
15837 ## Edge case bugs in Parsoid from T93580
15839 T93580: 1. Templated <ref> inside block images
15841 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15845 <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>
15847 <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>
15851 T93580: 2. <ref> inside inline images
15853 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15857 <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>
15859 <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>
15863 T93580: 3. Templated <ref> inside inline images
15865 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15869 <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>
15871 <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>
15878 Subpage test/subpage
15886 subpage title=[[Subpage test]]
15890 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15895 Subpage noslash link
15897 subpage title=[[Subpage test]]
15901 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15906 Subpage test/1/2/subpage
15912 Relative subpage noslash link
15914 parsoid=wt2wt,wt2html,html2html
15915 subpage title=[[Subpage test/1/2/3/4]]
15921 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15922 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15925 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15926 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15930 Parsoid: dot-slash prefixed wikilinks
15940 </p><p>[[././baz/]]
15945 </p><p>[[././baz/]]
15950 Render invalid page names as plain text (T53090)
15962 [[foo[http://example.com]xyz]]
15964 [[{{echo|./../foo}}|bar]]
15965 [[{{echo|foo/.}}|bar]]
15966 [[{{echo|foo/..}}|bar]]
15967 [[{{echo|foo~~~~bar}}]]
15968 [[{{echo|foo>bar}}]]
15969 [[{{echo|foo././bar}}]]
15970 [[{{echo|foo{bar}}]]
15971 [[{{echo|foo}bar}}]]
15972 [[{{echo|foo[bar}}]]
15973 [[{{echo|foo]bar}}]]
15974 [[{{echo|foo<bar}}]]
15976 <p>[[./../foo|bar]]
15986 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15987 </p><p>[[./../foo|bar]]
16000 <p>[[./../foo|bar]]
16010 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16012 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16013 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16014 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16015 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16016 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16017 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16018 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16019 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16020 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16021 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16022 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<bar"}},"i":0}}]}'>foo<bar</span>]]</p>
16030 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16035 T2561: {{/Subpage}}
16037 subpage title=[[Page]]
16041 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16049 Category:MediaWiki User's Guide
16057 [[:Category:MediaWiki User's Guide]]
16059 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16068 [[Category:MediaWiki User's Guide]]
16070 cat=MediaWiki_User's_Guide sort=
16072 <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"}}'/>
16076 PAGESINCATEGORY invalid title fatal (r33546 fix)
16078 {{PAGESINCATEGORY:<bogus>}}
16085 Category with different sort key
16089 [[Category:MediaWiki User's Guide|Foo]]
16091 cat=MediaWiki_User's_Guide sort=Foo
16093 <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"}}'/>
16097 Category with identical sort key
16101 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16103 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16105 <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"}}'/>
16109 Category with empty sort key
16114 [[Category:MediaWiki User's Guide|]]
16116 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16120 Category with empty sort key and parentheses
16125 [[Category:Foo (bar)|]]
16127 [[Category:Foo (bar)|Foo]]
16131 Category with link tail
16136 123[[Category:Foo]]456
16138 123[[Category:Foo]]456
16142 Category with template
16147 [[Category:{{echo|Foo}}]]
16149 [[Category:{{echo|Foo}}]]
16153 Category with template in sort key
16158 [[Category:Foo|{{echo|Bar}}]]
16160 [[Category:Foo|{{echo|Bar}}]]
16164 Category with template in sort key and title
16169 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16171 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16174 ## We used to, but no longer wt2wt this test since the default serializer
16175 ## will normalize all categories to serialize on their own line.
16176 ## This wikitext usage is going to be fairly uncommon in production and
16177 ## selser will take care of preserving formatting in those scenarios.
16179 Category / paragraph interactions
16183 Foo [[Category:Baz]] Bar
16185 Foo [[Category:Baz]]
16193 [[Category:Baz]] Bar
16206 {{echo|[[Category:Baz]]}}
16219 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16220 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16221 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16222 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16223 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16224 <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}}]}'/>
16225 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16228 ## We used to, but no longer wt2wt this test since the default serializer
16229 ## will normalize all categories to serialize on their own line.
16230 ## This wikitext usage is going to be fairly uncommon in production and
16231 ## selser will take care of preserving formatting in those scenarios.
16233 ## The whitespace on the empty line is part of the test. Please do not delete
16235 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16241 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16243 {{echo|[[Category:Foo]] and so should this!}}
16245 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16250 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16252 <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>
16255 ## Parsoid will not try to wt2wt this while preserving newlines because
16256 ## it suppresses excess newlines within list items -- and we don't want to
16257 ## introduce a special case just for categories, which is, in reality somewhat
16258 ## odd behavior -- categories are unlikely to be used in list items like this
16259 ## in top-level pages and are only likely to show up in template-generated
16260 ## list items where this RT-ing is a non-issue.
16262 ## The whitespace on the empty line is part of the test. Please do not delete
16264 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16270 [[Category:Foo]] and this should be part of the same list item
16273 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16275 <ul><li>This and this should be part of the same list item</li>
16276 <li>So should this and this should be part of the same list item</li></ul>
16279 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16280 <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>
16284 ## Newlines and categories that follow the last item of a list
16285 ## are treated differently because this (list followed by categories)
16286 ## is an extremely common pattern on wikis.
16288 3. Categories and newlines: newline suppression for last list item should RT properly
16309 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16311 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16312 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16314 <dl><dd>c</dd></dl>
16316 <link rel="mw:PageProp/Category" href="./Category:C"/>
16318 <dl><dt>d</dt></dl>
16320 <link rel="mw:PageProp/Category" href="./Category:D"/>
16324 4. Categories and newlines: newline suppression for last list item should RT properly
16332 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16334 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16337 ## only wt2html for this to make sure the algo only applies to the rightmost path
16339 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16352 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16354 <ul><li>d</li></ul></li></ul>
16355 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16358 ## We used to, but no longer wt2wt this test since the default serializer
16359 ## will normalize all categories to serialize on their own line.
16360 ## This wikitext usage is going to be fairly uncommon in production and
16361 ## selser will take care of preserving formatting in those scenarios.
16363 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16367 *a [[Category:Foo]]
16369 <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>
16372 # This test also demonstrates because of newline+category tunneling
16373 # through the list hander, template wrapping doesn't expand to the
16374 # containing list when the list item swallows the category.
16376 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16381 <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
16382 </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>
16386 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16390 {{echo|[[Category:Foo]]
16394 <ul><li>a</li></ul>
16396 <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">
16397 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16398 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16402 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16406 [[Category:Bar]]<!--boo1--> <!--boo2-->
16407 [[Category:Baz]]<!--boo3--> <!--boo4-->
16409 <ul><li>a</li></ul>
16411 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16412 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16416 Categories and newlines: should behave properly with linkprefix (T87753)
16431 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16432 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16436 No regressions on internal links following category (T174639)
16438 parsoid=wt2html,html2html
16440 [[Category:Foo]]<div>a
16445 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16448 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16450 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16453 # Note that Parsoid differs slightly from PHP due to T175421
16455 11. Special case where only newlines separate links (T175416)
16457 parsoid=wt2html,html2html
16461 [[Foo]][[es:Alimento]]
16466 <a href="/wiki/Foo" title="Foo">Foo</a>
16467 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16470 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16472 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16474 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16478 Category links with multiple namespaces
16480 [[Category:Project:Foo]]
16482 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16486 Parsoid: Serialize link to category page with colon escape
16492 [[:Category:Foo|Bar]]
16495 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16496 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16500 # We used to, but no longer wt2wt this test since the default serializer
16501 # will normalize all categories to serialize on their own line.
16502 # This wikitext usage is going to be fairly uncommon in production and
16503 # selser will take care of preventing whitespace insertion if this
16504 # occurs in an article.
16506 # html2html disabled for the same reason (whitespace insertion between
16509 # html2wt disabled because it localizes the "Category" namespace.
16511 Link prefix/suffixes aren't applied to category links
16521 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16525 Link prefix/suffixes aren't applied to language links
16535 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16539 Parsoid: Serialize link to file page with colon escape
16545 [[:File:Foo.png|Bar]]
16548 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16549 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16554 Parsoid: Serialize a genuine category link without colon escape
16559 [[Category:Foo|Bar]]
16561 <link rel="mw:PageProp/Category" href="./Category:Foo">
16562 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16566 Normalize hrefs properly before testing for invalid link targets (T72894)
16570 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16572 [[Category:Toxine bactérienne]]
16576 Parsoid: Defaultsort
16578 {{DEFAULTSORT:Foo}}
16580 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16583 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16584 # But, this is a limitation of our representation and is documented in
16585 # TemplateHandler.js in processSpecialMagicWord
16587 Parsoid: Defaultsort (template-generated)
16589 {{{{echo|DEFAULTSORT}}:Foo}}
16591 <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"}]]}'/>
16595 ### Inter-language links
16598 Interlanguage links
16606 es:Alimento fr:Nourriture zh:食品
16608 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16609 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16610 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16614 Duplicate interlanguage links (T26502)
16625 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16626 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16627 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16628 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16635 Basic section headings
16642 ===Smaller headline===
16645 <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>
16648 <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>
16651 <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>
16657 Section headings with TOC
16660 ===Subheadline 1===
16661 =====Skipping a level=====
16662 ======Skipping a level======
16666 ===Another headline===
16668 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16670 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16672 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16674 <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>
16676 <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>
16683 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16685 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16691 <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>
16692 <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>
16693 <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>
16694 <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>
16695 <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>
16698 <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>
16703 TOC anchors don't collide
16711 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16713 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16714 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16715 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16716 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16720 <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>
16721 <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>
16722 <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>
16723 <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>
16727 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16728 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16730 Handling of sections up to level 6 and beyond
16735 ==Level 2 Heading==
16736 ===Level 3 Heading===
16737 ====Level 4 Heading====
16738 =====Level 5 Heading=====
16739 ======Level 6 Heading======
16740 =======Level 7 Heading=======
16741 ========Level 8 Heading========
16742 =========Level 9 Heading=========
16743 ==========Level 10 Heading==========
16745 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16747 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16749 <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>
16751 <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>
16753 <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>
16755 <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>
16757 <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>
16758 <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>
16759 <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>
16760 <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>
16761 <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>
16775 <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>
16776 <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>
16777 <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>
16778 <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>
16779 <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>
16780 <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>
16781 <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>
16782 <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>
16783 <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>
16784 <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>
16787 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16788 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16789 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16790 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16791 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16792 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16793 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16794 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16795 <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>
16796 <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>
16800 TOC regression (T11764)
16804 ====title 1.1.1====
16809 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16811 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16813 <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>
16815 <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>
16818 <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>
16821 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16823 <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>
16829 <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>
16830 <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>
16831 <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>
16832 <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>
16833 <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>
16834 <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>
16839 TOC for heading containing <span id="..."></span> (T96153)
16842 ==<span id="old-anchor"></span>New title==
16844 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16846 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16850 <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>
16855 TOC with wgMaxTocLevel=3 (T8204)
16861 ====title 1.1.1====
16866 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16868 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16870 <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>
16871 <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>
16874 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16876 <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>
16882 <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>
16883 <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>
16884 <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>
16885 <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>
16886 <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>
16887 <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>
16892 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16898 ====Section 1.1.1====
16899 ====Section 1.1.1.1====
16902 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16904 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16906 <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>
16909 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16913 <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>
16914 <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>
16915 <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>
16916 <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>
16917 <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>
16923 Resolving duplicate section names
16928 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
16929 <h2><span class="mw-headline" id="Foo_bar_2">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
16934 Resolving duplicate section names with differing case (T12721)
16939 <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>
16940 <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>
16952 Template with sections, __NOTOC__
16959 <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>
16960 <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>
16961 <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>
16962 <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>
16967 __NOEDITSECTION__ keyword
16973 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16974 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16979 Link inside a section heading
16981 ==Section with a [[Main Page|link]] in it==
16983 <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>
16988 TOC regression (T14077)
16995 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16997 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16999 <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>
17002 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17006 <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>
17007 <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>
17008 <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>
17013 T3219 URL next to image (good)
17015 http://example.com [[File:Foobar.jpg]]
17017 <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>
17020 <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>
17023 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17025 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17027 parsoid=wt2html,html2html
17030 The line above must have a trailing space!
17033 But just in case it doesn't...
17035 <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>
17036 <p>The line above must have a trailing space!
17038 <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>
17039 <p>But just in case it doesn't...
17042 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17043 <p>The line above must have a trailing space!</p>
17044 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17046 <p>But just in case it doesn't...</p>
17050 Header with special characters (T27462)
17052 The tooltips shall not show entities to the user (ie. be double escaped)
17069 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17071 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17073 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17074 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17075 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17076 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17077 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17081 <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>
17084 <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>
17087 <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>
17090 <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>
17093 <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>
17097 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17099 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17102 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17105 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17108 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17111 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17116 Header with space, plus and underscore as entity
17118 Id should not contain + for spaces
17120 ==Space between Text==
17123 ==Space-Entity between Text==
17126 ==Plus+between+Text==
17129 ==Plus-Entity+between+Text==
17132 ==Underscore_between_Text==
17135 ==Underscore-Entity_between_Text==
17138 [[#Space between Text]]
17139 [[#Space-Entity between Text]]
17140 [[#Plus+between+Text]]
17141 [[#Plus-Entity+between+Text]]
17142 [[#Underscore_between_Text]]
17143 [[#Underscore-Entity_between_Text]]
17145 <p>Id should not contain + for spaces
17147 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17149 <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>
17150 <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>
17151 <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>
17152 <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>
17153 <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>
17154 <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>
17158 <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>
17161 <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>
17164 <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>
17167 <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>
17170 <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>
17173 <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>
17175 </p><p><a href="#Space_between_Text">#Space between Text</a>
17176 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17177 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17178 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17179 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17180 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17183 <p>Id should not contain + for spaces</p>
17185 <h2 id="Space_between_Text">Space between Text</h2>
17188 <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>
17191 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17194 <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>
17197 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17200 <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>
17203 <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>
17204 <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>
17205 <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>
17206 <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>
17207 <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>
17208 <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>
17211 # Parsoid html2wt disabled because it adds padding spaces around =
17213 Headers with excess '=' characters
17214 (Are similar tests necessary beyond the 1st level?)
17216 parsoid=wt2html,wt2wt,html2html
17220 =''italic'' heading==
17221 ==''italic'' heading=
17223 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17225 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17226 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17227 <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>
17228 <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>
17232 <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>
17233 <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>
17234 <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>
17235 <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>
17238 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17239 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17240 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17241 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17245 HTML headers vs TOC (T25393)
17246 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17258 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17260 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17262 <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>
17263 <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>
17266 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17268 <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>
17269 <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>
17275 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17276 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17277 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17278 <h1><span class="mw-headline" id="Header_2">Header 2
17280 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17281 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17284 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17285 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17286 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17288 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17290 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17291 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17292 <meta property="mw:PageProp/noeditsection"/>
17296 Single-line or multiline-comments can follow headings
17298 parsoid=wt2html,wt2wt
17306 <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>
17307 <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>
17308 <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>
17311 <h2 id="foo">foo</h2><!---->
17312 <h2 id="bar">bar</h2><!--c1-->
17313 <h2 id="baz">baz</h2><!--
17319 T3219 URL next to image (broken)
17321 http://example.com[[File:Foobar.jpg]]
17323 <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>
17326 <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>
17330 T3186 news: in the middle of text
17332 http://en.wikinews.org/wiki/Wikinews:Workplace
17334 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17340 Namespaced link must have a title
17349 Namespaced link must have a title (bad fragment version)
17351 [[Project:#fragment]]
17353 <p>[[Project:#fragment]]
17359 ### HTML tags and HTML attributes
17363 div with no attributes
17365 <div>HTML rocks</div>
17367 <div>HTML rocks</div>
17372 div with double-quoted attribute
17374 <div id="rock">HTML rocks</div>
17376 <div id="rock">HTML rocks</div>
17381 div with single-quoted attribute
17383 <div id='rock'>HTML rocks</div>
17385 <div id="rock">HTML rocks</div>
17390 div with unquoted attribute
17392 <div id=rock>HTML rocks</div>
17394 <div id="rock">HTML rocks</div>
17399 div with illegal double attributes
17401 <div id="a" id="b">HTML rocks</div>
17403 <div id="b">HTML rocks</div>
17408 div with empty attribute value, space before equals
17410 parsoid=wt2html,html2html
17412 <div class =>HTML rocks</div>
17414 <div class="">HTML rocks</div>
17417 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17421 div with multiple empty attribute values
17423 wgFragmentMode=[ 'html5', 'legacy' ]
17425 parsoid=wt2html,html2html
17427 <div id= title=>HTML rocks</div>
17429 <div id="title=">HTML rocks</div>
17432 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17435 # FIXME Parsoid doesn't actually match PHP here.
17436 # Probably we should use the synthetic <foo /> or <indicator>
17437 # extensions for this test, which are enabled when running parser tests.
17439 Extension tag in attribute value
17441 <span title="<translate>123</translate>">ok</span>
17442 !! html/php+disabled
17443 <p><span title="<translate>123</translate>">ok</span>
17446 <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>
17450 table with multiple empty attribute values
17452 parsoid=wt2html,html2html
17458 <table title="id=">
17464 <table title="id=">
17465 <tbody><tr><td>hi</td></tr>
17470 div with braces in attribute value
17472 <div title="{}">Foo</div>
17474 <div title="{}">Foo</div>
17477 <div title="{}">Foo</div>
17481 div with empty attribute value, no space before equals
17483 parsoid=wt2html,html2html
17485 <div class=>HTML rocks</div>
17487 <div class="">HTML rocks</div>
17490 <div class="">HTML rocks</div>
17494 HTML multiple attributes correction
17496 <p class="error" class="awesome">Awesome!</p>
17498 <p class="awesome">Awesome!</p>
17503 Table multiple attributes correction
17506 !+ class="error" class="awesome"|status
17511 <th class="awesome">status
17519 <DIV ID="x">HTML ROCKS</DIV>
17521 <div id="x">HTML ROCKS</div>
17526 Non-ASCII pseudo-tags are rendered as text
17535 Pseudo-tag with URL 'name' renders as url link
17537 <http://example.com/>
17539 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17544 text with amp in the middle of nowhere
17548 <p>Remember AT&T?
17553 text with character entity: eacute
17555 I always thought é was a cute letter.
17557 <p>I always thought é was a cute letter.
17562 text with entity-escaped character entity-like string: eacute
17564 I always thought &eacute; was a cute letter.
17566 <p>I always thought &eacute; was a cute letter.
17571 text with undefined character entity: xacute
17573 I always thought &xacute; was a cute letter.
17575 <p>I always thought &xacute; was a cute letter.
17582 <data value="5">five</data>
17583 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17584 <mark>This highlighted text</mark>
17586 <p><data value="5">five</data>
17587 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17588 <mark>This highlighted text</mark>
17593 HTML tag with leading space is parsed as text
17597 <p>< div>foo< /div>
17601 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17602 ## the HTML5 parsing spec.
17604 Element with broken attribute syntax
17608 <div style=" style="123">hi</div>
17611 <div style="123">hi</div>
17615 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17616 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17620 ### Nesting tests (see T43545, T52604, T53081)
17623 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17624 # Note that html2wt is considerably more difficult if we use <b> in
17625 # the test case, instead of <small>
17627 Ensure that HTML adoption agency algorithm is properly implemented.
17629 <small>X<small>Y</small>Z</small>
17631 <p><small>X<small>Y</small>Z</small>
17635 # This was T43545 in the PHP parser.
17639 <kbd>X<kbd>Y</kbd>Z</kbd>
17641 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17645 # The following cases were T53081 in the PHP parser.
17646 # Note that there are some other nestable tags (b, i, etc) which are
17647 # not covered; see T53081 for discussion.
17652 <em>X<em>Y</em>Z</em>
17654 <p><em>X<em>Y</em>Z</em>
17659 Nesting of <strong>
17661 <strong>X<strong>Y</strong>Z</strong>
17663 <p><strong>X<strong>Y</strong>Z</strong>
17672 <p><q>X<q>Y</q>Z</q>
17679 <ruby>X<ruby>Y</ruby>Z</ruby>
17681 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17688 <bdo>X<bdo>Y</bdo>Z</bdo>
17690 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17702 [[Media:Foobar.jpg]]
17703 [[Media:Video.ogv]]
17704 [[:Media:Video.ogv]]
17706 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17707 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17708 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17711 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17712 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17713 <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>
17717 Media link with text
17719 [[Media:Foobar.jpg|A neat file to look at]]
17721 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17724 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17727 # FIXME: this is still bad HTML tag nesting
17728 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17729 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17731 Media link with nasty text
17733 parsoid=wt2html,html2html
17735 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17737 <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>
17740 <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>
17742 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Safe Link</a></p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg"><div style="display:none" data-parsoid='{"stx":"html"}'>" onmouseover="alert(document.cookie)" onfoo="</div></a>
17746 Media link to nonexistent file (T3702)
17748 [[Media:No such.jpg]]
17749 [[Media:No_such file.jpg]]
17751 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17752 <a href="/index.php?title=Special:Upload&wpDestFile=No_such_file.jpg" class="new" title="No such file.jpg">Media:No_such file.jpg</a>
17755 <p><a rel="mw:MediaLink" href="./Special:FilePath/No_such.jpg" title="No such.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"fileName":"No_such.jpg"},"sa":{"fileName":"No such.jpg"}}'>Media:No such.jpg</a>
17756 <a rel="mw:MediaLink" href="./Special:FilePath/No_such_file.jpg" title="No such file.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"fileName":"No_such_file.jpg"},"sa":{"fileName":"No_such file.jpg"}}'>Media:No_such file.jpg</a></p>
17760 Image link to nonexistent file (T3850 - good)
17762 [[File:No_such.jpg]]
17764 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17767 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:No_such.jpg"><img resource="./File:No_such.jpg" src="./Special:FilePath/No_such.jpg" height="220" width="220"/></a></figure-inline></p>
17771 :Image link to nonexistent file (T3850 - bad)
17773 [[:Image:No such.jpg]]
17775 <p><a href="/index.php?title=File:No_such.jpg&action=edit&redlink=1" class="new" title="File:No such.jpg (page does not exist)">Image:No such.jpg</a>
17778 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17782 Character reference normalization in link text (T3938)
17784 [[Main Page|this&that]]
17786 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17793 Test for unicode normalization
17795 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17799 (T21451) Links should refer to the normalized form.
17807 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17808 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17809 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17810 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17811 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17816 Empty attribute crash test (T4067)
17818 <font color="">foo</font>
17820 <p><font color="">foo</font>
17825 Empty attribute crash test single-quotes (T4067)
17827 <font color=''>foo</font>
17829 <p><font color="">foo</font>
17834 Attribute test: equals, then nothing
17836 parsoid=wt2html,html2html
17838 <font color=>foo</font>
17840 <p><font color="">foo</font>
17843 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17847 Attribute test: unquoted value
17849 parsoid=wt2html,html2html
17851 <font color=x>foo</font>
17853 <p><font color="x">foo</font>
17856 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17860 Attribute test: unquoted but illegal value (hash)
17862 <font color=#x>foo</font>
17864 <p><font color="#x">foo</font>
17868 # Parsoid does not serialize to empty attribute syntax,
17869 # so wt2wt and html2wt cases are skipped
17871 Attribute test: no value (T54330)
17873 parsoid=wt2html,html2html
17875 <font color>foo</font>
17877 <p><font color="">foo</font>
17880 <p><font color="">foo</font></p>
17884 T4095: link with three closing brackets
17888 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17891 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17895 T4095: link with pipe and three closing brackets
17897 [[Main Page|link]]]
17899 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17902 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17906 T4095: link with pipe and three closing brackets, version 2
17908 [[Main Page|[http://example.com/]]]
17910 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17913 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17922 Template:Dangerous attribute
17924 " onmouseover="alert(document.cookie)
17928 Template:Dangerous style attribute
17930 border-size: expression(alert(document.cookie))
17936 <div style="float: right; {{{1}}}">Magic div</div>
17940 T4304: HTML attribute safety (safe template; regression T4309)
17942 <div title="{{test}}"></div>
17944 <div title="This is a test template"></div>
17947 <div title="This is a test template" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"This is a test template"},"sa":{"title":"{{test}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,20,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"test\",\"href\":\"./Template:Test\"},\"params\":{},\"i\":0}}]}'>This is a test template</span>"}]]}'></div>
17950 # Parsoid has enough context to handle this case
17952 T4304: HTML attribute safety (dangerous template; 2309)
17954 <div title="{{dangerous attribute}}"></div>
17956 <div title=""></div>
17959 <div title='" onmouseover="alert(document.cookie)' about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"\" onmouseover=\"alert(document.cookie)"},"sa":{"title":"{{dangerous attribute}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,35,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous attribute\",\"href\":\"./Template:Dangerous_attribute\"},\"params\":{},\"i\":0}}]}'>\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
17963 T4304: HTML attribute safety (dangerous style template; 2309)
17965 <div style="{{dangerous style attribute}}"></div>
17967 <div style="/* insecure input */"></div>
17970 <div style="/* insecure input */" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"{{dangerous style attribute}}"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,41,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous style attribute\",\"href\":\"./Template:Dangerous_style_attribute\"},\"params\":{},\"i\":0}}]}'>border-size: expression(alert(document.cookie))</span>"}]]}'></div>
17974 T4304: HTML attribute safety (safe parameter; 2309)
17976 {{div style|width: 200px}}
17978 <div style="float: right; width: 200px">Magic div</div>
17981 <div style="float: right; width: 200px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"float: right; width: 200px"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: 200px"}},"i":0}}]}'>Magic div</div>
17985 T4304: HTML attribute safety (unsafe parameter; 2309)
17987 {{div style|width: expression(alert(document.cookie))}}
17989 <div style="/* insecure input */">Magic div</div>
17992 <div style="/* insecure input */" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: expression(alert(document.cookie))"}},"i":0}}]}'>Magic div</div>
17995 ## Parsoid output here differs; needs investigation.
17997 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17999 {{div style|"><script>alert(document.cookie)</script>}}
18001 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18005 ## Parsoid output here differs; needs investigation.
18007 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18009 {{div style|" ><script>alert(document.cookie)</script>}}
18011 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18016 T4304: HTML attribute safety (link)
18018 <div title="[[Main Page]]"></div>
18020 <div title="[[Main Page]]"></div>
18023 <div title="[[Main Page]]"></div>
18027 T4304: HTML attribute safety (italics)
18029 <div title="''foobar''"></div>
18031 <div title="''foobar''"></div>
18036 T4304: HTML attribute safety (bold)
18038 <div title="'''foobar'''"></div>
18040 <div title="'''foobar'''"></div>
18045 T4304: HTML attribute safety (ISBN)
18047 <div title="ISBN 1234567890"></div>
18049 <div title="ISBN 1234567890"></div>
18054 T4304: HTML attribute safety (RFC)
18056 <div title="RFC 1234"></div>
18058 <div title="RFC 1234"></div>
18063 T4304: HTML attribute safety (PMID)
18065 <div title="PMID 1234567890"></div>
18067 <div title="PMID 1234567890"></div>
18072 T4304: HTML attribute safety (web link)
18074 <div title="http://example.com/"></div>
18076 <div title="http://example.com/"></div>
18081 T4304: HTML attribute safety (named web link)
18083 <div title="[http://example.com/ link]"></div>
18085 <div title="[http://example.com/ link]"></div>
18088 <div title="[http://example.com/ link]"></div>
18092 T5244: HTML attribute safety (extension; safe)
18094 <div style="<nowiki>background:blue</nowiki>"></div>
18096 <div style="background:blue"></div>
18099 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18103 T5244: HTML attribute safety (extension; unsafe)
18105 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18107 <div style="/* insecure input */"></div>
18110 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18113 # More MSIE fun discovered by Tom Gilder
18116 MSIE CSS safety test: spurious slash
18118 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18120 <div style="/* insecure input */">evil</div>
18123 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18127 MSIE CSS safety test: hex code
18129 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18131 <div style="/* insecure input */">evil</div>
18134 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18138 MSIE CSS safety test: comment in url
18140 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18142 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18145 <div style="background-image:u rl(javascript:alert('boo'))" data-parsoid='{"stx":"html","a":{"style":"background-image:u rl(javascript:alert('boo'))"},"sa":{"style":"background-image:u/**/rl(javascript:alert('boo'))"}}'>evil</div>
18149 MSIE CSS safety test: comment in expression
18151 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18153 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18156 <div style="background-image:expres sion(alert('boo4'))" data-parsoid='{"stx":"html","a":{"style":"background-image:expres sion(alert('boo4'))"},"sa":{"style":"background-image:expres/**/sion(alert('boo4'))"}}'>evil4</div>
18160 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18162 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18164 <p style="/* invalid control char */">A</p>
18167 <p style="/* invalid control char */" data-parsoid='{"stx":"html","a":{"style":"/* invalid control char */"},"sa":{"style":"font-size: 100px; background-image:url\\b(https://www.google.com/images/srpr/logo6w.png)"}}'>A</p>
18171 MSIE 6 CSS safety test: Fullwidth (T57332)
18173 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18174 <div style="top:EXPRESSION(alert())">B</div>
18176 <p style="/* insecure input */">A</p>
18177 <div style="/* insecure input */">B</div>
18180 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18181 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18185 MSIE 6 CSS safety test: IPA extensions (T57332)
18187 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18188 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18190 <div style="/* insecure input */">A</div>
18191 <p style="/* insecure input */">B</p>
18194 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18195 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')"}}'>B</p>
18199 MSIE 6 CSS safety test: sup/sub script (T57332)
18201 <div style="background-image:url⁽javascript:alert())">A</div>
18202 <div style="background-image:url₍javascript:alert())">B</div>
18203 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18205 <div style="/* insecure input */">A</div>
18206 <div style="/* insecure input */">B</div>
18207 <p style="/* insecure input */">C</p>
18210 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18211 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18212 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18218 parsoid=wt2html,html2html
18221 title="data:text/html,<img src=1 onerror=alert(1)>"
18222 style="-o-link:attr(title);-o-link-source:current">X</div>
18224 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18227 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */" data-parsoid='{"stx":"html","a":{"title":"data:text/html,<img src=1 onerror=alert(1)>","style":"/* insecure input */"},"sa":{"title":"&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;","style":"-o-link:attr(title);-o-link-source:current"}}'>X</div>
18231 MSIE 6 CSS safety test: Repetition markers (T57332)
18233 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18234 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18235 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18236 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18237 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18238 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18239 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18241 <p style="/* insecure input */">A</p>
18242 <p style="/* insecure input */">B</p>
18243 <p style="/* insecure input */">C</p>
18244 <p style="/* insecure input */">D</p>
18245 <p style="/* insecure input */">E</p>
18246 <p style="/* insecure input */">F</p>
18247 <p style="/* insecure input */">G</p>
18250 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expres〱ion((title='XSSed'),'red')"}}'>A</p>
18251 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresゝion((title='XSSed'),'red')"}}'>B</p>
18252 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title='XSSed'),'red')"}}'>C</p>
18253 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresヽion((title='XSSed'),'red')"}}'>D</p>
18254 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹽion((title='XSSed'),'red')"}}'>E</p>
18255 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹼion((title='XSSed'),'red')"}}'>F</p>
18256 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title='XSSed'),'red')"}}'>G</p>
18260 Table attribute legitimate extension
18263 !+ style="<nowiki>color:blue</nowiki>"|status
18268 <th style="color:blue">status
18274 Table attribute safety
18277 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18282 <th style="/* insecure input */">status
18288 CSS line continuation 1
18290 <div style="background-image: u\ rl(test.jpg);"></div>
18292 <div style="/* insecure input */"></div>
18297 CSS line continuation 2
18299 <div style="background-image: u\ rl(test.jpg); "></div>
18301 <div style="/* invalid control char */"></div>
18312 Expansion of multi-line templates in attribute values (T8255)
18314 <div style="background: {{identity|#00FF00}}">-</div>
18316 <div style="background: #00FF00">-</div>
18321 Expansion of multi-line templates in attribute values (T8255 sanity check)
18323 <div style="background:
18326 <div style="background: #00FF00">-</div>
18329 <div style="background:
18334 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18336 <div style="background: #00FF00">-</div>
18338 <div style="background: #00FF00">-</div>
18343 Tags which are hidden from tidiers cannot pass through the Sanitizer
18345 <mw:toc><script>alert();</script></mw:toc>
18347 <p><mw:toc><script>alert();</script></mw:toc>
18352 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18356 Parser hook: empty input
18367 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18370 ## Don't expect parsoid to rt this form.
18372 Parser hook: empty input using terminated empty elements
18374 parsoid=wt2html,html2html
18385 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18389 Parser hook: empty input using terminated empty elements (space before)
18400 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18404 Parser hook: basic input
18415 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18418 ## Don't expect parsoid to rt this form.
18420 Parser hook: case insensitive
18422 parsoid=wt2html,html2html
18433 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18436 ## Don't expect parsoid to rt this form.
18438 Parser hook: case insensitive, redux
18440 parsoid=wt2html,html2html
18451 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18455 Parser hook: nested tags
18459 <tag><tag></tag></tag>
18471 </tag></pre><p></tag>
18474 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
18478 Parser hook: basic arguments
18480 <tag width="200" height="100" depth="50" square=""></tag>
18493 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18496 ## Don't expect parsoid to rt this form.
18498 Parser hook: basic arguments, variations
18500 parsoid=wt2html,html2html
18502 <tag width=200 height = "100" depth = '50' square></tag>
18515 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18519 Parser hook: argument containing a forward slash (T7344)
18521 <tag filename="/tmp/bla"></tag>
18526 'filename' => '/tmp/bla',
18531 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18534 ## Don't expect parsoid to rt this form.
18536 Parser hook: empty input using terminated empty elements (T4374)
18538 parsoid=wt2html,html2html
18550 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}'></pre><p>text</p>
18553 ## </tag> should be output literally since there is no matching tag that begins it
18554 ## Don't expect parsoid to rt this form.
18556 Parser hook: basic arguments using terminated empty elements (T4374)
18560 <tag width=200 height = "100" depth = '50' square/>
18577 <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
18581 ## Don't expect parsoid to rt this form.
18583 Parser hook: Don't allow unclosed extension tags
18589 this is a '''test'''
18591 <p>test <tag>123
18592 </p><p>this is a <b>test</b>
18595 <p>test <tag>123</p>
18597 <p>this is a <b>test</b></p>
18601 Parser hook: horizontal rule inside extension tag that outputs <pre>
18622 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18626 Parser hook: static parser hook not inside a comment
18628 <statictag>hello, world</statictag>
18630 <statictag action="flush" />
18636 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18637 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18641 Parser hook: static parser hook inside a comment
18643 <!-- <statictag>hello, world</statictag> -->
18644 <statictag action="flush" />
18649 <!-- <statictag>hello, world</statictag> -->
18650 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18653 # Nested template calls; this case was broken by Parser.php rev 1.506,
18657 Template:One-parameter
18659 (My parameter is: {{{1}}})
18663 Template:Map-one-parameter
18665 {{{{{1}}}|{{{2}}}}}
18669 Nested template calls
18671 {{Map-one-parameter|One-parameter|param}}
18673 <p>(My parameter is: param)
18683 Sanitizer: Closing of open tags
18685 <s></s><table></table>
18687 <p><s></s></p><table></table>
18689 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
18693 Sanitizer: Closing of open but not closed tags
18702 Sanitizer: Closing of closed but not open tags
18708 <p class="mw-empty-elt">
18713 Sanitizer: Closing of closed but not open table tags
18717 Table not started</td></tr></table>
18719 <p>Table not started
18724 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18726 wgFragmentMode=[ 'html5', 'legacy' ]
18728 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18730 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18733 <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>
18737 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18739 wgFragmentMode=[ 'legacy' ]
18741 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18743 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18747 # In HTML5, the restrictions are that id must contain at least one character,
18748 # and must not contain any space characters.
18750 Sanitizer: Validating the contents of the id attribute (T6515)
18754 <br id="" /><br id="a space" />
18759 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18761 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18765 <br id="foo" /><br id="foo" />
18767 Something need to be done. foo-2 ?
18771 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18774 <meta itemprop="hello" content="world">
18775 <meta http-equiv="refresh" content="5">
18776 <meta itemprop="hello" http-equiv="refresh" content="5">
18777 <link itemprop="hello" href="{{SERVER}}">
18778 <link rel="stylesheet" href="{{SERVER}}">
18779 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18783 <p> <meta itemprop="hello" content="world" />
18784 <meta http-equiv="refresh" content="5">
18785 <meta itemprop="hello" content="5" />
18786 <link itemprop="hello" href="http://example.org" />
18787 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18788 <link itemprop="hello" href="http://example.org" />
18795 Sanitizer: Strip comments from CSS attributes
18797 parsoid=wt2html,wt2wt
18799 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18801 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18804 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18808 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18810 [[meatball:Soft"Security]]
18812 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18815 <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>
18819 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18821 [[meatball:Foo<Bar]]
18822 [[meatball:Foo>Bar]]
18823 [[meatball:Foo<bar]]
18824 [[meatball:Foo>bar]]
18826 <p>[[meatball:Foo<Bar]]
18827 [[meatball:Foo>Bar]]
18828 [[meatball:Foo<bar]]
18829 [[meatball:Foo>bar]]
18832 <p>[[meatball:Foo<Bar]]
18833 [[meatball:Foo>Bar]]
18834 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18835 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18839 Language converter: output gets cut off unexpectedly (T7757)
18843 this bit is safe: }-
18845 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18847 then we get cut off here: }-
18849 all additional text is vanished
18851 <p>this bit is safe: }-
18852 </p><p>but if we add a conversion instance: xxx
18853 </p><p>then we get cut off here: }-
18854 </p><p>all additional text is vanished
18857 <p>this bit is safe: }-</p>
18858 <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>
18859 <p>then we get cut off here: }-</p>
18860 <p>all additional text is vanished</p>
18864 Language converter glossary rules inside attributes (T119158)
18866 language=sr variant=sr-el
18868 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18870 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18873 </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>
18876 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18878 <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>
18882 Self closed html pairs (T7487)
18884 <center><font id="bug" />Centered text</center>
18885 <div><font id="bug2" />In div text</div>
18887 <center><font id="bug"></font>Centered text</center>
18888 <div><font id="bug2"></font>In div text</div>
18892 Punctuation: nbsp before exclamation
18896 <p>C'est grave !
18901 Punctuation: CSS !important (T13874)
18903 <div style="width:50% !important">important</div>
18905 <div style="width:50% !important">important</div>
18910 Punctuation: CSS ! important (T13874; with space after)
18912 <div style="width:50% ! important">important</div>
18914 <div style="width:50% ! important">important</div>
18919 HTML bullet list, closed tags (T7497)
18932 <ul data-parsoid='{"stx":"html"}'>
18933 <li data-parsoid='{"stx":"html"}'>One</li>
18934 <li data-parsoid='{"stx":"html"}'>Two</li>
18940 HTML bullet list, unclosed tags (T7497)
18952 <ul data-parsoid='{"stx":"html"}'>
18953 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18954 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18960 HTML ordered list, closed tags (T7497)
18973 <ol data-parsoid='{"stx":"html"}'>
18974 <li data-parsoid='{"stx":"html"}'>One</li>
18975 <li data-parsoid='{"stx":"html"}'>Two</li>
18981 HTML ordered list, unclosed tags (T7497)
18994 <ol data-parsoid='{"stx":"html"}'>
18995 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18996 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19002 HTML nested bullet list, closed tags (T7497)
19025 <ul data-parsoid='{"stx":"html"}'>
19026 <li data-parsoid='{"stx":"html"}'>One</li>
19027 <li data-parsoid='{"stx":"html"}'>Two:
19028 <ul data-parsoid='{"stx":"html"}'>
19029 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19030 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19037 HTML nested bullet list, open tags (T7497)
19059 HTML nested ordered list, closed tags (T7497)
19084 HTML nested ordered list, open tags (T7497)
19121 HTML ordered list item with parameters oddity
19123 <ol><li id="fragment">One</li>
19126 <ol><li id="fragment">One</li>
19131 # parsoid doesn't explicitly mark autonumbered links, see T55505
19133 T7918: autonumbering
19135 [http://first/] [http://second] [ftp://ftp]
19139 [mailto:enclosed@mail.tld With target]
19141 [mailto:enclosed@mail.tld]
19143 mailto:inline@mail.tld
19145 <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>
19146 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19147 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19148 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19149 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19152 <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>
19153 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19154 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19155 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19156 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19161 # Security and HTML correctness
19162 # From Nick Jenkins' fuzz testing
19166 Fuzz testing: Parser13
19180 # Note that Parsoid output differs from the PHP parser here: the PHP
19181 # parser breaks the URL for the magic word, while in Parsoid the URL
19182 # production takes precedence.
19184 Fuzz testing: Parser14
19189 <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>
19190 http://<div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
19192 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19198 <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>
19199 http://</p><div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
19201 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19205 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19206 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19210 Fuzz testing: Parser14-table
19212 parsoid=wt2html,html2html
19217 <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>
19218 <table style="__TOC__">
19223 <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>
19224 <table style="__TOC__">
19231 <table style="__TOC__"></table>
19234 # Known to produce bogus xml (extra </td>)
19235 # Don't add the html/php section since it generates broken HTML
19237 Fuzz testing: Parser16
19254 Fuzz testing: Parser21
19257 !irc://{{ftp://a" onmouseover="alert('hello world');"
19262 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19272 Fuzz testing: Parser22
19274 http://===r:::https://b
19278 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19286 ## Remex doesn't account for fostered content.
19287 ## Known to produce bad XML for now
19289 Fuzz testing: Parser24
19296 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19297 <br style="onmouseover='alert(document.cookie);' " />
19299 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19304 <u class="|">}}}} >
19305 <br style="onmouseover='alert(document.cookie);'" />
19307 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19317 <u class="|">}}}} >
19318 <br style="onmouseover='alert(document.cookie);'" />
19320 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19321 </u><table><tbody><tr>
19325 </tbody></table><p><u class="|">
19328 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
19330 <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>"}'/>}}}} >
19331 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
19333 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
19334 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
19337 # Note: the current result listed for this is not what the original one was,
19338 # but the original bug was JavaScript injection, which is fixed in any case.
19339 # It's not clear that the original result listed was any more correct than the
19340 # current one. Original result:
19343 # <li class="||">
19344 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19346 Fuzz testing: Parser25 (T8055)
19352 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19354 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19357 <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"]}'>
19358 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19362 Fuzz testing: URL adjacent extension (with space, clean)
19364 http://example.com <nowiki>junk</nowiki>
19366 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19369 <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>
19373 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19375 http://example.com<nowiki>junk</nowiki>
19377 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19380 <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>
19384 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19386 http://example.com<pre>junk</pre>
19388 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19391 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19393 <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>
19397 Fuzz testing: image with bogus manual thumbnail
19399 [[Image:foobar.jpg|thumbnail= ]]
19401 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19404 <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>
19407 # Parsoid will emit the newline literally in wt2wt; see next test case.
19409 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19413 <pre dir=" "></pre>
19415 <pre dir=" "></pre>
19418 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19419 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19423 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19427 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19428 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19438 Templates in extension attributes are not expanded
19440 <pre dir="{{echo|ltr}}"></pre>
19442 <pre dir="{{echo|ltr}}"></pre>
19445 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19449 Parsing optional HTML elements (T8171)
19454 <td> Some tabular data</td>
19455 <td> More tabular data ...
19456 <td> And yet som tabular data</td>
19462 <td> Some tabular data</td>
19463 <td> More tabular data ...
19464 </td><td> And yet som tabular data</td>
19471 Correct handling of <td>, <tr> (T8171)
19476 <td> Some tabular data</td>
19477 <td> More tabular data ...</td>
19478 <td> And yet som tabular data</td>
19484 <td> Some tabular data</td>
19485 <td> More tabular data ...</td>
19486 <td> And yet som tabular data</td>
19494 Parsing crashing regression (fr:JavaScript)
19498 <p></body></x>
19503 Inline wiki vs wiki block nesting
19509 <p><b>Bold paragraph</b>
19510 </p><p>New wiki paragraph
19514 # FIXME: The current php output is documented
19515 # and desired output is the parsoid target.
19517 Inline HTML vs wiki block nesting
19523 <p><b>Bold paragraph
19524 </p><p>New wiki paragraph</b>
19527 <p><b>Bold paragraph
19528 </b></p><p><b>New wiki paragraph
19531 <p><b>Bold paragraph</b>
19532 </p><p>New wiki paragraph
19536 # Original result was this:
19537 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19539 # While that might be marginally more intuitive, maybe, the six-apostrophe
19540 # construct is clearly pathological and the result stated here (which is what
19541 # the parser actually does) is about as reasonable as anything.
19543 Mixing markup for italics and bold
19546 '''bold''''''bold''bolditalics'''''
19548 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19556 Article for special page transclusion test
19560 Special page transclusion
19563 {{Special:Prefixindex/Xyzzyx}}
19565 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19571 Special page transclusion twice (T7021)
19574 {{Special:Prefixindex/Xyzzyx}}
19575 {{Special:Prefixindex/Xyzzyx}}
19577 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19579 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19585 Transclusion of default MediaWiki message
19587 {{MediaWiki:Mainpage}}
19594 Transclusion of nonexistent MediaWiki message
19596 {{MediaWiki:Mainpagexxx}}
19598 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19603 Transclusion of MediaWiki message with underscore
19605 {{MediaWiki:history_short}}
19612 Transclusion of MediaWiki message with space
19614 {{MediaWiki:history short}}
19621 Invalid header with following text
19631 Section extraction test (section 0)
19651 Section extraction test (section 1)
19673 Section extraction test (section 2)
19694 Section extraction test (section 3)
19714 Section extraction test (section 4)
19738 Section extraction test (section 5)
19758 Section extraction test (section 6)
19779 Section extraction test (section 7)
19799 Section extraction test (section 8)
19819 Section extraction test (section 9)
19840 Section extraction test (section 10)
19860 Section extraction test (nonexistent section 11)
19879 Section extraction test with bogus heading (section 1)
19884 ==bogus== not a legal section
19888 ==bogus== not a legal section
19892 Section extraction test with bogus heading (section 2)
19897 ==bogus== not a legal section
19904 Section extraction test with comment after heading (section 1)
19916 Section extraction test with comment after heading (section 2)
19928 Section extraction test with bogus <nowiki> heading (section 1)
19933 ==bogus== <nowiki>not a legal section</nowiki>
19937 ==bogus== <nowiki>not a legal section</nowiki>
19941 Section extraction test with bogus <nowiki> heading (section 2)
19946 ==bogus== <nowiki>not a legal section</nowiki>
19952 # Formerly testing for T4587, now resolved by the use of unmarked sections
19953 # instead of respecting commented sections
19955 Section extraction prefixed by comment (section 1)
19966 Section extraction prefixed by comment (section 2)
19976 # Formerly testing for T4607, now resolved by the use of unmarked sections
19977 # instead of respecting HTML-style headings
19979 Section extraction, mixed wiki and html (section 1)
19995 Section extraction, mixed wiki and html (section 2)
20011 # Formerly testing for T5342
20013 Section extraction, heading surrounded by <noinclude>
20017 <noinclude>==unmarked==</noinclude>
20023 # Test behavior of T21910
20025 Sectiion with all-equals
20030 The line above must have a trailing space
20033 But just in case it doesn't...
20037 But just in case it doesn't...
20041 Section replacement test (section 0)
20072 Section replacement test (section 1)
20101 Section replacement test (section 2)
20131 Section replacement test (section 3)
20162 Section replacement test (section 4)
20189 Section replacement test (section 5)
20220 Section replacement test (section 6)
20250 Section replacement test (section 7)
20281 Section replacement test (section 8)
20312 Section replacement test (section 9)
20341 Section replacement test (section 10)
20371 Section replacement test with initial whitespace (T15728)
20375 Preformatted initial line
20379 Preformatted initial line
20386 Section extraction, heading followed by pre with 20 spaces (T8398)
20398 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20411 Section extraction, <pre> around bogus header (T12309)
20428 Section replacement, <pre> around bogus header (T12309)
20449 Handling of 
 in URLs
20453 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20456 <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>
20460 Handling of %0A in URLs
20464 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20467 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20470 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20472 5 quotes, code coverage +1 line
20479 <p><b><i></i></b></p>
20482 # same html as previous, but wikitext adjusted to match parsoid html2wt
20483 # note that wt2html and html2html will put the <i> before the <b>
20485 5 quotes, code coverage +1 line w/ nowiki (1)
20487 parsoid=wt2wt,html2wt
20489 '''''<nowiki/>'''''
20494 <p><b><i></i></b></p>
20497 # same as previous, just swapping the <i> and <b>
20499 5 quotes, code coverage +1 line w/ nowiki (2)
20501 '''''<nowiki/>'''''
20506 <p><i><b></b></i></p>
20510 Special:Search page linking.
20514 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20519 {{!}} is a magic word
20521 {{!}} is a magic word there and {{!}} is still a magic word here
20522 | is not a magic word here but {{!}} is still a magic word here
20524 <p>| is a magic word there and | is still a magic word here
20525 | is not a magic word here but | is still a magic word here
20528 <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
20529 | 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>
20535 title=[[Parser test]]
20549 *{{SUBJECTPAGENAME}}
20550 *{{SUBJECTPAGENAMEE}}
20553 *{{NAMESPACENUMBER}}
20558 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20560 <ul><li>Parser test</li>
20561 <li>Parser_test</li>
20562 <li>Parser test</li>
20563 <li>Parser_test</li>
20564 <li>Parser test</li>
20565 <li>Parser_test</li>
20566 <li>Parser test</li>
20567 <li>Parser_test</li>
20568 <li>Parser test</li>
20569 <li>Parser_test</li>
20570 <li>Talk:Parser test</li>
20571 <li>Talk:Parser_test</li>
20572 <li>Parser test</li>
20573 <li>Parser_test</li>
20581 <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>
20584 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20587 Gallery with valid attributes
20589 <gallery type="123" summary="345">
20590 File:File:Foobar.jpg
20593 <ul class="gallery mw-gallery-traditional" type="123">
20594 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20595 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20596 <div class="gallerytext">
20602 <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"}}'>
20603 <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>
20607 ## Parsoid thinks the "centre" here is a property, not a caption.
20612 "modes": ["wt2html"],
20613 "nativeGallery": true
20621 image4 |300px| centre
20622 image5.svg| http://///////
20627 <ul class="gallery mw-gallery-traditional">
20628 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20629 <div class="thumb" style="height: 150px;">Image1.png</div>
20630 <div class="gallerytext">
20633 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20634 <div class="thumb" style="height: 150px;">Image2.gif</div>
20635 <div class="gallerytext">
20638 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20639 <div class="thumb" style="height: 150px;">Image3</div>
20640 <div class="gallerytext">
20643 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20644 <div class="thumb" style="height: 150px;">Image4</div>
20645 <div class="gallerytext">
20650 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20651 <div class="thumb" style="height: 150px;">Image5.svg</div>
20652 <div class="gallerytext">
20653 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20657 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20658 <div class="thumb" style="height: 150px;">* image6</div>
20659 <div class="gallerytext">
20665 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20666 <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>
20667 <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>
20668 <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>
20669 <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>
20670 <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>
20671 <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>
20676 Gallery (with options, html)
20679 "modes": ["wt2html", "html2html"],
20680 "nativeGallery": true
20683 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20684 File:Nonexistent.jpg|caption
20685 File:Nonexistent.jpg
20686 image:foobar.jpg|some '''caption''' [[Main Page]]
20688 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20691 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20692 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20693 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20694 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20695 <div class="gallerytext">
20700 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20701 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20702 <div class="gallerytext">
20705 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20706 <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>
20707 <div class="gallerytext">
20708 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20712 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20713 <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>
20714 <div class="gallerytext">
20717 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20718 <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>
20719 <div class="gallerytext">
20727 <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":{}}'>
20728 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20729 <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>
20730 <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>
20731 <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>
20732 <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>
20733 <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>
20738 Gallery (with options, extsrc)
20741 "nativeGallery": false
20744 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20745 File:Nonexistent.jpg|caption
20746 File:Nonexistent.jpg
20747 image:foobar.jpg|some '''caption''' [[Main Page]]
20749 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20752 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20753 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20754 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20755 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20756 <div class="gallerytext">
20761 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20762 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20763 <div class="gallerytext">
20766 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20767 <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>
20768 <div class="gallerytext">
20769 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20773 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20774 <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>
20775 <div class="gallerytext">
20778 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20779 <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>
20780 <div class="gallerytext">
20788 <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"}}'>
20789 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20790 <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>
20791 <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>
20792 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
20793 <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>
20794 <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>
20799 Gallery (without px units)
20801 <gallery widths="70" heights="40">
20805 <ul class="gallery mw-gallery-traditional">
20806 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20807 <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>
20808 <div class="gallerytext">
20814 <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"}}'>
20815 <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>
20820 Gallery (with invalid units)
20822 <gallery widths="70em" heights="40em">
20826 <ul class="gallery mw-gallery-traditional">
20827 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20828 <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>
20829 <div class="gallerytext">
20835 <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"}}'>
20836 <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>
20841 Gallery with link that has fragment
20844 "modes": ["wt2html", "html2html"],
20845 "nativeGallery": true
20849 image:foobar.jpg|link=Main_Page
20850 image:foobar.jpg|link=Main_Page#section
20851 image:foobar.jpg|link=Main Page#section|caption
20854 <ul class="gallery mw-gallery-traditional">
20855 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20856 <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>
20857 <div class="gallerytext">
20860 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20861 <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>
20862 <div class="gallerytext">
20865 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20866 <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>
20867 <div class="gallerytext">
20875 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20876 <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>
20877 <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>
20878 <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>
20882 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20884 Gallery with template inside caption
20887 "nativeGallery": true
20890 <gallery caption="{{echo|hi}}">
20891 File:Foobar.jpg|{{echo|ho}}
20894 <ul class="gallery mw-gallery-traditional">
20895 <li class='gallerycaption'>{{echo|hi}}</li>
20896 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20897 <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>
20898 <div class="gallerytext">
20906 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20907 <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>
20908 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img 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>
20913 Gallery with wikitext inside caption
20916 "nativeGallery": true
20920 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20921 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20924 <ul class="gallery mw-gallery-traditional">
20925 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20926 <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>
20927 <div class="gallerytext">
20928 <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>
20932 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20933 <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>
20934 <div class="gallerytext">
20935 <p>This is a test template
20942 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20943 <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>
20944 <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>
20949 Gallery (with showfilename option)
20952 "nativeGallery": true
20955 <gallery showfilename="">
20956 File:Nonexistent.jpg|caption
20957 File:Nonexistent.jpg
20958 File:Foobar.jpg|some '''caption''' [[Main Page]]
20962 <ul class="gallery mw-gallery-traditional">
20963 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20964 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20965 <div class="gallerytext">
20966 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20971 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20972 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20973 <div class="gallerytext">
20974 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20978 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20979 <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>
20980 <div class="gallerytext">
20981 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20982 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20986 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20987 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
20988 <div class="gallerytext">
20989 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20996 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20997 <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>
20998 <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>
20999 <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>
21000 <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>
21004 ## Should Parsoid be preserving these variations? See T151367
21006 Gallery (with namespace-less filenames)
21009 "modes": ["wt2html", "html2html"],
21010 "nativeGallery": true
21014 File:Nonexistent.jpg
21020 <ul class="gallery mw-gallery-traditional">
21021 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21022 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21023 <div class="gallerytext">
21026 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21027 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21028 <div class="gallerytext">
21031 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21032 <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>
21033 <div class="gallerytext">
21036 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21037 <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>
21038 <div class="gallerytext">
21044 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21045 <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>
21046 <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>
21047 <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>
21048 <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>
21053 Gallery override link with wikilink (T36852)
21056 "nativeGallery": true
21060 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21063 <ul class="gallery mw-gallery-traditional">
21064 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21065 <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>
21066 <div class="gallerytext">
21072 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21073 <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>
21078 Gallery override link with absolute external link (T36852)
21081 "nativeGallery": true
21085 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21088 <ul class="gallery mw-gallery-traditional">
21089 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21090 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21091 <div class="gallerytext">
21097 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21098 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="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>
21103 Gallery override link with absolute external link with LanguageConverter
21108 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21111 <ul class="gallery mw-gallery-traditional">
21112 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21113 <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>
21114 <div class="gallerytext">
21122 <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"}}'>
21123 <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>
21128 Gallery override link with malicious javascript (T36852)
21131 "modes": ["wt2html", "html2html"],
21132 "nativeGallery": true
21136 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21139 <ul class="gallery mw-gallery-traditional">
21140 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21141 <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>
21142 <div class="gallerytext">
21148 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21149 <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>
21153 # Note that parsoid uses the invalid link as a caption, PHP does not.
21155 Gallery with invalid title as link (T45964)
21158 "modes": ["wt2html", "html2html"],
21159 "nativeGallery": true
21163 File:Foobar.jpg|link=<
21166 <ul class="gallery mw-gallery-traditional">
21167 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21168 <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>
21169 <div class="gallerytext">
21175 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21176 <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>
21181 Serialize gallery without attrs in data-mw
21184 "modes": ["html2wt"],
21185 "nativeGallery": true
21188 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21189 <li class="gallerycaption">123</li>
21190 <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>
21193 <gallery caption="123">
21199 Gallery with class and style attributes
21202 "nativeGallery": true
21205 <gallery class="center" style="text-align: center;">
21209 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21210 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21211 <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>
21212 <div class="gallerytext">
21218 <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":{}}'>
21219 <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>
21224 Gallery in slideshow mode
21227 "nativeGallery": true
21230 <gallery mode="slideshow" showthumbnails="">
21234 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21235 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21236 <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>
21237 <div class="gallerytext">
21243 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21244 <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>
21249 Serialize gallery image captions on a line
21252 "modes": ["html2wt"],
21253 "nativeGallery": true
21256 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21257 <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>
21258 <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>
21262 File:Foobar.jpg| hi ho
21263 File:Foobar.jpg|hi<br />ho
21268 HTML Hex character encoding (spells the word "JavaScript")
21270 parsoid=wt2html,wt2wt,html2html
21272 JavaScript
21274 <p>JavaScript
21277 <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>
21281 HTML Hex character encoding bogus encoding (T28437 regression check)
21285 <p>&#xsee;&#XSEE;
21290 HTML Hex character encoding mixed case
21292 parsoid=wt2html,wt2wt,html2html
21299 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21302 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21303 # Note that U+000C (form feed) is not a valid XML character, so
21304 # it is banned even though allowed in HTML5.
21306 Illegal character references (T106578)
21311 ; Control (low): 
21312 ; Control (high):  Ÿ
21313 ; Surrogate: ��
21314 ; This is an okay astral character: 💩
21322 <dt>Control (low)</dt>
21324 <dt>Control (high)</dt>
21325 <dd>&#x7F; &#x9F;</dd>
21327 <dd>&#xD83D;&#xDCA9;</dd>
21328 <dt>This is an okay astral character</dt>
21329 <dd>💩</dd></dl>
21333 __FORCETOC__ override
21345 ISBN 978-0-1234-56 789
21347 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21350 <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>
21354 ISBN followed by 5 spaces
21365 ISBN ISBN 1234567890
21367 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21370 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21373 # Uppercase X and lowercase x as well
21384 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21385 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21386 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21387 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21388 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21389 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21392 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21393 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21394 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21395 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21396 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21397 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21401 ISBN with empty prefix (parsoid test)
21405 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21408 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21412 T24905: <abbr> followed by ISBN followed by </a>
21414 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21416 <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>
21419 <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>
21427 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21430 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21434 Double RFC with a wiki link
21438 <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>
21441 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21449 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21452 <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>
21456 Centre-aligned image
21458 [[Image:foobar.jpg|centre]]
21460 <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>
21463 <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>
21469 [[Image:foobar.jpg|none]]
21471 <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>
21474 <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>
21478 Width + Height sized image (using px) (height is ignored)
21480 [[Image:foobar.jpg|640x480px]]
21482 <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>
21485 <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>
21489 Width-sized image (using px, no following whitespace)
21491 [[Image:foobar.jpg|640px]]
21493 <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>
21496 <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>
21500 Width-sized image (using px, with following whitespace - test regression from r39467)
21502 [[Image:foobar.jpg|640px ]]
21504 <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>
21507 <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>
21511 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21513 [[Image:foobar.jpg| 640px]]
21515 <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>
21518 <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>
21522 Image with page parameter
21526 [[File:LoremIpsum.djvu|page=2]]
21528 <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>
21531 <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>
21535 Another italics / bold test
21543 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21549 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21552 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21556 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21558 Images with the "|" character in the comment
21560 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21562 <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>
21565 <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>
21569 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21571 <html><script>alert(1);</script></html>
21573 <p><html><script>alert(1);</script></html>
21578 HTML with raw HTML ($wgRawHtml==true)
21582 <html><script>alert(1);</script></html>
21584 <p><script>alert(1);</script>
21589 Parents of subpages, one level up
21591 subpage title=[[Subpage test/L1/L2/L3]]
21595 <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>
21601 Parents of subpages, one level up, not named
21603 subpage title=[[Subpage test/L1/L2/L3]]
21607 <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>
21614 Parents of subpages, two levels up
21616 subpage title=[[Subpage test/L1/L2/L3]]
21622 <p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1</a>2
21623 </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>
21628 Parents of subpages, two levels up, without trailing slash or name.
21630 subpage title=[[Subpage test/L1/L2/L3]]
21639 Parents of subpages, two levels up, with lots of extra trailing slashes.
21641 subpage title=[[Subpage test/L1/L2/L3]]
21645 <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>
21650 Subpage test/L1/L2/L3Sibling
21656 Transclusion of a sibling page (one level up)
21658 subpage title=[[Subpage test/L1/L2/L3]]
21667 Transclusion of a child page
21669 subpage title=[[Subpage test/L1/L2]]
21677 # This is wt2html only in Parsoid because we add <nowiki>
21678 # because of {{..}} and we don't expect to fix that to
21679 # eliminate the nowikis selective for {{..}} markup.
21681 Non-transclusion because of too many up levels
21683 subpage title=[[Subpage test/L1/L2/L3]]
21686 {{../../../../More than parent}}
21688 <p>{{../../../../More than parent}}
21691 <p>{{../../../../More than parent}}</p>
21695 Definition list code coverage
21709 <dl><dt>title </dt><dd>def</dd>
21710 <dt>title </dt><dd>def</dd>
21711 <dt>title</dt><dd>def</dd></dl>
21715 Don't fall for the self-closing div
21717 <div>hello world</div/>
21719 <div>hello world</div>
21728 <p>[[:Template:Msg]]
21737 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21741 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21743 Always escape literal '>' in output, not just after '<'
21757 <p>This is a test template
21758 This is a test template
21770 Inclusion of !userCanEdit() content
21774 <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>
21780 Out-of-order TOC heading levels
21789 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
21791 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21793 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21794 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21797 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21799 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21800 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21806 <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>
21807 <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>
21808 <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>
21809 <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>
21810 <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>
21811 <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>
21817 ISBN with a dummy number
21827 ISBN with space-delimited number
21831 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21834 <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>
21839 ISBN with multiple spaces, no number
21858 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21859 </p><p>ISBN 12345678901
21862 <p>ISBN 123456789</p>
21864 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21866 <p>ISBN 12345678901</p>
21871 ISBN with trailing year (T9110)
21873 ISBN 1-234-56789-0 - 2006
21875 ISBN 1 234 56789 0 - 2006
21877 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21878 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21881 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21883 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21890 wgFragmentMode=[ 'html5', 'legacy' ]
21892 {{anchorencode:foo bar©#%n}}
21897 <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>
21901 anchorencode (legacy)
21903 wgFragmentMode=[ 'legacy' ]
21905 {{anchorencode:foo bar©#%n}}
21907 <p>foo_bar.C2.A9.23.25n
21912 anchorencode trims spaces
21914 wgFragmentMode=[ 'html5', 'legacy' ]
21916 {{anchorencode: __pretty__please__}}
21921 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21925 anchorencode deals with links
21927 wgFragmentMode=[ 'html5', 'legacy' ]
21929 {{anchorencode: [[hello|world]] [[hi]]}}
21934 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21938 anchorencode deals with templates
21940 wgFragmentMode=[ 'html5', 'legacy' ]
21942 {{anchorencode: {{Foo}} x}}
21947 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21951 anchorencode encodes like the TOC generator: (T20431)
21953 wgFragmentMode=[ 'html5', 'legacy' ]
21955 ===_ +:.3A%3A _ &&]] x===
21956 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21959 <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>
21960 <p>+:.3A%3A_&&]]_x
21963 <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>
21964 <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>
21965 <meta property="mw:PageProp/noeditsection"/>
21969 anchorencode encodes like the TOC generator: (T20431) (legacy)
21971 wgFragmentMode=[ 'legacy' ]
21973 ===_ +:.3A%3A&&]]===
21974 {{anchorencode: _ +:.3A%3A&&]] }}
21977 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21978 <p>.2B:.3A.253A.26.26.5D.5D
21983 T8200: blockquotes and paragraph formatting
22004 T10293: Use of center tag ruins paragraph formatting
22025 Parsing of overlapping (improperly nested) inline html tags
22027 <span><s>x</span></s>
22029 <p><span><s>x</span></s></span>
22032 <p><span><s>x</s></span>
22037 ### Language variants related tests
22040 # Parsoid does not mark self-links.
22041 # Parsoid does not convert links; PHP will do any necessary redirects.
22044 Self-link in language variants
22046 title=[[Dunav]] language=sr
22048 Both [[Dunav]] and [[Дунав]] are names for this river.
22050 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22053 <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>
22063 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22065 title=[[Duna]] language=sr
22067 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22069 <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.
22072 <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>
22076 Link to a section of a variant of this title shouldn't be parsed as self-link
22078 title=[[Duna]] language=sr
22080 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22082 <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.
22085 <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>
22089 Link to pages in language variants
22093 Main Page can be written as [[Маин Паге]]
22095 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22098 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22103 Multiple links to pages in language variants
22107 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22109 <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>.
22112 <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>
22117 Simple template in language variants
22123 <p>This is a test template
22129 Template with explicit namespace in language variants
22135 <p>This is a test template
22141 Basic test for template parameter in language variants
22145 {{парамтест|param=foo}}
22147 <p>This is a test template with parameter foo
22152 Simple category in language variants
22156 [[Category:МедиаWики Усер'с Гуиде]]
22158 cat=МедиаWики_Усер'с_Гуиде sort=
22160 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22175 ## We used to, but no longer wt2wt this test since the default serializer
22176 ## will normalize all categories to serialize on their own line.
22177 ## This wikitext usage is going to be fairly uncommon in production and
22178 ## selser will take care of preserving formatting in those scenarios.
22180 Don't convert blue categorylinks to another variant (T35210)
22186 [[A]][[Category:分类]]
22190 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22191 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22195 Stripping -{}- tags (language variants)
22199 Latin proverb: -{Ne nuntium necare}-
22201 <p>Latin proverb: Ne nuntium necare
22204 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22209 Prevent conversion with -{}- tags (language variants)
22211 language=sr variant=sr-ec
22213 Latinski: -{Ne nuntium necare}-
22215 <p>Латински: Ne nuntium necare
22218 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22223 Prevent conversion of text with -{}- tags (language variants)
22225 language=sr variant=sr-ec
22227 Latinski: -{Ne nuntium necare}-
22229 <p>Латински: Ne nuntium necare
22232 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22237 Prevent conversion of links with -{}- tags (language variants)
22239 language=sr variant=sr-ec
22243 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22246 <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>
22251 -{}- tags within headlines (within html for parserConvert())
22253 wgFragmentMode=[ 'html5', 'legacy' ]
22255 language=sr variant=sr-ec
22259 Note that even an unprotected headline ID is not affected by language
22264 <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>
22265 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22268 <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>
22271 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22273 <p>Note that even an unprotected headline ID is not affected by language
22276 <h2 id="Latinski">Latinski</h2>
22280 Explicit definition of language variant alternatives
22282 language=zh variant=zh-tw
22284 -{zh:China;zh-tw:Taiwan}-, not China
22286 <p>Taiwan, not China
22289 <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>
22293 Filter syntax for language variants
22295 language=zh variant=zh-tw
22297 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22299 <p>fooblog, WEBJOURNAL, WEBLOGquux
22302 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22305 # Note that Parsoid post-processing for language variants needs to
22306 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22308 Conversion around HTML tags
22310 language=sr variant=sr-ec
22312 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22313 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22316 <span title="ЛаCтин">ски</span>
22319 <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"}]}'/>
22320 <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>
22324 Explicit session-wise two-way language variant mapping (A flag and - flag)
22326 language=zh variant=zh-tw
22328 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22330 Taiwan is not China.
22332 But -{A|zh:China; zh-tw:Taiwan}- is China,
22334 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22336 and -{China}- is China.
22338 <p>This is Taiwan, but we'll forget that now.
22339 </p><p>Taiwan is not China.
22340 </p><p>But Taiwan is Taiwan,
22341 </p><p>(This should be stripped!)
22342 </p><p>and China is China.
22345 <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>
22346 <p>Taiwan is not China.</p>
22347 <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>
22348 <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>
22349 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22353 Explicit session-wise one-way language variant mapping (A flag and - flag)
22355 language=zh variant=zh-tw
22357 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22359 COUNTRY is China or Taiwan.
22361 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22363 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22365 and -{COUNTRY}- is COUNTRY.
22367 <p>This is Taiwan, but we'll forget that now.
22368 </p><p>COUNTRY is China or Taiwan.
22369 </p><p>But Taiwan is Taiwan,
22370 </p><p>(This should be stripped!)
22371 </p><p>and COUNTRY is COUNTRY.
22374 <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>
22375 <p>COUNTRY is China or Taiwan.</p>
22376 <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>
22377 <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>
22378 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22382 Explicit session-wise two-way language variant mapping (H flag for hide)
22384 language=zh variant=zh-tw
22386 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22390 <p>(This should be stripped!)
22391 </p><p>Taiwan is Taiwan.
22394 <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>
22395 <p>Taiwan is China.</p>
22399 Explicit session-wise one-way language variant mapping (H flag for hide)
22401 language=zh variant=zh-tw
22403 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22405 COUNTRY is Taiwan or China.
22407 <p>(This should be stripped!)
22408 </p><p>Taiwan is Taiwan or China.
22411 <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>
22412 <p>COUNTRY is Taiwan or China.</p>
22415 ## Note that parsoid test runner does not support 'showtitle' option.
22417 Adding explicit conversion rule for title (T flag)
22419 language=zh variant=zh-tw showtitle
22421 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22426 <p>Should be stripped!
22427 </p><p>Taiwan is China.
22430 <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>
22431 <p>Taiwan is China.</p>
22435 Code coverage: T combined with H flag
22437 language=zh variant=zh-tw showtitle
22439 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22444 <p>Should be stripped!
22445 </p><p>Taiwan is Taiwan.
22448 <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>
22449 <p>Taiwan is China.</p>
22453 Code coverage: T with no variants
22455 language=zh variant=zh-tw showtitle
22457 -{H|zh:China; zh-tw:Taiwan}-
22458 Taiwan is China.-{T|Taiwan is China}-
22465 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22466 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22470 Code coverage: rules with no variants
22472 language=zh variant=zh-tw
22474 -{H|zh:China; zh-tw:Taiwan}-
22485 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22487 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22488 Taiwan is China.</p>
22493 Code coverage: D flag for conversion rule
22495 language=zh variant=zh-tw
22497 -{D|zh-cn:XA; zh-tw:YA}-
22498 -{A;D|zh-cn:XB; zh-tw:YB}-
22499 -{D;H|zh-cn:XC; zh-tw:YC}-
22501 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22507 XA XB XC YA YB YC FOO BAR BAT 012345
22512 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22516 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22519 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22520 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22521 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22522 <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>
22523 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22524 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22525 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22526 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22530 Code coverage: N flag for conversion rule
22532 language=zh variant=zh-cn
22542 </p><p>српски (ћирилица)
22545 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22546 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22547 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22550 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22552 Code coverage: N flag for conversion rule (wt2html only)
22554 language=zh variant=zh-cn
22555 parsoid=wt2html,html2html
22562 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22566 Testing that changing the language variant here in the tests actually works
22568 language=zh variant=zh showtitle
22570 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22573 <p>Should be stripped!
22576 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22580 Recursive conversion of alt and title attrs shouldn't clear converter state
22582 language=zh variant=zh-cn
22585 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22586 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22590 Should be stripped<span title="Exclamation">!</span>
22593 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22594 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>
22598 T26072: more test on conversion rule for title
22600 language=zh variant=zh-tw showtitle
22602 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22604 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22607 <p>This should be stripped!
22608 </p><p>This won't take interferes with the title rule.
22611 <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>
22612 <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>
22616 Partly disable title conversion if variant == main language code
22618 language=zh variant=zh title=[[ZH]] showtitle
22620 -{T|zh-cn:CN;zh-tw:TW}-
22626 <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>
22630 Partly disable title conversion if variant == main language code, more
22632 language=zh variant=zh title=[[ZH]] showtitle
22640 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22644 Raw output of variant escape tags (R flag)
22646 language=zh variant=zh-tw
22648 Raw: -{R|zh:China;zh-tw:Taiwan}-
22650 <p>Raw: zh:China;zh-tw:Taiwan
22653 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22656 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22658 Raw output of variant escape tags (R flag) (wt2html only)
22660 language=zh variant=zh-tw
22661 parsoid=wt2html,html2html
22663 -{Variant}- -{D|syntax}- -{D;R|options}-
22665 <p>Variant syntax options
22668 <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>
22672 Nested markup inside raw output of variant escape tags (R flag)
22674 language=zh variant=zh-tw
22676 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22678 <p>Nested raw: nested Taiwan nested
22681 <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>
22685 Nested markup and spaces inside raw output of variant escape tags (R flag)
22687 language=zh variant=zh-tw
22689 X-{ outer -{ inner }- outer }-X
22691 <p>X outer inner outer X
22694 <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>
22698 Templates inside raw output of variant escape tags (R flag)
22700 language=zh variant=zh-tw
22702 Nested raw: -{R|nested {{echo|hi}} templates}-
22704 <p>Nested raw: nested hi templates
22707 <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>
22711 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22713 language=zh variant=zh-cn
22715 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22720 <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>
22724 Conversion rules from [numeric-only string] to [something else] (T48634)
22726 language=zh variant=zh-cn
22728 -{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
22733 <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>
22737 Two-way converter rule entries with an empty value should be ignored (T53551)
22739 language=zh variant=zh-cn
22741 -{H|zh-cn:foo;zh-tw:;}-foobar
22746 <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>
22750 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22752 language=zh variant=zh-cn
22754 -{H|=>zh-cn:foo;}-foobar
22759 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22763 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22765 language=zh variant=zh-cn
22772 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22776 Nested using of manual convert syntax
22778 language=zh variant=zh-hk
22780 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22782 <p>Nested: Hello Hong Kong!
22785 <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>
22789 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22791 language=zh variant=zh-cn
22793 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22795 <p><span title="X">A</span>
22798 <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>
22802 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22804 language=zh variant=zh-cn
22806 -{<span title="-{X}-">A</span>}-
22807 !! html/php+disabled
22808 <p><span title="X">A</span>
22811 <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>
22814 # Parsoid and PHP disagree on how to parse this example: Parsoid
22815 # insists that the content of a language converter element be a valid
22816 # DOM fragment or attribute string
22818 Language converter markup with block content
22820 language=zh variant=zh-cn
22822 <span>a-{b<div>c}-d
22824 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22826 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22831 </span></div></span></div></span>
22833 <span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<div typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[10,16,5,0]}'>c</div>"}}'></div>d
22835 <span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<div typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[50,56,5,0]}'>c</div>"}}'></div>d
22837 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"x<span data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[82,89,6,0]}'>y</span>"},{"f":"0","l":"zh-tw","t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[100,106,5,0]}'>c</div>"}]}'/>d</span></p></span></span>
22841 LanguageConverter selser (1)
22843 language=zh variant=zh-cn
22845 "modes": ["wt2wt", "selser"],
22847 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22857 LanguageConverter selser (2)
22859 language=zh variant=zh-cn
22861 "modes": ["wt2wt", "selser"],
22863 ["span[class='x']", "contents", "text", "-{foo}-"],
22864 ["a", "contents", "text", "-{"],
22865 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22869 <span class="x">TEXT1</span>
22870 [http://example.com TEXT2]
22874 <span class="x"><nowiki>-{foo}-</nowiki></span>
22875 [http://example.com -{]
22876 [[Foo|<nowiki>-{</nowiki>]]
22877 {{1x|<nowiki>-{</nowiki>}}
22880 # Tests LanguageVariantText in ConstrainedText
22882 LanguageConverter selser (3)
22884 language=zh variant=zh-cn
22886 "modes": ["wt2wt", "selser"],
22888 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22889 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22900 |<nowiki/>-{edited}-
22904 # Tests LanguageVariantText._fromSelSer
22906 LanguageConverter selser (4)
22908 language=zh variant=zh-cn
22910 "modes": ["wt2wt", "selser"],
22912 ["td > span.x", "remove"]
22918 |<span class="x">Foo</span>-{Bar}-
22919 ||<span class="x">Foo</span>-{Bar}-
22929 # Since Parsoid is starting to emit canonical wikitext for links,
22930 # [http://example.com http://example.com] will not RT back to that
22932 # Parsoid does not language-convert links (it is done in a
22933 # post-processing step)
22935 Proper conversion of text in external links
22937 language=sr variant=sr-ec
22940 http://www.google.com
22941 gopher://www.google.com
22942 [http://www.google.com http://www.google.com]
22943 [gopher://www.google.com gopher://www.google.com]
22944 [https://www.google.com irc://www.google.com]
22945 [ftp://www.google.com www.google.com/ftp://dir]
22946 [//www.google.com www.google.com]
22948 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22949 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22950 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22951 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22952 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22953 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22954 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22957 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22958 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22959 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
22960 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22961 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22962 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22963 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22967 Do not convert roman numbers to language variants
22969 language=sr variant=sr-ec
22973 <p>Фридрих IV је цар.
22976 <p>Fridrih IV je car.</p>
22980 Unclosed language converter markup "-{"
22991 Don't convert raw rule "-{R|=>}-" to "=>"
23000 <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>
23004 Don't break link parsing if language converter markup is in the caption.
23006 language=sr variant=sr-ec
23008 [[Main Page|-{R|main page}-]]
23010 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23013 <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>
23017 T146304: Don't break template parsing if language converter markup is in the parameter.
23019 language=sr variant=sr-ec
23026 <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>
23030 T146305: Don't break image parsing if language converter markup is in the caption.
23034 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23036 <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>
23039 <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>
23043 T146305: Don't break image parsing if nested language converter markup is in the caption.
23045 language=zh variant=zh-cn
23047 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23049 <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>
23052 <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>
23055 # XXX html2wt disabled because rich markup in alt is not preserved.
23057 Don't break gallery if language converter markup is inside.
23062 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23063 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23066 <ul class="gallery mw-gallery-traditional">
23067 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23068 <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>
23069 <div class="gallerytext">
23070 <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>
23074 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23075 <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>
23076 <div class="gallerytext">
23077 <p>This is a test template
23084 <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"}}'>
23085 <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>
23086 <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>
23091 T153135: Don't break list handling if language converter markup is in the item.
23093 language=zh variant=zh-cn
23095 ;-{zh-cn:AAA;zh-tw:BBB}-
23099 <dt>foo:bar</dt></dl>
23102 <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>
23103 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23107 // Note that parsoid does not protect colons unless language converter
23108 // markup is properly nested, because it is a backtracking parser.
23110 T153135: Unclosed markup in definition list (code coverage)
23112 language=zh variant=zh-cn
23117 <dl><dt><b>foo:bar</b></dt><b>
23118 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23121 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23122 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23126 T153135: Nested language converter markup in definition list (code coverage)
23128 language=zh variant=zh-cn
23130 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23132 <dl><dt>AAA foo:bar bat:baz</dt>
23136 <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>
23137 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23141 # html2wt mode disabled due to <nowiki> insertion.
23143 T153140: Don't break table handling if language converter markup is in the cell.
23145 language=sr variant=sr-ec
23146 parsoid=wt2html,wt2wt,html2html
23163 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23170 Language converter tricky html2wt cases (1)
23173 parsoid=html2wt,wt2wt
23175 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23177 -{<nowiki>}-</nowiki>}-
23184 Language converter tricky html2wt cases (2)
23187 parsoid=html2wt,wt2wt
23191 <nowiki>-{foo}-</nowiki>
23193 <p>-{foo}-
23198 Language converter tricky html2wt cases (3)
23201 parsoid=html2wt,wt2wt
23203 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23204 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23205 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23211 -{<nowiki>-{foo}-</nowiki>}-
23215 </p><p>-{foo}-
23220 Language converter tricky html2wt cases (4)
23223 parsoid=html2wt,wt2wt
23225 <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>
23233 # Note that the <nowiki> escaping added by parsoid for source text,
23234 # destination text, and language names only works on the PHP side
23235 # for *destination text*. (HTML entity escaping wouldn't work
23236 # any better.) This is probably a bug, at least for source texts.
23237 # (For language names PHP uses a precise regexp based on the languages
23238 # it currently knows have variants, which is fragile since this set
23239 # can grow/shrink over time.)
23241 Language converter tricky html2wt cases (5)
23243 language=zh variant=zh-cn
23245 <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>
23246 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23247 <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>
23248 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23251 -{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
23253 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23255 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23257 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23260 !! html/php+disabled
23261 <p>foobat;xyz=>zh-cn:abc
23265 </p><p>a:b=>c 0;zh-tw:bar
23270 T179579: Nowiki and lc interaction
23277 -{123<nowiki>|</nowiki>456}-
23279 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23281 <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>
23285 T2529: Uncovered bullet
23295 T2529: Uncovered bullet in a deeply nested list
23297 *******Foo {{bullet}}
23299 <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>
23305 T2529: Uncovered table already at line-start
23328 T2529: Uncovered bullet in parser function result
23330 *Foo {{lc:{{bullet}} }}
23338 T7678: Double-parsed template argument
23340 {{lc:{{{1}}}|hello}}
23347 T7678: Double-parsed template invocation
23349 {{lc:{{paramtest {{!}} param = hello }} }}
23351 <p>{{paramtest | param = hello }}
23356 Case insensitivity of parser functions for non-ASCII characters (T10143)
23359 title=[[Main Page]]
23361 {{PRVNÍVELKÉ:ěščř}}
23362 {{prvnívelké:ěščř}}
23382 Morwen/13: Unclosed link followed by heading
23389 <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>
23394 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23401 <h1><span class="mw-headline" id="heading">heading</span></h1>
23406 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23413 <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>
23428 Paragraphs inside divs (no extra line breaks)
23440 Paragraphs inside divs (extra line break on open)
23455 Paragraphs inside divs (extra line break on close)
23470 Paragraphs inside divs (extra line break on open and close)
23486 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23488 Nesting tags, paragraphs on lines which begin with <div>
23490 <div></div><strong>A
23493 <div></div><p><strong>A
23494 </strong></p><strong></strong><p><strong>B</strong>
23497 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
23498 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
23501 # T8200: <blockquote> should behave like <div> with respect to line breaks
23503 T8200: paragraphs inside blockquotes (no extra line breaks)
23505 parsoid=wt2html,html2html
23507 <blockquote>Line one
23509 Line two</blockquote>
23511 <blockquote>Line one
23512 Line two</blockquote>
23515 <blockquote><p>Line one
23516 Line two</p></blockquote>
23520 T8200: paragraphs inside blockquotes (extra line break on open)
23522 parsoid=wt2html,html2html
23527 Line two</blockquote>
23532 Line two</blockquote>
23538 Line two</p></blockquote>
23542 T8200: paragraphs inside blockquotes (extra line break on close)
23544 parsoid=wt2html,html2html
23546 <blockquote>Line one
23551 <blockquote>Line one
23557 <blockquote><p>Line one
23564 T8200: paragraphs inside blockquotes (extra line break on open and close)
23580 ## This is a corner case interaction between the paragraph wrapping in the
23581 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
23582 ## some tags which close paragraphs (and thus prevent wrapping on their line),
23583 ## of which "div" is one, but do p-wrapping inside them. These are referred
23584 ## to as "never suppressing". Remex, for its part, doesn't traverse into
23585 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
23587 Paragraphs inside blockquotes/divs (no extra line breaks)
23589 <blockquote><div>Line one
23591 Line two</div></blockquote>
23593 <blockquote><div>Line one
23594 Line two</div></blockquote>
23599 Paragraphs inside blockquotes/divs (extra line break on open)
23604 Line two</div></blockquote>
23609 Line two</div></blockquote>
23614 Paragraphs inside blockquotes/divs (extra line break on close)
23616 <blockquote><div>Line one
23619 </div></blockquote>
23621 <blockquote><div>Line one
23624 </div></blockquote>
23629 Paragraphs inside blockquotes/divs (extra line break on open and close)
23635 </div></blockquote>
23641 </div></blockquote>
23646 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23648 wgLinkHolderBatchSize=0
23654 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23655 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23656 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23661 Free external link invading image caption
23663 [[Image:Foobar.jpg|thumb|http://x|hello]]
23665 <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>
23668 <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>
23672 T17196: localised external link numbers
23676 [http://en.wikipedia.org/]
23678 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23681 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23685 Multibyte character in padleft
23687 {{padleft:-Hello|7|Æ}}
23692 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23696 Multibyte character in padright
23698 {{padright:Hello-|7|Æ}}
23703 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23707 formatdate parser function
23709 {{#formatdate:2009-03-24}}
23711 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23716 formatdate parser function, with default format
23718 {{#formatdate:2009-03-24|mdy}}
23720 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23725 Spacing of numbers in formatted dates
23727 {{#formatdate:January 15}}
23729 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23734 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
23736 language=nl title=[[MediaWiki:Common.css]]
23738 {{#formatdate:2009-03-24|dmy}}
23740 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23753 Edit comment with link
23757 I like the [[Main Page]] a lot
23759 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23763 Edit comment with link and link text
23767 I like the [[Main Page|best pages]] a lot
23769 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23773 Edit comment with link and link text with suffix
23777 I like the [[Main Page|best page]]s a lot
23779 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23783 Edit comment with section link (non-local, eg in history list)
23785 comment title=[[Main Page]]
23787 /* External links */ removed bogus entries
23789 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23793 Edit comment with section link and text before it (non-local, eg in history list)
23795 comment title=[[Main Page]]
23797 pre-comment text /* External links */ removed bogus entries
23799 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>
23803 Edit comment with section link (local, eg in diff view)
23805 comment local title=[[Main Page]]
23807 /* External links */ removed bogus entries
23809 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23813 Edit comment with subpage link (T16080)
23817 title=[[Subpage test]]
23819 Poked at a [[/subpage]] here...
23821 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23825 Edit comment with subpage link and link text (T16080)
23829 title=[[Subpage test]]
23831 Poked at a [[/subpage|neat little page]] here...
23833 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23837 Edit comment with bogus subpage link in non-subpage NS (T16080)
23840 title=[[Subpage test]]
23842 Poked at a [[/subpage]] here...
23844 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23848 Edit comment with bare anchor link (local, as on diff)
23852 title=[[Main Page]]
23856 <a href="#section">#section</a>
23860 Edit comment with bare anchor link (non-local, as on history)
23863 title=[[Main Page]]
23867 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23871 Anchor starting with underscore
23877 <p><a href="#_ref">One</a>
23880 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23884 Id starting with underscore
23886 <div id="_ref"></div>
23888 <div id="_ref"></div>
23893 Edit comment with link with more than one pipe (T99346)
23897 [[Main Page|Many|pipes]]
23899 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23903 Complex edit comment with link with more than one pipe (T99346)
23907 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23909 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..."
23913 Space normalisation on autocomment (T24784)
23916 title=[[Main Page]]
23918 /* __hello__world__ */
23920 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23924 percent-encoding and + signs in comments (T28410)
23928 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23930 <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>
23933 # Parsoid doesn't support this yet: see T75581
23934 # but it *should* omit the 'src' attribute if the image is bad.
23935 # PHP side of tests was disabled in
23936 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23937 # because of issues in the PHP parserTests infrastructure
23938 # (but the output below is indeed what the PHP side emits)
23940 Bad images - basic functionality
23943 !! html/php+disabled
23945 <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>
23949 Bad images - T18039: text after bad image disappears
23954 !! html/php+disabled
23960 <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>
23965 Verify that displaytitle works (T24501) no displaytitle
23969 wgAllowDisplayTitle=true
23970 wgRestrictDisplayTitle=false
23972 this is not the the title
23975 <p>this is not the the title
23980 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23985 wgAllowDisplayTitle=true
23986 wgRestrictDisplayTitle=false
23988 this is not the the title
23989 {{DISPLAYTITLE:whatever}}
23992 <p>this is not the the title
23997 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24002 wgAllowDisplayTitle=true
24003 wgRestrictDisplayTitle=true
24005 this is not the the title
24006 {{DISPLAYTITLE:whatever}}
24009 <p>this is not the the title
24014 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24019 wgAllowDisplayTitle=true
24020 wgRestrictDisplayTitle=true
24022 this is not the the title
24023 {{DISPLAYTITLE:screen}}
24026 <p>this is not the the title
24031 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24036 wgAllowDisplayTitle=false
24038 this is not the the title
24039 {{DISPLAYTITLE:screen}}
24042 <p>this is not the the title
24043 <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>
24048 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24053 wgAllowDisplayTitle=false
24055 this is not the the title
24058 <p>this is not the the title
24063 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24068 wgAllowDisplayTitle=true
24069 wgRestrictDisplayTitle=true
24071 this is not the the title
24072 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24074 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24075 <p>this is not the the title
24080 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24085 wgAllowDisplayTitle=true
24086 wgRestrictDisplayTitle=true
24088 this is not the the title
24089 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24091 <span style="color: red;">s</span>creen
24092 <p>this is not the the title
24097 Page status indicators: Empty name is invalid
24101 <indicator name=" "></indicator>
24102 <indicator></indicator>
24104 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24105 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24110 Page status indicators: Weird syntaxes that are okay
24114 <indicator name="empty" />
24115 <indicator name="name"></indicator>
24124 Page status indicators: Torture test
24128 <indicator name="01">hello world</indicator>
24129 <indicator name="02">[[Main Page]]</indicator>
24130 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24131 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24132 <indicator name="05">*foo
24134 <indicator name="06"><nowiki>foo</nowiki></indicator>
24135 <indicator name="07"> Preformatted</indicator>
24136 <indicator name="08"><div>Broken tag</indicator>
24137 <indicator name="09">{| class=wikitable
24140 <indicator name="10">Two
24142 paragraphs</indicator>
24145 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24146 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" />
24147 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>
24148 05=<ul><li>foo</li>
24152 07=<pre>Preformatted
24154 08=<div>Broken tag</div>
24156 09=<table class="wikitable">
24173 preload: check <noinclude> and <includeonly>
24177 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24183 preload: check <onlyinclude>
24187 Goodbye <onlyinclude>Hello world</onlyinclude>
24193 preload: can pass tags through if we want to
24197 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24199 <includeonly>Hello world</includeonly>
24203 preload: check that it doesn't try to do tricks
24207 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24209 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24213 Play a bit with r67090 and T5158
24215 <div style="width:50% !important"> </div>
24216 <div style="width:50% !important"> </div>
24217 <div style="width:50% !important"> </div>
24218 <div style="border : solid;"> </div>
24220 <div style="width:50% !important"> </div>
24221 <div style="width:50% !important"> </div>
24222 <div style="width:50% !important"> </div>
24223 <div style="border : solid;"> </div>
24226 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24227 <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>
24228 <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>
24229 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24234 French spaces in wikitext
24236 foo ! bar ? bat 50 % is less than 75 %.
24238 Hello : this ; is « something ‹ else › again »
24240 <p>foo ! bar ? bat 50 % is less than 75 %.
24241 </p><p>Hello : this ; is « something ‹ else › again »
24245 # It would be reasonable for Parsoid and PHP to differ here.
24246 # The PHP behavior is arguably a bug.
24248 Corner case: french spaces in definition list
24252 <dl><dt>foo </dt>
24257 T5158: Test for French spaces in attributes
24259 <br style=" clear : both ; " />
24261 <p><br style="clear : both ;" />
24266 HTML5 data attributes
24268 <span data-foo="bar">Baz</span>
24269 <p data-abc-def_hij="">Quuz</p>
24271 <p><span data-foo="bar">Baz</span>
24273 <p data-abc-def_hij="">Quuz</p>
24276 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24277 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24281 Strip reserved data attributes
24283 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24285 <div data-ok="fred">d</div>
24288 <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>
24292 percent-encoding and + signs in internal links (T28410)
24294 [[User:+%]] [[Page+title%]]
24295 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24296 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24297 [[%33%45]] [[%33%45+]]
24299 <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>
24300 <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>
24301 <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>
24302 <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>
24305 <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>
24306 <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>
24307 <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>
24308 <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>
24312 Special characters in embedded file links (T29679)
24314 [[File:Contains & ampersand.jpg]]
24315 [[File:Does not exist.jpg|Title with & ampersand]]
24317 <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>
24318 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24321 <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>
24322 <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>
24326 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24328 Text's been normalized?
24330 <p>Text's been normalized?
24335 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24337 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24339 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24344 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24346 [http://www.example.org/ ideograms]
24348 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24353 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24355 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24357 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24381 T33098 Template which includes system messages which includes the template
24385 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24386 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24391 T33490 Turkish: ucfirst 'blah'
24402 T33490 Turkish: ucfirst 'ix'
24413 T33490 Turkish: lcfirst 'BLAH'
24424 T33490 Turkish: ucfırst (with a dotless i)
24430 <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>
24435 T33490 ucfırst (with a dotless i) with English language
24441 <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>
24445 # Note that Parsoid doesn't emit an explicit TOC.
24446 # Note also that the html2wt direction tends to emit an extra newline
24447 # between the __TOC__ magicword and the first heading unless *both*
24448 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24452 T28375: TOC with italics
24454 title=[[Main Page]]
24457 ==''Lost'' episodes==
24459 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24461 <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>
24465 <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>
24468 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24469 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24473 T28375: TOC with bold
24475 title=[[Main Page]]
24478 =='''should be bold''' then normal text==
24480 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24482 <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>
24486 <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>
24489 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24490 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24494 T35845: Headings become cursive in TOC when they contain an image
24496 title=[[Main Page]]
24499 ==Image [[Image:foobar.jpg]]==
24501 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24503 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24507 <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>
24510 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24511 <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>
24515 T35845 (2): Headings become bold in TOC when they contain a blockquote
24517 title=[[Main Page]]
24520 ==<blockquote>Quote</blockquote>==
24522 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24524 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24528 <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>
24531 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24533 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24537 <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>
24539 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24540 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
24544 Unclosed tags in TOC
24546 wgFragmentMode=[ 'html5', 'legacy' ]
24548 title=[[Main Page]]
24552 <small>Hanc marginis exiguitas non caperet.</small>
24555 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24557 <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>
24561 <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>
24562 <p><small>Hanc marginis exiguitas non caperet.</small>
24566 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24567 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24568 <p><small>Hanc marginis exiguitas non caperet.</small>
24573 Multiple tags in TOC
24576 ==<i>Foo</i> <b>Bar</b>==
24578 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24580 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24582 <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>
24583 <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>
24587 <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>
24588 <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>
24591 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24593 <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>
24594 <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>
24598 <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>
24599 <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>
24601 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24602 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24604 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
24607 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24608 # html5 tag parsing.
24610 Tags with parameters in TOC
24615 ==<sup class="in-h2">Hello</sup>==
24617 ==<sup class="a > b">Evilbye</sup>==
24619 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24621 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24622 <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>
24626 <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>
24627 <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>
24630 <meta property="mw:PageProp/toc" />
24631 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24633 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24637 span tags with directionality in TOC
24640 ==<span dir="ltr">C++</span>==
24642 ==<span dir="rtl">זבנג!</span>==
24644 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24646 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24648 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24650 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24652 <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>
24653 <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>
24654 <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>
24655 <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>
24656 <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>
24660 <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>
24661 <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>
24662 <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>
24663 <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>
24664 <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>
24667 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24668 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24669 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24670 <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>
24671 <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>
24672 <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>
24676 T74884: bdi element in ToC
24679 ==<bdi>test</bdi>==
24681 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24683 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24687 <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>
24690 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24691 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24695 T35715: s/strike element in ToC
24698 ==<s>test</s> test <strike>test</strike>==
24700 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24702 <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>
24706 <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>
24709 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24710 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24714 T198618: style element in ToC
24719 ==<style>.foo {}</style>Style<style>.bar {}</style>==
24721 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24723 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
24727 <h2><span class="mw-headline" id="Style"><style>.foo {}</style>Style<style>.bar {}</style></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Style">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
24730 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24731 <h2 id="Style" data-parsoid='{}'><style>.foo {}</style>Style<style>.bar {}</style></h2>
24735 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24740 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24742 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24746 <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>
24749 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24750 <h2 id="x" data-parsoid='{}'>x</h2>
24756 == {{int:headline_sample}} ==
24760 T34057: Title needed when expanding <h> nodes.
24762 title=[[Main Page]]
24766 <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>
24771 Strip marker in urlencode
24773 {{urlencode:x<nowiki/>y}}
24774 {{urlencode:x<nowiki/>y|wiki}}
24775 {{urlencode:x<nowiki/>y|path}}
24776 {{urlencode:x<pre id="one">two</pre>y}}
24804 Strip marker in formatNum
24806 {{formatnum:1<nowiki/>2}}
24807 {{formatnum:1<nowiki/>2|R}}
24815 Check noCommafy in formatNum
24819 {{formatnum:123456.78}}
24820 {{formatnum:123456.78|NOSEP}}
24828 Wrong option for formatNum (T58199)
24830 {{formatnum:1,234.56|Random}}
24831 {{formatnum:1,234.56|EVERYTHING}}
24832 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24841 Strip marker in grammar
24845 {{grammar:elative|foo<nowiki/>bar}}
24852 Strip marker in padleft
24854 {{padleft:|2|x<nowiki/>y}}
24861 Strip marker in padright
24863 {{padright:|2|x<nowiki/>y}}
24870 Strip marker in anchorencode
24872 {{anchorencode:x<nowiki/>y}}
24877 <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>
24881 nowiki inside link inside heading (T20295)
24883 ==[[foo|x<nowiki>y</nowiki>z]]==
24885 <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>
24890 new support for bdi element (T33817)
24892 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24894 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24899 Ignore pipe between table row attributes
24903 |- id=foo | style='color: red'
24911 <tr id="foo" style="color: red">
24918 Language parser function
24927 Padleft and padright (default 0-padding)
24936 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24937 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24941 Padleft and padright (partial fill)
24943 {{padleft:xyz|6|ab}}
24944 {{padright:xyz|6|ab}}
24950 <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>
24951 <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>
24955 Padleft and padright as substr
24957 {{padleft:|3|abcde}}
24958 {{padright:|3|abcde}}
24964 <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>
24965 <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>
24969 Padleft and padright with non-numerical length (T180403)
24971 {{padleft:abcdef|junk}}
24972 {{padright:abcdef|junk}}
24980 Special parser function
24982 {{#special:RandomPage}}
24983 {{#special:BaDtItLe}}
24984 {{#special:Foobar}}
24993 T36939 - Case insensitive link parsing ([HttP://])
24995 [HttP://MediaWiki.Org/]
24997 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25000 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
25004 T36939 - Case insensitive link parsing ([HttP:// title])
25006 [HttP://MediaWiki.Org/ MediaWiki]
25008 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25013 T36939 - Case insensitive link parsing (HttP://)
25015 HttP://MediaWiki.Org/
25017 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25020 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
25038 <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>
25039 <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>
25040 <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>
25041 <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>
25042 <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>
25048 ### Parsoid-specific tests
25049 ### Parsoid-PHP parser incompatibilities
25052 1. SOL-sensitive wikitext tokens as template-args
25054 parsoid=wt2html,wt2wt
25060 <span about="#mwt1" typeof="mw:Transclusion">
25061 </span><ul about="#mwt1"><li>a</li>
25063 <span about="#mwt2" typeof="mw:Transclusion">
25064 </span><ol about="#mwt2"><li>a</li>
25066 <span about="#mwt3" typeof="mw:Transclusion">
25067 </span><dl about="#mwt3"><dd>a</dd>
25071 #### -----------------------------------------------------------------
25072 #### Parsoid-specific functionality tests
25073 #### -----------------------------------------------------------------
25075 # T65642/T68749: Formatting elt fixup around images.
25076 # We know wt2wt will fail, but we expect selser to pass.
25077 # Due to the nature of our testing, wt2wt and selser tests will enter the
25078 # blacklist and we'll catch selser regressions based on changes to the
25079 # blacklist entries for selser tests.
25081 1. Treebuilder fixup of formatting elt
25083 parsoid=wt2html,wt2wt
25088 [[Image:Foobar.jpg|right|Test]]
25096 </small></p><small>
25097 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Test"><img alt="Test" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
25098 </small><p><small></small>
25100 </td></tr></tbody></table>
25104 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25105 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Test</figcaption></figure></small>
25106 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25111 2. Treebuilder fixup of formatting elt
25113 parsoid=wt2html,wt2wt
25115 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25117 <small>[[Image:Foobar.jpg|right|300px]]</small>
25119 <p><b>foo</b></p><b><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div></b><p><b>bar</b>
25120 </p><small><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a></div></small>
25122 <p><b>foo</b></p><b><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure></b><p><b>bar</b></p>
25124 <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>
25128 3. Treebuilder fixup of formatting elt
25130 parsoid=wt2html,wt2wt
25132 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25134 <p><small><b>foo</b></small></p><small><b><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div></b></small><p><small><b>bar</b></small>
25137 <p><small><b>foo</b></small></p><small><b><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure></b></small><p><small><b>bar</b></small></p>
25141 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25143 parsoid=wt2html,wt2wt
25145 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25147 <b><small><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a></div></small></b>
25149 <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>
25152 #### ----------------------------------------------------------------
25153 #### Parsoid-only testing of Parsoid's impl of LST
25154 #### Not implemented yet, see
25155 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25156 #### ----------------------------------------------------------------
25158 ## We still need to support serializing the older format while content is stored.
25160 LST Sections: Backwards compatibility
25163 "suppressErrors": true,
25164 "modes": ["html2wt"]
25167 <section begin="2011-05-16" />
25168 <section end="2014-04-10 (MW 1.23wmf22)" />
25170 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25171 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25175 LST Sections: Newfangled approach
25177 <section begin="2011-05-16" />
25178 <section end="2014-04-10 (MW 1.23wmf22)" />
25180 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
25182 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
25186 #--------- Test stripping of empty nodes in template content ----------
25189 Empty LI and TR nodes should be stripped from template content
25194 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25198 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25211 Empty LI and TR nodes should not be stripped from top-level content
25225 <li class='mw-empty-elt'></li>
25230 <tr class='mw-empty-elt'></tr>
25239 Empty TR nodes should not be stripped if they have any attributes set
25241 {{EmptyTRWithHTMLAttrTest}}
25243 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25244 <tr align='center'></tr>
25245 <tr><td>foo</td></tr>
25246 <tr align='center'></tr>
25247 <tr><td>bar</td></tr>
25251 #### ----------------------------------------------------------------
25252 #### The following section of tests are primarily to test
25253 #### wikitext escaping capabilities of Parsoid. Given that
25254 #### escaping can be done any number of ways, the wikitext (input)
25255 #### is always adjusted to reflect how Parsoid adds nowiki
25258 #### We are marking several tests as parsoid-only since the
25259 #### HTML in the result section is different from what the
25260 #### PHP parser generates for it.
25261 #### ----------------------------------------------------------------
25264 #### --------------- Headings ---------------
25266 #### 1. Nested inside html <h1>=foo=</h1>
25267 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25268 #### 3. Nested inside html with wikitext split by html tags
25269 #### 4. No escape needed
25270 #### 5. Empty headings <h1></h1>
25271 #### 6. Heading chars in SOL context
25272 #### ----------------------------------------
25274 Headings: 0. Unnested
25284 <p>=foo<i>a</i>=</p>
25286 <nowiki>=foo=</nowiki>
25288 <nowiki> </nowiki>=foo=
25290 <nowiki>=foo=</nowiki>
25292 =foo''a''<nowiki>=</nowiki>
25295 # New headings and existing headings are handled differently
25297 Headings: 1. Nested inside html
25305 <h1 data-parsoid=''>=foo=</h1>
25306 <h2 data-parsoid=''>=foo=</h2>
25307 <h3 data-parsoid=''>=foo=</h3>
25308 <h4 data-parsoid=''>=foo=</h4>
25309 <h5 data-parsoid=''>=foo=</h5>
25310 <h6 data-parsoid=''>=foo=</h6>
25318 =<nowiki>=foo=</nowiki>=
25319 ==<nowiki>=foo=</nowiki>==
25320 ===<nowiki>=foo=</nowiki>===
25321 ====<nowiki>=foo=</nowiki>====
25322 =====<nowiki>=foo=</nowiki>=====
25323 ======<nowiki>=foo=</nowiki>======
25328 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25337 <nowiki>*</nowiki>bar
25343 <nowiki>=bar=</nowiki>
25347 Headings: 3. Nested inside html with wikitext split by html tags
25351 <h1>=<b>bold</b>foo=</h1>
25353 = ='''bold'''foo= =
25357 Headings: 4a. No escaping needed (testing just h1 and h2)
25368 <h1><i>=</i>foo=</h1>
25388 Headings: 4b. No escaping needed (inside p-tags)
25405 Headings: 4c. Short headings (1)
25412 <nowiki>===</nowiki>
25418 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25420 Headings: 4d. Short headings (2)
25422 parsoid=wt2html,html2html
25433 <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>
25434 <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>
25435 <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>
25440 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25441 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25442 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25446 Headings: 5. Empty headings
25450 <h1 data-parsoid='{}'></h1>
25452 <h2 data-parsoid='{}'></h2>
25454 <h3 data-parsoid='{}'></h3>
25456 <h4 data-parsoid='{}'></h4>
25458 <h5 data-parsoid='{}'></h5>
25460 <h6 data-parsoid='{}'></h6>
25470 =====<nowiki/>=====
25472 ======<nowiki/>======
25476 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25486 <nowiki>=a=</nowiki>
25488 <nowiki>=a=</nowiki>
25490 <nowiki>=a=</nowiki>
25494 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25507 <nowiki>=a=</nowiki>
25510 <nowiki>=a=</nowiki>
25513 <nowiki>=a=</nowiki>
25518 Headings: 6c. Heading chars in SOL context (leading newline break)
25526 <nowiki>=b=</nowiki>
25530 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25534 <!--c0--><p>=a=</p>
25536 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25538 <!--c0--><nowiki>=a=</nowiki>
25540 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25544 Headings: 6d. Heading chars in SOL context (No escaping needed)
25554 Headings: 7. Insert a newline between new content and headings
25560 <h2 data-parsoid='{}'>A</h2>
25561 <p data-parsoid='{}'>a</p>
25572 Headings: Used as horizontal rule
25574 wgFragmentMode=[ 'html5', 'legacy' ]
25580 <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>
25583 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25586 #### --------------- Lists ---------------
25587 #### 0. Outside nests (*foo, etc.)
25588 #### 1. Nested inside html <ul><li>*foo</li></ul>
25589 #### 2. Inside definition lists
25590 #### 3. Only bullets at start should be escaped
25591 #### 4. No escapes needed
25592 #### 5. No unnecessary escapes
25593 #### 6. Escape bullets in SOL position
25594 #### 7. Escape bullets in a multi-line context
25595 #### ----------------------------------------
25598 Lists: 0. Outside nests
25608 <nowiki>*</nowiki>foo
25610 <nowiki>#</nowiki>foo
25612 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25615 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25616 ## to test wikitext escaping, and insignificant whitespace diffs
25617 ## cause PHP parser tests to barf
25619 Lists: 1. Nested inside html (No unnecessary escapes)
25628 <li data-parsoid='{}'>*foo</li>
25629 <li data-parsoid='{}'>#foo</li>
25630 <li data-parsoid='{}'>:foo</li>
25631 <li data-parsoid='{}'>;foo</li>
25639 <li data-parsoid='{}'>*foo</li>
25640 <li data-parsoid='{}'>#foo</li>
25641 <li data-parsoid='{}'>:foo</li>
25642 <li data-parsoid='{}'>;foo</li>
25649 *<nowiki>*foo</nowiki>
25650 *<nowiki>#foo</nowiki>
25651 *<nowiki>:foo</nowiki>
25652 *<nowiki>;foo</nowiki>
25658 #<nowiki>*foo</nowiki>
25659 #<nowiki>#foo</nowiki>
25660 #<nowiki>:foo</nowiki>
25661 #<nowiki>;foo</nowiki>
25665 Lists: 2. Inside definition lists
25669 <dl><dt>;foo</dt></dl>
25670 <dl><dt>:foo</dt></dl>
25673 <dl><dd>:foo</dd></dl>
25677 ; <nowiki>:foo</nowiki>
25679 ; <nowiki>:foo</nowiki>
25686 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25692 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25696 *<nowiki>*foo</nowiki>''it''*bar
25700 Lists: 4. No escapes needed
25713 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25717 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25731 Lists: 5. No unnecessary escapes
25735 <ul><li> bar <span>[[foo]]</span></li></ul>
25736 <ul><li> =bar <span>[[foo]]</span></li></ul>
25737 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25738 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25739 <ul><li> =bar <span>foo]]</span>=</li></ul>
25740 <ul><li> <s></s>: a</li></ul>
25741 <ul><li> <i>* foo</i></li></ul>
25744 * bar <span><nowiki>[[foo]]</nowiki></span>
25746 * =bar <span><nowiki>[[foo]]</nowiki></span>
25748 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25750 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25752 * =bar <span>foo]]</span>=
25760 Lists: 6. Escape bullets in SOL position
25764 <p><!--cmt-->*foo</p>
25766 <!--cmt--><nowiki>*</nowiki>foo
25770 Lists: 7. Escape bullets in a multi-line context
25779 <nowiki>*</nowiki>b
25783 Lists: 8. Escape colons only if not present in tags
25787 <dl><dt>a:b<i>c:d</i></dt></dl>
25789 ; <nowiki>a:b</nowiki>''c:d''
25792 #### --------------- HRs ---------------
25793 #### 1. Single line
25794 #### -----------------------------------
25797 HRs: 1. Single line
25805 ----<nowiki>----</nowiki>
25810 #### --------------- Tables ---------------
25811 #### 1a. Simple example
25812 #### 1b. No escaping needed (!foo)
25813 #### 1c. No escaping needed (|foo)
25814 #### 1d. No escaping needed (|}foo)
25816 #### 2a. Nested in td (<td>foo|bar</td>)
25817 #### 2b. Nested in td (<td>foo||bar</td>)
25818 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25820 #### 3a. Nested in th (<th>foo!bar</th>)
25821 #### 3b. Nested in th (<th>foo!!bar</th>)
25822 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25826 #### 4c. No escaping needed
25827 #### --------------------------------------
25830 Tables: 1a. Simple example
25838 <nowiki>{|</nowiki>
25843 Tables: 1b. No escaping needed
25854 Tables: 1c. No escaping needed
25865 Tables: 1d. No escaping needed
25876 Tables: 2a. Nested in td
25881 <td>foo|bar</td></tr>
25882 <tr><td>x<div>a|b</div></td>
25886 |<nowiki>foo|bar</nowiki>
25888 |x<div><nowiki>a|b</nowiki></div>
25896 <td>x<div>a|b</div>
25897 </td></tr></tbody></table>
25901 Tables: 2b. Nested in td
25907 <td>a<i>b||c</i></td>
25908 <td>a<i><div>b||c</div></i></td>
25909 </tr></tbody></table>
25912 |<nowiki>foo||bar</nowiki>
25913 |a''<nowiki>b||c</nowiki>''
25914 |a''<div><nowiki>b||c</nowiki></div>''
25923 <td>a<i><div>b||c</div></i>
25929 Tables: 2c. Nested in td -- no escaping needed
25945 Tables: 3a. Nested in th
25961 Tables: 3b. Nested in th
25966 <tr><th>foo!!bar</th>
25967 <th><i>foo|bar</i></th>
25968 <th><i>foo!!bar</i></th>
25969 <th><i><span>foo!!bar</span></i></th>
25970 </tr></tbody></table>
25973 !<nowiki>foo!!bar</nowiki>
25974 !''<nowiki>foo|bar</nowiki>''
25975 !''<nowiki>foo!!bar</nowiki>''
25976 !''<span><nowiki>foo!!bar</nowiki></span>''
25985 <th><i>foo!!bar</i>
25987 <th><i><span>foo!!bar</span></i>
25993 Tables: 3c. Nested in th
25998 <tr><th>foo||bar</th>
25999 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26000 </tr></tbody></table>
26003 !<nowiki>foo||bar</nowiki>
26004 !<nowiki>foo||bar</nowiki>
26017 Tables: 4a. Escape -
26033 |<nowiki>-bar</nowiki>
26038 Tables: 4b. Escape +
26054 |<nowiki>+bar</nowiki>
26059 Tables: 4c. No escaping needed
26064 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26065 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26071 <div>a|b</div></td>
26116 Tables: 4d. No escaping needed
26121 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26122 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26123 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26134 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26144 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26148 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26150 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26152 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26154 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26157 | || align="center" | ||
26167 | {{!}}{{!}} align="center" | ||
26171 ! !! align="center" | !!
26177 <td align="center"></td>
26179 </td></tr></tbody></table>
26184 <td align="center">
26187 </td></tr></tbody></table>
26191 <td align="center"></td>
26193 </td></tr></tbody></table>
26197 <th align="center"></th>
26199 </th></tr></tbody></table>
26203 T97430: Don't emit empty nowiki pairs around marker meta tags
26207 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26208 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26210 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26211 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26215 Unclosed xmlish element in table line shouldn't eat end delimiters
26220 <tbody><tr><td> <foo</td>
26221 <td> bar></td></tr>
26238 #### --------------- Links ----------------
26239 #### 1. Quote marks in link text
26240 #### 2. Wikilinks: Escapes needed
26241 #### 3. Wikilinks: No escapes needed
26242 #### 4. Extlinks: Escapes needed
26243 #### 5. Extlinks: No escapes needed
26244 #### --------------------------------------
26246 Links 1. WikiLinks: No escapes needed
26250 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26251 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26252 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26256 [[Foo|x [Foobar] x]]
26258 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26259 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26260 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26265 Links 2. WikiLinks: Escapes needed
26269 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26270 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26271 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26272 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26273 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26274 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26275 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26276 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26277 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26278 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26280 [[Foo|<nowiki>Foobar]</nowiki>]]
26281 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26282 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26283 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26284 [[Foo|<nowiki>|Bar</nowiki>]]
26285 [[Foo|<nowiki>]]bar</nowiki>]]
26286 [[Foo|<nowiki>[[bar</nowiki>]]
26287 [[Foo|<nowiki>x [[ y</nowiki>]]
26288 [[Foo|<nowiki>x ]] y</nowiki>]]
26289 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26291 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26292 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26293 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26294 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26295 <a href="/wiki/Foo" title="Foo">|Bar</a>
26296 <a href="/wiki/Foo" title="Foo">]]bar</a>
26297 <a href="/wiki/Foo" title="Foo">[[bar</a>
26298 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26299 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26300 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26305 Links 3. WikiLinks: No escapes needed
26309 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26310 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26315 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26316 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26321 Links 4. ExtLinks: Escapes needed
26325 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26326 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26327 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26328 <p>[http://google.com]</p>
26329 <p>[http://google.com google]</p>
26330 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26331 <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>
26333 [http://google.com <nowiki>[google]</nowiki>]
26334 [http://google.com <nowiki>google]</nowiki>]
26335 [http://google.com <nowiki>goog] le</nowiki>]
26337 <nowiki>[http://google.com]</nowiki>
26339 <nowiki>[http://google.com google]</nowiki>
26341 [http://google.com<nowiki>]</nowiki>
26343 [{{echo|http://google.com}}<nowiki>]</nowiki>
26345 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26346 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26347 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26348 </p><p>[http://google.com]
26349 </p><p>[http://google.com google]
26350 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26351 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26356 Links 5. ExtLinks: No escapes needed
26360 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26361 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26363 [http://google.com [google]
26365 [[http://google.com]]
26367 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26368 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26373 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26377 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26378 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26379 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26380 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26381 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26382 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26383 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26384 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26385 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26386 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26387 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26388 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26389 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26392 x<nowiki/>http://example.com<nowiki/>y
26393 http://example.com<nowiki/>?x
26394 http://example.com<nowiki/>&x
26395 http://example.com<nowiki/>'x
26396 http://example.com<nowiki/>,x
26397 http://example.com<nowiki/>.x
26398 http://example.com<nowiki/>;x
26399 http://example.com<nowiki/>:x
26400 http://example.com<nowiki/>;x
26401 http://example.com<nowiki/>!x
26402 http://example.com<nowiki/>=x
26403 http://example.com<nowiki/>(x)
26404 http://example.com(x<nowiki/>)
26408 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26413 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26415 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26416 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26417 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26418 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26419 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26425 "http://example.com"
26426 (http://example.com)
26427 (http://example.com) foo
26428 http://example.com,
26429 http://example.com, foo
26432 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26434 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26435 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26436 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26437 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26438 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26443 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26447 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26448 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26450 http://example.com.,;:!?\
26451 -http://example.com:
26453 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26454 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26459 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26463 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26464 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26465 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26469 X<nowiki/>RFC 123<nowiki/>y
26473 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26477 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26478 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26479 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26486 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26487 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26488 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26493 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26497 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26498 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26499 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26503 X<nowiki/>PMID 123<nowiki/>y
26507 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26511 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26512 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26513 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26520 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26521 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26522 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26527 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26531 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26532 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26533 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26536 ISBN 1234567890<nowiki/>1
26537 ISBN 1234567890<nowiki/>x
26538 a<nowiki/>ISBN 1234567890<nowiki/>b
26542 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26546 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26550 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26555 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26559 <p>this is not a link: http://example.com
26562 this is not a link: <nowiki>http://example.com</nowiki>
26566 Links 15. Link trails can't become link prefixes.
26571 <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>
26573 [[Söfnuður]]-[[00]]
26575 <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>
26579 #### --------------- Quotes ---------------
26580 #### 1. Quotes inside <b> and <i>
26581 #### 2. Link fragments separated by <i> and <b> tags
26582 #### 3. Link fragments inside <i> and <b>
26583 #### 4. No escaping needed
26584 #### --------------------------------------
26586 1a. Quotes inside <b> and <i>
26597 <b>foo'<i>bar'</i>baz</b>
26606 <i>fools'<span> errand</span></i>
26607 <i><span>fool</span>'s errand</i>
26608 '<i>foo</i> bar '<i>baz</i>
26609 a|!*#-:;+-~[]{}b'<i>x</i>
26613 ''<nowiki>''foo''</nowiki>''
26614 ''<nowiki>'''foo'''</nowiki>''
26616 '''<nowiki/>'foo''''
26617 '''<nowiki>''foo''</nowiki>'''
26618 '''<nowiki>'''foo'''</nowiki>'''
26619 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26620 '''foo'''<nowiki/>'s
26626 '''foo'''<nowiki/>'
26627 ''''foo'''<nowiki/>'
26628 ''fools'<span> errand</span>''
26629 ''<span>fool</span>'s errand''
26630 '<nowiki/>''foo'' bar '''baz''
26631 a|!*#-:;+-~[]{}b'''x''
26635 1b. Quotes inside <b> and <i> with other tags on same line
26639 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26640 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26641 <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>
26642 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26643 '<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>
26644 '<i>foo</i> <div title="name">test</div>
26645 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26646 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26647 <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>
26650 '''a'' foo ''[[bar]]''
26651 ''a''' foo ''[[bar]]''
26652 ''a''' foo '''{{echo|[[bar]]}}'''
26653 [[foo]] x'''[[bar]]''
26654 '''foo'' <ref>test</ref>
26655 '''foo'' <div title="name">test</div>
26656 '''foo'' and <br> bar
26661 2. Link fragments separated by <i> and <b> tags
26665 <p>[[<i>foo</i>hello]]</p>
26666 <p>[[<b>foo</b>hello]]</p>
26668 [[''foo''<nowiki>hello]]</nowiki>
26670 [['''foo'''<nowiki>hello]]</nowiki>
26673 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26674 # this is one of the shortcomings of this format
26676 3. Link fragments inside <i> and <b>
26680 <p><i>[[foo</i>]]</p>
26681 <p><b>[[foo</b>]]</p>
26683 ''[[foo''<nowiki>]]</nowiki>
26685 '''[[foo'''<nowiki>]]</nowiki>
26689 4. No escaping needed
26693 <p>'<span><i>bar</i></span>'
26694 '<span><b>bar</b></span>'
26698 '<span>''bar''</span>'
26699 '<span>'''bar'''</span>'
26703 #### ----------- Paragraphs ---------------
26704 #### 1. No unnecessary escapes
26705 #### --------------------------------------
26708 1. No unnecessary escapes
26712 <p>bar <span>[[foo]]</span>
26713 </p><p>=bar <span>[[foo]]</span>
26714 </p><p>[[bar <span>[[foo]]</span>
26715 </p><p>]]bar <span>[[foo]]</span>
26716 </p><p>=bar <span>foo]]</span>=
26719 bar <span><nowiki>[[foo]]</nowiki></span>
26721 =bar <span><nowiki>[[foo]]</nowiki></span>
26723 [[bar <span><nowiki>[[foo]]</nowiki></span>
26725 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26727 =bar <span>foo]]</span><nowiki>=</nowiki>
26730 #### ----------------------- PRE --------------------------
26732 1. Leading whitespace in SOL context should be escaped
26755 <nowiki> </nowiki>a
26757 <nowiki> </nowiki> a
26761 <nowiki> </nowiki> a
26763 <nowiki> </nowiki>a
26766 <nowiki> </nowiki>b
26789 2. Leading whitespace in non-indent-pre contexts should not be escaped
26793 <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>
26794 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26795 <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>
26805 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26824 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26828 <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>
26830 [[File:Foobar.jpg|thumb|caption]]
26834 5. Nowiki escaping should account for indent-pres
26844 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26858 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
26861 "modes": ["html2wt"],
26862 "scrubWikitext": true
26870 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
26871 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
26872 <p> <!--boo-->*foo</p>
26873 <p><!--boo--> *foo</p>
26874 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
26875 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
26891 <nowiki>*</nowiki>foo
26893 <nowiki/><!--boo-->*foo
26895 <!--boo--><nowiki/>*foo
26897 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
26899 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
26902 #### --------------- Behavior Switches --------------------
26905 1. Valid behavior switches should be escaped
26912 <nowiki>__TOC__</nowiki>
26913 ''<nowiki>__TOC__</nowiki>''
26917 2. Invalid behavior switches should not be escaped
26928 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26930 Behavior switches should be SOL-transparent
26934 <meta property="mw:PageProp/toc" />
26936 <!-- this one's bogus -->
26939 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26941 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26945 <!-- this one's bogus -->
26954 #### --------------- HTML tags ---------------
26957 #### 3. multi-line html tag
26958 #### 4. extension tags
26959 #### -----------------------------------------
26965 <a href="http://google.com">google</a>
26967 <a href="http://google.com">google</a>
26975 <ul><li> <div>foo</div></li>
26976 <li> <div style="color:red">foo</div></li>
26977 <li> <td></li></ul>
26980 * <nowiki><div>foo</div></nowiki>
26981 * <nowiki><div style="color:red">foo</div></nowiki>
26982 * <nowiki><td></nowiki>
26986 3. multi-line html tag
27005 <p><ref>foo</ref>
27006 </p><p><ref>bar
27007 </p><p>baz</ref>
27010 <nowiki><ref>foo</ref></nowiki>
27012 <nowiki><ref>bar</nowiki>
27014 baz<nowiki></ref></nowiki>
27018 Parsoid: newline inducing block nodes don't suppress <nowiki>
27024 <nowiki> </nowiki>a
27029 #### --------------- Others ---------------
27035 <p><nowiki>foo</nowiki>
27038 <nowiki>foo</nowiki>
27041 ## The quote-char in the input is necessary for triggering the bug
27043 (T54035) Nowiki-escaping should not get tripped by " :" in text
27052 #----------- End of wikitext escaping tests --------------
27056 Tag-like HTML structures are passed through as text
27078 </p><p>1<d e>f
27083 HTML tag with necessary entities in attributes
27085 <span title="&amp;">foo</span>
27087 <p><span title="&amp;">foo</span>
27092 HTML tag with 'unnecessary' entity encoding in attributes
27094 <span title="&">foo</span>
27096 <p><span title="&">foo</span>
27101 HTML tag with broken attribute value quoting
27103 parsoid=wt2html,html2html
27105 <span title="Hello world>Foo</span>
27107 <p><span title="Hello world">Foo</span>
27110 <p><span title="Hello world">Foo</span></p>
27114 Self-closed tag with broken attribute value quoting
27116 parsoid=wt2html,html2html
27118 <div title="Hello world />Foo
27120 <div title="Hello world"></div><p>Foo
27123 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27127 Table with broken attribute value quoting
27129 parsoid=wt2html,html2html
27132 | title="Hello world|Foo
27137 <td title="Hello world">Foo
27143 <td title="Hello world">Foo
27149 Table with broken attribute value quoting on consecutive lines
27151 parsoid=wt2html,html2html
27154 | title="Hello world|Foo
27155 | style="color:red|Bar
27160 <td title="Hello world">Foo
27162 <td style="color:red">Bar
27168 <td title="Hello world">Foo
27169 </td><td style="color: red">Bar
27170 </td></tr></tbody></table>
27175 Accept empty td cell attribute
27178 | align="center" |foo|| |
27183 <td align="center">foo</td>
27190 Non-empty attributes in th-cells
27193 !Foo!! style="color: red" |Bar
27199 <th style="color: red">Bar
27205 Accept empty attributes in th-cells
27220 Empty table rows go away
27241 ### Parsoid-centric tests for testing RTing of inter-element separators
27242 ### Edge cases not tested by existing parser tests and specific to
27243 ### Parsoid-specific serialization strategies.
27247 RT-ed inter-element separators should be valid separators
27259 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27263 # Parsoid-only test of a DOM pass
27265 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27277 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27278 <p>bar</p></small></td></tr>
27282 <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>
27286 # Note that the "style" attribute is really a template parameter here.
27287 # The = would have to be {{=}} if you wanted the literal.
27289 Empty TD followed by TD with tpl-generated attribute
27294 |{{echo|style='color:red'}}|foo
27308 Indented table with an empty td
27326 ## We have some newline diffs RT-ing this edge case
27327 ## and it is not important enough -- we seem to be emitting
27328 ## at most 2 newlines after a </tr> and this is unrelated to
27329 ## the issue from T85627 that this is testing.
27331 Indented table with blank lines in between (T85627)
27350 Indented block & table
27364 <div data-parsoid='{"stx":"html"}'>foo</div>
27366 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27371 Indent and comment before table row
27386 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27387 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27391 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27393 Empty TR followed by a template-generated TR
27399 {{echo|<tr><td>foo</td></tr>}}
27404 <tr class='mw-empty-elt'></tr>
27405 <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}}]}'>
27410 ## PHP and parsoid output differ for this, and since this is primarily
27411 ## for testing Parsoid's serializer, marking this Parsoid only
27413 Empty TR followed by mixed-ws-comment line should RT correctly
27426 <tr class='mw-empty-elt'></tr>
27429 <!--c--> </tr><!--d-->
27435 Multi-line image caption generated by templates with/without trailing newlines
27437 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27438 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27440 <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>
27441 <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>
27445 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27449 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27451 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27453 <includeonly>foo</includeonly>
27461 ## PHP emits broken html for this, and since this is primarily
27462 ## a Parsoid serializer test, marking this Parsoid only
27464 Improperly nested inline or quotes tags with whitespace in between
27466 <span> <s>x</span> </s>
27469 <p><span> <s>x</s></span><s> </s>
27470 <b> <i>x</i></b><i> </i>
27475 Encapsulate protected attributes from wt
27477 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27479 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27483 <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>
27485 <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">
27486 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
27490 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27491 ## Having nested or stray pre tags results in the attempt to add duplicates,
27492 ## causing an assertion fail. This test tries to prevent that situation.
27494 Ensure ParagraphWrapper can deal with stray closing pre tags
27503 ## Remex doesn't account for fostered content.
27505 1. Ensure fostered text content is wrapped in element nodes
27509 <table>hi</table><table>ho</table>
27511 hi<table></table>ho<table></table>
27513 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>hi</p><table data-parsoid='{"stx":"html"}'></table><p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>ho</p><table data-parsoid='{"stx":"html"}'></table>
27516 ## Remex doesn't account for fostered content.
27518 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27520 parsoid=wt2html,wt2wt
27530 </td></tr></tbody></table>
27532 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
27533 <table data-parsoid='{"stx":"html"}'>
27534 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
27535 </td></tr></tbody></table>
27538 ## Remex doesn't account for fostered content.
27540 Encapsulation properly handles null DSR information from foster box
27542 parsoid=wt2html,wt2wt
27544 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27546 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>foo<tr><td>bar</td></tr></table>"}},"i":0}}]}'>foo</p><table about="#mwt1" data-parsoid='{"stx":"html"}'><tbody><tr><td>bar</td></tr></tbody></table>
27549 ## Remex doesn't account for fostered content.
27551 1. Encapsulate foster-parented transclusion content
27553 parsoid=wt2wt,wt2html
27555 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27557 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
27559 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<tr><td>bar</td></tr>"}},"i":0}},"</table>"]}'>foo</p><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td>bar</td></tr></tbody></table>
27563 2. Encapsulate foster-parented transclusion content
27565 parsoid=wt2wt,wt2html
27567 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27569 <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>
27580 3. Encapsulate foster-parented transclusion content
27582 parsoid=wt2wt,wt2html
27584 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27586 <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>"]}">
27599 4. Encapsulate foster-parented transclusion content
27601 parsoid=wt2wt,wt2html
27603 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27605 <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>"]}">
27617 ## Remex doesn't account for fostered content.
27619 5. Encapsulate foster-parented transclusion content
27621 parsoid=wt2wt,wt2html
27623 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27625 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27627 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}'>foo</p><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27630 ## Remex doesn't account for fostered content.
27632 6. Encapsulate foster-parented transclusion content
27634 parsoid=wt2wt,wt2html
27636 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27638 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
27640 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}'>foo</p><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p data-parsoid='{"stx":"html"}'>ok</p>
27644 7. Encapsulate foster-parented transclusion content
27646 parsoid=wt2wt,wt2html
27648 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27650 <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>
27660 ## Remex doesn't account for fostered content.
27661 # Note that the wt is broken on purpose: the = should be {{=}} if you
27662 # don't want it to be a template parameter key.
27664 8. Encapsulate foster-parented transclusion content
27666 parsoid=wt2wt,wt2html
27669 }}{|{{echo|style='color:red'}}
27680 </td></tr></tbody></table>
27682 <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">
27683 </span><p about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"style","named":true}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"style":{"wt":"'color:red'"}},"i":0}},"\n|-\n|b\n|}"]}'>{{{1}}}</p><table about="#mwt3">
27686 </td></tr></tbody></table>
27689 ## Remex doesn't account for fostered content.
27691 9. Encapsulate foster-parented transclusion content
27693 parsoid=wt2wt,wt2html
27695 <table>{{echo|hi</table>hello}}
27697 hi<table></table><p>hello
27700 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi</table>hello"}},"i":0}}]}'>hi</p><table about="#mwt2"></table><p about="#mwt2">hello</p>
27704 Table in fosterable position
27715 <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">
27717 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27723 # Parsoid only for T66747
27725 Properly encapsulate empty-content transclusions in fosterable positions
27733 <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"}]]}'>
27739 Always encapsulate foster box when template range is expanded to table
27752 T115289: Unclosed table
27754 {{echo|<table>}}<!--c-->[[Category:Two]]
27756 <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>
27760 T115289: Don't migrate newlines out of tables with fostered content
27762 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27764 <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>
27768 T73074: More fostering fun
27770 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27772 <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>
27776 Support <object> element with .data attribute
27780 <object data="test.swf"></object>
27782 <object data="test.swf"></object>
27786 Don't block XML namespace declaration
27788 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27790 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27793 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27796 # -----------------------------------------------------------------
27797 # The following section of tests are primarily to spec requirements
27798 # around Parsoid's serialization (old, new, edited content)
27800 # All these tests are marked Parsoid html2wt and html2html only
27801 # ----------------------------------------------------------------
27804 Ignore rel attribute in a-tags during serialization to url-links
27808 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27809 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27810 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27812 http://en.wikipedia.org/wiki/Foobar
27813 http://en.wikipedia.org/wiki/Foobar
27814 http://en.wikipedia.org/wiki/Foobar
27817 # 'mi' is a localinterwiki prefix as well as a language
27819 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27823 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27829 Parsoid should accept interwiki shortcuts
27833 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27834 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27835 <a href='./fr:Foo'>Foo</a></p>
27836 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27837 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27838 <a href='fr%3AFoo'>Foo</a></p>
27839 <p><a href='FR%3AFoo'>Foo</a>
27840 <a href='./FR:Foo'>Foo</a></p>
27855 Parsoid should not accept invalid interwiki shortcuts
27859 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27860 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27861 <a href='news:Foo'>Foo</a></p>
27870 New wikilinks should be serialized properly
27874 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27875 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27876 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27877 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27878 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27882 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27883 http://en.wikipedia.org/wiki/Foo
27884 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27888 New wiki links (href variations)
27892 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27893 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27894 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27895 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27900 [[Toxine bactérienne]]
27904 New wiki links (content string variations)
27908 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27909 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27910 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27914 [[Foo_bar|./Foo_bar]]
27918 New category links (href variations)
27922 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27923 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27924 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27926 [[Category:Toxine bactérienne]]
27927 [[Category:Toxine bactérienne]]
27928 [[Category:Toxine bactérienne]]
27932 New sol transparent links don't need indent-pre nowiki protection
27937 <link rel="mw:PageProp/redirect" href="./Main_Page">
27938 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27939 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27941 #WEITERLEITUNG [[Main Page]]
27942 <!-- this is good --> [[Category:Good]]
27943 <!-- this is great --> [[Kategorie:Great]]
27947 New interlanguage links (href variations)
27951 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27952 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27953 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27955 [[es:Toxine bactérienne]]
27956 [[es:Toxine_bactérienne]]
27957 [[es:Toxine_bactérienne]]
27961 Image: Modifying size of an image (1)
27964 "modes": ["wt2wt"],
27966 ["img[height]", "attr", "height", "22"],
27967 ["img[width]", "attr", "width", "200"]
27971 [[Image:Foobar.jpg|230x230px]]
27973 [[Image:Foobar.jpg|200x200px]]
27977 Image: Modifying size of an image (2)
27980 "modes": ["wt2wt"],
27982 ["img[height]", "attr", "height", "100"],
27983 ["img[width]", "attr", "width", "500"]
27987 [[Image:Foobar.jpg|230x230px]]
27989 [[Image:Foobar.jpg|500x500px]]
27992 # Change in size is ignored so long as class='mw-default-size'
27994 Image: Modifying size of an image (3)
27997 "modes": ["wt2wt"],
27999 ["figure[class]", "removeClass", "mw-default-size"],
28000 ["figure img", "attr", "height", "19"],
28001 ["figure img", "attr", "width", "170"]
28005 [[Image:Foobar.jpg|thumb]]
28007 [[Image:Foobar.jpg|thumb|170x170px]]
28011 Image: Modifying alignment of an image (T50665)
28014 "modes": ["wt2wt"],
28016 ["figure[class]", "removeClass", "mw-halign-right"],
28017 ["figure[class]", "addClass", "mw-halign-left"]
28021 [[Image:Foobar.jpg|thumb|caption|right]]
28023 [[Image:Foobar.jpg|thumb|caption|left]]
28027 Image: Modifying mw-default-size of an frameless image (T64805)
28030 "modes": ["wt2wt"],
28032 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28036 [[Image:Foobar.jpg|frameless|right]]
28038 [[Image:Foobar.jpg|frameless|right|220x220px]]
28042 Image: Modifying valign of an image (T51221)
28045 "modes": ["wt2wt"],
28047 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28048 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28052 [[File:Foobar.jpg|20px|middle]]
28054 [[File:Foobar.jpg|20px|text-top]]
28058 Image: Modifying alt attribute of an image (T58400)
28061 "modes": ["wt2wt"],
28063 ["img[alt]", "attr", "alt", "some alternate edited text"]
28067 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28069 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28073 Image: Modifying caption of an image
28076 "modes": ["wt2wt"],
28078 ["figcaption", "text", "new caption"]
28082 [[Image:Foobar.jpg|thumb|original caption]]
28084 [[Image:Foobar.jpg|thumb|new caption]]
28088 Image: empty alt attribute (T50924)
28092 [[File:Foobar.jpg|thumb|alt=|bar]]
28094 <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>
28098 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28104 <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>
28106 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28110 Image: Block level image should have \n before and after
28113 [[File:Foobar.jpg|right|thumb|150x150px]]
28117 <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>
28122 Image: New block level image should have \n before and after (existing content)
28125 [[File:Foobar.jpg|right|thumb|150x150px]]
28129 <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>
28134 Image: upright option (parsoid)
28136 [[File:Foobar.jpg|thumb|upright|caption]]
28137 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28138 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28140 <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>
28141 <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>
28142 <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>
28146 Image: upright option is ignored on inline and frame images (parsoid)
28148 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28150 <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>
28154 Image: in template parameter with empty parameter
28156 {{echo|[[File:Foobar.jpg|link=]]}}
28158 <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>
28162 Image: from basic HTML (1)
28166 <span typeof="mw:Image">
28167 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28170 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28174 Image: from basic HTML (2)
28178 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28180 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28184 Image: from basic HTML (3)
28188 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28190 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28194 Image: from basic HTML (4)
28198 <img src="./File:Foobar.jpg">
28200 [[File:Foobar.jpg|link=]]
28204 Image: Invalid title as link
28206 [[File:Foobar.jpg|link=<]]
28208 <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>
28211 <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>
28215 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28220 <li><p>foo</p></li>
28227 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28231 <ul> <li>foo</li></ul>
28237 Don't strip leading whitespace when handling indent-pre suppressing tags
28242 <tr><td> indented row</td></tr>
28245 <b>This is very bold of you!</b>
28248 indented cell (no pre-wrapping!)
28258 '''This is very bold of you!'''
28262 indented cell (no pre-wrapping!)
28270 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28292 <nowiki> </nowiki></span>bar2
28295 <nowiki> </nowiki><span>bar</span>
28298 <nowiki> </nowiki><span>foo</span>
28303 Lists: Dont insert newlines in a serialized list item.
28307 <ul><li>a<br>b</li><li>c</li></ul>
28314 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28317 "modes": ["html2wt"],
28318 "scrubWikitext": false
28321 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28322 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28324 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28325 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28327 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28329 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28331 == hello there [[Category:A1]] ==
28333 == [[Category:A2]] hi pal ==
28335 == <!--foo--> [[Category:A3]] how goes it ==
28337 == it goes well [[Category:A4]] <!--bar--> ==
28339 ==howdy [[Category:A5]]==
28345 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28348 "modes": ["html2wt"],
28349 "scrubWikitext": true
28352 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28353 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28355 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28356 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28358 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28366 <!--foo-->[[Category:A3]]
28371 [[Category:A4]] <!--bar-->
28379 Headings: Don't hoist metas that come from templates
28382 "modes": ["html2wt"],
28383 "scrubWikitext": true
28386 <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>
28388 == {{echo|foo [[Category:Foo]]}} ==
28392 Headings: Category in ref isn't hoisted
28395 "modes": ["html2wt"],
28396 "scrubWikitext": true
28399 <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>
28401 <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>
28404 [[Category:Baz]] </ref> ==
28410 Parsoid: Serialize positional parameters with = in them as named parameter
28414 <p about="#mwt1" typeof="mw:Transclusion"
28415 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28417 <p about="#mwt1" typeof="mw:Transclusion"
28418 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28420 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28421 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28422 <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>
28426 {{echo|1=f=oo|2=bar}}
28428 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28429 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28430 {{echo|<nowiki>f=oo</nowiki>|bar}}
28434 Parsoid: Serialize positional parameters with = in extlink as named parameter
28438 <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>
28440 {{echo|1=http://stuff?is=ok}}
28444 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28448 <div>a<p>b</p></div>
28469 Substrings resembling wikitext in hrefs should not get nowiki escapes
28473 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28479 Enforce single-line context in the serializer
28486 <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">
28487 </span><span about="#mwt1">you</span> </h2>
28489 <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>
28491 <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
28492 there</span></li></ol>
28504 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28511 </tbody></table></dd></dl>
28515 == hi {{bogus|there
28526 * foo '''bar''' baz
28538 Serialize new placeholder space without spans
28542 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28544 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28546 <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>
28552 <ref>foo : bar</ref>ok
28556 #-----------------------
28557 # Tag minimization tests
28558 #-----------------------
28561 1. I/B quote minimization: wikitext-only tags should be combined
28565 <p><i>A</i><i>B</i></p>
28566 <p><b>A</b><b>B</b></p>
28567 <p><i>A</i><b><i>B</i></b></p>
28568 <p><b>A</b><i><b>B</b></i></p>
28569 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28570 <p><i><b>A</b></i><i><b>B</b></i></p>
28571 <p><i><b>A</b></i><b><i>B</i></b></p>
28572 <p><b><i>A</i></b><i><b>B</b></i></p>
28592 2. I/B quote minimization: wikitext and html tags should not be combined
28596 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28597 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28601 ''A''<nowiki/>'''<i>B</i>'''
28605 3. I/B quote minimization: templated content stops minimization
28609 <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>
28610 <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>
28612 ''A''{{echo|''B''}}
28614 ''A''{{echo|'''''B'''''}}
28618 4. I/B quote minimization: new content should be mimimized with adjacent old content
28622 <p><i>A</i><i>B</i></p>
28623 <p><b>A</b><b>B</b></p>
28624 <p><i>A</i><b><i>B</i></b></p>
28634 5a. Merge adjacent quote nodes if they've been edited
28637 "modes": ["wt2wt", "selser"],
28639 ["p", "contents", "remove", ":contains('b')"]
28649 5b. Merge adjacent quote nodes if they've been edited
28652 "modes": ["wt2wt", "selser"],
28658 ''a''<span id="x">b</span>''c''
28664 1. Merge adjacent link nodes as long as at least one element is new
28667 "modes": ["html2wt"],
28668 "scrubWikitext": true
28671 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28672 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28673 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28677 [[Football|Foot]][[Football|ball]]
28681 2. Merge adjacent link nodes and enable additional normalizations
28684 "modes": ["html2wt"],
28685 "scrubWikitext": true
28688 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28694 3. Don't merge adjacent link nodes if scrubWikitext is false
28697 "modes": ["html2wt"],
28698 "scrubWikitext": false
28701 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28703 [[Football|Foot]][[Football|ball]]
28707 1. Move format tags outside of WikiLink
28710 "modes": ["html2wt"],
28711 "scrubWikitext": true
28714 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
28715 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
28716 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
28719 '''''[[Football]]'''''
28720 <u>'''''[[Football]]'''''</u>
28724 2. Move format tags outside of WikiLink with mergable A tags
28727 "modes": ["html2wt"],
28728 "scrubWikitext": true
28731 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
28733 '''''[[Football]]'''''
28737 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
28740 "modes": ["html2wt"],
28741 "scrubWikitext": true
28744 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
28746 <font color="red"><u>'''[[Foo]]'''</u></font>
28750 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
28753 "modes": ["html2wt"],
28754 "scrubWikitext": true
28757 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
28758 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
28759 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
28761 [[Foo|<font color="red">Foo</font>]]
28762 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
28763 [[Foo|<span class="Bar">Foo</span>]]
28767 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
28770 "modes": ["selser"],
28771 "scrubWikitext": true,
28773 ["a", "html", "<i>Foo</i>"]
28783 6. Regression test: Manual edit test to ensure diff markers are not lost
28786 "modes": ["selser"],
28787 "scrubWikitext": true,
28789 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
28798 #------------------------------
28799 # End of tag minimization tests
28800 #------------------------------
28803 T56262: New entities
28807 <span typeof="mw:Entity"> </span>
28812 ## Note that there is no wikitext output for 'unknownproperty' ##
28813 ## Unknown magic words are silently dropped ##
28820 <meta property='mw:PageProp/toc' />
28821 <meta property='mw:PageProp/notoc' />
28822 <meta property='mw:PageProp/forcetoc' />
28823 <meta property='mw:PageProp/index' />
28824 <meta property='mw:PageProp/noindex' />
28825 <meta property='mw:PageProp/nogallery' />
28826 <meta property='mw:PageProp/noeditsection' />
28827 <meta property='mw:PageProp/notitleconvert' />
28828 <meta property='mw:PageProp/nocontentconvert' />
28829 <meta property='mw:PageProp/unknownproperty' />
28839 __NOCONTENTCONVERT__
28843 Consecutive <pre>s should not get merged
28845 parsoid=html2wt,html2html
28847 <pre>a</pre><pre>b</pre>
28875 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28879 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28881 [[Special:BookSources/1234567890|ISBN 1234567895]]
28885 Edited RFC links not serializable as RFC links should serialize as extlinks
28889 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28891 [https://tools.ietf.org/html/rfc123 New RFC]
28895 Edited PMID links not serializable as PMID links should serialize as extlinks
28899 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28901 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28905 WTS of autolinks with trailing/surrounding context
28909 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28910 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28911 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28912 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28913 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28914 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28916 http://cscott.net'''foo'''
28918 http://cscott.net<b>foo</b>
28920 '''http://cscott.net'''
28922 '''http://cscott.net '''
28924 '''http://cscott.net<nowiki/>x'''
28926 http://cscott.net<nowiki/>x
28930 WTS of autolinks with nowikis (round-trip)
28932 x<nowiki/>http://cscott.net<nowiki/>x
28934 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28937 # this is the "easy" test because it leaves in place all the
28938 # data-parsoid information indicating this is an autolink
28940 WTS of autolinks with escapes (editing)
28943 "modes": ["wt2wt"],
28945 [ "span", "remove" ]
28949 x<nowiki/>http://cscott.net<nowiki/>x
28951 x<nowiki/>http://cscott.net<nowiki/>x
28955 WTS of edited autolink-like text (T103364)
28958 "modes": ["wt2wt"],
28960 [ "span[typeof]", "removeAttr", "typeof" ]
28964 Not a link: <nowiki>http://example.com</nowiki>.
28966 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28970 WTS of newly-authored autolink-like text (T103364)
28974 <p>http://example.com is not a link.</p>
28976 <nowiki>http://example.com</nowiki> is not a link.
28980 WTS of autolink-like text after an autolink (T108563)
28984 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28986 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28990 Magic links inside links (not autolinked)
28992 [[Foo|http://example.com]]
28995 [[Foo|ISBN 123456789x]]
28997 [http://foo.com http://example.com]
28998 [http://foo.com RFC 1234]
28999 [http://foo.com PMID 1234]
29000 [http://foo.com ISBN 123456789x]
29002 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29003 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29004 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29005 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29006 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29007 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29008 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29009 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29012 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29013 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29014 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29015 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29017 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
29018 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
29019 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
29020 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
29024 Magic links inside image captions (autolinked)
29026 [[File:Foobar.jpg|thumb|http://example.com]]
29027 [[File:Foobar.jpg|thumb|RFC 1234]]
29028 [[File:Foobar.jpg|thumb|PMID 1234]]
29029 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
29031 <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>
29032 <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>
29033 <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>
29034 <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>
29036 <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>
29037 <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>
29038 <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>
29039 <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>
29043 WTS of magic word text (T109371)
29048 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
29049 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
29051 <nowiki>RFC 1234</nowiki>
29053 [http://foo.com RFC 1234]
29059 Edited Redirect link should emit a non-piped wikitext link
29063 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29069 T75121: Infer extension name from typeOf if data-mw is not present
29071 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29073 <div typeOf="mw:Extension/foo"></div>
29078 # Note that the <p> wrapping isn't present in PHP parser output
29079 # The important thing for this test is that P-wrapping doesn't
29080 # interfere with the <nowiki> protection for leading - in <td>
29081 # (which isn't necessary for <th>).
29083 T88318: p-wrapped dash in table.
29085 parsoid=html2wt,wt2wt
29088 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29089 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29090 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
29097 |<nowiki>-</nowiki>
29098 |<nowiki>- </nowiki>
29118 <td><small>-</small>
29125 </td></tr></tbody></table>
29129 T149209: WTS: Handle newlines in table cells properly
29137 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29139 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29145 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29147 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29169 T149209: Selser: Handle newlines in table cells properly
29172 "modes": ["selser"],
29174 [ "#h1", "html", "a\nb\n" ],
29175 [ "#h2", "html", "a\nb\n" ],
29176 [ "#c1", "html", "a\nb\n" ],
29177 [ "#c2", "html", "<p>a</p>" ],
29178 [ "#c3", "html", "<p>a</p>" ],
29179 [ "#c4", "html", "edit-me<p>a</p>" ]
29184 ! id="h1" |edit-me!!1
29186 ! id="h2" |edit-me||2
29188 | id="c1" |edit-me||3
29190 | id="c2" |edit-me||4
29192 | id="c3" |edit-me||p||q||r
29194 | id="c4" |edit-me||p||q||r
29223 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29228 <td id='mwAc'>foo</td>
29229 <td id='serialize-this'>bar</td>
29234 | id="serialize-this" |bar
29239 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29243 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29245 <div id="hello">ok</div>
29249 Testing serialization after deletion in references
29252 "modes": ["wt2wt"],
29258 hi <ref><div id="x">ho</div></ref>
29268 Testing serialization after deletion of table cells
29271 "modes": ["wt2wt", "selser"],
29279 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29289 Testing selser after addition of new row before first row (T125419)
29292 "modes": ["wt2wt", "selser"],
29294 [ "tr", "before", "<tr><td>X</td></tr>" ]
29310 Serialize new table rows in a HTML table using HTML tags
29313 "modes": ["wt2wt", "selser"],
29315 [ "tr", "before", "<tr><td>X</td></tr>" ]
29319 <table><tr><td>a</td></tr></table>
29321 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29325 Serialize new table cells in a HTML row using HTML tags
29328 "modes": ["wt2wt", "selser"],
29330 [ "td", "before", "<td>X</td>" ]
29334 <table><tr><td>a</td></tr></table>
29336 <table><tr><td>X</td><td>a</td></tr></table>
29340 Serialize wikitext list items as HTML list items when embedded in a HTML list
29344 <ul data-parsoid='{"stx": "html"}'>
29345 <li data-parsoid='{}'>a</li>
29355 # SSS FIXME: Is this actually a good thing given the
29356 # odd nested list output that is generated by MW?
29357 # <ul><li>foo<ul>..</ul></li></ul> instead of
29358 # <ul><li>foo</li><ul>..</ul></ul>
29360 Wikitext lists can be nested inside HTML lists
29364 <ul data-parsoid='{"stx": "html"}'>
29365 <li data-parsoid='{"stx": "html"}'>a
29366 <ul><li>b</li></ul>
29370 <ul data-parsoid='{"stx": "html"}'>
29372 <ul><li>y</li></ul>
29393 "modes": ["wt2wt"],
29395 [ "#xyz", "before", "<b>before</b> stuff " ],
29396 [ "#xyz", "after", " stuff <i>after</i>" ],
29397 [ "#xyz", "html", "x <b>y</b> z" ]
29401 <span id="xyz">hello</span>
29403 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29407 Never serialize a-tag as html, regardless of what data-parsoid has to say
29409 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29411 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29416 ## SSS FIXME: This is broken output nevertheless.
29417 ## What might be a reasonable non-broken output for this?
29418 ## This is an edge case unlikely to be seen in production
29419 ## that I am not wasting more time on this right now.
29421 Never serialize a-tag as html, no matter what attributes it has
29423 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29425 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29427 [http://boo.org http://boohoo.org]
29430 # Misnested is an indication that selser can reuse the source but these have
29431 # shown to sneak through on occasion. See T101768.
29432 # The original wikitext here is: [http://test.com [[one]] two three]
29434 Strip span tags added to mark misnested links
29438 <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>
29440 [http://test.com][[one]] two three
29444 Catch regression when unpacking misnested links
29448 {{echo|hi}}[http://example.com [[ho]]]
29450 <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>
29454 Catch regression when unpacking with trailing content
29456 {{echo|Foo <references/> bar}}
29458 <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>
29462 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29466 <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|}"]}'>
29478 ## This test verifies the presence and computation of this attribute indirectly
29479 ## by making an edit and ensuring that the serialization is correct (which it would be
29480 ## only if firstWikitextNode is properly set).
29482 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
29485 "modes": ["wt2wt"],
29487 [ "div#x", "remove" ],
29488 [ "div", "before", "<div>new</div>" ]
29492 <div id="x">foo</div>
29494 {{echo|<div>boo</div>
29502 {{echo|<div>boo</div>
29508 # --------------------------------------------
29509 # Tests spec'ing wikitext serialization norms |
29510 # --------------------------------------------
29513 Serialize multi-line indent-pre starting with wikitext syntax
29527 1. Categories should always be serialized on their own line
29531 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
29539 2. Categories that are part of templates should not introduce a line break
29541 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
29543 <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>
29546 # Careful while editing these next 2 tests. There are \u200f characters
29547 # before and after the <link> tags in the HTML and following some
29548 # of the categories in wikitext
29549 # Do not remove these characters in edits.
29551 # As part of the serialization, these bidi characters will get stripped.
29553 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
29556 "modes": ["html2wt"],
29557 "scrubWikitext": true
29560 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
29561 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
29564 [[קטגוריה: שיטות משפט]]
29568 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
29571 "modes": ["html2wt"],
29572 "scrubWikitext": true
29575 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
29582 Lists: Add space after bullets
29589 <li><span> baz</span></li>
29594 * <span> baz</span>
29598 1. Headings: Add space before/after == (T53744)
29605 <h2><span> baz</span></h2>
29613 == <span> baz</span> ==
29617 2. Headings: Add space before/after == even after hoisted content
29620 "modes": ["html2wt"],
29621 "scrubWikitext": true
29624 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29632 1. Headings: suppress newly created empty headings
29635 "modes": ["html2wt"],
29636 "scrubWikitext": true
29644 2. Headings: don't suppress empty headings if scrubWikitext is false
29654 3. Headings: suppress empty headings on edits
29657 "modes": ["selser"],
29658 "scrubWikitext": true,
29664 ==<span id="x">foo</span>==
29669 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29672 "modes": ["html2wt"],
29673 "scrubWikitext": true
29676 <h2>foo<br/>bar</h2>
29677 <h2>foo <span><br/>bar</span> baz</h2>
29681 == foo <span> bar</span> baz ==
29685 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29688 "modes": ["html2wt"],
29689 "scrubWikitext": false
29692 <h2>foo<br/>bar</h2>
29698 1. WT Quote Tags: suppress newly created empty style tags
29701 "modes": ["html2wt"],
29702 "scrubWikitext": true
29710 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29716 ''<nowiki/>'''''<nowiki/>'''
29720 3. WT Quote Tags: suppress empty style tags on edits
29723 "modes": ["selser"],
29724 "scrubWikitext": true,
29730 '''<span id="x">foo</span>'''
29735 1. Anchors: suppress newly created empty anchors
29738 "modes": ["html2wt"],
29739 "scrubWikitext": true
29742 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29747 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29750 "modes": ["html2wt"],
29751 "scrubWikitext": false
29754 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29760 3. Anchors: suppress empty anchors on edits
29763 "modes": ["selser"],
29764 "scrubWikitext": true,
29770 [[Test|<span id="x">foo</span>]]
29775 3a. Anchors: do not suppress numbered extlinks
29778 "modes": ["wt2wt"],
29779 "scrubWikitext": true
29784 <a rel="mw:ExtLink" href="http://foo.com"></a>
29788 3b. Anchors: do not suppress numbered extlinks
29791 "modes": ["wt2wt"],
29792 "scrubWikitext": true,
29798 [http://foo.com <span id="x">foo</span>]
29804 Normalizations should be restricted to edited content
29807 "modes": ["selser"],
29808 "scrubWikitext": true,
29810 [ "h1", "before", "<i></i>"]
29824 1. Multiple normalizations (html2wt)
29827 "modes": ["html2wt"],
29828 "scrubWikitext": true
29832 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29833 </a><b><i></i></b>x</p>
29842 2. Multiple normalizations (selser)
29845 "modes": ["selser"],
29846 "scrubWikitext": true,
29848 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29852 <span id="x">foo</span>
29854 <span id="x">foo</span>
29860 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29863 "modes": ["html2wt"],
29864 "scrubWikitext": true
29876 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29883 <nowiki> </nowiki>hi
29885 <nowiki> </nowiki> hello
29889 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29892 "modes": ["html2wt"],
29893 "scrubWikitext": true
29902 baz bang</td></tr></table>
29908 bar<span>boo</span></p>
29924 bar<span>boo</span>
29928 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29931 "modes": ["selser"],
29932 "scrubWikitext": true,
29934 [ "p", "html", " a\n b" ]
29945 1. New links that end in spaces
29948 "modes": ["html2wt"],
29949 "scrubWikitext": false
29952 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29953 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29954 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29956 [[Berlin ]]<nowiki/>is the capital of Germany.
29960 [[Boston ]] is a city.
29964 2. New links that end in spaces
29967 "modes": ["html2wt"],
29968 "scrubWikitext": true
29971 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29972 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29973 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29975 [[Berlin]] is the capital of Germany.
29979 [[Boston]] is a city.
29983 1. Table cells with escapable prefixes
29986 "modes": ["html2wt"],
29987 "scrubWikitext": false
29991 <tr><td>a</td></tr>
29992 <tr><td>-</td></tr>
29993 <tr><td>+</td></tr>
29999 |<nowiki>-</nowiki>
30001 |<nowiki>+</nowiki>
30006 2. Table cells with escapable prefixes
30009 "modes": ["html2wt"],
30010 "scrubWikitext": true
30014 <tr><td>a</td></tr>
30015 <tr><td>-</td></tr>
30016 <tr><td>+</td></tr>
30029 3a. Table cells with escapable prefixes after edits
30032 "modes": ["selser"],
30033 "scrubWikitext": true,
30035 [ "table tbody tr:first-child td:first-child", "remove"]
30049 3b. Table cells with escapable prefixes after edits
30052 "modes": ["selser"],
30053 "scrubWikitext": true,
30055 [ "table tbody tr:first-child td:first-child", "html", "-" ],
30062 |<span id="x">foo</span>+
30071 # FIXME: This test will fail because
30072 # normalization doesn't realize that the id attribute
30073 # will eliminate the escapable scenario
30075 4a. Table cells without escapable prefixes after edits
30078 "modes": ["selser"],
30079 "scrubWikitext": true,
30081 [ "#x", "html", "-" ]
30094 ## This tests normalizer's ability to discriminate between
30095 ## cells having identical content.
30097 4b. Table cells without escapable prefixes after edits
30100 "modes": ["selser"],
30101 "scrubWikitext": true,
30103 [ "td", "html", "-" ]
30116 ## This tests normalizer's ability to not be tripped by
30117 ## comments (and whitespace)
30119 4c. Table cells without escapable prefixes after edits
30122 "modes": ["selser"],
30123 "scrubWikitext": true,
30125 [ "table tbody tr td:first-child", "remove" ]
30140 ## This tests normalizer's ability to handle HTML cells
30142 4d. Table cells without escapable prefixes after edits
30145 "modes": ["selser"],
30146 "scrubWikitext": true,
30148 [ "td", "html", "-" ]
30153 <tr><td>a</td></tr>
30157 <tr><td>-</td></tr>
30161 ## T111151 Remove font elements without attributes
30163 5a. font tags without attributes should be dropped in scrubWikitext mode
30166 "modes": ["html2wt"],
30167 "scrubWikitext": true
30171 <font><font>bar</font></font>
30172 <font class="x">boo</font>
30176 <font class="x">boo</font>
30180 5b. font tags should not be dropped without scrubWikitext being enabled
30183 "modes": ["html2wt"],
30184 "scrubWikitext": false
30193 Escape nowiki DOM elements
30197 <nowiki><i>foo</i></nowiki>
30199 <nowiki>''foo''</nowiki>
30202 # This is meant to be an interim fix while we go about figuring out
30203 # how to not introduce these trailing <nowiki/>s in the first place.
30205 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30209 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30211 <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>
30212 <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>
30226 New list is serialized on newlines
30230 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30234 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30236 The quick brown fox jumps over the lazy dog.
30242 The quick onyx goblin jumps over the lazy dwarf.
30246 New lists in formatting elements serialized w/o newlines
30258 <small><ul><li>hi</li></ul></small>
30270 New list in table doesn't need newlines
30274 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30283 # ---------------------------------------------------
30284 # End of tests spec'ing wikitext serialization norms |
30285 # ---------------------------------------------------
30289 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30297 <td><b>c</b><p>d</p></td>
30316 Anchor without href scenarios
30318 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30321 <a class="no">dice</a>
30326 <span name="foo"></span>
30330 New transclusion added after a list should be serialized after the list
30334 <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>
30340 # -----------------------------------------------------------------
30341 # End of section for Parsoid-only html2wt tests for serialization
30343 # -----------------------------------------------------------------
30345 # -----------------------------------------------------------------
30346 # The following section of tests are primarily to spec behavior of
30347 # the selective serializer. All these tests have manual selser
30348 # changes. The automated selser changes for all tests handle the
30349 # wide variation of changes, but these tests here capture specs
30350 # deterministically.
30351 # ----------------------------------------------------------------
30355 Selser: New comments should not be lost
30358 "modes": ["selser"],
30360 [ "#a", "after", "<!--c1-->" ],
30361 [ "#b", "before", "<!--c2-->" ]
30365 <span id="a">a</span>
30367 <span id="b">b</span>
30369 <span id="a">a</span><!--c1-->
30371 <!--c2--><span id="b">b</span>
30376 Selser: Check for validity of DSR before using it
30379 "modes": ["selser"],
30381 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30385 <span id="a">a</span>
30387 {{DISPLAYTITLE:foo}}
30388 <span id="a">a</span>
30392 1. DOMDiff: Changes to <ref> content should be looked up using id
30395 "modes": ["selser"],
30397 ["#X", "after", "bar"],
30398 ["#Y", "after", "baz"]
30402 X <ref><span id="X">foo</span></ref>
30405 <ref name="a"><span id="Y">foo</span></ref>
30408 X <ref><span id="X">foo</span>bar</ref>
30411 <ref name="a"><span id="Y">foo</span>baz</ref>
30416 2. DOMDiff: Changes to <ref> content should be looked up using id
30419 "modes": ["selser"],
30421 ["#Z", "after", "bar"]
30425 A <ref>foo bar for a</ref>
30426 B <ref group="X" name="b" />
30430 <references group="X">
30431 <ref name="b"><span id="Z">foo</span></ref>
30434 A <ref>foo bar for a</ref>
30435 B <ref group="X" name="b" />
30439 <references group="X">
30440 <ref name="b"><span id="Z">foo</span>bar</ref>
30445 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30448 "modes": ["selser"],
30450 [ "div:first-child", "text", "bar" ]
30454 <div style="{{1x|color:red;}}%">foo</div>
30456 <div style="{{1x|color:red;}}%">bar</div>
30468 <li class="mw-empty-elt"></li>
30469 <li class="mw-empty-elt"></li>
30476 [[File:Thumb.png|thumb]]
30478 <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>
30480 <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>
30484 unclosed internal link XSS (T137264)
30486 [[#%3Cscript%3Ealert(1)%3C/script%3E|
30488 <p>[[#<script>alert(1)</script>|
30491 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
30495 Validating that <style> isn't eaten by tidy (T167349)
30500 <style>.foo::before { content: "<foo>"; }</style>
30501 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30505 <style>.foo::before { content: "<foo>"; }</style>
30506 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30511 Validating that <style> isn't wrapped in a paragraph (T186965)
30515 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30517 <style>.foo::before { content: "<foo>"; }</style>
30519 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30521 But if it's on a line with other content, let it be wrapped.
30523 <style>.foo::before { content: "<foo>"; }</style> bar
30525 foo <style>.foo::before { content: "<foo>"; }</style>
30527 foo <style>.foo::before { content: "<foo>"; }</style> bar
30529 And the same if we have non-paragraph-breaking whitespace
30532 <style>.foo::before { content: "<foo>"; }</style>
30535 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30537 <style>.foo::before { content: "<foo>"; }</style>
30538 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30539 <p>But if it's on a line with other content, let it be wrapped.
30540 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
30541 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
30542 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
30543 </p><p>And the same if we have non-paragraph-breaking whitespace
30545 <style>.foo::before { content: "<foo>"; }</style>
30551 Validating that <link> isn't wrapped in a paragraph (T186965)
30555 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30557 <link rel="foo" href="bar"/>
30559 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30561 But if it's on a line with other content, let it be wrapped.
30563 <link rel="foo" href="bar"/> bar
30565 foo <link rel="foo" href="bar"/>
30567 foo <link rel="foo" href="bar"/> bar
30569 And the same if we have non-paragraph-breaking whitespace
30572 <link rel="foo" href="bar"/>
30575 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30577 <link rel="foo" href="bar"/>
30578 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30579 <p>But if it's on a line with other content, let it be wrapped.
30580 </p><p><link rel="foo" href="bar"/> bar
30581 </p><p>foo <link rel="foo" href="bar"/>
30582 </p><p>foo <link rel="foo" href="bar"/> bar
30583 </p><p>And the same if we have non-paragraph-breaking whitespace
30585 <link rel="foo" href="bar"/>
30591 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
30593 wgFragmentMode=[ 'html5', 'legacy' ]
30595 ==A&B&C&amp;D&amp;amp;E==
30596 [[#A&B&C&amp;D&amp;amp;E]]
30598 <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>
30599 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
30602 <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>
30603 <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>
30607 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
30609 wgFragmentMode=[ 'legacy' ]
30611 ==A&B&C&amp;D&amp;amp;E==
30612 [[#A&B&C&amp;D&amp;amp;E]]
30614 <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>
30615 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
30620 Decoding of HTML entities in embedded HTML tags
30622 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30624 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30627 <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>
30631 Decoding of HTML entities in indicator names for IDs (T104196)
30633 parsoid=wt2html,html2html
30636 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30638 1&2&3&4&amp;5=Indicator
30641 <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>
30644 # this version of the test strips out the ambiguity so Parsoid rts cleanly
30646 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
30650 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30652 1&2&3&4&amp;5=Indicator
30655 <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>
30658 # This fragment mode is what Parsoid supports.
30660 HTML5 ids: fallback to legacy
30662 wgFragmentMode=[ 'html5', 'legacy' ]
30674 ==Hey < # " > % : '==
30675 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30677 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30679 <!-- These two links should produce identical HTML -->
30680 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30683 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
30685 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30686 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30687 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30688 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30689 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30690 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30694 <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>
30695 <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>
30696 <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>
30697 <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>
30698 <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>
30699 <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>
30700 <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>
30701 </p><p>💩 <span id="💩"></span>
30702 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30705 <h2 id="Foo_bar">Foo bar</h2>
30707 <h2 id="foo_Bar_2">foo Bar</h2>
30709 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30711 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30713 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30715 <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>
30716 <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>
30718 <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>
30720 <!-- These two links should produce identical HTML -->
30721 <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>
30724 # Parsoid doesn't support this mode
30726 HTML5 ids: legacy with a fallback to modern
30728 wgFragmentMode=[ 'legacy', 'html5' ]
30740 ==Hey < # " > % : '==
30741 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30743 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30745 <!-- These two links should produce identical HTML -->
30746 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30749 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
30751 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30752 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30753 <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>
30754 <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>
30755 <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>
30756 <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>
30760 <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>
30761 <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>
30762 <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>
30763 <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>
30764 <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>
30765 <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>
30766 <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>
30767 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30768 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30772 # Parsoid doesn't support this mode.
30774 HTML5 ids: no legacy
30776 wgFragmentMode=[ 'html5' ]
30788 ==Hey < # " > % : '==
30789 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30791 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30793 <!-- These two links should produce identical HTML -->
30794 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30797 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
30799 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30800 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30801 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30802 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30803 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30804 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30808 <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>
30809 <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>
30810 <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>
30811 <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>
30812 <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>
30813 <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>
30814 <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>
30815 </p><p>💩 <span id="💩"></span>
30816 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30821 T90902: Normalize weird characters in section IDs
30823 wgFragmentMode=[ 'html5', 'legacy' ]
30829 <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>
30830 <p><a href="#Foo_bar">#Foo bar</a>
30833 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30834 <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>
30838 T51672: Test for brackets in attributes of elements in external link texts
30840 [http://example.com/ link <span title="title with [brackets]">span</span>]
30841 [http://example.com/ link <span title="title with [brackets]">span</span>]
30844 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30845 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30848 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30849 <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>
30853 T72875: Test for brackets in attributes of elements in internal link texts
30855 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30856 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30859 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30860 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30863 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30864 <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>
30868 T179544: {{anchorencode:}} output should be always usable in links
30870 wgFragmentMode=[ 'html5' ]
30872 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30874 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30877 <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>
30880 ## ------------------------------
30881 ## Parsoid section-wrapping tests
30882 ## ------------------------------
30884 Section wrapping for well-nested sections (no leading content)
30887 "wrapSections": true
30908 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30911 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30914 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30917 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30920 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30923 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30930 Section wrapping for well-nested sections (with leading content)
30933 "wrapSections": true
30938 Para 2 with a <div>nested in it</div>
30951 <section data-mw-section-id="0"><p>Para 1.</p>
30953 <p>Para 2 with a </p><div>nested in it</div>
30957 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30960 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30963 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30966 </section></section>
30970 Section wrapping with template-generated sections (good nesting 1)
30973 "wrapSections": true
30990 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30993 <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">
30994 </span><p about="#mwt1">b</p>
30995 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30998 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
31002 # In this example, the template scope is mildly expanded to incorporate the
31003 # trailing newline after the transclusion since that is part of section 1.1.1
31005 Section wrapping with template-generated sections (good nesting 2)
31008 "wrapSections": true,
31009 "modes": ["wt2html", "wt2wt"]
31024 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31027 <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">
31028 </span><p about="#mwt1">b</p><span about="#mwt1">
31029 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
31030 </span><p about="#mwt1">d</p><span about="#mwt1">
31031 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
31035 # In this example, the template scope is mildly expanded to incorporate the
31036 # trailing newline after the transclusion since that is part of section 1.2.1
31038 Section wrapping with template-generated sections (good nesting 3)
31041 "wrapSections": true,
31042 "modes": ["wt2html", "wt2wt"]
31060 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
31063 <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">
31064 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
31065 </span><p about="#mwt1">b</p><span about="#mwt1">
31066 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
31067 </span><p about="#mwt1">c</p><span about="#mwt1">
31068 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
31069 </span><p about="#mwt1">d</p><span about="#mwt1">
31070 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
31074 # Because of section-wrapping and template-wrapping interactions,
31075 # the scope of the template is expanded so that the template markup
31076 # is valid in the presence of <section> tags.
31077 # This exercises the s1 is null scenario in the wrapSections code
31079 Section wrapping with template-generated sections (bad nesting 1)
31082 "wrapSections": true
31096 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
31099 <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"]}'>
31100 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
31101 </span><p about="#mwt1">b
31102 </p><span about="#mwt1">
31104 </span><p about="#mwt1">c</p><span about="#mwt1">
31105 </span></section></div></section>
31108 # Because of section-wrapping and template-wrapping interactions,
31109 # the scope of the template is expanded so that the template markup
31110 # is valid in the presence of <section> tags.
31111 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
31113 Section wrapping with template-generated sections (bad nesting 2)
31116 "wrapSections": true
31134 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31137 </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">
31138 </span><p about="#mwt1">b</p><span about="#mwt1">
31139 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
31140 </span><p about="#mwt1">c</p><span about="#mwt1">
31142 </span><p about="#mwt1">d</p><span about="#mwt1">
31144 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
31148 # Because of section-wrapping and template-wrapping interactions,
31149 # additional template wrappers are added to <section> tags
31150 # so that template wrapping semantics are valid whether section
31151 # tags are retained or stripped. But, the template scope can expand
31152 # greatly when accounting for section tags.
31153 # This exercises the s1 and s2 are in different subtrees scenario
31155 Section wrapping with template-generated sections (bad nesting 3)
31158 "wrapSections": true,
31159 "modes": ["wt2html", "wt2wt"]
31177 <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>
31180 <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">
31181 </span><p about="#mwt1">b</p><span about="#mwt1">
31182 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
31183 </span><p about="#mwt1">c</p>
31186 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
31191 Section wrapping with uneditable lead section + div wrapping multiple sections
31194 "wrapSections": true
31199 <div style="border:1px solid red;">
31216 <section data-mw-section-id="-1"><p>foo</p>
31218 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31219 <section data-mw-section-id="1"><h1 id="1">1</h1>
31222 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31225 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31229 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31232 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31234 </section></section>
31238 Section wrapping with editable lead section + div overlapping multiple sections
31241 "wrapSections": true
31248 <div style="border:1px solid red;">
31265 <section data-mw-section-id="0"><p>foo</p>
31267 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31269 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31272 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31275 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31280 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31283 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31285 </section></section>
31289 HTML header tags should not be wrapped in section tags
31292 "wrapSections": true
31305 <section data-mw-section-id="0"><p>foo</p>
31307 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31309 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31311 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31313 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31317 Lead section containing only whitespace and comments.
31320 "wrapSections": true
31324 <!-- this is a comment, presumably significant to editors -->
31331 <section data-mw-section-id="0" data-parsoid="{}">
31332 <!-- this is a comment, presumably significant to editors -->
31333 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31336 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31341 Pseudo-sections emitted by templates should have id -2
31344 "wrapSections": true
31354 <section data-mw-section-id="-1"><p>foo</p>
31355 </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}}]}'>
31356 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31357 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31358 </section></div><span about="#mwt1">
31362 ##########################################################################
31363 Tests demonstrating white-space insensitivity in input wikitext
31364 for wikitext headings, wikitext list items, and wikitext table captions,
31365 headings, and cells. HTML versions of the same should preserve whitespace.
31366 ##########################################################################
31368 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31371 "modes": ["wt2html"],
31372 "preserveIEW": true
31376 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31377 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31378 == <!--Headings with fallback ids--> Личная жизнь ==
31379 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31380 ; <!--term to define--> term : <!--term's definition--> definition
31382 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31384 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31386 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31388 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
31390 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
31393 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31396 <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>
31397 <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>
31398 <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>
31399 <ul><li>List item</li></ul>
31400 <dl><dt>term </dt>
31401 <dd>definition</dd></dl>
31403 <caption>Table Caption
31406 <th>Table Heading 1</th>
31407 <th>Table Heading 2
31410 <td>Table Cell 1</td>
31414 <td>class="foo"</td>
31418 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
31419 </td></tr></tbody></table>
31422 <td>Table Cell 1</td>
31424 </td></tr></tbody></table> foo</dd></dl>
31426 <meta property="mw:PageProp/notoc">
31427 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
31428 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
31429 <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>
31430 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
31431 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
31433 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
31435 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
31437 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31439 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
31441 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
31444 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31445 </tbody></table> foo<!--c1--></dd></dl>
31448 # Looks like <caption> is not accepted in HTML
31450 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
31453 "modes": ["wt2html"],
31454 "preserveIEW": true
31458 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31459 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31461 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
31462 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
31465 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
31466 <ul><li> List item </li></ul>
31468 <tbody><tr><th> Table Heading </th><th></th></tr>
31469 <tr><td> Table Cell </td><th></th></tr>
31472 <meta property="mw:PageProp/notoc"/>
31473 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31474 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31476 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
31477 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
31482 Do not trim whitespace in links and quotes
31485 "modes": ["wt2html"],
31486 "preserveIEW": true
31489 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
31490 [[Foo| some text ]]
31492 <p>foo <i> italic </i> and <b> bold </b>
31493 <a href="/wiki/Foo" title="Foo"> some text </a>
31496 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
31497 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
31501 Remove p tags surrounding a single element in a figcaption
31505 [[File:Foobar.jpg|right|200x200px|Caption]]
31507 <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>
31511 Selser preserves lack of newline before list and allows newline after the list
31514 "modes": ["selser"],
31515 "scrubWikitext": true,
31517 [ "ul", "after", "<p>footer</p>" ]
31534 Selser does not introduce newlines between unedited paragraph preceding the list
31537 "modes": ["selser"],
31539 [ "table tbody tr td p:last-child", "empty" ]
31561 Selser does not introduce newlines between unedited paragraph following the list
31564 "modes": ["selser"],
31566 [ "table tbody tr td p:first-child", "empty" ]
31588 Remove a list item but do not insert newline above list
31591 "modes": ["selser"],
31593 [ "ul li:last-child", "remove" ]