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>
12673 # Ensure we're using a language without variants for this test; even
12674 # if $wgUsePigLatinVariant is true. We've picked `de` arbitrarily.
12676 Preprocessor precedence 18: another rightmost wins scenario
12681 {{ -{{{{1|tplarg}}} }} }-
12683 <p>{{ -{tplarg }} }-
12686 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12690 Preprocessor precedence 19: break syntax
12703 ### Token Stream Patcher tests
12705 ### These tests won't always pass wt2wt and other modes because
12706 ### on serialization, the table will be output on a new line.
12707 ### For now, we are blacklisting them, and using this to test selser.
12711 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12713 parsoid=wt2html,wt2wt
12715 {{echo|}}{| width = '100%'
12719 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12720 <tbody><tr><td>foo</td></tr>
12724 ## We used to, but no longer wt2wt this test since the default serializer
12725 ## will normalize the include directives to serialize on their own line.
12726 ## Selser will take care of preserving formatting in scenarios where they
12727 ## intermingled with other wikitext.
12729 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12733 <includeonly>a</includeonly>{| {{{b}}}
12737 <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":""}]]}'>
12738 <tbody><tr><td>c</td></tr>
12743 Table wikitext syntax outside wiki-tables
12747 ! not a table heading
12750 | class="foo bar" | baz
12758 ! not a table heading
12761 | class="foo bar" | baz
12770 ### Testing parsing of templates where a template arg
12771 ### has the same name as the template itself.
12777 {{{quote|{{{1}}}}}}
12781 Templates: Template Name/Arg clash: 1. Use of positional param
12790 Templates: Template Name/Arg clash: 2. Use of named param
12792 {{quote|quote=foo}}
12799 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12808 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12812 Templates: 1. Simple use
12821 Templates: 2. Inside a block tag
12823 <div>{{echo|Foo}}</div>
12824 <blockquote>{{echo|Foo}}</blockquote>
12827 <blockquote>Foo</blockquote>
12831 <blockquote><p>Foo</p></blockquote>
12835 Templates: P-wrapping: 1a. Templates on consecutive lines
12846 Templates: P-wrapping: 1b. Templates on consecutive lines
12860 Templates: P-wrapping: 1c. Templates on consecutive lines
12863 {{echo|bar}} <div>baz</div>
12872 bar </p><div>baz</div>
12876 Templates: P-wrapping: 1d. Template preceded by comment-only line
12885 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12889 Templates: Inline Text: 1. Multiple template uses
12891 {{echo|Foo}}bar{{echo|baz}}
12898 Templates: Inline Text: 2. Back-to-back template uses
12900 {{echo|Foo}}{{echo|bar}}
12907 Templates: Block Tags: 1. Multiple template uses
12909 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12911 <div>Foo</div><div>bar</div><div>baz</div>
12916 Templates: Block Tags: 2. Back-to-back template uses
12918 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12920 <div>Foo</div><div>bar</div>
12924 ## Parsoid drops empty elements in templates.
12926 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12933 b</p><p class="mw-empty-elt"></p>
12935 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\nb</p>"}},"i":0}}]}'>a</p><span about="#mwt1">
12936 </span><p about="#mwt1">b</p>
12940 Templates: Links: 1. Simple example
12942 {{echo|[[Foo|bar]]}}
12944 <p><a href="/wiki/Foo" title="Foo">bar</a>
12949 Templates: Links: 2. Generation of link href
12951 [[{{echo|Foo}}|bar]]
12953 <p><a href="/wiki/Foo" title="Foo">bar</a>
12958 Templates: Links: 3. Generation of part of a link href
12960 [[Fo{{echo|o}}|bar]]
12962 [[Foo{{echo|bar}}]]
12964 [[Foo{{echo|bar}}baz]]
12966 [[Foo{{echo|bar}}|bar]]
12968 [[:Foo{{echo|bar}}]]
12970 [[:Foo{{echo|bar}}|bar]]
12972 <p><a href="/wiki/Foo" title="Foo">bar</a>
12973 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12974 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12975 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12976 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12977 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12982 Templates: Links: 4. Multiple templates generating link href
12984 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12986 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12991 Templates: Links: 5. Generation of link text
12993 [[Foo|{{echo|bar}}]]
12995 <p><a href="/wiki/Foo" title="Foo">bar</a>
13000 Templates: Links: 5. Nested templates (only outermost template should be marked)
13002 {{echo|[[{{echo|Foo}}|bar]]}}
13004 <p><a href="/wiki/Foo" title="Foo">bar</a>
13009 Templates: HTML Tag: 1. Generation of HTML attr. key
13011 <div {{echo|style}}="color:red;">foo</div>
13013 <div style="color:red;">foo</div>
13018 Templates: HTML Tag: 2. Generation of HTML attr. value
13020 <div style={{echo|'color:red;'}}>foo</div>
13022 <div style="color:red;">foo</div>
13027 Templates: HTML Tag: 3. Generation of HTML attr key and value
13029 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13031 <div style="color:red;">foo</div>
13036 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13038 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13040 <div title="This is a long title with just one piece templated">foo</div>
13045 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13047 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13049 <div title="This is a long title with just one piece templated">foo</div>
13054 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13056 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13058 <div title="This is a long title with just one piece templated">foo</div>
13062 # SSS FIXME: While it is great we added support for all this,
13063 # do we want to make this part of the spec? Maybe we want to
13064 # deprecate this kind of usage in the future?
13066 Templates: HTML Tag: 7. Generation of partial attribute key string
13068 <div st{{echo|yle}}="color:red;">foo</div>
13070 <div style="color:red;">foo</div>
13075 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13077 <div {{echo|1=id="v1"}}>bar</div>
13079 <div id="v1">bar</div>
13084 Templates: HTML Tag: 9. Multiple template-generated attributes
13086 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13088 <div id="v1" title="foo">bar</div>
13093 Templates: Support for templates generating attributes and content
13095 {| {{mixed_attr_content_template}}
13100 <table style="color:red;" title="T48811">
13110 <table style="color:red;" title="T48811" about="#mwt1" typeof="mw:Transclusion mw:ExpandedAttrs" data-mw='{"parts":["{| ",{"template":{"target":{"wt":"mixed_attr_content_template","href":"./Template:Mixed_attr_content_template"},"params":{},"i":0}},"\n|-\n|bar\n|}"]}'>
13119 Template:attribute_from_template
13125 Table cell with attribute before expanded attribute
13128 | align="center" {{attribute_from_template}} |456
13132 <tbody><tr><td align="center" class="123" about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"class","html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[20,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"attribute_from_template\",\"href\":\"./Template:Attribute_from_template\"},\"params\":{},\"i\":0}}]}'>class=\"123\"</span>"},{"html":""}]]}'>456</td></tr>
13137 1. Entities and nowikis inside templated attributes should be handled correctly
13139 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13141 <div style="background:#f9f9f9;">foo</div>
13144 <div style="background:#f9f9f9;" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html"}' data-mw='{"attribs":[[{"txt":"style","html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[5,49,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"style{{=}}\\\"background:&amp;#35;f9f9f9;\\\"\"}},\"i\":0}}]}'>style</span><span typeof=\"mw:Nowiki\" about=\"#mwt1\" data-parsoid=\"{}\">=</span><span about=\"#mwt1\" data-parsoid=\"{}\">\"background:</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#35;\",\"srcContent\":\"#\"}'>#</span><span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"</span>"},{"html":""}]]}'>foo</div>
13148 2. Entities and nowikis inside templated attributes should be handled correctly
13151 |{{table_attribs_3}}
13156 <td style="background:#f9f9f9;">Foo
13161 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":0}}]}'>Foo</td></tr>
13166 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13169 |{{table_attribs_3}}
13174 <td style="background:#f9f9f9;">Foo
13178 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":1}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":2}}]}'>
13179 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13185 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13188 |{{table_attribs_6}} hi
13193 <td style="background: red;">hi
13198 <tbody><tr><td style="background: red;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_6","href":"./Template:Table_attribs_6"},"params":{},"i":0}}," hi"]}'> hi</td></tr>
13203 Templates: HTML Tables: 1. Generating start of a HTML table
13205 {{echo|<table><tr><td>foo</td>}}</tr></table>
13207 <table><tr><td>foo</td></tr></table>
13212 Templates: HTML Tables: 2a. Generating middle of a HTML table
13214 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13216 <table><tr><td>foo</td></tr></table>
13221 Templates: HTML Tables: 2b. Generating middle of a HTML table
13223 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13225 <table><tr><td>foo</td></tr></table>
13230 Templates: HTML Tables: 3. Generating end of a HTML table
13232 <table><tr>{{echo|<td>foo</td></tr></table>}}
13234 <table><tr><td>foo</td></tr></table>
13239 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13241 {{echo|<table>}}<tr><td>foo</td></tr></table>
13243 <table><tr><td>foo</td></tr></table>
13248 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13250 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13252 <table><tr><td>foo</td></tr></table>
13257 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13259 <table><tr>{{echo|<td>}}foo</td></tr></table>
13261 <table><tr><td>foo</td></tr></table>
13266 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13268 <table><tr><td>foo{{echo|</td>}}</tr></table>
13270 <table><tr><td>foo</td></tr></table>
13275 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13277 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13279 <table><tr><td>foo</td></tr></table>
13284 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13286 <table><tr><td>foo</td></tr>{{echo|</table>}}
13288 <table><tr><td>foo</td></tr></table>
13293 Templates: HTML Tables: 5. Proper fostering of categories from inside
13295 parsoid=wt2html,wt2wt
13297 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13298 <!--Two categories (T52330)-->
13299 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13301 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13302 <!--Two categories (T52330)-->
13303 <link rel="mw:PageProp/Category" href="./Category:Bar1"><link rel="mw:PageProp/Category" href="./Category:Bar2"><table><tbody><tr><td>foo</td></tr></tbody></table>
13306 ## Remex doesn't account for fostered content.
13308 Templates: Wiki Tables: 1a. Fostering of entire template content
13316 <tr><td></td></tr></table>
13321 <table><tbody><tr><td></td></tr></tbody></table>
13323 <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">
13329 Templates: Wiki Tables: 1b. Fostering of entire template content
13342 <tr><td></td></tr></table>
13350 <tbody><tr><td></td></tr></tbody></table>
13352 <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|}"]}'>
13354 </div><table about="#mwt3">
13359 ## Remex doesn't account for fostered content.
13361 Templates: Wiki Tables: 2. Fostering of partial template content
13371 <tr><td></td></tr></table>
13376 <div>b</div><table>
13377 <tbody><tr><td></td></tr></tbody></table>
13379 <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">
13386 Templates: Wiki Tables: 3. td-content via multiple templates
13389 {{echo|{{pipe}}a}}{{echo|b}}
13400 Templates: Wiki Tables: 4. Templated tags, no content
13406 <tr><td></td></tr></table>
13411 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13425 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13438 ## This test case is very specific to Parsoid's internals
13439 ## and is hence only tested for Parsoid's code. Parsoid uses
13440 ## a <meta> marker tag for <ref> tags and they are expanded
13441 ## much later. We are verifying that this <meta> tag usage
13442 ## doesn't prevent foster parenting.
13444 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13446 {{PartialTable}}<ref>foo</ref>
13451 <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">
13455 <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>
13459 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13469 <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{{!}}}"]}'>
13470 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13474 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13479 Templates: Lists: Multi-line list-items via templates
13481 *{{echo|a {{nonexistent|
13483 *{{echo|b {{nonexistent|
13486 <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>
13487 <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>
13492 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13494 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13496 <p><i>ab</i>c<i>d</i>e
13501 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13502 (PHP parser generates misnested html)
13504 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13506 <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>
13510 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13511 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13513 parsoid=wt2html,wt2wt
13515 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13517 <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>
13518 <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>
13519 <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>
13523 Templates: Ugly nesting: 4. Divs opened/closed across templates
13525 a<div>b{{echo|c</div>d}}e
13530 <p>a</p><div>bc</div><p>de
13535 Templates: Ugly templates: 3. newline-only template parameter
13544 # This looks like a bug: a single newline triggers p/br for some reason.
13546 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13555 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13556 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13558 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13564 <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
13565 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13569 # T66017 -- ugly wikitext with fostered content generates two template ranges
13570 # that are "identical" and generate nesting cycles in the algorithm
13572 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13574 {{echo|<table><tr><td><table>}}
13578 <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"}'>
13579 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13580 </table></td></tr></tbody></table>
13584 Templates: Parameters substituted at the top-level
13586 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13590 <p><i>who</i> me? <b>never!</b>
13594 <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>
13596 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13600 Templates: Param with empty arg in the final position
13604 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13608 Parser Functions: 1. Simple example
13617 Parser Functions: 2. Nested use (only outermost should be marked up)
13625 ## Note that the templates inside the references are not wrapped
13627 Template nested in extension tag in template
13629 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13630 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13633 <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>
13634 <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>
13635 <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>
13639 ### Pre-save transform tests
13642 pre-save transform: subst:
13648 This is a test template
13652 pre-save transform: normal template
13662 pre-save transform: nonexistent template
13666 {{thistemplatedoesnotexist}}
13668 {{thistemplatedoesnotexist}}
13672 pre-save transform: subst magic variables
13681 # This is T2089, which I fixed. -- wtm
13683 pre-save transform: subst: templates with parameters
13687 {{subst:paramtest|param="something else"}}
13689 This is a test template with parameter "something else"
13693 Template:nowikitest
13695 <nowiki>'''not wiki'''</nowiki>
13699 pre-save transform: nowiki in subst (T3188)
13703 {{subst:nowikitest}}
13705 <nowiki>'''not wiki'''</nowiki>
13709 Template:commenttest
13711 This template has <!-- a comment --> in it.
13715 pre-save transform: comment in subst (T3936)
13719 {{subst:commenttest}}
13721 This template has <!-- a comment --> in it.
13725 pre-save transform: unclosed tag
13729 <nowiki>'''not wiki'''
13731 <nowiki>'''not wiki'''
13735 pre-save transform: mixed tag case
13739 <NOwiki>'''not wiki'''</noWIKI>
13741 <NOwiki>'''not wiki'''</noWIKI>
13745 pre-save transform: unclosed comment in <nowiki>
13749 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13751 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13754 # Leading @ in this template definition works around a limitation
13755 # in parsoid's parserTests which otherwise strips the <span> from the
13756 # result (confusing it for a template wrapper)
13760 @<span onmouseover="alert('crap')">Oh no</span>
13764 (confirming safety of fix for subst T3936)
13766 {{Template:dangerous}}
13768 <p>@<span>Oh no</span>
13773 pre-save transform: comment containing gallery (T7024)
13777 <!-- <gallery>data</gallery> -->
13779 <!-- <gallery>data</gallery> -->
13783 pre-save transform: comment containing extension
13787 <!-- <tag>data</tag> -->
13789 <!-- <tag>data</tag> -->
13793 pre-save transform: comment containing nowiki
13797 <!-- <nowiki>data</nowiki> -->
13799 <!-- <nowiki>data</nowiki> -->
13803 pre-save transform: <noinclude> in subst (T5298)
13813 pre-save transform: <onlyinclude> in subst (T5298)
13817 {{subst:Includes2}}
13825 {{<includeonly>subst:</includeonly>Includes}}
13829 Template:SafeSubstTest
13831 {{<includeonly>safesubst:</includeonly>Includes}}
13835 T24297: safesubst: works during PST
13839 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13845 T24297: safesubst: works during normal parse
13854 subst: does not work during normal parse
13858 <p>{{subst:Includes}}
13863 pre-save transform: context links ("pipe trick")
13867 [[Article (context)|]]
13870 [[Bar:Article (context)|]]
13871 [[:Bar:Article (context)|]]
13873 [[|Article (context)]]
13877 [[Article (context)|Article]]
13878 [[Bar:Article|Article]]
13879 [[:Bar:Article|Article]]
13880 [[Bar:Article (context)|Article]]
13881 [[:Bar:Article (context)|Article]]
13883 [[Article (context)]]
13884 [[Bar:X (Y) Z|X (Y) Z]]
13885 [[:Bar:X (Y) Z|X (Y) Z]]
13889 pre-save transform: context links ("pipe trick") with interwiki prefix
13893 [[interwiki:Article|]]
13894 [[:interwiki:Article|]]
13895 [[interwiki:Bar:Article|]]
13896 [[:interwiki:Bar:Article|]]
13898 [[interwiki:Article|Article]]
13899 [[:interwiki:Article|Article]]
13900 [[interwiki:Bar:Article|Bar:Article]]
13901 [[:interwiki:Bar:Article|Bar:Article]]
13905 pre-save transform: context links ("pipe trick") with parens in title
13907 pst title=[[Somearticle (context)]]
13911 [[Article (context)|Article]]
13915 pre-save transform: context links ("pipe trick") with comma in title
13917 pst title=[[Someplace, Somewhere]]
13920 [[Otherplace, Elsewhere|]]
13921 [[Otherplace, Elsewhere, Anywhere|]]
13923 [[Otherplace, Somewhere|Otherplace]]
13924 [[Otherplace, Elsewhere|Otherplace]]
13925 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13929 pre-save transform: context links ("pipe trick") with parens and comma
13931 pst title=[[Someplace (IGNORED), Somewhere]]
13934 [[Otherplace (place), Elsewhere|]]
13936 [[Otherplace, Somewhere|Otherplace]]
13937 [[Otherplace (place), Elsewhere|Otherplace]]
13941 pre-save transform: context links ("pipe trick") with comma and parens
13943 pst title=[[Who, me? (context)]]
13946 [[Me, Myself, and I (1937 song)|]]
13948 [[Yes, you. (context)|Yes, you.]]
13949 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13953 pre-save transform: context links ("pipe trick") with namespace
13955 pst title=[[Ns:Somearticle]]
13959 [[Ns:Article|Article]]
13963 pre-save transform: context links ("pipe trick") with namespace and parens
13965 pst title=[[Ns:Somearticle (context)]]
13969 [[Ns:Article (context)|Article]]
13973 pre-save transform: context links ("pipe trick") with namespace and comma
13975 pst title=[[Ns:Somearticle, Context, Whatever]]
13979 [[Ns:Article, Context, Whatever|Article]]
13983 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13985 pst title=[[Ns:Somearticle, Context (context)]]
13989 [[Ns:Article (context)|Article]]
13993 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13995 pst title=[[Ns:Somearticle (IGNORED), Context]]
13999 [[Ns:Article, Context|Article]]
14003 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14007 [[Article(context)|]]
14008 [[Bar:Article(context)|]]
14009 [[:Bar:Article(context)|]]
14010 [[|Article(context)]]
14014 [[Article(context)|Article]]
14015 [[Bar:Article(context)|Article]]
14016 [[:Bar:Article(context)|Article]]
14017 [[Article(context)]]
14018 [[Bar:X(Y)Z|X(Y)Z]]
14019 [[:Bar:X(Y)Z|X(Y)Z]]
14023 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14027 [[Article (context)|]]
14028 [[Bar:Article (context)|]]
14029 [[:Bar:Article (context)|]]
14030 [[|Article (context)]]
14034 [[Article (context)|Article]]
14035 [[Bar:Article (context)|Article]]
14036 [[:Bar:Article (context)|Article]]
14037 [[Article (context)]]
14038 [[Bar:X (Y) Z|X (Y) Z]]
14039 [[:Bar:X (Y) Z|X (Y) Z]]
14043 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14047 [[Article(context)|]]
14048 [[Bar:Article(context)|]]
14049 [[:Bar:Article(context)|]]
14050 [[|Article(context)]]
14054 [[Article(context)|Article]]
14055 [[Bar:Article(context)|Article]]
14056 [[:Bar:Article(context)|Article]]
14057 [[Article(context)]]
14058 [[Bar:X(Y)Z|X(Y)Z]]
14059 [[:Bar:X(Y)Z|X(Y)Z]]
14063 pre-save transform: context links ("pipe trick") with commas (T23660)
14067 [[Article (context), context|]]
14068 [[Article (context),context|]]
14069 [[Bar:Article (context), context|]]
14070 [[Bar:Article (context),context|]]
14071 [[:Bar:Article (context), context|]]
14072 [[:Bar:Article (context),context|]]
14074 [[Article (context), context|Article]]
14075 [[Article (context),context|Article]]
14076 [[Bar:Article (context), context|Article]]
14077 [[Bar:Article (context),context|Article]]
14078 [[:Bar:Article (context), context|Article]]
14079 [[:Bar:Article (context),context|Article]]
14083 Parsoid: backwards pipe trick
14090 <p>[[|<b>bar</b>]]</p>
14094 pre-save transform: trim trailing empty lines
14098 Empty lines are trimmed
14104 Empty lines are trimmed
14108 pre-save transform: Signature expansion
14115 * <noinclude>~~~</noinclude>
14116 * <includeonly>~~~</includeonly>
14117 * <onlyinclude>~~~</onlyinclude>
14119 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14120 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14121 * 00:02, 1 January 1970 (UTC)
14122 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14123 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14124 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14129 ParserOutput flags from signature expansion (T84843)
14136 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14137 flags=user-signature
14142 pre-save transform: Signature expansion in nowiki tags (T2093)
14148 <nowiki>~~~~</nowiki>
14150 <includeonly><nowiki>~~~~</nowiki></includeonly>
14152 <noinclude><nowiki>~~~~</nowiki></noinclude>
14154 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14156 {{subst:Foo}} shall be converted to FOO
14158 As well as inside noinclude/onlyinclude
14159 <noinclude>{{subst:Foo}}</noinclude>
14160 <onlyinclude>{{subst:Foo}}</onlyinclude>
14162 But not inside includeonly
14163 <includeonly>{{subst:Foo}}</includeonly>
14167 <nowiki>~~~~</nowiki>
14169 <includeonly><nowiki>~~~~</nowiki></includeonly>
14171 <noinclude><nowiki>~~~~</nowiki></noinclude>
14173 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14175 FOO shall be converted to FOO
14177 As well as inside noinclude/onlyinclude
14178 <noinclude>FOO</noinclude>
14179 <onlyinclude>FOO</onlyinclude>
14181 But not inside includeonly
14182 <includeonly>{{subst:Foo}}</includeonly>
14186 Parsoid: Recognize nowiki with trailing space in tags
14190 <nowiki ><div>[[foo]]</nowiki >
14198 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14205 Parsoid: Recognize nowiki with odd capitalization
14209 <noWikI ><div>[[foo]]</Nowiki >
14211 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14216 Parsoid: Escape nowiki with trailing space in tags
14220 <p><nowiki > foo </nowiki ></p>
14221 <p>a<nowiki />b</p>
14222 <p>c<nowiki/ >d</p>
14224 <nowiki > foo </nowiki >
14232 Parsoid: Escape weird noWikI capitalizations
14236 <p><noWikI > foo </NoWikI ></p>
14238 <noWikI > foo </NoWikI >
14242 ### Message transform tests
14245 message transform: magic variables
14255 message transform: should not transform wiki markup
14265 message transform: <noinclude> in transcluded template (T6926)
14275 message transform: <onlyinclude> in transcluded template (T6926)
14285 {{#special:}} page name, known
14289 {{#special:Recentchanges}}
14291 Special:RecentChanges
14295 {{#special:}} page name with subpage, known
14299 {{#special:Recentchanges/param}}
14301 Special:RecentChanges/param
14305 {{#special:}} page name, unknown
14309 {{#special:foobar nonexistent}}
14311 Special:Foobar nonexistent
14315 {{#speciale:}} page name, known
14319 {{#speciale:Recentchanges}}
14321 Special:RecentChanges
14325 {{#speciale:}} page name with subpage, known
14329 {{#speciale:Recentchanges/param}}
14331 Special:RecentChanges/param
14335 {{#speciale:}} page name, unknown
14339 {{#speciale:foobar nonexistent}}
14341 Special:Foobar_nonexistent
14347 ### For Parsoid-specific tests, see
14348 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14353 parsoid=wt2html,wt2wt,html2html
14355 [[Image:foobar.jpg]]
14357 <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>
14360 <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>
14364 Serialize simple image with span wrapper
14368 <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>
14370 [[File:Foobar.jpg]]
14374 Simple image (using File: namespace, now canonical)
14376 [[File:Foobar.jpg]]
14378 <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>
14381 <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>
14385 Right-aligned image
14387 [[File:Foobar.jpg|right]]
14389 <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>
14392 <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>
14398 [[File:Foobar.jpg|right|Caption text]]
14400 <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>
14403 <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>
14407 Image with caption, T55312 #1
14409 [[File:Foobar.jpg|right|Caption page stuff]]
14411 <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>
14414 <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>
14418 Image with caption, T55312 #2
14420 [[File:Foobar.jpg|right|Caption page=]]
14422 <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>
14425 <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>
14429 Image with caption, T55312 #3
14431 [[File:Foobar.jpg|right|Caption page=stuff]]
14433 <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>
14436 <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>
14440 Image caption with pipe entity
14442 [[File:Foobar.jpg|thumb|one | two]]
14443 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14445 <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>
14446 <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>
14449 <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>
14450 <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>
14454 Allow empty links in image captions (T62753)
14458 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14463 <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>
14466 <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>
14468 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14469 </figcaption></figure>
14473 Titles in unlinked images (T23454)
14475 [[File:Foobar.jpg|link=|stuff]]
14477 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14480 <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>
14484 Link with empty target
14493 Image with link trail
14495 Linktrails should not work for images: [[File:Foobar.jpg]]s
14497 <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
14500 <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>
14504 Image with empty attribute
14506 parsoid=wt2html,wt2wt,html2html
14508 [[File:Foobar.jpg|right||Caption text]]
14510 <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>
14513 <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>
14517 1. Block image with individual attributes from templates
14519 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14521 <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>
14524 <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>
14528 2. Block Image with individual attributes from templates
14530 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14532 <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>
14535 <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>
14539 3. Inline image with individual attributes from templates
14541 [[File:Foobar.jpg|{{echo|50px}}]]
14543 <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>
14546 <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>
14549 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14550 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14552 Image with multiple attributes from the same template
14554 [[File:Foobar.jpg|{{image_attribs}}]]
14556 <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>
14559 <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>
14563 Image with link tails
14567 123[[File:Foobar.jpg]]456
14568 123[[File:Foobar.jpg|right]]456
14569 123[[File:Foobar.jpg|thumb]]456
14571 <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
14573 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
14574 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
14577 <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
14579 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
14580 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
14583 <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>
14584 <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
14585 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>
14589 Image with multiple captions -- only last one is accepted
14591 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14593 <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>
14596 <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>
14600 Image with multiple widths -- use last
14602 [[File:Foobar.jpg|200px|300px|caption]]
14604 <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>
14607 <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>
14611 Image with multiple alignments -- use first (T50664)
14615 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14617 [[File:Foobar.jpg|middle|text-top|caption]]
14619 <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>
14620 <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>
14623 <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>
14624 <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>
14628 Image with width attribute at different positions
14630 [[File:Foobar.jpg|200px|right|Caption]]
14631 [[File:Foobar.jpg|right|200px|Caption]]
14632 [[File:Foobar.jpg|right|Caption|200px]]
14634 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
14635 <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 <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>
14639 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
14640 <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 <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>
14644 # a sad bit of backward-compatibility
14646 Image with size specified with pxpx (T15500, T53628)
14648 parsoid=wt2html,wt2wt,html2html
14650 [[File:Foobar.jpg|20pxpx]]
14651 [[File:Foobar.jpg|200x20pxpx]]
14653 <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>
14654 <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>
14657 <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>
14661 Image with link parameter, wiki target
14663 [[File:Foobar.jpg|link=Main Page]]
14665 <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>
14668 <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>
14671 # parsoid T51293 (part 1)
14673 Image with link parameter, URL target
14675 [[File:Foobar.jpg|link=http://example.com/]]
14677 <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>
14680 <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>
14683 # parsoid T51293 (part 2)
14685 Image with link parameter, protocol-less URL target
14687 [[File:Foobar.jpg|link=//example.com/]]
14689 <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>
14692 <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>
14696 Escaping non-block captions (T107435)
14699 "modes": ["wt2wt"],
14701 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14705 [[Image:Foobar.jpg|caption]]
14707 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14710 # wgExternalLinkTarget not supported by Parsoid
14712 Image with link parameter, wgExternalLinkTarget
14714 [[Image:foobar.jpg|link=http://example.com/]]
14716 wgExternalLinkTarget='foobar'
14718 <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>
14723 Image with link parameter, wgNoFollowLinks set to false
14725 [[Image:foobar.jpg|link=http://example.com/]]
14727 wgNoFollowLinks=false
14729 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14734 Image with link parameter, wgNoFollowDomainExceptions
14736 [[Image:foobar.jpg|link=http://example.com/]]
14738 wgNoFollowDomainExceptions='example.com'
14740 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14744 # wgExternalLinkTarget not supported by Parsoid
14746 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14748 [[Image:foobar.jpg|link=http://example.com/|Title]]
14750 wgExternalLinkTarget='foobar'
14752 <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>
14757 Image with empty link parameter
14759 [[File:Foobar.jpg|link=]]
14761 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14764 <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>
14768 Image with link parameter (wiki target) and unnamed parameter
14770 [[File:Foobar.jpg|link=Main_Page|Title]]
14772 <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>
14775 <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>
14779 Image with link parameter (URL target) and unnamed parameter
14781 [[File:Foobar.jpg|link=http://example.com/|Title]]
14783 <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>
14786 <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>
14790 Thumbnail image with link parameter
14793 parsoid=wt2html,wt2wt,html2html
14795 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14797 <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>
14800 <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>
14804 Manually-specified thumbnail image
14808 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14810 <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>
14813 <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>
14817 Manually-specified thumbnail image with explicit link to wiki page
14820 parsoid=wt2html,wt2wt,html2html
14822 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14824 <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>
14827 <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>
14831 Manually-specified thumbnail image with explicit link to url
14834 parsoid=wt2html,wt2wt,html2html
14836 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14838 <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>
14841 <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>
14845 Manually-specified thumbnail image with explicit no link
14848 parsoid=wt2html,wt2wt,html2html
14850 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14852 <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>
14855 <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>
14859 Manually-specified thumbnail image with explicit link and alt text
14862 parsoid=wt2html,wt2wt,html2html
14864 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14866 <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>
14869 <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>
14873 Image with frame and link
14875 parsoid=wt2html,wt2wt,html2html
14877 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14879 <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>
14882 <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>
14886 Image with frame and link and explicit alt
14888 parsoid=wt2html,wt2wt,html2html
14890 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14892 <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>
14895 <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>
14899 Image with wiki markup in implicit alt
14901 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14903 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14905 <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>
14906 </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>
14909 <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>
14911 <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>
14915 Alt image option should handle most kinds of wikitext without barfing
14917 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14919 <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>
14922 <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>
14926 Image with table with attributes in caption
14928 parsoid=wt2html,html2html
14930 [[File:Foobar.jpg|thumb|
14937 <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>
14938 <table class="123">
14939 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14942 </figcaption></figure>
14946 Image with table with rows from templates in caption
14948 [[File:Foobar.jpg|thumb|
14954 <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>
14956 <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>
14958 </figcaption></figure>
14962 Image with nested tables in caption
14964 [[File:Foobar.jpg|thumb|Foo<br />
14973 <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}'/>
14977 <tbody><tr><td>z</td></tr>
14978 </tbody></table></td></tr>
14980 </figcaption></figure>
14984 Image with heading and horizontal rule in caption
14986 [[File:Foobar.jpg|thumb|
14992 <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>
14995 <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>
14996 <h3 id="Testing">Testing</h3>
14998 <hr data-parsoid='{"extra_dashes":10}'/>
14999 </figcaption></figure>
15002 ###################
15003 # Conflicting image format options.
15004 # First option specified should 'win'.
15005 # All three cases in each test should be identical.
15008 Image with 'frameless' first.
15010 parsoid=wt2html,wt2wt,html2html
15012 [[File:Foobar.jpg|frameless|caption]]
15014 [[File:Foobar.jpg|frameless|frame|caption]]
15016 [[File:Foobar.jpg|frameless|thumb|caption]]
15018 <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>
15019 </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><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>
15023 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
15024 <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>
15025 <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>
15029 Image with 'frame' first.
15031 parsoid=wt2html,wt2wt,html2html
15033 [[File:Foobar.jpg|frame|caption]]
15034 [[File:Foobar.jpg|frame|frameless|caption]]
15035 [[File:Foobar.jpg|frame|thumb|caption]]
15037 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
15038 <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 <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>
15042 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
15043 <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>
15044 <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>
15048 Image with 'thumb' first.
15050 parsoid=wt2html,wt2wt,html2html
15052 [[File:Foobar.jpg|thumb|caption]]
15053 [[File:Foobar.jpg|thumb|frameless|caption]]
15054 [[File:Foobar.jpg|thumb|frame|caption]]
15056 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15057 <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 <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>
15061 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15062 <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 <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>
15066 ###################
15068 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15069 # and https://phabricator.wikimedia.org/T64258
15070 # Foobar has actual size of 1941x220
15071 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15072 # a scalable format.
15073 # 2. Framed images always ignore size options; always render at default size.
15074 # 3. "Unspecified format" and border are the only types which can be
15078 Image: unspecified format and border enlarge
15080 parsoid=wt2html,wt2wt,html2html
15082 [[File:Foobar.jpg|2000px]]
15084 [[File:Foobar.jpg|border|2000px]]
15086 <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>
15087 </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>
15090 <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>
15091 <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>
15095 Image: "unspecified format" and border reduce
15097 parsoid=wt2html,wt2wt,html2html
15099 [[File:Foobar.jpg|1000px]]
15101 [[File:Foobar.jpg|border|1000px]]
15103 <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>
15104 </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>
15107 <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>
15108 <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>
15112 Image: thumbs reduce
15114 parsoid=wt2html,wt2wt,html2html
15116 [[File:Foobar.jpg|thumb|50px]]
15118 <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>
15121 <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>
15125 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15127 parsoid=wt2html,wt2wt,html2html
15129 [[File:Foobar.jpg|thumb|2000px]]
15131 [[File:Foobar.svg|thumb|2000px]]
15133 <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>
15134 <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>
15137 <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>
15138 <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>
15142 Image: frameless can reduce in size
15144 parsoid=wt2html,wt2wt,html2html
15146 [[File:Foobar.jpg|frameless|50px]]
15148 <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>
15151 <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>
15155 Image: bitmap frameless can't be enlarged past original size, but vector can
15157 parsoid=wt2html,wt2wt,html2html
15159 [[File:Foobar.jpg|frameless|2000px]]
15161 [[File:Foobar.svg|frameless|2000px]]
15163 <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>
15164 </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>
15167 <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>
15168 <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>
15172 Image: framed images are always unscaled.
15174 parsoid=wt2html,wt2wt,html2html
15176 [[File:Foobar.jpg|frame]]
15178 [[File:Foobar.jpg|frame|50px]]
15180 [[File:Foobar.jpg|frame|50x50px]]
15182 [[File:Foobar.jpg|frame|2000px]]
15184 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15185 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15186 <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 <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>
15190 <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>
15191 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15192 <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 <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>
15196 ###################
15199 Link to image page- image page normally doesn't exists, hence edit link
15200 Add test with existing image page
15201 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15205 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15210 T20784 Link to non-existent image page with caption should use caption as link text
15212 [[:Image:test|caption]]
15214 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15219 Frameless image caption with a free URL
15221 [[File:Foobar.jpg|http://example.com]]
15223 <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>
15226 <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>
15230 Thumbnail image caption with a free URL
15234 [[File:Foobar.jpg|thumb|http://example.com]]
15236 <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>
15239 <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>
15243 Thumbnail image caption with a free URL and explicit alt
15246 parsoid=wt2html,wt2wt,html2html
15248 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15250 <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>
15253 <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>
15257 SVG thumbnails with no language set
15260 [[File:Foobar.svg|thumb|caption]]
15262 <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>
15265 <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>
15269 SVG thumbnails with language de
15271 parsoid=wt2html,wt2wt,html2html
15273 [[File:Foobar.svg|thumb|caption|lang=de]]
15275 <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>
15278 <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>
15282 SVG thumbnails with invalid language code
15284 parsoid=wt2html,wt2wt,html2html
15286 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15288 <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>
15291 <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>
15295 T3887: A ISBN with a thumbnail
15297 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15299 <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>
15302 <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>
15306 T3887: A RFC with a thumbnail
15308 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15310 <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>
15313 <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>
15317 T3887: A mailto link with a thumbnail
15319 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15321 <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>
15324 <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>
15327 # Pending resolution to T2368
15329 T2648: Frameless image caption with a link
15331 [[File:Foobar.jpg|text with a [[link]] in it]]
15333 <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>
15336 <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>
15340 T2648: Frameless image caption with a link (suffix)
15342 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15344 <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>
15347 <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>
15351 T2648: Frameless image caption with an interwiki link
15353 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15355 <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>
15358 <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>
15362 T2648: Frameless image caption with a piped interwiki link
15364 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15366 <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>
15369 <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>
15373 T107474: Frameless image caption with <nowiki>
15375 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15377 <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>
15381 Escape HTML special chars in image alt text
15383 [[File:Foobar.jpg|& < > "]]
15385 <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>
15388 <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>
15392 Escape HTML special chars in image alt text with LanguageConverter
15396 [[File:Foobar.jpg|& < > "]]
15398 <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>
15401 <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>
15405 Entities in file name and attributes
15407 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15409 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15412 <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>
15416 T2499: Alt text should have Ӓ, not &1234;
15418 [[File:Foobar.jpg|♀]]
15420 <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>
15423 <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>
15427 Broken image caption with link
15429 parsoid=wt2html,wt2wt,html2html
15431 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15433 <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.
15436 <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>
15440 Image caption containing another image
15442 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15444 <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>
15447 <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>
15451 Image: caption containing a newline
15453 [[File:Foobar.jpg|This
15456 <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>
15459 <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>
15463 Image: caption containing leading space
15464 (The leading space should not trigger nowiki escaping in wt2wt mode)
15466 [[File:Foobar.jpg|thumb| bar]]
15468 <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>
15471 <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>
15474 # html/php output not have newlines after table, td, th, etc. because
15475 # Linker::makeThumbLink2() replaces the newlines with spaces since
15476 # the table is inside a caption.
15477 # FIXME: Verify if that circa 2004 fix is still required.
15479 Image: caption containing a table
15481 parsoid=wt2html,wt2wt,html2html
15483 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15489 and some more text.]]
15491 <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>
15494 <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
15497 <tr><th>Foo</th><th>Bar</th></tr>
15500 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15504 T5090: External links other than http: in image captions
15506 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15508 <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>
15511 <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>
15517 parsoid=wt2html,wt2wt,html2html
15519 [[Image:foobar.jpg|a|class=b]]
15521 <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>
15524 <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>
15528 Localized image handling (1).
15530 parsoid=wt2html,wt2wt,html2html
15533 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15535 <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>
15538 <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>
15542 Localized image handling (2).
15545 parsoid=wt2html,wt2wt,html2html
15548 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15550 <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>
15553 <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>
15557 Localized image handling (3).
15562 <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>
15564 [[File:Foobar.jpg|بندانگشتی]]
15568 "border", "frameless" and "class" attributes on an image.
15571 parsoid=wt2html,wt2wt,html2html
15573 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15575 <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>
15578 <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>
15581 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15583 Invalid image attributes (T64500)
15586 parsoid=wt2html,wt2wt,html2html
15588 [[File:Foobar.jpg|thumb|float|left|caption]]
15590 [[File:Foobar.jpg|thumb|righ|caption]]
15592 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15594 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
15595 <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>
15596 <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>
15599 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15600 <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>
15601 <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>
15607 #REDIRECT [[File:Barfoo.jpg]]
15610 # FIXME: Parsoid should run this test -- but we'd need to teach the
15611 # mockAPI about the redirected Barfoo.jpg image.
15615 [[Image:Barfoo.jpg]]
15617 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15622 Missing image with uploads disabled
15626 [[File:Foobaz.jpg]]
15628 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15631 <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>
15634 # Parsoid-specific testing for images
15635 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15636 # Currently imperfect due to a flaw in the Parsoid testrunner
15638 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15642 Parsoid-specific image handling - simple image with size and middle alignment
15644 [[File:Foobar.jpg|middle|50px]]
15646 <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>
15650 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
15652 parsoid=wt2wt,wt2html,html2html
15654 [[Image:Foobar.jpg|middle|50px]]
15656 <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>
15660 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
15662 [[File:Foobar.jpg|50px|middle]]
15664 <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>
15668 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
15670 parsoid=wt2html,wt2wt,html2html
15672 [[Image:Foobar.jpg|50px|middle]]
15674 <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>
15678 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15680 [[File:Foobar.jpg|500x10px|baseline|caption]]
15682 <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>
15686 Parsoid-specific image handling - simple image with border and size spec
15688 [[File:Foobar.jpg|50px|border|caption]]
15690 <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>
15694 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15696 parsoid=wt2html,html2html
15698 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15700 <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>
15704 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
15706 parsoid=wt2html,html2html
15708 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15710 <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>
15714 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15716 parsoid=wt2html,html2html
15718 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15720 <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>
15724 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
15726 parsoid=wt2html,html2html
15728 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15730 <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>
15734 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
15736 parsoid=wt2html,wt2wt,html2html
15738 [[File:Foobar.jpg|frame|500x50px|caption]]
15740 <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>
15744 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
15746 parsoid=wt2html,html2html
15748 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15750 <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>
15754 Parsoid-specific image handling - frameless image with specific size, border, and caption
15756 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15758 <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>
15762 Parsoid-specific image handling - simple image with a formatted caption
15764 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15766 <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>
15770 Parsoid-specific image handling - caption with a template in it
15772 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15774 <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>
15778 Parsoid-specific image handling - caption with unbalanced tags in it
15780 parsoid=wt2html,wt2wt,html2html
15783 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15787 <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>
15792 Parsoid-specific image handling - empty caption (1)
15794 parsoid=wt2html,wt2wt
15796 [[File:Foobar.jpg|thumb|]]
15798 <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>
15801 # empty captions don't get serialized unless we're in the "round trip" case
15803 Parsoid-specific image handling - empty caption (2)
15807 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15808 <a href="./File:Foobar.jpg">
15809 <img resource="./File:Foobar.jpg"
15810 src="//example.com/images/3/3a/Foobar.jpg"
15811 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15812 height="25" width="220"/>
15814 <figcaption></figcaption>
15817 [[File:Foobar.jpg|thumb]]
15821 Parsoid-specific image handling - whitespace caption
15823 [[File:Foobar.jpg|thumb| ]]
15825 <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>
15829 Parsoid-specific image handling - lang option
15832 [[File:Foobar.svg|lang=de|caption]]
15836 <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>
15840 ## Edge case bugs in Parsoid from T93580
15842 T93580: 1. Templated <ref> inside block images
15844 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15848 <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>
15850 <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>
15854 T93580: 2. <ref> inside inline images
15856 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15860 <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>
15862 <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>
15866 T93580: 3. Templated <ref> inside inline images
15868 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15872 <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>
15874 <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>
15881 Subpage test/subpage
15889 subpage title=[[Subpage test]]
15893 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15898 Subpage noslash link
15900 subpage title=[[Subpage test]]
15904 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15909 Subpage test/1/2/subpage
15915 Relative subpage noslash link
15917 parsoid=wt2wt,wt2html,html2html
15918 subpage title=[[Subpage test/1/2/3/4]]
15924 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15925 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15928 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15929 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15933 Parsoid: dot-slash prefixed wikilinks
15943 </p><p>[[././baz/]]
15948 </p><p>[[././baz/]]
15953 Render invalid page names as plain text (T53090)
15965 [[foo[http://example.com]xyz]]
15967 [[{{echo|./../foo}}|bar]]
15968 [[{{echo|foo/.}}|bar]]
15969 [[{{echo|foo/..}}|bar]]
15970 [[{{echo|foo~~~~bar}}]]
15971 [[{{echo|foo>bar}}]]
15972 [[{{echo|foo././bar}}]]
15973 [[{{echo|foo{bar}}]]
15974 [[{{echo|foo}bar}}]]
15975 [[{{echo|foo[bar}}]]
15976 [[{{echo|foo]bar}}]]
15977 [[{{echo|foo<bar}}]]
15979 <p>[[./../foo|bar]]
15989 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15990 </p><p>[[./../foo|bar]]
16003 <p>[[./../foo|bar]]
16013 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16015 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16016 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16017 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16018 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16019 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16020 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16021 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16022 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16023 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16024 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16025 [[<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>
16033 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16038 T2561: {{/Subpage}}
16040 subpage title=[[Page]]
16044 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16052 Category:MediaWiki User's Guide
16060 [[:Category:MediaWiki User's Guide]]
16062 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16071 [[Category:MediaWiki User's Guide]]
16073 cat=MediaWiki_User's_Guide sort=
16075 <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"}}'/>
16079 PAGESINCATEGORY invalid title fatal (r33546 fix)
16081 {{PAGESINCATEGORY:<bogus>}}
16088 Category with different sort key
16092 [[Category:MediaWiki User's Guide|Foo]]
16094 cat=MediaWiki_User's_Guide sort=Foo
16096 <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"}}'/>
16100 Category with identical sort key
16104 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16106 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16108 <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"}}'/>
16112 Category with empty sort key
16117 [[Category:MediaWiki User's Guide|]]
16119 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16123 Category with empty sort key and parentheses
16128 [[Category:Foo (bar)|]]
16130 [[Category:Foo (bar)|Foo]]
16134 Category with link tail
16139 123[[Category:Foo]]456
16141 123[[Category:Foo]]456
16145 Category with template
16150 [[Category:{{echo|Foo}}]]
16152 [[Category:{{echo|Foo}}]]
16156 Category with template in sort key
16161 [[Category:Foo|{{echo|Bar}}]]
16163 [[Category:Foo|{{echo|Bar}}]]
16167 Category with template in sort key and title
16172 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16174 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16177 ## We used to, but no longer wt2wt this test since the default serializer
16178 ## will normalize all categories to serialize on their own line.
16179 ## This wikitext usage is going to be fairly uncommon in production and
16180 ## selser will take care of preserving formatting in those scenarios.
16182 Category / paragraph interactions
16186 Foo [[Category:Baz]] Bar
16188 Foo [[Category:Baz]]
16196 [[Category:Baz]] Bar
16209 {{echo|[[Category:Baz]]}}
16222 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16223 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16224 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16225 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16226 <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>
16227 <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}}]}'/>
16228 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16231 ## We used to, but no longer wt2wt this test since the default serializer
16232 ## will normalize all categories to serialize on their own line.
16233 ## This wikitext usage is going to be fairly uncommon in production and
16234 ## selser will take care of preserving formatting in those scenarios.
16236 ## The whitespace on the empty line is part of the test. Please do not delete
16238 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16244 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16246 {{echo|[[Category:Foo]] and so should this!}}
16248 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16253 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16255 <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>
16258 ## Parsoid will not try to wt2wt this while preserving newlines because
16259 ## it suppresses excess newlines within list items -- and we don't want to
16260 ## introduce a special case just for categories, which is, in reality somewhat
16261 ## odd behavior -- categories are unlikely to be used in list items like this
16262 ## in top-level pages and are only likely to show up in template-generated
16263 ## list items where this RT-ing is a non-issue.
16265 ## The whitespace on the empty line is part of the test. Please do not delete
16267 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16273 [[Category:Foo]] and this should be part of the same list item
16276 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16278 <ul><li>This and this should be part of the same list item</li>
16279 <li>So should this and this should be part of the same list item</li></ul>
16282 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16283 <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>
16287 ## Newlines and categories that follow the last item of a list
16288 ## are treated differently because this (list followed by categories)
16289 ## is an extremely common pattern on wikis.
16291 3. Categories and newlines: newline suppression for last list item should RT properly
16312 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16314 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16315 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16317 <dl><dd>c</dd></dl>
16319 <link rel="mw:PageProp/Category" href="./Category:C"/>
16321 <dl><dt>d</dt></dl>
16323 <link rel="mw:PageProp/Category" href="./Category:D"/>
16327 4. Categories and newlines: newline suppression for last list item should RT properly
16335 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16337 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16340 ## only wt2html for this to make sure the algo only applies to the rightmost path
16342 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16355 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16357 <ul><li>d</li></ul></li></ul>
16358 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16361 ## We used to, but no longer wt2wt this test since the default serializer
16362 ## will normalize all categories to serialize on their own line.
16363 ## This wikitext usage is going to be fairly uncommon in production and
16364 ## selser will take care of preserving formatting in those scenarios.
16366 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16370 *a [[Category:Foo]]
16372 <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>
16375 # This test also demonstrates because of newline+category tunneling
16376 # through the list hander, template wrapping doesn't expand to the
16377 # containing list when the list item swallows the category.
16379 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16384 <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
16385 </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>
16389 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16393 {{echo|[[Category:Foo]]
16397 <ul><li>a</li></ul>
16399 <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">
16400 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16401 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16405 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16409 [[Category:Bar]]<!--boo1--> <!--boo2-->
16410 [[Category:Baz]]<!--boo3--> <!--boo4-->
16412 <ul><li>a</li></ul>
16414 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16415 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16419 Categories and newlines: should behave properly with linkprefix (T87753)
16434 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16435 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16439 No regressions on internal links following category (T174639)
16441 parsoid=wt2html,html2html
16443 [[Category:Foo]]<div>a
16448 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16451 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16453 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16456 # Note that Parsoid differs slightly from PHP due to T175421
16458 11. Special case where only newlines separate links (T175416)
16460 parsoid=wt2html,html2html
16464 [[Foo]][[es:Alimento]]
16469 <a href="/wiki/Foo" title="Foo">Foo</a>
16470 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16473 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16475 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16477 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16481 Category links with multiple namespaces
16483 [[Category:Project:Foo]]
16485 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16489 Parsoid: Serialize link to category page with colon escape
16495 [[:Category:Foo|Bar]]
16498 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16499 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16503 # We used to, but no longer wt2wt this test since the default serializer
16504 # will normalize all categories to serialize on their own line.
16505 # This wikitext usage is going to be fairly uncommon in production and
16506 # selser will take care of preventing whitespace insertion if this
16507 # occurs in an article.
16509 # html2html disabled for the same reason (whitespace insertion between
16512 # html2wt disabled because it localizes the "Category" namespace.
16514 Link prefix/suffixes aren't applied to category links
16524 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16528 Link prefix/suffixes aren't applied to language links
16538 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16542 Parsoid: Serialize link to file page with colon escape
16548 [[:File:Foo.png|Bar]]
16551 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16552 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16557 Parsoid: Serialize a genuine category link without colon escape
16562 [[Category:Foo|Bar]]
16564 <link rel="mw:PageProp/Category" href="./Category:Foo">
16565 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16569 Normalize hrefs properly before testing for invalid link targets (T72894)
16573 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16575 [[Category:Toxine bactérienne]]
16579 Parsoid: Defaultsort
16581 {{DEFAULTSORT:Foo}}
16583 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16586 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16587 # But, this is a limitation of our representation and is documented in
16588 # TemplateHandler.js in processSpecialMagicWord
16590 Parsoid: Defaultsort (template-generated)
16592 {{{{echo|DEFAULTSORT}}:Foo}}
16594 <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"}]]}'/>
16598 ### Inter-language links
16601 Interlanguage links
16609 es:Alimento fr:Nourriture zh:食品
16611 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16612 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16613 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16617 Duplicate interlanguage links (T26502)
16628 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16629 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16630 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16631 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16638 Basic section headings
16645 ===Smaller headline===
16648 <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>
16651 <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>
16654 <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>
16660 Section headings with TOC
16663 ===Subheadline 1===
16664 =====Skipping a level=====
16665 ======Skipping a level======
16669 ===Another headline===
16671 <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>
16673 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16675 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16677 <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>
16679 <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>
16686 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16688 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16694 <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>
16695 <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>
16696 <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>
16697 <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>
16698 <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>
16701 <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>
16706 TOC anchors don't collide
16714 <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>
16716 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16717 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16718 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16719 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16723 <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>
16724 <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>
16725 <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>
16726 <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>
16730 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16731 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16733 Handling of sections up to level 6 and beyond
16738 ==Level 2 Heading==
16739 ===Level 3 Heading===
16740 ====Level 4 Heading====
16741 =====Level 5 Heading=====
16742 ======Level 6 Heading======
16743 =======Level 7 Heading=======
16744 ========Level 8 Heading========
16745 =========Level 9 Heading=========
16746 ==========Level 10 Heading==========
16748 <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>
16750 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16752 <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>
16754 <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>
16756 <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>
16758 <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>
16760 <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>
16761 <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>
16762 <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>
16763 <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>
16764 <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>
16778 <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>
16779 <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>
16780 <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>
16781 <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>
16782 <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>
16783 <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>
16784 <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>
16785 <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>
16786 <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>
16787 <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>
16790 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16791 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16792 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16793 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16794 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16795 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16796 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16797 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16798 <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>
16799 <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>
16803 TOC regression (T11764)
16807 ====title 1.1.1====
16812 <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>
16814 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16816 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a>
16818 <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>
16821 <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>
16824 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16826 <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>
16832 <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>
16833 <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>
16834 <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>
16835 <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>
16836 <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>
16837 <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>
16842 TOC for heading containing <span id="..."></span> (T96153)
16845 ==<span id="old-anchor"></span>New title==
16847 <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>
16849 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16853 <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>
16858 TOC with wgMaxTocLevel=3 (T8204)
16864 ====title 1.1.1====
16869 <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>
16871 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16873 <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>
16874 <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>
16877 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16879 <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>
16885 <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>
16886 <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>
16887 <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>
16888 <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>
16889 <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>
16890 <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>
16895 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16901 ====Section 1.1.1====
16902 ====Section 1.1.1.1====
16905 <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>
16907 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16909 <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>
16912 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16916 <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>
16917 <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>
16918 <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>
16919 <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>
16920 <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>
16926 Resolving duplicate section names
16931 <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>
16932 <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>
16937 Resolving duplicate section names with differing case (T12721)
16942 <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>
16943 <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>
16955 Template with sections, __NOTOC__
16962 <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>
16963 <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>
16964 <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>
16965 <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>
16970 __NOEDITSECTION__ keyword
16976 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16977 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16982 Link inside a section heading
16984 ==Section with a [[Main Page|link]] in it==
16986 <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>
16991 TOC regression (T14077)
16998 <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>
17000 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17002 <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>
17005 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17009 <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>
17010 <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>
17011 <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>
17016 T3219 URL next to image (good)
17018 http://example.com [[File:Foobar.jpg]]
17020 <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>
17023 <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>
17026 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17028 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17030 parsoid=wt2html,html2html
17033 The line above must have a trailing space!
17036 But just in case it doesn't...
17038 <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>
17039 <p>The line above must have a trailing space!
17041 <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>
17042 <p>But just in case it doesn't...
17045 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17046 <p>The line above must have a trailing space!</p>
17047 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17049 <p>But just in case it doesn't...</p>
17053 Header with special characters (T27462)
17055 The tooltips shall not show entities to the user (ie. be double escaped)
17072 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17074 <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>
17076 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17077 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17078 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17079 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17080 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17084 <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>
17087 <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>
17090 <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>
17093 <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>
17096 <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>
17100 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17102 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17105 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17108 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17111 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17114 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17119 Header with space, plus and underscore as entity
17121 Id should not contain + for spaces
17123 ==Space between Text==
17126 ==Space-Entity between Text==
17129 ==Plus+between+Text==
17132 ==Plus-Entity+between+Text==
17135 ==Underscore_between_Text==
17138 ==Underscore-Entity_between_Text==
17141 [[#Space between Text]]
17142 [[#Space-Entity between Text]]
17143 [[#Plus+between+Text]]
17144 [[#Plus-Entity+between+Text]]
17145 [[#Underscore_between_Text]]
17146 [[#Underscore-Entity_between_Text]]
17148 <p>Id should not contain + for spaces
17150 <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>
17152 <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>
17153 <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>
17154 <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>
17155 <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>
17156 <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>
17157 <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>
17161 <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>
17164 <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>
17167 <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>
17170 <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>
17173 <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>
17176 <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>
17178 </p><p><a href="#Space_between_Text">#Space between Text</a>
17179 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17180 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17181 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17182 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17183 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17186 <p>Id should not contain + for spaces</p>
17188 <h2 id="Space_between_Text">Space between Text</h2>
17191 <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>
17194 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17197 <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>
17200 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17203 <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>
17206 <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>
17207 <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>
17208 <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>
17209 <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>
17210 <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>
17211 <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>
17214 # Parsoid html2wt disabled because it adds padding spaces around =
17216 Headers with excess '=' characters
17217 (Are similar tests necessary beyond the 1st level?)
17219 parsoid=wt2html,wt2wt,html2html
17223 =''italic'' heading==
17224 ==''italic'' heading=
17226 <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>
17228 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17229 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17230 <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>
17231 <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>
17235 <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>
17236 <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>
17237 <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>
17238 <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>
17241 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17242 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17243 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17244 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17248 HTML headers vs TOC (T25393)
17249 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17261 <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>
17263 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17265 <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>
17266 <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>
17269 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17271 <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>
17272 <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>
17278 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17279 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17280 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17281 <h1><span class="mw-headline" id="Header_2">Header 2
17283 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17284 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17287 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17288 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17289 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17291 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17293 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17294 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17295 <meta property="mw:PageProp/noeditsection"/>
17299 Single-line or multiline-comments can follow headings
17301 parsoid=wt2html,wt2wt
17309 <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>
17310 <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>
17311 <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>
17314 <h2 id="foo">foo</h2><!---->
17315 <h2 id="bar">bar</h2><!--c1-->
17316 <h2 id="baz">baz</h2><!--
17322 T3219 URL next to image (broken)
17324 http://example.com[[File:Foobar.jpg]]
17326 <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>
17329 <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>
17333 T3186 news: in the middle of text
17335 http://en.wikinews.org/wiki/Wikinews:Workplace
17337 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17343 Namespaced link must have a title
17352 Namespaced link must have a title (bad fragment version)
17354 [[Project:#fragment]]
17356 <p>[[Project:#fragment]]
17362 ### HTML tags and HTML attributes
17366 div with no attributes
17368 <div>HTML rocks</div>
17370 <div>HTML rocks</div>
17375 div with double-quoted attribute
17377 <div id="rock">HTML rocks</div>
17379 <div id="rock">HTML rocks</div>
17384 div with single-quoted attribute
17386 <div id='rock'>HTML rocks</div>
17388 <div id="rock">HTML rocks</div>
17393 div with unquoted attribute
17395 <div id=rock>HTML rocks</div>
17397 <div id="rock">HTML rocks</div>
17402 div with illegal double attributes
17404 <div id="a" id="b">HTML rocks</div>
17406 <div id="b">HTML rocks</div>
17411 div with empty attribute value, space before equals
17413 parsoid=wt2html,html2html
17415 <div class =>HTML rocks</div>
17417 <div class="">HTML rocks</div>
17420 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17424 div with multiple empty attribute values
17426 wgFragmentMode=[ 'html5', 'legacy' ]
17428 parsoid=wt2html,html2html
17430 <div id= title=>HTML rocks</div>
17432 <div id="title=">HTML rocks</div>
17435 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17438 # FIXME Parsoid doesn't actually match PHP here.
17439 # Probably we should use the synthetic <foo /> or <indicator>
17440 # extensions for this test, which are enabled when running parser tests.
17442 Extension tag in attribute value
17444 <span title="<translate>123</translate>">ok</span>
17445 !! html/php+disabled
17446 <p><span title="<translate>123</translate>">ok</span>
17449 <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>
17453 table with multiple empty attribute values
17455 parsoid=wt2html,html2html
17461 <table title="id=">
17467 <table title="id=">
17468 <tbody><tr><td>hi</td></tr>
17473 div with braces in attribute value
17475 <div title="{}">Foo</div>
17477 <div title="{}">Foo</div>
17480 <div title="{}">Foo</div>
17484 div with empty attribute value, no space before equals
17486 parsoid=wt2html,html2html
17488 <div class=>HTML rocks</div>
17490 <div class="">HTML rocks</div>
17493 <div class="">HTML rocks</div>
17497 HTML multiple attributes correction
17499 <p class="error" class="awesome">Awesome!</p>
17501 <p class="awesome">Awesome!</p>
17506 Table multiple attributes correction
17509 !+ class="error" class="awesome"|status
17514 <th class="awesome">status
17522 <DIV ID="x">HTML ROCKS</DIV>
17524 <div id="x">HTML ROCKS</div>
17529 Non-ASCII pseudo-tags are rendered as text
17538 Pseudo-tag with URL 'name' renders as url link
17540 <http://example.com/>
17542 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17547 text with amp in the middle of nowhere
17551 <p>Remember AT&T?
17556 text with character entity: eacute
17558 I always thought é was a cute letter.
17560 <p>I always thought é was a cute letter.
17565 text with entity-escaped character entity-like string: eacute
17567 I always thought &eacute; was a cute letter.
17569 <p>I always thought &eacute; was a cute letter.
17574 text with undefined character entity: xacute
17576 I always thought &xacute; was a cute letter.
17578 <p>I always thought &xacute; was a cute letter.
17585 <data value="5">five</data>
17586 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17587 <mark>This highlighted text</mark>
17589 <p><data value="5">five</data>
17590 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17591 <mark>This highlighted text</mark>
17596 HTML tag with leading space is parsed as text
17600 <p>< div>foo< /div>
17604 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17605 ## the HTML5 parsing spec.
17607 Element with broken attribute syntax
17611 <div style=" style="123">hi</div>
17614 <div style="123">hi</div>
17618 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17619 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17623 ### Nesting tests (see T43545, T52604, T53081)
17626 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17627 # Note that html2wt is considerably more difficult if we use <b> in
17628 # the test case, instead of <small>
17630 Ensure that HTML adoption agency algorithm is properly implemented.
17632 <small>X<small>Y</small>Z</small>
17634 <p><small>X<small>Y</small>Z</small>
17638 # This was T43545 in the PHP parser.
17642 <kbd>X<kbd>Y</kbd>Z</kbd>
17644 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17648 # The following cases were T53081 in the PHP parser.
17649 # Note that there are some other nestable tags (b, i, etc) which are
17650 # not covered; see T53081 for discussion.
17655 <em>X<em>Y</em>Z</em>
17657 <p><em>X<em>Y</em>Z</em>
17662 Nesting of <strong>
17664 <strong>X<strong>Y</strong>Z</strong>
17666 <p><strong>X<strong>Y</strong>Z</strong>
17675 <p><q>X<q>Y</q>Z</q>
17682 <ruby>X<ruby>Y</ruby>Z</ruby>
17684 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17691 <bdo>X<bdo>Y</bdo>Z</bdo>
17693 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17705 [[Media:Foobar.jpg]]
17706 [[Media:Video.ogv]]
17707 [[:Media:Video.ogv]]
17709 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17710 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17711 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17714 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17715 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17716 <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>
17720 Media link with text
17722 [[Media:Foobar.jpg|A neat file to look at]]
17724 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17727 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17730 # FIXME: this is still bad HTML tag nesting
17731 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17732 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17734 Media link with nasty text
17736 parsoid=wt2html,html2html
17738 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17740 <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>
17743 <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>
17745 <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>
17749 Media link to nonexistent file (T3702)
17751 [[Media:No such.jpg]]
17752 [[Media:No_such file.jpg]]
17754 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17755 <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>
17758 <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>
17759 <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>
17763 Image link to nonexistent file (T3850 - good)
17765 [[File:No_such.jpg]]
17767 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17770 <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>
17774 :Image link to nonexistent file (T3850 - bad)
17776 [[:Image:No such.jpg]]
17778 <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>
17781 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17785 Character reference normalization in link text (T3938)
17787 [[Main Page|this&that]]
17789 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17796 Test for unicode normalization
17798 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17802 (T21451) Links should refer to the normalized form.
17810 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17811 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17812 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17813 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17814 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17819 Empty attribute crash test (T4067)
17821 <font color="">foo</font>
17823 <p><font color="">foo</font>
17828 Empty attribute crash test single-quotes (T4067)
17830 <font color=''>foo</font>
17832 <p><font color="">foo</font>
17837 Attribute test: equals, then nothing
17839 parsoid=wt2html,html2html
17841 <font color=>foo</font>
17843 <p><font color="">foo</font>
17846 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17850 Attribute test: unquoted value
17852 parsoid=wt2html,html2html
17854 <font color=x>foo</font>
17856 <p><font color="x">foo</font>
17859 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17863 Attribute test: unquoted but illegal value (hash)
17865 <font color=#x>foo</font>
17867 <p><font color="#x">foo</font>
17871 # Parsoid does not serialize to empty attribute syntax,
17872 # so wt2wt and html2wt cases are skipped
17874 Attribute test: no value (T54330)
17876 parsoid=wt2html,html2html
17878 <font color>foo</font>
17880 <p><font color="">foo</font>
17883 <p><font color="">foo</font></p>
17887 T4095: link with three closing brackets
17891 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17894 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17898 T4095: link with pipe and three closing brackets
17900 [[Main Page|link]]]
17902 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17905 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17909 T4095: link with pipe and three closing brackets, version 2
17911 [[Main Page|[http://example.com/]]]
17913 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17916 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17925 Template:Dangerous attribute
17927 " onmouseover="alert(document.cookie)
17931 Template:Dangerous style attribute
17933 border-size: expression(alert(document.cookie))
17939 <div style="float: right; {{{1}}}">Magic div</div>
17943 T4304: HTML attribute safety (safe template; regression T4309)
17945 <div title="{{test}}"></div>
17947 <div title="This is a test template"></div>
17950 <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>
17953 # Parsoid has enough context to handle this case
17955 T4304: HTML attribute safety (dangerous template; 2309)
17957 <div title="{{dangerous attribute}}"></div>
17959 <div title=""></div>
17962 <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>
17966 T4304: HTML attribute safety (dangerous style template; 2309)
17968 <div style="{{dangerous style attribute}}"></div>
17970 <div style="/* insecure input */"></div>
17973 <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>
17977 T4304: HTML attribute safety (safe parameter; 2309)
17979 {{div style|width: 200px}}
17981 <div style="float: right; width: 200px">Magic div</div>
17984 <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>
17988 T4304: HTML attribute safety (unsafe parameter; 2309)
17990 {{div style|width: expression(alert(document.cookie))}}
17992 <div style="/* insecure input */">Magic div</div>
17995 <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>
17998 ## Parsoid output here differs; needs investigation.
18000 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
18002 {{div style|"><script>alert(document.cookie)</script>}}
18004 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18008 ## Parsoid output here differs; needs investigation.
18010 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18012 {{div style|" ><script>alert(document.cookie)</script>}}
18014 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18019 T4304: HTML attribute safety (link)
18021 <div title="[[Main Page]]"></div>
18023 <div title="[[Main Page]]"></div>
18026 <div title="[[Main Page]]"></div>
18030 T4304: HTML attribute safety (italics)
18032 <div title="''foobar''"></div>
18034 <div title="''foobar''"></div>
18039 T4304: HTML attribute safety (bold)
18041 <div title="'''foobar'''"></div>
18043 <div title="'''foobar'''"></div>
18048 T4304: HTML attribute safety (ISBN)
18050 <div title="ISBN 1234567890"></div>
18052 <div title="ISBN 1234567890"></div>
18057 T4304: HTML attribute safety (RFC)
18059 <div title="RFC 1234"></div>
18061 <div title="RFC 1234"></div>
18066 T4304: HTML attribute safety (PMID)
18068 <div title="PMID 1234567890"></div>
18070 <div title="PMID 1234567890"></div>
18075 T4304: HTML attribute safety (web link)
18077 <div title="http://example.com/"></div>
18079 <div title="http://example.com/"></div>
18084 T4304: HTML attribute safety (named web link)
18086 <div title="[http://example.com/ link]"></div>
18088 <div title="[http://example.com/ link]"></div>
18091 <div title="[http://example.com/ link]"></div>
18095 T5244: HTML attribute safety (extension; safe)
18097 <div style="<nowiki>background:blue</nowiki>"></div>
18099 <div style="background:blue"></div>
18102 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18106 T5244: HTML attribute safety (extension; unsafe)
18108 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18110 <div style="/* insecure input */"></div>
18113 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18116 # More MSIE fun discovered by Tom Gilder
18119 MSIE CSS safety test: spurious slash
18121 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18123 <div style="/* insecure input */">evil</div>
18126 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18130 MSIE CSS safety test: hex code
18132 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18134 <div style="/* insecure input */">evil</div>
18137 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18141 MSIE CSS safety test: comment in url
18143 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18145 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18148 <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>
18152 MSIE CSS safety test: comment in expression
18154 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18156 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18159 <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>
18163 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18165 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18167 <p style="/* invalid control char */">A</p>
18170 <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>
18174 MSIE 6 CSS safety test: Fullwidth (T57332)
18176 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18177 <div style="top:EXPRESSION(alert())">B</div>
18179 <p style="/* insecure input */">A</p>
18180 <div style="/* insecure input */">B</div>
18183 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18184 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18188 MSIE 6 CSS safety test: IPA extensions (T57332)
18190 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18191 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18193 <div style="/* insecure input */">A</div>
18194 <p style="/* insecure input */">B</p>
18197 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18198 <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>
18202 MSIE 6 CSS safety test: sup/sub script (T57332)
18204 <div style="background-image:url⁽javascript:alert())">A</div>
18205 <div style="background-image:url₍javascript:alert())">B</div>
18206 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18208 <div style="/* insecure input */">A</div>
18209 <div style="/* insecure input */">B</div>
18210 <p style="/* insecure input */">C</p>
18213 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18214 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18215 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18221 parsoid=wt2html,html2html
18224 title="data:text/html,<img src=1 onerror=alert(1)>"
18225 style="-o-link:attr(title);-o-link-source:current">X</div>
18227 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18230 <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>
18234 MSIE 6 CSS safety test: Repetition markers (T57332)
18236 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18237 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18238 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18239 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18240 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18241 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18242 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18244 <p style="/* insecure input */">A</p>
18245 <p style="/* insecure input */">B</p>
18246 <p style="/* insecure input */">C</p>
18247 <p style="/* insecure input */">D</p>
18248 <p style="/* insecure input */">E</p>
18249 <p style="/* insecure input */">F</p>
18250 <p style="/* insecure input */">G</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')"}}'>A</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')"}}'>B</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')"}}'>C</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')"}}'>D</p>
18257 <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>
18258 <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>
18259 <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>
18263 Table attribute legitimate extension
18266 !+ style="<nowiki>color:blue</nowiki>"|status
18271 <th style="color:blue">status
18277 Table attribute safety
18280 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18285 <th style="/* insecure input */">status
18291 CSS line continuation 1
18293 <div style="background-image: u\ rl(test.jpg);"></div>
18295 <div style="/* insecure input */"></div>
18300 CSS line continuation 2
18302 <div style="background-image: u\ rl(test.jpg); "></div>
18304 <div style="/* invalid control char */"></div>
18315 Expansion of multi-line templates in attribute values (T8255)
18317 <div style="background: {{identity|#00FF00}}">-</div>
18319 <div style="background: #00FF00">-</div>
18324 Expansion of multi-line templates in attribute values (T8255 sanity check)
18326 <div style="background:
18329 <div style="background: #00FF00">-</div>
18332 <div style="background:
18337 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18339 <div style="background: #00FF00">-</div>
18341 <div style="background: #00FF00">-</div>
18346 Tags which are hidden from tidiers cannot pass through the Sanitizer
18348 <mw:toc><script>alert();</script></mw:toc>
18350 <p><mw:toc><script>alert();</script></mw:toc>
18355 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18359 Parser hook: empty input
18370 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18373 ## Don't expect parsoid to rt this form.
18375 Parser hook: empty input using terminated empty elements
18377 parsoid=wt2html,html2html
18388 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18392 Parser hook: empty input using terminated empty elements (space before)
18403 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18407 Parser hook: basic input
18418 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18421 ## Don't expect parsoid to rt this form.
18423 Parser hook: case insensitive
18425 parsoid=wt2html,html2html
18436 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18439 ## Don't expect parsoid to rt this form.
18441 Parser hook: case insensitive, redux
18443 parsoid=wt2html,html2html
18454 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18458 Parser hook: nested tags
18462 <tag><tag></tag></tag>
18474 </tag></pre><p></tag>
18477 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
18481 Parser hook: basic arguments
18483 <tag width="200" height="100" depth="50" square=""></tag>
18496 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18499 ## Don't expect parsoid to rt this form.
18501 Parser hook: basic arguments, variations
18503 parsoid=wt2html,html2html
18505 <tag width=200 height = "100" depth = '50' square></tag>
18518 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18522 Parser hook: argument containing a forward slash (T7344)
18524 <tag filename="/tmp/bla"></tag>
18529 'filename' => '/tmp/bla',
18534 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18537 ## Don't expect parsoid to rt this form.
18539 Parser hook: empty input using terminated empty elements (T4374)
18541 parsoid=wt2html,html2html
18553 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}'></pre><p>text</p>
18556 ## </tag> should be output literally since there is no matching tag that begins it
18557 ## Don't expect parsoid to rt this form.
18559 Parser hook: basic arguments using terminated empty elements (T4374)
18563 <tag width=200 height = "100" depth = '50' square/>
18580 <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
18584 ## Don't expect parsoid to rt this form.
18586 Parser hook: Don't allow unclosed extension tags
18592 this is a '''test'''
18594 <p>test <tag>123
18595 </p><p>this is a <b>test</b>
18598 <p>test <tag>123</p>
18600 <p>this is a <b>test</b></p>
18604 Parser hook: horizontal rule inside extension tag that outputs <pre>
18625 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18629 Parser hook: static parser hook not inside a comment
18631 <statictag>hello, world</statictag>
18633 <statictag action="flush" />
18639 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18640 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18644 Parser hook: static parser hook inside a comment
18646 <!-- <statictag>hello, world</statictag> -->
18647 <statictag action="flush" />
18652 <!-- <statictag>hello, world</statictag> -->
18653 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18656 # Nested template calls; this case was broken by Parser.php rev 1.506,
18660 Template:One-parameter
18662 (My parameter is: {{{1}}})
18666 Template:Map-one-parameter
18668 {{{{{1}}}|{{{2}}}}}
18672 Nested template calls
18674 {{Map-one-parameter|One-parameter|param}}
18676 <p>(My parameter is: param)
18686 Sanitizer: Closing of open tags
18688 <s></s><table></table>
18690 <p><s></s></p><table></table>
18692 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
18696 Sanitizer: Closing of open but not closed tags
18705 Sanitizer: Closing of closed but not open tags
18711 <p class="mw-empty-elt">
18716 Sanitizer: Closing of closed but not open table tags
18720 Table not started</td></tr></table>
18722 <p>Table not started
18727 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18729 wgFragmentMode=[ 'html5', 'legacy' ]
18731 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18733 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18736 <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>
18740 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18742 wgFragmentMode=[ 'legacy' ]
18744 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18746 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18750 # In HTML5, the restrictions are that id must contain at least one character,
18751 # and must not contain any space characters.
18753 Sanitizer: Validating the contents of the id attribute (T6515)
18757 <br id="" /><br id="a space" />
18762 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18764 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18768 <br id="foo" /><br id="foo" />
18770 Something need to be done. foo-2 ?
18774 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18777 <meta itemprop="hello" content="world">
18778 <meta http-equiv="refresh" content="5">
18779 <meta itemprop="hello" http-equiv="refresh" content="5">
18780 <link itemprop="hello" href="{{SERVER}}">
18781 <link rel="stylesheet" href="{{SERVER}}">
18782 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18786 <p> <meta itemprop="hello" content="world" />
18787 <meta http-equiv="refresh" content="5">
18788 <meta itemprop="hello" content="5" />
18789 <link itemprop="hello" href="http://example.org" />
18790 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18791 <link itemprop="hello" href="http://example.org" />
18798 Sanitizer: Strip comments from CSS attributes
18800 parsoid=wt2html,wt2wt
18802 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/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>
18807 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18811 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18813 [[meatball:Soft"Security]]
18815 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18818 <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>
18822 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18824 [[meatball:Foo<Bar]]
18825 [[meatball:Foo>Bar]]
18826 [[meatball:Foo<bar]]
18827 [[meatball:Foo>bar]]
18829 <p>[[meatball:Foo<Bar]]
18830 [[meatball:Foo>Bar]]
18831 [[meatball:Foo<bar]]
18832 [[meatball:Foo>bar]]
18835 <p>[[meatball:Foo<Bar]]
18836 [[meatball:Foo>Bar]]
18837 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18838 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18842 Language converter: output gets cut off unexpectedly (T7757)
18846 this bit is safe: }-
18848 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18850 then we get cut off here: }-
18852 all additional text is vanished
18854 <p>this bit is safe: }-
18855 </p><p>but if we add a conversion instance: xxx
18856 </p><p>then we get cut off here: }-
18857 </p><p>all additional text is vanished
18860 <p>this bit is safe: }-</p>
18861 <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>
18862 <p>then we get cut off here: }-</p>
18863 <p>all additional text is vanished</p>
18867 Language converter glossary rules inside attributes (T119158)
18869 language=sr variant=sr-el
18871 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18873 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18876 </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>
18879 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18881 <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>
18885 Self closed html pairs (T7487)
18887 <center><font id="bug" />Centered text</center>
18888 <div><font id="bug2" />In div text</div>
18890 <center><font id="bug"></font>Centered text</center>
18891 <div><font id="bug2"></font>In div text</div>
18895 Punctuation: nbsp before exclamation
18899 <p>C'est grave !
18904 Punctuation: CSS !important (T13874)
18906 <div style="width:50% !important">important</div>
18908 <div style="width:50% !important">important</div>
18913 Punctuation: CSS ! important (T13874; with space after)
18915 <div style="width:50% ! important">important</div>
18917 <div style="width:50% ! important">important</div>
18922 HTML bullet list, closed tags (T7497)
18935 <ul data-parsoid='{"stx":"html"}'>
18936 <li data-parsoid='{"stx":"html"}'>One</li>
18937 <li data-parsoid='{"stx":"html"}'>Two</li>
18943 HTML bullet list, unclosed tags (T7497)
18955 <ul data-parsoid='{"stx":"html"}'>
18956 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18957 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18963 HTML ordered list, closed tags (T7497)
18976 <ol data-parsoid='{"stx":"html"}'>
18977 <li data-parsoid='{"stx":"html"}'>One</li>
18978 <li data-parsoid='{"stx":"html"}'>Two</li>
18984 HTML ordered list, unclosed tags (T7497)
18997 <ol data-parsoid='{"stx":"html"}'>
18998 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18999 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19005 HTML nested bullet list, closed tags (T7497)
19028 <ul data-parsoid='{"stx":"html"}'>
19029 <li data-parsoid='{"stx":"html"}'>One</li>
19030 <li data-parsoid='{"stx":"html"}'>Two:
19031 <ul data-parsoid='{"stx":"html"}'>
19032 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19033 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19040 HTML nested bullet list, open tags (T7497)
19062 HTML nested ordered list, closed tags (T7497)
19087 HTML nested ordered list, open tags (T7497)
19124 HTML ordered list item with parameters oddity
19126 <ol><li id="fragment">One</li>
19129 <ol><li id="fragment">One</li>
19134 # parsoid doesn't explicitly mark autonumbered links, see T55505
19136 T7918: autonumbering
19138 [http://first/] [http://second] [ftp://ftp]
19142 [mailto:enclosed@mail.tld With target]
19144 [mailto:enclosed@mail.tld]
19146 mailto:inline@mail.tld
19148 <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>
19149 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19150 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19151 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19152 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19155 <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>
19156 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19157 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19158 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19159 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19164 # Security and HTML correctness
19165 # From Nick Jenkins' fuzz testing
19169 Fuzz testing: Parser13
19183 # Note that Parsoid output differs from the PHP parser here: the PHP
19184 # parser breaks the URL for the magic word, while in Parsoid the URL
19185 # production takes precedence.
19187 Fuzz testing: Parser14
19192 <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>
19193 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>
19195 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19201 <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>
19202 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>
19204 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19208 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19209 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19213 Fuzz testing: Parser14-table
19215 parsoid=wt2html,html2html
19220 <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>
19221 <table style="__TOC__">
19226 <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>
19227 <table style="__TOC__">
19234 <table style="__TOC__"></table>
19237 # Known to produce bogus xml (extra </td>)
19238 # Don't add the html/php section since it generates broken HTML
19240 Fuzz testing: Parser16
19257 Fuzz testing: Parser21
19260 !irc://{{ftp://a" onmouseover="alert('hello world');"
19265 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19275 Fuzz testing: Parser22
19277 http://===r:::https://b
19281 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19289 ## Remex doesn't account for fostered content.
19290 ## Known to produce bad XML for now
19292 Fuzz testing: Parser24
19299 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19300 <br style="onmouseover='alert(document.cookie);' " />
19302 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19307 <u class="|">}}}} >
19308 <br style="onmouseover='alert(document.cookie);'" />
19310 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19320 <u class="|">}}}} >
19321 <br style="onmouseover='alert(document.cookie);'" />
19323 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19324 </u><table><tbody><tr>
19328 </tbody></table><p><u class="|">
19331 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
19333 <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>"}'/>}}}} >
19334 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
19336 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
19337 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
19340 # Note: the current result listed for this is not what the original one was,
19341 # but the original bug was JavaScript injection, which is fixed in any case.
19342 # It's not clear that the original result listed was any more correct than the
19343 # current one. Original result:
19346 # <li class="||">
19347 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19349 Fuzz testing: Parser25 (T8055)
19355 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19357 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19360 <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"]}'>
19361 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19365 Fuzz testing: URL adjacent extension (with space, clean)
19367 http://example.com <nowiki>junk</nowiki>
19369 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19372 <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>
19376 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19378 http://example.com<nowiki>junk</nowiki>
19380 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19383 <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>
19387 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19389 http://example.com<pre>junk</pre>
19391 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19394 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19396 <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>
19400 Fuzz testing: image with bogus manual thumbnail
19402 [[Image:foobar.jpg|thumbnail= ]]
19404 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19407 <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>
19410 # Parsoid will emit the newline literally in wt2wt; see next test case.
19412 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19416 <pre dir=" "></pre>
19418 <pre dir=" "></pre>
19421 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19422 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19426 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19430 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19431 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19441 Templates in extension attributes are not expanded
19443 <pre dir="{{echo|ltr}}"></pre>
19445 <pre dir="{{echo|ltr}}"></pre>
19448 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19452 Parsing optional HTML elements (T8171)
19457 <td> Some tabular data</td>
19458 <td> More tabular data ...
19459 <td> And yet som tabular data</td>
19465 <td> Some tabular data</td>
19466 <td> More tabular data ...
19467 </td><td> And yet som tabular data</td>
19474 Correct handling of <td>, <tr> (T8171)
19479 <td> Some tabular data</td>
19480 <td> More tabular data ...</td>
19481 <td> And yet som tabular data</td>
19487 <td> Some tabular data</td>
19488 <td> More tabular data ...</td>
19489 <td> And yet som tabular data</td>
19497 Parsing crashing regression (fr:JavaScript)
19501 <p></body></x>
19506 Inline wiki vs wiki block nesting
19512 <p><b>Bold paragraph</b>
19513 </p><p>New wiki paragraph
19517 # FIXME: The current php output is documented
19518 # and desired output is the parsoid target.
19520 Inline HTML vs wiki block nesting
19526 <p><b>Bold paragraph
19527 </p><p>New wiki paragraph</b>
19530 <p><b>Bold paragraph
19531 </b></p><p><b>New wiki paragraph
19534 <p><b>Bold paragraph</b>
19535 </p><p>New wiki paragraph
19539 # Original result was this:
19540 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19542 # While that might be marginally more intuitive, maybe, the six-apostrophe
19543 # construct is clearly pathological and the result stated here (which is what
19544 # the parser actually does) is about as reasonable as anything.
19546 Mixing markup for italics and bold
19549 '''bold''''''bold''bolditalics'''''
19551 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19559 Article for special page transclusion test
19563 Special page transclusion
19566 {{Special:Prefixindex/Xyzzyx}}
19568 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19574 Special page transclusion twice (T7021)
19577 {{Special:Prefixindex/Xyzzyx}}
19578 {{Special:Prefixindex/Xyzzyx}}
19580 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19582 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19588 Transclusion of default MediaWiki message
19590 {{MediaWiki:Mainpage}}
19597 Transclusion of nonexistent MediaWiki message
19599 {{MediaWiki:Mainpagexxx}}
19601 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19606 Transclusion of MediaWiki message with underscore
19608 {{MediaWiki:history_short}}
19615 Transclusion of MediaWiki message with space
19617 {{MediaWiki:history short}}
19624 Invalid header with following text
19634 Section extraction test (section 0)
19654 Section extraction test (section 1)
19676 Section extraction test (section 2)
19697 Section extraction test (section 3)
19717 Section extraction test (section 4)
19741 Section extraction test (section 5)
19761 Section extraction test (section 6)
19782 Section extraction test (section 7)
19802 Section extraction test (section 8)
19822 Section extraction test (section 9)
19843 Section extraction test (section 10)
19863 Section extraction test (nonexistent section 11)
19882 Section extraction test with bogus heading (section 1)
19887 ==bogus== not a legal section
19891 ==bogus== not a legal section
19895 Section extraction test with bogus heading (section 2)
19900 ==bogus== not a legal section
19907 Section extraction test with comment after heading (section 1)
19919 Section extraction test with comment after heading (section 2)
19931 Section extraction test with bogus <nowiki> heading (section 1)
19936 ==bogus== <nowiki>not a legal section</nowiki>
19940 ==bogus== <nowiki>not a legal section</nowiki>
19944 Section extraction test with bogus <nowiki> heading (section 2)
19949 ==bogus== <nowiki>not a legal section</nowiki>
19955 # Formerly testing for T4587, now resolved by the use of unmarked sections
19956 # instead of respecting commented sections
19958 Section extraction prefixed by comment (section 1)
19969 Section extraction prefixed by comment (section 2)
19979 # Formerly testing for T4607, now resolved by the use of unmarked sections
19980 # instead of respecting HTML-style headings
19982 Section extraction, mixed wiki and html (section 1)
19998 Section extraction, mixed wiki and html (section 2)
20014 # Formerly testing for T5342
20016 Section extraction, heading surrounded by <noinclude>
20020 <noinclude>==unmarked==</noinclude>
20026 # Test behavior of T21910
20028 Sectiion with all-equals
20033 The line above must have a trailing space
20036 But just in case it doesn't...
20040 But just in case it doesn't...
20044 Section replacement test (section 0)
20075 Section replacement test (section 1)
20104 Section replacement test (section 2)
20134 Section replacement test (section 3)
20165 Section replacement test (section 4)
20192 Section replacement test (section 5)
20223 Section replacement test (section 6)
20253 Section replacement test (section 7)
20284 Section replacement test (section 8)
20315 Section replacement test (section 9)
20344 Section replacement test (section 10)
20374 Section replacement test with initial whitespace (T15728)
20378 Preformatted initial line
20382 Preformatted initial line
20389 Section extraction, heading followed by pre with 20 spaces (T8398)
20401 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20414 Section extraction, <pre> around bogus header (T12309)
20431 Section replacement, <pre> around bogus header (T12309)
20452 Handling of 
 in URLs
20456 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20459 <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>
20463 Handling of %0A in URLs
20467 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20470 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20473 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20475 5 quotes, code coverage +1 line
20482 <p><b><i></i></b></p>
20485 # same html as previous, but wikitext adjusted to match parsoid html2wt
20486 # note that wt2html and html2html will put the <i> before the <b>
20488 5 quotes, code coverage +1 line w/ nowiki (1)
20490 parsoid=wt2wt,html2wt
20492 '''''<nowiki/>'''''
20497 <p><b><i></i></b></p>
20500 # same as previous, just swapping the <i> and <b>
20502 5 quotes, code coverage +1 line w/ nowiki (2)
20504 '''''<nowiki/>'''''
20509 <p><i><b></b></i></p>
20513 Special:Search page linking.
20517 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20522 {{!}} is a magic word
20524 {{!}} 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
20527 <p>| is a magic word there and | is still a magic word here
20528 | is not a magic word here but | is still a magic word here
20531 <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
20532 | 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>
20538 title=[[Parser test]]
20552 *{{SUBJECTPAGENAME}}
20553 *{{SUBJECTPAGENAMEE}}
20556 *{{NAMESPACENUMBER}}
20561 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20563 <ul><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>Parser_test</li>
20571 <li>Parser test</li>
20572 <li>Parser_test</li>
20573 <li>Talk:Parser test</li>
20574 <li>Talk:Parser_test</li>
20575 <li>Parser test</li>
20576 <li>Parser_test</li>
20584 <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>
20587 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20590 Gallery with valid attributes
20592 <gallery type="123" summary="345">
20593 File:File:Foobar.jpg
20596 <ul class="gallery mw-gallery-traditional" type="123">
20597 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20598 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20599 <div class="gallerytext">
20605 <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"}}'>
20606 <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>
20610 ## Parsoid thinks the "centre" here is a property, not a caption.
20615 "modes": ["wt2html"],
20616 "nativeGallery": true
20624 image4 |300px| centre
20625 image5.svg| http://///////
20630 <ul class="gallery mw-gallery-traditional">
20631 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20632 <div class="thumb" style="height: 150px;">Image1.png</div>
20633 <div class="gallerytext">
20636 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20637 <div class="thumb" style="height: 150px;">Image2.gif</div>
20638 <div class="gallerytext">
20641 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20642 <div class="thumb" style="height: 150px;">Image3</div>
20643 <div class="gallerytext">
20646 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20647 <div class="thumb" style="height: 150px;">Image4</div>
20648 <div class="gallerytext">
20653 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20654 <div class="thumb" style="height: 150px;">Image5.svg</div>
20655 <div class="gallerytext">
20656 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20660 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20661 <div class="thumb" style="height: 150px;">* image6</div>
20662 <div class="gallerytext">
20668 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
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: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>
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: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>
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:Image3"><img resource="./File:Image3" src="./Special:FilePath/Image3" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20672 <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>
20673 <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>
20674 <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>
20679 Gallery (with options, html)
20682 "modes": ["wt2html", "html2html"],
20683 "nativeGallery": true
20686 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20687 File:Nonexistent.jpg|caption
20688 File:Nonexistent.jpg
20689 image:foobar.jpg|some '''caption''' [[Main Page]]
20691 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20694 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20695 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20696 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20697 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20698 <div class="gallerytext">
20703 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20704 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20705 <div class="gallerytext">
20708 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20709 <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>
20710 <div class="gallerytext">
20711 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20715 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20716 <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>
20717 <div class="gallerytext">
20720 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20721 <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>
20722 <div class="gallerytext">
20730 <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":{}}'>
20731 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20732 <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>
20733 <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>
20734 <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>
20735 <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>
20736 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img 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>
20741 Gallery (with options, extsrc)
20744 "nativeGallery": false
20747 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20748 File:Nonexistent.jpg|caption
20749 File:Nonexistent.jpg
20750 image:foobar.jpg|some '''caption''' [[Main Page]]
20752 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20755 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20756 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20757 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20758 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20759 <div class="gallerytext">
20764 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20765 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20766 <div class="gallerytext">
20769 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20770 <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>
20771 <div class="gallerytext">
20772 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20776 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20777 <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>
20778 <div class="gallerytext">
20781 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20782 <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>
20783 <div class="gallerytext">
20791 <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"}}'>
20792 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20793 <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>
20794 <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>
20795 <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>
20796 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
20797 <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>
20802 Gallery (without px units)
20804 <gallery widths="70" heights="40">
20808 <ul class="gallery mw-gallery-traditional">
20809 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20810 <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>
20811 <div class="gallerytext">
20817 <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"}}'>
20818 <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>
20823 Gallery (with invalid units)
20825 <gallery widths="70em" heights="40em">
20829 <ul class="gallery mw-gallery-traditional">
20830 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20831 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
20832 <div class="gallerytext">
20838 <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"}}'>
20839 <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>
20844 Gallery with link that has fragment
20847 "modes": ["wt2html", "html2html"],
20848 "nativeGallery": true
20852 image:foobar.jpg|link=Main_Page
20853 image:foobar.jpg|link=Main_Page#section
20854 image:foobar.jpg|link=Main Page#section|caption
20857 <ul class="gallery mw-gallery-traditional">
20858 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20859 <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>
20860 <div class="gallerytext">
20863 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20864 <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>
20865 <div class="gallerytext">
20868 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20869 <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>
20870 <div class="gallerytext">
20878 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20879 <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>
20880 <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>
20881 <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>
20885 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20887 Gallery with template inside caption
20890 "nativeGallery": true
20893 <gallery caption="{{echo|hi}}">
20894 File:Foobar.jpg|{{echo|ho}}
20897 <ul class="gallery mw-gallery-traditional">
20898 <li class='gallerycaption'>{{echo|hi}}</li>
20899 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20900 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
20901 <div class="gallerytext">
20909 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20910 <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>
20911 <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>
20916 Gallery with wikitext inside caption
20919 "nativeGallery": true
20923 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20924 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20927 <ul class="gallery mw-gallery-traditional">
20928 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20929 <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>
20930 <div class="gallerytext">
20931 <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>
20935 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20936 <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>
20937 <div class="gallerytext">
20938 <p>This is a test template
20945 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20946 <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>
20947 <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>
20952 Gallery (with showfilename option)
20955 "nativeGallery": true
20958 <gallery showfilename="">
20959 File:Nonexistent.jpg|caption
20960 File:Nonexistent.jpg
20961 File:Foobar.jpg|some '''caption''' [[Main Page]]
20965 <ul class="gallery mw-gallery-traditional">
20966 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20967 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20968 <div class="gallerytext">
20969 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20974 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20975 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20976 <div class="gallerytext">
20977 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20981 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20982 <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>
20983 <div class="gallerytext">
20984 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20985 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20989 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20990 <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>
20991 <div class="gallerytext">
20992 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20999 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
21000 <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>
21001 <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>
21002 <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>
21003 <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>
21007 ## Should Parsoid be preserving these variations? See T151367
21009 Gallery (with namespace-less filenames)
21012 "modes": ["wt2html", "html2html"],
21013 "nativeGallery": true
21017 File:Nonexistent.jpg
21023 <ul class="gallery mw-gallery-traditional">
21024 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21025 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21026 <div class="gallerytext">
21029 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21030 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21031 <div class="gallerytext">
21034 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21035 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/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>
21036 <div class="gallerytext">
21039 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21040 <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>
21041 <div class="gallerytext">
21047 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21048 <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>
21049 <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>
21050 <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>
21051 <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>
21056 Gallery override link with wikilink (T36852)
21059 "nativeGallery": true
21063 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21066 <ul class="gallery mw-gallery-traditional">
21067 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21068 <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>
21069 <div class="gallerytext">
21075 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21076 <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>
21081 Gallery override link with absolute external link (T36852)
21084 "nativeGallery": true
21088 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21091 <ul class="gallery mw-gallery-traditional">
21092 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21093 <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>
21094 <div class="gallerytext">
21100 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21101 <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>
21106 Gallery override link with absolute external link with LanguageConverter
21111 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21114 <ul class="gallery mw-gallery-traditional">
21115 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21116 <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>
21117 <div class="gallerytext">
21125 <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"}}'>
21126 <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>
21131 Gallery override link with malicious javascript (T36852)
21134 "modes": ["wt2html", "html2html"],
21135 "nativeGallery": true
21139 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21142 <ul class="gallery mw-gallery-traditional">
21143 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21144 <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>
21145 <div class="gallerytext">
21151 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21152 <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>
21156 # Note that parsoid uses the invalid link as a caption, PHP does not.
21158 Gallery with invalid title as link (T45964)
21161 "modes": ["wt2html", "html2html"],
21162 "nativeGallery": true
21166 File:Foobar.jpg|link=<
21169 <ul class="gallery mw-gallery-traditional">
21170 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21171 <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>
21172 <div class="gallerytext">
21178 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21179 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; 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>
21184 Serialize gallery without attrs in data-mw
21187 "modes": ["html2wt"],
21188 "nativeGallery": true
21191 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21192 <li class="gallerycaption">123</li>
21193 <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>
21196 <gallery caption="123">
21202 Gallery with class and style attributes
21205 "nativeGallery": true
21208 <gallery class="center" style="text-align: center;">
21212 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21213 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21214 <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>
21215 <div class="gallerytext">
21221 <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":{}}'>
21222 <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>
21227 Gallery in slideshow mode
21230 "nativeGallery": true
21233 <gallery mode="slideshow" showthumbnails="">
21237 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21238 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21239 <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>
21240 <div class="gallerytext">
21246 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21247 <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>
21252 Serialize gallery image captions on a line
21255 "modes": ["html2wt"],
21256 "nativeGallery": true
21259 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21260 <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>
21261 <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>
21265 File:Foobar.jpg| hi ho
21266 File:Foobar.jpg|hi<br />ho
21271 HTML Hex character encoding (spells the word "JavaScript")
21273 parsoid=wt2html,wt2wt,html2html
21275 JavaScript
21277 <p>JavaScript
21280 <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>
21284 HTML Hex character encoding bogus encoding (T28437 regression check)
21288 <p>&#xsee;&#XSEE;
21293 HTML Hex character encoding mixed case
21295 parsoid=wt2html,wt2wt,html2html
21302 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21305 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21306 # Note that U+000C (form feed) is not a valid XML character, so
21307 # it is banned even though allowed in HTML5.
21309 Illegal character references (T106578)
21314 ; Control (low): 
21315 ; Control (high):  Ÿ
21316 ; Surrogate: ��
21317 ; This is an okay astral character: 💩
21325 <dt>Control (low)</dt>
21327 <dt>Control (high)</dt>
21328 <dd>&#x7F; &#x9F;</dd>
21330 <dd>&#xD83D;&#xDCA9;</dd>
21331 <dt>This is an okay astral character</dt>
21332 <dd>💩</dd></dl>
21336 __FORCETOC__ override
21348 ISBN 978-0-1234-56 789
21350 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21353 <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>
21357 ISBN followed by 5 spaces
21368 ISBN ISBN 1234567890
21370 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21373 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21376 # Uppercase X and lowercase x as well
21387 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21388 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21389 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21390 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21391 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21392 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21395 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21396 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21397 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21398 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21399 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21400 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21404 ISBN with empty prefix (parsoid test)
21408 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21411 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21415 T24905: <abbr> followed by ISBN followed by </a>
21417 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21419 <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>
21422 <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>
21430 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21433 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21437 Double RFC with a wiki link
21441 <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>
21444 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21452 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21455 <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>
21459 Centre-aligned image
21461 [[Image:foobar.jpg|centre]]
21463 <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>
21466 <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>
21472 [[Image:foobar.jpg|none]]
21474 <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>
21477 <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>
21481 Width + Height sized image (using px) (height is ignored)
21483 [[Image:foobar.jpg|640x480px]]
21485 <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>
21488 <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>
21492 Width-sized image (using px, no following whitespace)
21494 [[Image:foobar.jpg|640px]]
21496 <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>
21499 <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>
21503 Width-sized image (using px, with following whitespace - test regression from r39467)
21505 [[Image:foobar.jpg|640px ]]
21507 <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>
21510 <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>
21514 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21516 [[Image:foobar.jpg| 640px]]
21518 <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>
21521 <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>
21525 Image with page parameter
21529 [[File:LoremIpsum.djvu|page=2]]
21531 <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>
21534 <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>
21538 Another italics / bold test
21546 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21552 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21555 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21559 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21561 Images with the "|" character in the comment
21563 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21565 <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>
21568 <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>
21572 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21574 <html><script>alert(1);</script></html>
21576 <p><html><script>alert(1);</script></html>
21581 HTML with raw HTML ($wgRawHtml==true)
21585 <html><script>alert(1);</script></html>
21587 <p><script>alert(1);</script>
21592 Parents of subpages, one level up
21594 subpage title=[[Subpage test/L1/L2/L3]]
21598 <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>
21604 Parents of subpages, one level up, not named
21606 subpage title=[[Subpage test/L1/L2/L3]]
21610 <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>
21617 Parents of subpages, two levels up
21619 subpage title=[[Subpage test/L1/L2/L3]]
21625 <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
21626 </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>
21631 Parents of subpages, two levels up, without trailing slash or name.
21633 subpage title=[[Subpage test/L1/L2/L3]]
21642 Parents of subpages, two levels up, with lots of extra trailing slashes.
21644 subpage title=[[Subpage test/L1/L2/L3]]
21648 <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>
21653 Subpage test/L1/L2/L3Sibling
21659 Transclusion of a sibling page (one level up)
21661 subpage title=[[Subpage test/L1/L2/L3]]
21670 Transclusion of a child page
21672 subpage title=[[Subpage test/L1/L2]]
21680 # This is wt2html only in Parsoid because we add <nowiki>
21681 # because of {{..}} and we don't expect to fix that to
21682 # eliminate the nowikis selective for {{..}} markup.
21684 Non-transclusion because of too many up levels
21686 subpage title=[[Subpage test/L1/L2/L3]]
21689 {{../../../../More than parent}}
21691 <p>{{../../../../More than parent}}
21694 <p>{{../../../../More than parent}}</p>
21698 Definition list code coverage
21712 <dl><dt>title </dt><dd>def</dd>
21713 <dt>title </dt><dd>def</dd>
21714 <dt>title</dt><dd>def</dd></dl>
21718 Don't fall for the self-closing div
21720 <div>hello world</div/>
21722 <div>hello world</div>
21731 <p>[[:Template:Msg]]
21740 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21744 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21746 Always escape literal '>' in output, not just after '<'
21760 <p>This is a test template
21761 This is a test template
21773 Inclusion of !userCanEdit() content
21777 <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>
21783 Out-of-order TOC heading levels
21792 <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>
21794 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21796 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21797 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21800 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21802 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21803 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21809 <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>
21810 <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>
21811 <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>
21812 <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>
21813 <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>
21814 <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>
21820 ISBN with a dummy number
21830 ISBN with space-delimited number
21834 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21837 <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>
21842 ISBN with multiple spaces, no number
21861 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21862 </p><p>ISBN 12345678901
21865 <p>ISBN 123456789</p>
21867 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21869 <p>ISBN 12345678901</p>
21874 ISBN with trailing year (T9110)
21876 ISBN 1-234-56789-0 - 2006
21878 ISBN 1 234 56789 0 - 2006
21880 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21881 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21884 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21886 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21893 wgFragmentMode=[ 'html5', 'legacy' ]
21895 {{anchorencode:foo bar©#%n}}
21900 <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>
21904 anchorencode (legacy)
21906 wgFragmentMode=[ 'legacy' ]
21908 {{anchorencode:foo bar©#%n}}
21910 <p>foo_bar.C2.A9.23.25n
21915 anchorencode trims spaces
21917 wgFragmentMode=[ 'html5', 'legacy' ]
21919 {{anchorencode: __pretty__please__}}
21924 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21928 anchorencode deals with links
21930 wgFragmentMode=[ 'html5', 'legacy' ]
21932 {{anchorencode: [[hello|world]] [[hi]]}}
21937 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21941 anchorencode deals with templates
21943 wgFragmentMode=[ 'html5', 'legacy' ]
21945 {{anchorencode: {{Foo}} x}}
21950 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21954 anchorencode encodes like the TOC generator: (T20431)
21956 wgFragmentMode=[ 'html5', 'legacy' ]
21958 ===_ +:.3A%3A _ &&]] x===
21959 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21962 <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>
21963 <p>+:.3A%3A_&&]]_x
21966 <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>
21967 <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>
21968 <meta property="mw:PageProp/noeditsection"/>
21972 anchorencode encodes like the TOC generator: (T20431) (legacy)
21974 wgFragmentMode=[ 'legacy' ]
21976 ===_ +:.3A%3A&&]]===
21977 {{anchorencode: _ +:.3A%3A&&]] }}
21980 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21981 <p>.2B:.3A.253A.26.26.5D.5D
21986 T8200: blockquotes and paragraph formatting
22007 T10293: Use of center tag ruins paragraph formatting
22028 Parsing of overlapping (improperly nested) inline html tags
22030 <span><s>x</span></s>
22032 <p><span><s>x</span></s></span>
22035 <p><span><s>x</s></span>
22040 ### Language variants related tests
22043 # Parsoid does not mark self-links.
22044 # Parsoid does not convert links; PHP will do any necessary redirects.
22047 Self-link in language variants
22049 title=[[Dunav]] language=sr
22051 Both [[Dunav]] and [[Дунав]] are names for this river.
22053 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22056 <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>
22066 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22068 title=[[Duna]] language=sr
22070 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22072 <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.
22075 <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>
22079 Link to a section of a variant of this title shouldn't be parsed as self-link
22081 title=[[Duna]] language=sr
22083 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22085 <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.
22088 <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>
22092 Link to pages in language variants
22096 Main Page can be written as [[Маин Паге]]
22098 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22101 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22106 Multiple links to pages in language variants
22110 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22112 <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>.
22115 <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>
22120 Simple template in language variants
22126 <p>This is a test template
22132 Template with explicit namespace in language variants
22138 <p>This is a test template
22144 Basic test for template parameter in language variants
22148 {{парамтест|param=foo}}
22150 <p>This is a test template with parameter foo
22155 Simple category in language variants
22159 [[Category:МедиаWики Усер'с Гуиде]]
22161 cat=МедиаWики_Усер'с_Гуиде sort=
22163 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22178 ## We used to, but no longer wt2wt this test since the default serializer
22179 ## will normalize all categories to serialize on their own line.
22180 ## This wikitext usage is going to be fairly uncommon in production and
22181 ## selser will take care of preserving formatting in those scenarios.
22183 Don't convert blue categorylinks to another variant (T35210)
22189 [[A]][[Category:分类]]
22193 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22194 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22198 Stripping -{}- tags (language variants)
22202 Latin proverb: -{Ne nuntium necare}-
22204 <p>Latin proverb: Ne nuntium necare
22207 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22212 Prevent conversion with -{}- tags (language variants)
22214 language=sr variant=sr-ec
22216 Latinski: -{Ne nuntium necare}-
22218 <p>Латински: Ne nuntium necare
22221 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22226 Prevent conversion of text with -{}- tags (language variants)
22228 language=sr variant=sr-ec
22230 Latinski: -{Ne nuntium necare}-
22232 <p>Латински: Ne nuntium necare
22235 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22240 Prevent conversion of links with -{}- tags (language variants)
22242 language=sr variant=sr-ec
22246 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22249 <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>
22254 -{}- tags within headlines (within html for parserConvert())
22256 wgFragmentMode=[ 'html5', 'legacy' ]
22258 language=sr variant=sr-ec
22262 Note that even an unprotected headline ID is not affected by language
22267 <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>
22268 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22271 <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>
22274 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22276 <p>Note that even an unprotected headline ID is not affected by language
22279 <h2 id="Latinski">Latinski</h2>
22283 Explicit definition of language variant alternatives
22285 language=zh variant=zh-tw
22287 -{zh:China;zh-tw:Taiwan}-, not China
22289 <p>Taiwan, not China
22292 <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>
22296 Filter syntax for language variants
22298 language=zh variant=zh-tw
22300 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22302 <p>fooblog, WEBJOURNAL, WEBLOGquux
22305 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22308 # Note that Parsoid post-processing for language variants needs to
22309 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22311 Conversion around HTML tags
22313 language=sr variant=sr-ec
22315 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22316 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22319 <span title="ЛаCтин">ски</span>
22322 <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"}]}'/>
22323 <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>
22327 Explicit session-wise two-way language variant mapping (A flag and - flag)
22329 language=zh variant=zh-tw
22331 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22333 Taiwan is not China.
22335 But -{A|zh:China; zh-tw:Taiwan}- is China,
22337 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22339 and -{China}- is China.
22341 <p>This is Taiwan, but we'll forget that now.
22342 </p><p>Taiwan is not China.
22343 </p><p>But Taiwan is Taiwan,
22344 </p><p>(This should be stripped!)
22345 </p><p>and China is China.
22348 <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>
22349 <p>Taiwan is not China.</p>
22350 <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>
22351 <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>
22352 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22356 Explicit session-wise one-way language variant mapping (A flag and - flag)
22358 language=zh variant=zh-tw
22360 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22362 COUNTRY is China or Taiwan.
22364 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22366 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22368 and -{COUNTRY}- is COUNTRY.
22370 <p>This is Taiwan, but we'll forget that now.
22371 </p><p>COUNTRY is China or Taiwan.
22372 </p><p>But Taiwan is Taiwan,
22373 </p><p>(This should be stripped!)
22374 </p><p>and COUNTRY is COUNTRY.
22377 <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>
22378 <p>COUNTRY is China or Taiwan.</p>
22379 <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>
22380 <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>
22381 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22385 Explicit session-wise two-way language variant mapping (H flag for hide)
22387 language=zh variant=zh-tw
22389 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22393 <p>(This should be stripped!)
22394 </p><p>Taiwan is Taiwan.
22397 <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>
22398 <p>Taiwan is China.</p>
22402 Explicit session-wise one-way language variant mapping (H flag for hide)
22404 language=zh variant=zh-tw
22406 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22408 COUNTRY is Taiwan or China.
22410 <p>(This should be stripped!)
22411 </p><p>Taiwan is Taiwan or China.
22414 <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>
22415 <p>COUNTRY is Taiwan or China.</p>
22418 ## Note that parsoid test runner does not support 'showtitle' option.
22420 Adding explicit conversion rule for title (T flag)
22422 language=zh variant=zh-tw showtitle
22424 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22429 <p>Should be stripped!
22430 </p><p>Taiwan is China.
22433 <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>
22434 <p>Taiwan is China.</p>
22438 Code coverage: T combined with H flag
22440 language=zh variant=zh-tw showtitle
22442 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22447 <p>Should be stripped!
22448 </p><p>Taiwan is Taiwan.
22451 <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>
22452 <p>Taiwan is China.</p>
22456 Code coverage: T with no variants
22458 language=zh variant=zh-tw showtitle
22460 -{H|zh:China; zh-tw:Taiwan}-
22461 Taiwan is China.-{T|Taiwan is China}-
22468 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22469 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22473 Code coverage: rules with no variants
22475 language=zh variant=zh-tw
22477 -{H|zh:China; zh-tw:Taiwan}-
22488 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22490 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22491 Taiwan is China.</p>
22496 Code coverage: D flag for conversion rule
22498 language=zh variant=zh-tw
22500 -{D|zh-cn:XA; zh-tw:YA}-
22501 -{A;D|zh-cn:XB; zh-tw:YB}-
22502 -{D;H|zh-cn:XC; zh-tw:YC}-
22504 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22510 XA XB XC YA YB YC FOO BAR BAT 012345
22515 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22519 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22522 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22523 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22524 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22525 <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>
22526 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22527 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22528 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22529 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22533 Code coverage: N flag for conversion rule
22535 language=zh variant=zh-cn
22545 </p><p>српски (ћирилица)
22548 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22549 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22550 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22553 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22555 Code coverage: N flag for conversion rule (wt2html only)
22557 language=zh variant=zh-cn
22558 parsoid=wt2html,html2html
22565 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22569 Testing that changing the language variant here in the tests actually works
22571 language=zh variant=zh showtitle
22573 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22576 <p>Should be stripped!
22579 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22583 Recursive conversion of alt and title attrs shouldn't clear converter state
22585 language=zh variant=zh-cn
22588 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22589 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22593 Should be stripped<span title="Exclamation">!</span>
22596 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22597 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>
22601 T26072: more test on conversion rule for title
22603 language=zh variant=zh-tw showtitle
22605 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22607 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22610 <p>This should be stripped!
22611 </p><p>This won't take interferes with the title rule.
22614 <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>
22615 <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>
22619 Partly disable title conversion if variant == main language code
22621 language=zh variant=zh title=[[ZH]] showtitle
22623 -{T|zh-cn:CN;zh-tw:TW}-
22629 <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>
22633 Partly disable title conversion if variant == main language code, more
22635 language=zh variant=zh title=[[ZH]] showtitle
22643 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22647 Raw output of variant escape tags (R flag)
22649 language=zh variant=zh-tw
22651 Raw: -{R|zh:China;zh-tw:Taiwan}-
22653 <p>Raw: zh:China;zh-tw:Taiwan
22656 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22659 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22661 Raw output of variant escape tags (R flag) (wt2html only)
22663 language=zh variant=zh-tw
22664 parsoid=wt2html,html2html
22666 -{Variant}- -{D|syntax}- -{D;R|options}-
22668 <p>Variant syntax options
22671 <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>
22675 Nested markup inside raw output of variant escape tags (R flag)
22677 language=zh variant=zh-tw
22679 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22681 <p>Nested raw: nested Taiwan nested
22684 <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>
22688 Nested markup and spaces inside raw output of variant escape tags (R flag)
22690 language=zh variant=zh-tw
22692 X-{ outer -{ inner }- outer }-X
22694 <p>X outer inner outer X
22697 <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>
22701 Templates inside raw output of variant escape tags (R flag)
22703 language=zh variant=zh-tw
22705 Nested raw: -{R|nested {{echo|hi}} templates}-
22707 <p>Nested raw: nested hi templates
22710 <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>
22714 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22716 language=zh variant=zh-cn
22718 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22723 <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>
22727 Conversion rules from [numeric-only string] to [something else] (T48634)
22729 language=zh variant=zh-cn
22731 -{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
22736 <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>
22740 Two-way converter rule entries with an empty value should be ignored (T53551)
22742 language=zh variant=zh-cn
22744 -{H|zh-cn:foo;zh-tw:;}-foobar
22749 <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>
22753 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22755 language=zh variant=zh-cn
22757 -{H|=>zh-cn:foo;}-foobar
22762 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22766 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22768 language=zh variant=zh-cn
22775 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22779 Nested using of manual convert syntax
22781 language=zh variant=zh-hk
22783 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22785 <p>Nested: Hello Hong Kong!
22788 <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>
22792 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22794 language=zh variant=zh-cn
22796 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22798 <p><span title="X">A</span>
22801 <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>
22805 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22807 language=zh variant=zh-cn
22809 -{<span title="-{X}-">A</span>}-
22810 !! html/php+disabled
22811 <p><span title="X">A</span>
22814 <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>
22817 # Parsoid and PHP disagree on how to parse this example: Parsoid
22818 # insists that the content of a language converter element be a valid
22819 # DOM fragment or attribute string
22821 Language converter markup with block content
22823 language=zh variant=zh-cn
22825 <span>a-{b<div>c}-d
22827 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22829 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22834 </span></div></span></div></span>
22836 <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
22838 <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
22840 <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>
22844 LanguageConverter selser (1)
22846 language=zh variant=zh-cn
22848 "modes": ["wt2wt", "selser"],
22850 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22860 LanguageConverter selser (2)
22862 language=zh variant=zh-cn
22864 "modes": ["wt2wt", "selser"],
22866 ["span[class='x']", "contents", "text", "-{foo}-"],
22867 ["a", "contents", "text", "-{"],
22868 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22872 <span class="x">TEXT1</span>
22873 [http://example.com TEXT2]
22877 <span class="x"><nowiki>-{foo}-</nowiki></span>
22878 [http://example.com -{]
22879 [[Foo|<nowiki>-{</nowiki>]]
22880 {{1x|<nowiki>-{</nowiki>}}
22883 # Tests LanguageVariantText in ConstrainedText
22885 LanguageConverter selser (3)
22887 language=zh variant=zh-cn
22889 "modes": ["wt2wt", "selser"],
22891 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22892 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22903 |<nowiki/>-{edited}-
22907 # Tests LanguageVariantText._fromSelSer
22909 LanguageConverter selser (4)
22911 language=zh variant=zh-cn
22913 "modes": ["wt2wt", "selser"],
22915 ["td > span.x", "remove"]
22921 |<span class="x">Foo</span>-{Bar}-
22922 ||<span class="x">Foo</span>-{Bar}-
22932 # Since Parsoid is starting to emit canonical wikitext for links,
22933 # [http://example.com http://example.com] will not RT back to that
22935 # Parsoid does not language-convert links (it is done in a
22936 # post-processing step)
22938 Proper conversion of text in external links
22940 language=sr variant=sr-ec
22943 http://www.google.com
22944 gopher://www.google.com
22945 [http://www.google.com http://www.google.com]
22946 [gopher://www.google.com gopher://www.google.com]
22947 [https://www.google.com irc://www.google.com]
22948 [ftp://www.google.com www.google.com/ftp://dir]
22949 [//www.google.com www.google.com]
22951 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22952 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22953 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22954 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22955 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22956 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22957 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22960 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22961 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22962 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
22963 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22964 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22965 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22966 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22970 Do not convert roman numbers to language variants
22972 language=sr variant=sr-ec
22976 <p>Фридрих IV је цар.
22979 <p>Fridrih IV je car.</p>
22983 Unclosed language converter markup "-{"
22994 Don't convert raw rule "-{R|=>}-" to "=>"
23003 <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>
23007 Don't break link parsing if language converter markup is in the caption.
23009 language=sr variant=sr-ec
23011 [[Main Page|-{R|main page}-]]
23013 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23016 <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>
23020 T146304: Don't break template parsing if language converter markup is in the parameter.
23022 language=sr variant=sr-ec
23029 <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>
23033 T146305: Don't break image parsing if language converter markup is in the caption.
23037 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23039 <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>
23042 <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>
23046 T146305: Don't break image parsing if nested language converter markup is in the caption.
23048 language=zh variant=zh-cn
23050 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23052 <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>
23055 <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>
23058 # XXX html2wt disabled because rich markup in alt is not preserved.
23060 Don't break gallery if language converter markup is inside.
23065 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23066 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23069 <ul class="gallery mw-gallery-traditional">
23070 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23071 <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>
23072 <div class="gallerytext">
23073 <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>
23077 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23078 <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>
23079 <div class="gallerytext">
23080 <p>This is a test template
23087 <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"}}'>
23088 <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>
23089 <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>
23094 T153135: Don't break list handling if language converter markup is in the item.
23096 language=zh variant=zh-cn
23098 ;-{zh-cn:AAA;zh-tw:BBB}-
23102 <dt>foo:bar</dt></dl>
23105 <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>
23106 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23110 // Note that parsoid does not protect colons unless language converter
23111 // markup is properly nested, because it is a backtracking parser.
23113 T153135: Unclosed markup in definition list (code coverage)
23115 language=zh variant=zh-cn
23120 <dl><dt><b>foo:bar</b></dt><b>
23121 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23124 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23125 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23129 T153135: Nested language converter markup in definition list (code coverage)
23131 language=zh variant=zh-cn
23133 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23135 <dl><dt>AAA foo:bar bat:baz</dt>
23139 <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>
23140 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23144 # html2wt mode disabled due to <nowiki> insertion.
23146 T153140: Don't break table handling if language converter markup is in the cell.
23148 language=sr variant=sr-ec
23149 parsoid=wt2html,wt2wt,html2html
23166 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23173 Language converter tricky html2wt cases (1)
23176 parsoid=html2wt,wt2wt
23178 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23180 -{<nowiki>}-</nowiki>}-
23187 Language converter tricky html2wt cases (2)
23190 parsoid=html2wt,wt2wt
23194 <nowiki>-{foo}-</nowiki>
23196 <p>-{foo}-
23201 Language converter tricky html2wt cases (3)
23204 parsoid=html2wt,wt2wt
23206 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23207 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23208 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23214 -{<nowiki>-{foo}-</nowiki>}-
23218 </p><p>-{foo}-
23223 Language converter tricky html2wt cases (4)
23226 parsoid=html2wt,wt2wt
23228 <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>
23236 # Note that the <nowiki> escaping added by parsoid for source text,
23237 # destination text, and language names only works on the PHP side
23238 # for *destination text*. (HTML entity escaping wouldn't work
23239 # any better.) This is probably a bug, at least for source texts.
23240 # (For language names PHP uses a precise regexp based on the languages
23241 # it currently knows have variants, which is fragile since this set
23242 # can grow/shrink over time.)
23244 Language converter tricky html2wt cases (5)
23246 language=zh variant=zh-cn
23248 <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>
23249 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23250 <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>
23251 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23254 -{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
23256 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23258 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23260 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23263 !! html/php+disabled
23264 <p>foobat;xyz=>zh-cn:abc
23268 </p><p>a:b=>c 0;zh-tw:bar
23273 T179579: Nowiki and lc interaction
23280 -{123<nowiki>|</nowiki>456}-
23282 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23284 <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>
23288 T2529: Uncovered bullet
23298 T2529: Uncovered bullet in a deeply nested list
23300 *******Foo {{bullet}}
23302 <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>
23308 T2529: Uncovered table already at line-start
23331 T2529: Uncovered bullet in parser function result
23333 *Foo {{lc:{{bullet}} }}
23341 T7678: Double-parsed template argument
23343 {{lc:{{{1}}}|hello}}
23350 T7678: Double-parsed template invocation
23352 {{lc:{{paramtest {{!}} param = hello }} }}
23354 <p>{{paramtest | param = hello }}
23359 Case insensitivity of parser functions for non-ASCII characters (T10143)
23362 title=[[Main Page]]
23364 {{PRVNÍVELKÉ:ěščř}}
23365 {{prvnívelké:ěščř}}
23385 Morwen/13: Unclosed link followed by heading
23392 <h2><span class="mw-headline" id="heading">heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
23397 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23404 <h1><span class="mw-headline" id="heading">heading</span></h1>
23409 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23416 <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>
23431 Paragraphs inside divs (no extra line breaks)
23443 Paragraphs inside divs (extra line break on open)
23458 Paragraphs inside divs (extra line break on close)
23473 Paragraphs inside divs (extra line break on open and close)
23489 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23491 Nesting tags, paragraphs on lines which begin with <div>
23493 <div></div><strong>A
23496 <div></div><p><strong>A
23497 </strong></p><strong></strong><p><strong>B</strong>
23500 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
23501 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
23504 # T8200: <blockquote> should behave like <div> with respect to line breaks
23506 T8200: paragraphs inside blockquotes (no extra line breaks)
23508 parsoid=wt2html,html2html
23510 <blockquote>Line one
23512 Line two</blockquote>
23514 <blockquote>Line one
23515 Line two</blockquote>
23518 <blockquote><p>Line one
23519 Line two</p></blockquote>
23523 T8200: paragraphs inside blockquotes (extra line break on open)
23525 parsoid=wt2html,html2html
23530 Line two</blockquote>
23535 Line two</blockquote>
23541 Line two</p></blockquote>
23545 T8200: paragraphs inside blockquotes (extra line break on close)
23547 parsoid=wt2html,html2html
23549 <blockquote>Line one
23554 <blockquote>Line one
23560 <blockquote><p>Line one
23567 T8200: paragraphs inside blockquotes (extra line break on open and close)
23583 ## This is a corner case interaction between the paragraph wrapping in the
23584 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
23585 ## some tags which close paragraphs (and thus prevent wrapping on their line),
23586 ## of which "div" is one, but do p-wrapping inside them. These are referred
23587 ## to as "never suppressing". Remex, for its part, doesn't traverse into
23588 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
23590 Paragraphs inside blockquotes/divs (no extra line breaks)
23592 <blockquote><div>Line one
23594 Line two</div></blockquote>
23596 <blockquote><div>Line one
23597 Line two</div></blockquote>
23602 Paragraphs inside blockquotes/divs (extra line break on open)
23607 Line two</div></blockquote>
23612 Line two</div></blockquote>
23617 Paragraphs inside blockquotes/divs (extra line break on close)
23619 <blockquote><div>Line one
23622 </div></blockquote>
23624 <blockquote><div>Line one
23627 </div></blockquote>
23632 Paragraphs inside blockquotes/divs (extra line break on open and close)
23638 </div></blockquote>
23644 </div></blockquote>
23649 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23651 wgLinkHolderBatchSize=0
23657 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23658 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23659 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23664 Free external link invading image caption
23666 [[Image:Foobar.jpg|thumb|http://x|hello]]
23668 <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>
23671 <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>
23675 T17196: localised external link numbers
23679 [http://en.wikipedia.org/]
23681 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23684 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23688 Multibyte character in padleft
23690 {{padleft:-Hello|7|Æ}}
23695 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23699 Multibyte character in padright
23701 {{padright:Hello-|7|Æ}}
23706 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23710 formatdate parser function
23712 {{#formatdate:2009-03-24}}
23714 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23719 formatdate parser function, with default format
23721 {{#formatdate:2009-03-24|mdy}}
23723 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23728 Spacing of numbers in formatted dates
23730 {{#formatdate:January 15}}
23732 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23737 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
23739 language=nl title=[[MediaWiki:Common.css]]
23741 {{#formatdate:2009-03-24|dmy}}
23743 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23756 Edit comment with link
23760 I like the [[Main Page]] a lot
23762 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23766 Edit comment with link and link text
23770 I like the [[Main Page|best pages]] a lot
23772 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23776 Edit comment with link and link text with suffix
23780 I like the [[Main Page|best page]]s a lot
23782 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23786 Edit comment with section link (non-local, eg in history list)
23788 comment title=[[Main Page]]
23790 /* External links */ removed bogus entries
23792 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23796 Edit comment with section link and text before it (non-local, eg in history list)
23798 comment title=[[Main Page]]
23800 pre-comment text /* External links */ removed bogus entries
23802 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>
23806 Edit comment with section link (local, eg in diff view)
23808 comment local title=[[Main Page]]
23810 /* External links */ removed bogus entries
23812 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23816 Edit comment with subpage link (T16080)
23820 title=[[Subpage test]]
23822 Poked at a [[/subpage]] here...
23824 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23828 Edit comment with subpage link and link text (T16080)
23832 title=[[Subpage test]]
23834 Poked at a [[/subpage|neat little page]] here...
23836 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23840 Edit comment with bogus subpage link in non-subpage NS (T16080)
23843 title=[[Subpage test]]
23845 Poked at a [[/subpage]] here...
23847 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23851 Edit comment with bare anchor link (local, as on diff)
23855 title=[[Main Page]]
23859 <a href="#section">#section</a>
23863 Edit comment with bare anchor link (non-local, as on history)
23866 title=[[Main Page]]
23870 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23874 Anchor starting with underscore
23880 <p><a href="#_ref">One</a>
23883 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23887 Id starting with underscore
23889 <div id="_ref"></div>
23891 <div id="_ref"></div>
23896 Edit comment with link with more than one pipe (T99346)
23900 [[Main Page|Many|pipes]]
23902 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23906 Complex edit comment with link with more than one pipe (T99346)
23910 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23912 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..."
23916 Space normalisation on autocomment (T24784)
23919 title=[[Main Page]]
23921 /* __hello__world__ */
23923 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23927 percent-encoding and + signs in comments (T28410)
23931 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23933 <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>
23936 # Parsoid doesn't support this yet: see T75581
23937 # but it *should* omit the 'src' attribute if the image is bad.
23938 # PHP side of tests was disabled in
23939 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23940 # because of issues in the PHP parserTests infrastructure
23941 # (but the output below is indeed what the PHP side emits)
23943 Bad images - basic functionality
23946 !! html/php+disabled
23948 <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>
23952 Bad images - T18039: text after bad image disappears
23957 !! html/php+disabled
23963 <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>
23968 Verify that displaytitle works (T24501) no displaytitle
23972 wgAllowDisplayTitle=true
23973 wgRestrictDisplayTitle=false
23975 this is not the the title
23978 <p>this is not the the title
23983 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23988 wgAllowDisplayTitle=true
23989 wgRestrictDisplayTitle=false
23991 this is not the the title
23992 {{DISPLAYTITLE:whatever}}
23995 <p>this is not the the title
24000 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24005 wgAllowDisplayTitle=true
24006 wgRestrictDisplayTitle=true
24008 this is not the the title
24009 {{DISPLAYTITLE:whatever}}
24012 <p>this is not the the title
24017 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24022 wgAllowDisplayTitle=true
24023 wgRestrictDisplayTitle=true
24025 this is not the the title
24026 {{DISPLAYTITLE:screen}}
24029 <p>this is not the the title
24034 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24039 wgAllowDisplayTitle=false
24041 this is not the the title
24042 {{DISPLAYTITLE:screen}}
24045 <p>this is not the the title
24046 <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>
24051 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24056 wgAllowDisplayTitle=false
24058 this is not the the title
24061 <p>this is not the the title
24066 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24071 wgAllowDisplayTitle=true
24072 wgRestrictDisplayTitle=true
24074 this is not the the title
24075 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24077 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24078 <p>this is not the the title
24083 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24088 wgAllowDisplayTitle=true
24089 wgRestrictDisplayTitle=true
24091 this is not the the title
24092 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24094 <span style="color: red;">s</span>creen
24095 <p>this is not the the title
24100 Page status indicators: Empty name is invalid
24104 <indicator name=" "></indicator>
24105 <indicator></indicator>
24107 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24108 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24113 Page status indicators: Weird syntaxes that are okay
24117 <indicator name="empty" />
24118 <indicator name="name"></indicator>
24127 Page status indicators: Torture test
24131 <indicator name="01">hello world</indicator>
24132 <indicator name="02">[[Main Page]]</indicator>
24133 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24134 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24135 <indicator name="05">*foo
24137 <indicator name="06"><nowiki>foo</nowiki></indicator>
24138 <indicator name="07"> Preformatted</indicator>
24139 <indicator name="08"><div>Broken tag</indicator>
24140 <indicator name="09">{| class=wikitable
24143 <indicator name="10">Two
24145 paragraphs</indicator>
24148 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24149 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" />
24150 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>
24151 05=<ul><li>foo</li>
24155 07=<pre>Preformatted
24157 08=<div>Broken tag</div>
24159 09=<table class="wikitable">
24176 preload: check <noinclude> and <includeonly>
24180 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24186 preload: check <onlyinclude>
24190 Goodbye <onlyinclude>Hello world</onlyinclude>
24196 preload: can pass tags through if we want to
24200 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24202 <includeonly>Hello world</includeonly>
24206 preload: check that it doesn't try to do tricks
24210 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24212 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24216 Play a bit with r67090 and T5158
24218 <div style="width:50% !important"> </div>
24219 <div style="width:50% !important"> </div>
24220 <div style="width:50% !important"> </div>
24221 <div style="border : solid;"> </div>
24223 <div style="width:50% !important"> </div>
24224 <div style="width:50% !important"> </div>
24225 <div style="width:50% !important"> </div>
24226 <div style="border : solid;"> </div>
24229 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24230 <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>
24231 <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>
24232 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24237 French spaces in wikitext
24239 foo ! bar ? bat 50 % is less than 75 %.
24241 Hello : this ; is « something ‹ else › again »
24243 <p>foo ! bar ? bat 50 % is less than 75 %.
24244 </p><p>Hello : this ; is « something ‹ else › again »
24248 # It would be reasonable for Parsoid and PHP to differ here.
24249 # The PHP behavior is arguably a bug.
24251 Corner case: french spaces in definition list
24255 <dl><dt>foo </dt>
24260 T5158: Test for French spaces in attributes
24262 <br style=" clear : both ; " />
24264 <p><br style="clear : both ;" />
24269 HTML5 data attributes
24271 <span data-foo="bar">Baz</span>
24272 <p data-abc-def_hij="">Quuz</p>
24274 <p><span data-foo="bar">Baz</span>
24276 <p data-abc-def_hij="">Quuz</p>
24279 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24280 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24284 Strip reserved data attributes
24286 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24288 <div data-ok="fred">d</div>
24291 <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>
24295 percent-encoding and + signs in internal links (T28410)
24297 [[User:+%]] [[Page+title%]]
24298 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24299 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24300 [[%33%45]] [[%33%45+]]
24302 <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>
24303 <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>
24304 <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>
24305 <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>
24308 <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>
24309 <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>
24310 <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>
24311 <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>
24315 Special characters in embedded file links (T29679)
24317 [[File:Contains & ampersand.jpg]]
24318 [[File:Does not exist.jpg|Title with & ampersand]]
24320 <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>
24321 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24324 <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>
24325 <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>
24329 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24331 Text's been normalized?
24333 <p>Text's been normalized?
24338 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24340 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24342 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24347 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24349 [http://www.example.org/ ideograms]
24351 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24356 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24358 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24360 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24384 T33098 Template which includes system messages which includes the template
24388 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24389 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24394 T33490 Turkish: ucfirst 'blah'
24405 T33490 Turkish: ucfirst 'ix'
24416 T33490 Turkish: lcfirst 'BLAH'
24427 T33490 Turkish: ucfırst (with a dotless i)
24433 <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>
24438 T33490 ucfırst (with a dotless i) with English language
24444 <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>
24448 # Note that Parsoid doesn't emit an explicit TOC.
24449 # Note also that the html2wt direction tends to emit an extra newline
24450 # between the __TOC__ magicword and the first heading unless *both*
24451 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24455 T28375: TOC with italics
24457 title=[[Main Page]]
24460 ==''Lost'' episodes==
24462 <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>
24464 <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>
24468 <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>
24471 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24472 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24476 T28375: TOC with bold
24478 title=[[Main Page]]
24481 =='''should be bold''' then normal text==
24483 <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>
24485 <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>
24489 <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>
24492 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24493 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24497 T35845: Headings become cursive in TOC when they contain an image
24499 title=[[Main Page]]
24502 ==Image [[Image:foobar.jpg]]==
24504 <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>
24506 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24510 <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>
24513 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24514 <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>
24518 T35845 (2): Headings become bold in TOC when they contain a blockquote
24520 title=[[Main Page]]
24523 ==<blockquote>Quote</blockquote>==
24525 <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>
24527 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24531 <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>
24534 <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>
24536 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24540 <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>
24542 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24543 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
24547 Unclosed tags in TOC
24549 wgFragmentMode=[ 'html5', 'legacy' ]
24551 title=[[Main Page]]
24555 <small>Hanc marginis exiguitas non caperet.</small>
24558 <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>
24560 <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>
24564 <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>
24565 <p><small>Hanc marginis exiguitas non caperet.</small>
24569 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24570 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24571 <p><small>Hanc marginis exiguitas non caperet.</small>
24576 Multiple tags in TOC
24579 ==<i>Foo</i> <b>Bar</b>==
24581 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24583 <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>
24585 <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>
24586 <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>
24590 <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>
24591 <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>
24594 <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>
24596 <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>
24597 <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>
24601 <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>
24602 <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>
24604 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24605 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24607 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
24610 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24611 # html5 tag parsing.
24613 Tags with parameters in TOC
24618 ==<sup class="in-h2">Hello</sup>==
24620 ==<sup class="a > b">Evilbye</sup>==
24622 <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>
24624 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24625 <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>
24629 <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>
24630 <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>
24633 <meta property="mw:PageProp/toc" />
24634 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24636 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24640 span tags with directionality in TOC
24643 ==<span dir="ltr">C++</span>==
24645 ==<span dir="rtl">זבנג!</span>==
24647 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24649 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24651 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24653 <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>
24655 <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>
24656 <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>
24657 <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>
24658 <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>
24659 <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>
24663 <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>
24664 <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>
24665 <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>
24666 <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>
24667 <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>
24670 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24671 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24672 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24673 <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>
24674 <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>
24675 <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>
24679 T74884: bdi element in ToC
24682 ==<bdi>test</bdi>==
24684 <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>
24686 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24690 <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>
24693 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24694 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24698 T35715: s/strike element in ToC
24701 ==<s>test</s> test <strike>test</strike>==
24703 <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>
24705 <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>
24709 <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>
24712 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24713 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24717 T198618: style element in ToC
24722 ==<style>.foo {}</style>Style<style>.bar {}</style>==
24724 <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>
24726 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
24730 <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>
24733 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24734 <h2 id="Style" data-parsoid='{}'><style>.foo {}</style>Style<style>.bar {}</style></h2>
24738 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24743 <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>
24745 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24749 <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>
24752 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24753 <h2 id="x" data-parsoid='{}'>x</h2>
24759 == {{int:headline_sample}} ==
24763 T34057: Title needed when expanding <h> nodes.
24765 title=[[Main Page]]
24769 <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>
24774 Strip marker in urlencode
24776 {{urlencode:x<nowiki/>y}}
24777 {{urlencode:x<nowiki/>y|wiki}}
24778 {{urlencode:x<nowiki/>y|path}}
24779 {{urlencode:x<pre id="one">two</pre>y}}
24807 Strip marker in formatNum
24809 {{formatnum:1<nowiki/>2}}
24810 {{formatnum:1<nowiki/>2|R}}
24818 Check noCommafy in formatNum
24822 {{formatnum:123456.78}}
24823 {{formatnum:123456.78|NOSEP}}
24831 Wrong option for formatNum (T58199)
24833 {{formatnum:1,234.56|Random}}
24834 {{formatnum:1,234.56|EVERYTHING}}
24835 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24844 Strip marker in grammar
24848 {{grammar:elative|foo<nowiki/>bar}}
24855 Strip marker in padleft
24857 {{padleft:|2|x<nowiki/>y}}
24864 Strip marker in padright
24866 {{padright:|2|x<nowiki/>y}}
24873 Strip marker in anchorencode
24875 {{anchorencode:x<nowiki/>y}}
24880 <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>
24884 nowiki inside link inside heading (T20295)
24886 ==[[foo|x<nowiki>y</nowiki>z]]==
24888 <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>
24893 new support for bdi element (T33817)
24895 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24897 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24902 Ignore pipe between table row attributes
24906 |- id=foo | style='color: red'
24914 <tr id="foo" style="color: red">
24921 Language parser function
24930 Padleft and padright (default 0-padding)
24939 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24940 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24944 Padleft and padright (partial fill)
24946 {{padleft:xyz|6|ab}}
24947 {{padright:xyz|6|ab}}
24953 <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>
24954 <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>
24958 Padleft and padright as substr
24960 {{padleft:|3|abcde}}
24961 {{padright:|3|abcde}}
24967 <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>
24968 <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>
24972 Padleft and padright with non-numerical length (T180403)
24974 {{padleft:abcdef|junk}}
24975 {{padright:abcdef|junk}}
24983 Special parser function
24985 {{#special:RandomPage}}
24986 {{#special:BaDtItLe}}
24987 {{#special:Foobar}}
24996 T36939 - Case insensitive link parsing ([HttP://])
24998 [HttP://MediaWiki.Org/]
25000 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25003 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
25007 T36939 - Case insensitive link parsing ([HttP:// title])
25009 [HttP://MediaWiki.Org/ MediaWiki]
25011 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25016 T36939 - Case insensitive link parsing (HttP://)
25018 HttP://MediaWiki.Org/
25020 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25023 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
25041 <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>
25042 <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>
25043 <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>
25044 <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>
25045 <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>
25051 ### Parsoid-specific tests
25052 ### Parsoid-PHP parser incompatibilities
25055 1. SOL-sensitive wikitext tokens as template-args
25057 parsoid=wt2html,wt2wt
25063 <span about="#mwt1" typeof="mw:Transclusion">
25064 </span><ul about="#mwt1"><li>a</li>
25066 <span about="#mwt2" typeof="mw:Transclusion">
25067 </span><ol about="#mwt2"><li>a</li>
25069 <span about="#mwt3" typeof="mw:Transclusion">
25070 </span><dl about="#mwt3"><dd>a</dd>
25074 #### -----------------------------------------------------------------
25075 #### Parsoid-specific functionality tests
25076 #### -----------------------------------------------------------------
25078 # T65642/T68749: Formatting elt fixup around images.
25079 # We know wt2wt will fail, but we expect selser to pass.
25080 # Due to the nature of our testing, wt2wt and selser tests will enter the
25081 # blacklist and we'll catch selser regressions based on changes to the
25082 # blacklist entries for selser tests.
25084 1. Treebuilder fixup of formatting elt
25086 parsoid=wt2html,wt2wt
25091 [[Image:Foobar.jpg|right|Test]]
25099 </small></p><small>
25100 <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>
25101 </small><p><small></small>
25103 </td></tr></tbody></table>
25107 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25108 <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>
25109 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25114 2. Treebuilder fixup of formatting elt
25116 parsoid=wt2html,wt2wt
25118 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25120 <small>[[Image:Foobar.jpg|right|300px]]</small>
25122 <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>
25123 </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>
25125 <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>
25127 <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>
25131 3. Treebuilder fixup of formatting elt
25133 parsoid=wt2html,wt2wt
25135 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25137 <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>
25140 <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>
25144 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25146 parsoid=wt2html,wt2wt
25148 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25150 <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>
25152 <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>
25155 #### ----------------------------------------------------------------
25156 #### Parsoid-only testing of Parsoid's impl of LST
25157 #### Not implemented yet, see
25158 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25159 #### ----------------------------------------------------------------
25161 ## We still need to support serializing the older format while content is stored.
25163 LST Sections: Backwards compatibility
25166 "suppressErrors": true,
25167 "modes": ["html2wt"]
25170 <section begin="2011-05-16" />
25171 <section end="2014-04-10 (MW 1.23wmf22)" />
25173 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25174 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25178 LST Sections: Newfangled approach
25180 <section begin="2011-05-16" />
25181 <section end="2014-04-10 (MW 1.23wmf22)" />
25183 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
25185 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
25189 #--------- Test stripping of empty nodes in template content ----------
25192 Empty LI and TR nodes should be stripped from template content
25197 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25201 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25214 Empty LI and TR nodes should not be stripped from top-level content
25228 <li class='mw-empty-elt'></li>
25233 <tr class='mw-empty-elt'></tr>
25242 Empty TR nodes should not be stripped if they have any attributes set
25244 {{EmptyTRWithHTMLAttrTest}}
25246 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25247 <tr align='center'></tr>
25248 <tr><td>foo</td></tr>
25249 <tr align='center'></tr>
25250 <tr><td>bar</td></tr>
25254 #### ----------------------------------------------------------------
25255 #### The following section of tests are primarily to test
25256 #### wikitext escaping capabilities of Parsoid. Given that
25257 #### escaping can be done any number of ways, the wikitext (input)
25258 #### is always adjusted to reflect how Parsoid adds nowiki
25261 #### We are marking several tests as parsoid-only since the
25262 #### HTML in the result section is different from what the
25263 #### PHP parser generates for it.
25264 #### ----------------------------------------------------------------
25267 #### --------------- Headings ---------------
25269 #### 1. Nested inside html <h1>=foo=</h1>
25270 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25271 #### 3. Nested inside html with wikitext split by html tags
25272 #### 4. No escape needed
25273 #### 5. Empty headings <h1></h1>
25274 #### 6. Heading chars in SOL context
25275 #### ----------------------------------------
25277 Headings: 0. Unnested
25287 <p>=foo<i>a</i>=</p>
25289 <nowiki>=foo=</nowiki>
25291 <nowiki> </nowiki>=foo=
25293 <nowiki>=foo=</nowiki>
25295 =foo''a''<nowiki>=</nowiki>
25298 # New headings and existing headings are handled differently
25300 Headings: 1. Nested inside html
25308 <h1 data-parsoid=''>=foo=</h1>
25309 <h2 data-parsoid=''>=foo=</h2>
25310 <h3 data-parsoid=''>=foo=</h3>
25311 <h4 data-parsoid=''>=foo=</h4>
25312 <h5 data-parsoid=''>=foo=</h5>
25313 <h6 data-parsoid=''>=foo=</h6>
25321 =<nowiki>=foo=</nowiki>=
25322 ==<nowiki>=foo=</nowiki>==
25323 ===<nowiki>=foo=</nowiki>===
25324 ====<nowiki>=foo=</nowiki>====
25325 =====<nowiki>=foo=</nowiki>=====
25326 ======<nowiki>=foo=</nowiki>======
25331 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25340 <nowiki>*</nowiki>bar
25346 <nowiki>=bar=</nowiki>
25350 Headings: 3. Nested inside html with wikitext split by html tags
25354 <h1>=<b>bold</b>foo=</h1>
25356 = ='''bold'''foo= =
25360 Headings: 4a. No escaping needed (testing just h1 and h2)
25371 <h1><i>=</i>foo=</h1>
25391 Headings: 4b. No escaping needed (inside p-tags)
25408 Headings: 4c. Short headings (1)
25415 <nowiki>===</nowiki>
25421 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25423 Headings: 4d. Short headings (2)
25425 parsoid=wt2html,html2html
25436 <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>
25437 <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>
25438 <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>
25443 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25444 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25445 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25449 Headings: 5. Empty headings
25453 <h1 data-parsoid='{}'></h1>
25455 <h2 data-parsoid='{}'></h2>
25457 <h3 data-parsoid='{}'></h3>
25459 <h4 data-parsoid='{}'></h4>
25461 <h5 data-parsoid='{}'></h5>
25463 <h6 data-parsoid='{}'></h6>
25473 =====<nowiki/>=====
25475 ======<nowiki/>======
25479 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25489 <nowiki>=a=</nowiki>
25491 <nowiki>=a=</nowiki>
25493 <nowiki>=a=</nowiki>
25497 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25510 <nowiki>=a=</nowiki>
25513 <nowiki>=a=</nowiki>
25516 <nowiki>=a=</nowiki>
25521 Headings: 6c. Heading chars in SOL context (leading newline break)
25529 <nowiki>=b=</nowiki>
25533 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25537 <!--c0--><p>=a=</p>
25539 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25541 <!--c0--><nowiki>=a=</nowiki>
25543 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25547 Headings: 6d. Heading chars in SOL context (No escaping needed)
25557 Headings: 7. Insert a newline between new content and headings
25563 <h2 data-parsoid='{}'>A</h2>
25564 <p data-parsoid='{}'>a</p>
25575 Headings: Used as horizontal rule
25577 wgFragmentMode=[ 'html5', 'legacy' ]
25583 <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>
25586 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25589 #### --------------- Lists ---------------
25590 #### 0. Outside nests (*foo, etc.)
25591 #### 1. Nested inside html <ul><li>*foo</li></ul>
25592 #### 2. Inside definition lists
25593 #### 3. Only bullets at start should be escaped
25594 #### 4. No escapes needed
25595 #### 5. No unnecessary escapes
25596 #### 6. Escape bullets in SOL position
25597 #### 7. Escape bullets in a multi-line context
25598 #### ----------------------------------------
25601 Lists: 0. Outside nests
25611 <nowiki>*</nowiki>foo
25613 <nowiki>#</nowiki>foo
25615 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25618 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25619 ## to test wikitext escaping, and insignificant whitespace diffs
25620 ## cause PHP parser tests to barf
25622 Lists: 1. Nested inside html (No unnecessary escapes)
25631 <li data-parsoid='{}'>*foo</li>
25632 <li data-parsoid='{}'>#foo</li>
25633 <li data-parsoid='{}'>:foo</li>
25634 <li data-parsoid='{}'>;foo</li>
25642 <li data-parsoid='{}'>*foo</li>
25643 <li data-parsoid='{}'>#foo</li>
25644 <li data-parsoid='{}'>:foo</li>
25645 <li data-parsoid='{}'>;foo</li>
25652 *<nowiki>*foo</nowiki>
25653 *<nowiki>#foo</nowiki>
25654 *<nowiki>:foo</nowiki>
25655 *<nowiki>;foo</nowiki>
25661 #<nowiki>*foo</nowiki>
25662 #<nowiki>#foo</nowiki>
25663 #<nowiki>:foo</nowiki>
25664 #<nowiki>;foo</nowiki>
25668 Lists: 2. Inside definition lists
25672 <dl><dt>;foo</dt></dl>
25673 <dl><dt>:foo</dt></dl>
25676 <dl><dd>:foo</dd></dl>
25680 ; <nowiki>:foo</nowiki>
25682 ; <nowiki>:foo</nowiki>
25689 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25695 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25699 *<nowiki>*foo</nowiki>''it''*bar
25703 Lists: 4. No escapes needed
25716 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25720 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25734 Lists: 5. No unnecessary escapes
25738 <ul><li> bar <span>[[foo]]</span></li></ul>
25739 <ul><li> =bar <span>[[foo]]</span></li></ul>
25740 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25741 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25742 <ul><li> =bar <span>foo]]</span>=</li></ul>
25743 <ul><li> <s></s>: a</li></ul>
25744 <ul><li> <i>* foo</i></li></ul>
25747 * bar <span><nowiki>[[foo]]</nowiki></span>
25749 * =bar <span><nowiki>[[foo]]</nowiki></span>
25751 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25753 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25755 * =bar <span>foo]]</span>=
25763 Lists: 6. Escape bullets in SOL position
25767 <p><!--cmt-->*foo</p>
25769 <!--cmt--><nowiki>*</nowiki>foo
25773 Lists: 7. Escape bullets in a multi-line context
25782 <nowiki>*</nowiki>b
25786 Lists: 8. Escape colons only if not present in tags
25790 <dl><dt>a:b<i>c:d</i></dt></dl>
25792 ; <nowiki>a:b</nowiki>''c:d''
25795 #### --------------- HRs ---------------
25796 #### 1. Single line
25797 #### -----------------------------------
25800 HRs: 1. Single line
25808 ----<nowiki>----</nowiki>
25813 #### --------------- Tables ---------------
25814 #### 1a. Simple example
25815 #### 1b. No escaping needed (!foo)
25816 #### 1c. No escaping needed (|foo)
25817 #### 1d. No escaping needed (|}foo)
25819 #### 2a. Nested in td (<td>foo|bar</td>)
25820 #### 2b. Nested in td (<td>foo||bar</td>)
25821 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25823 #### 3a. Nested in th (<th>foo!bar</th>)
25824 #### 3b. Nested in th (<th>foo!!bar</th>)
25825 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25829 #### 4c. No escaping needed
25830 #### --------------------------------------
25833 Tables: 1a. Simple example
25841 <nowiki>{|</nowiki>
25846 Tables: 1b. No escaping needed
25857 Tables: 1c. No escaping needed
25868 Tables: 1d. No escaping needed
25879 Tables: 2a. Nested in td
25884 <td>foo|bar</td></tr>
25885 <tr><td>x<div>a|b</div></td>
25889 |<nowiki>foo|bar</nowiki>
25891 |x<div><nowiki>a|b</nowiki></div>
25899 <td>x<div>a|b</div>
25900 </td></tr></tbody></table>
25904 Tables: 2b. Nested in td
25910 <td>a<i>b||c</i></td>
25911 <td>a<i><div>b||c</div></i></td>
25912 </tr></tbody></table>
25915 |<nowiki>foo||bar</nowiki>
25916 |a''<nowiki>b||c</nowiki>''
25917 |a''<div><nowiki>b||c</nowiki></div>''
25926 <td>a<i><div>b||c</div></i>
25932 Tables: 2c. Nested in td -- no escaping needed
25948 Tables: 3a. Nested in th
25964 Tables: 3b. Nested in th
25969 <tr><th>foo!!bar</th>
25970 <th><i>foo|bar</i></th>
25971 <th><i>foo!!bar</i></th>
25972 <th><i><span>foo!!bar</span></i></th>
25973 </tr></tbody></table>
25976 !<nowiki>foo!!bar</nowiki>
25977 !''<nowiki>foo|bar</nowiki>''
25978 !''<nowiki>foo!!bar</nowiki>''
25979 !''<span><nowiki>foo!!bar</nowiki></span>''
25988 <th><i>foo!!bar</i>
25990 <th><i><span>foo!!bar</span></i>
25996 Tables: 3c. Nested in th
26001 <tr><th>foo||bar</th>
26002 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26003 </tr></tbody></table>
26006 !<nowiki>foo||bar</nowiki>
26007 !<nowiki>foo||bar</nowiki>
26020 Tables: 4a. Escape -
26036 |<nowiki>-bar</nowiki>
26041 Tables: 4b. Escape +
26057 |<nowiki>+bar</nowiki>
26062 Tables: 4c. No escaping needed
26067 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26068 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26074 <div>a|b</div></td>
26119 Tables: 4d. No escaping needed
26124 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26125 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26126 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26137 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26147 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26151 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26153 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26155 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26157 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26160 | || align="center" | ||
26170 | {{!}}{{!}} align="center" | ||
26174 ! !! align="center" | !!
26180 <td align="center"></td>
26182 </td></tr></tbody></table>
26187 <td align="center">
26190 </td></tr></tbody></table>
26194 <td align="center"></td>
26196 </td></tr></tbody></table>
26200 <th align="center"></th>
26202 </th></tr></tbody></table>
26206 T97430: Don't emit empty nowiki pairs around marker meta tags
26210 <p>*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.</p>
26213 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26214 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26218 Unclosed xmlish element in table line shouldn't eat end delimiters
26223 <tbody><tr><td> <foo</td>
26224 <td> bar></td></tr>
26241 #### --------------- Links ----------------
26242 #### 1. Quote marks in link text
26243 #### 2. Wikilinks: Escapes needed
26244 #### 3. Wikilinks: No escapes needed
26245 #### 4. Extlinks: Escapes needed
26246 #### 5. Extlinks: No escapes needed
26247 #### --------------------------------------
26249 Links 1. WikiLinks: No escapes needed
26253 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26254 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26255 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26259 [[Foo|x [Foobar] x]]
26261 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26262 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26263 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26268 Links 2. WikiLinks: Escapes needed
26272 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26273 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26274 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26275 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26276 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26277 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26278 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26279 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26280 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26281 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26283 [[Foo|<nowiki>Foobar]</nowiki>]]
26284 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26285 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26286 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26287 [[Foo|<nowiki>|Bar</nowiki>]]
26288 [[Foo|<nowiki>]]bar</nowiki>]]
26289 [[Foo|<nowiki>[[bar</nowiki>]]
26290 [[Foo|<nowiki>x [[ y</nowiki>]]
26291 [[Foo|<nowiki>x ]] y</nowiki>]]
26292 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26294 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26295 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26296 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26297 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26298 <a href="/wiki/Foo" title="Foo">|Bar</a>
26299 <a href="/wiki/Foo" title="Foo">]]bar</a>
26300 <a href="/wiki/Foo" title="Foo">[[bar</a>
26301 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26302 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26303 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26308 Links 3. WikiLinks: No escapes needed
26312 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26313 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26318 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26319 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26324 Links 4. ExtLinks: Escapes needed
26328 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26329 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26330 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26331 <p>[http://google.com]</p>
26332 <p>[http://google.com google]</p>
26333 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26334 <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>
26336 [http://google.com <nowiki>[google]</nowiki>]
26337 [http://google.com <nowiki>google]</nowiki>]
26338 [http://google.com <nowiki>goog] le</nowiki>]
26340 <nowiki>[http://google.com]</nowiki>
26342 <nowiki>[http://google.com google]</nowiki>
26344 [http://google.com<nowiki>]</nowiki>
26346 [{{echo|http://google.com}}<nowiki>]</nowiki>
26348 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26349 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26350 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26351 </p><p>[http://google.com]
26352 </p><p>[http://google.com google]
26353 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26354 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26359 Links 5. ExtLinks: No escapes needed
26363 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26364 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26366 [http://google.com [google]
26368 [[http://google.com]]
26370 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26371 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26376 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26380 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
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" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26390 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26391 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26392 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26395 x<nowiki/>http://example.com<nowiki/>y
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<nowiki/>!x
26405 http://example.com<nowiki/>=x
26406 http://example.com<nowiki/>(x)
26407 http://example.com(x<nowiki/>)
26411 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26416 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
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>)
26420 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26421 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26422 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26428 "http://example.com"
26429 (http://example.com)
26430 (http://example.com) foo
26431 http://example.com,
26432 http://example.com, foo
26435 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
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>)
26439 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26440 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26441 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26446 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26450 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26451 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26453 http://example.com.,;:!?\
26454 -http://example.com:
26456 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26457 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26462 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26466 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26467 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26468 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26472 X<nowiki/>RFC 123<nowiki/>y
26476 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26480 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26481 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26482 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26489 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26490 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26491 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26496 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26500 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26501 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26502 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26506 X<nowiki/>PMID 123<nowiki/>y
26510 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26514 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26515 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26516 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26523 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26524 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26525 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26530 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26534 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26535 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26536 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26539 ISBN 1234567890<nowiki/>1
26540 ISBN 1234567890<nowiki/>x
26541 a<nowiki/>ISBN 1234567890<nowiki/>b
26545 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26549 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26553 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26558 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26562 <p>this is not a link: http://example.com
26565 this is not a link: <nowiki>http://example.com</nowiki>
26569 Links 15. Link trails can't become link prefixes.
26574 <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>
26576 [[Söfnuður]]-[[00]]
26578 <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>
26582 #### --------------- Quotes ---------------
26583 #### 1. Quotes inside <b> and <i>
26584 #### 2. Link fragments separated by <i> and <b> tags
26585 #### 3. Link fragments inside <i> and <b>
26586 #### 4. No escaping needed
26587 #### --------------------------------------
26589 1a. Quotes inside <b> and <i>
26600 <b>foo'<i>bar'</i>baz</b>
26609 <i>fools'<span> errand</span></i>
26610 <i><span>fool</span>'s errand</i>
26611 '<i>foo</i> bar '<i>baz</i>
26612 a|!*#-:;+-~[]{}b'<i>x</i>
26616 ''<nowiki>''foo''</nowiki>''
26617 ''<nowiki>'''foo'''</nowiki>''
26619 '''<nowiki/>'foo''''
26620 '''<nowiki>''foo''</nowiki>'''
26621 '''<nowiki>'''foo'''</nowiki>'''
26622 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26623 '''foo'''<nowiki/>'s
26629 '''foo'''<nowiki/>'
26630 ''''foo'''<nowiki/>'
26631 ''fools'<span> errand</span>''
26632 ''<span>fool</span>'s errand''
26633 '<nowiki/>''foo'' bar '''baz''
26634 a|!*#-:;+-~[]{}b'''x''
26638 1b. Quotes inside <b> and <i> with other tags on same line
26642 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26643 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26644 <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>
26645 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26646 '<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>
26647 '<i>foo</i> <div title="name">test</div>
26648 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26649 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26650 <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>
26653 '''a'' foo ''[[bar]]''
26654 ''a''' foo ''[[bar]]''
26655 ''a''' foo '''{{echo|[[bar]]}}'''
26656 [[foo]] x'''[[bar]]''
26657 '''foo'' <ref>test</ref>
26658 '''foo'' <div title="name">test</div>
26659 '''foo'' and <br> bar
26664 2. Link fragments separated by <i> and <b> tags
26668 <p>[[<i>foo</i>hello]]</p>
26669 <p>[[<b>foo</b>hello]]</p>
26671 [[''foo''<nowiki>hello]]</nowiki>
26673 [['''foo'''<nowiki>hello]]</nowiki>
26676 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26677 # this is one of the shortcomings of this format
26679 3. Link fragments inside <i> and <b>
26683 <p><i>[[foo</i>]]</p>
26684 <p><b>[[foo</b>]]</p>
26686 ''[[foo''<nowiki>]]</nowiki>
26688 '''[[foo'''<nowiki>]]</nowiki>
26692 4. No escaping needed
26696 <p>'<span><i>bar</i></span>'
26697 '<span><b>bar</b></span>'
26701 '<span>''bar''</span>'
26702 '<span>'''bar'''</span>'
26706 #### ----------- Paragraphs ---------------
26707 #### 1. No unnecessary escapes
26708 #### --------------------------------------
26711 1. No unnecessary escapes
26715 <p>bar <span>[[foo]]</span>
26716 </p><p>=bar <span>[[foo]]</span>
26717 </p><p>[[bar <span>[[foo]]</span>
26718 </p><p>]]bar <span>[[foo]]</span>
26719 </p><p>=bar <span>foo]]</span>=
26722 bar <span><nowiki>[[foo]]</nowiki></span>
26724 =bar <span><nowiki>[[foo]]</nowiki></span>
26726 [[bar <span><nowiki>[[foo]]</nowiki></span>
26728 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26730 =bar <span>foo]]</span><nowiki>=</nowiki>
26733 #### ----------------------- PRE --------------------------
26735 1. Leading whitespace in SOL context should be escaped
26758 <nowiki> </nowiki>a
26760 <nowiki> </nowiki> a
26764 <nowiki> </nowiki> a
26766 <nowiki> </nowiki>a
26769 <nowiki> </nowiki>b
26792 2. Leading whitespace in non-indent-pre contexts should not be escaped
26796 <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>
26797 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26798 <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>
26808 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26827 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26831 <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>
26833 [[File:Foobar.jpg|thumb|caption]]
26837 5. Nowiki escaping should account for indent-pres
26847 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26861 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
26864 "modes": ["html2wt"],
26865 "scrubWikitext": true
26873 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
26874 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
26875 <p> <!--boo-->*foo</p>
26876 <p><!--boo--> *foo</p>
26877 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
26878 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
26894 <nowiki>*</nowiki>foo
26896 <nowiki/><!--boo-->*foo
26898 <!--boo--><nowiki/>*foo
26900 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
26902 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
26905 #### --------------- Behavior Switches --------------------
26908 1. Valid behavior switches should be escaped
26915 <nowiki>__TOC__</nowiki>
26916 ''<nowiki>__TOC__</nowiki>''
26920 2. Invalid behavior switches should not be escaped
26931 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26933 Behavior switches should be SOL-transparent
26937 <meta property="mw:PageProp/toc" />
26939 <!-- this one's bogus -->
26942 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26944 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26948 <!-- this one's bogus -->
26957 #### --------------- HTML tags ---------------
26960 #### 3. multi-line html tag
26961 #### 4. extension tags
26962 #### -----------------------------------------
26968 <a href="http://google.com">google</a>
26970 <a href="http://google.com">google</a>
26978 <ul><li> <div>foo</div></li>
26979 <li> <div style="color:red">foo</div></li>
26980 <li> <td></li></ul>
26983 * <nowiki><div>foo</div></nowiki>
26984 * <nowiki><div style="color:red">foo</div></nowiki>
26985 * <nowiki><td></nowiki>
26989 3. multi-line html tag
27008 <p><ref>foo</ref>
27009 </p><p><ref>bar
27010 </p><p>baz</ref>
27013 <nowiki><ref>foo</ref></nowiki>
27015 <nowiki><ref>bar</nowiki>
27017 baz<nowiki></ref></nowiki>
27021 Parsoid: newline inducing block nodes don't suppress <nowiki>
27027 <nowiki> </nowiki>a
27032 #### --------------- Others ---------------
27038 <p><nowiki>foo</nowiki>
27041 <nowiki>foo</nowiki>
27044 ## The quote-char in the input is necessary for triggering the bug
27046 (T54035) Nowiki-escaping should not get tripped by " :" in text
27055 #----------- End of wikitext escaping tests --------------
27059 Tag-like HTML structures are passed through as text
27081 </p><p>1<d e>f
27086 HTML tag with necessary entities in attributes
27088 <span title="&amp;">foo</span>
27090 <p><span title="&amp;">foo</span>
27095 HTML tag with 'unnecessary' entity encoding in attributes
27097 <span title="&">foo</span>
27099 <p><span title="&">foo</span>
27104 HTML tag with broken attribute value quoting
27106 parsoid=wt2html,html2html
27108 <span title="Hello world>Foo</span>
27110 <p><span title="Hello world">Foo</span>
27113 <p><span title="Hello world">Foo</span></p>
27117 Self-closed tag with broken attribute value quoting
27119 parsoid=wt2html,html2html
27121 <div title="Hello world />Foo
27123 <div title="Hello world"></div><p>Foo
27126 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27130 Table with broken attribute value quoting
27132 parsoid=wt2html,html2html
27135 | title="Hello world|Foo
27140 <td title="Hello world">Foo
27146 <td title="Hello world">Foo
27152 Table with broken attribute value quoting on consecutive lines
27154 parsoid=wt2html,html2html
27157 | title="Hello world|Foo
27158 | style="color:red|Bar
27163 <td title="Hello world">Foo
27165 <td style="color:red">Bar
27171 <td title="Hello world">Foo
27172 </td><td style="color: red">Bar
27173 </td></tr></tbody></table>
27178 Accept empty td cell attribute
27181 | align="center" |foo|| |
27186 <td align="center">foo</td>
27193 Non-empty attributes in th-cells
27196 !Foo!! style="color: red" |Bar
27202 <th style="color: red">Bar
27208 Accept empty attributes in th-cells
27223 Empty table rows go away
27244 ### Parsoid-centric tests for testing RTing of inter-element separators
27245 ### Edge cases not tested by existing parser tests and specific to
27246 ### Parsoid-specific serialization strategies.
27250 RT-ed inter-element separators should be valid separators
27262 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27266 # Parsoid-only test of a DOM pass
27268 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27280 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27281 <p>bar</p></small></td></tr>
27285 <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>
27289 # Note that the "style" attribute is really a template parameter here.
27290 # The = would have to be {{=}} if you wanted the literal.
27292 Empty TD followed by TD with tpl-generated attribute
27297 |{{echo|style='color:red'}}|foo
27311 Indented table with an empty td
27329 ## We have some newline diffs RT-ing this edge case
27330 ## and it is not important enough -- we seem to be emitting
27331 ## at most 2 newlines after a </tr> and this is unrelated to
27332 ## the issue from T85627 that this is testing.
27334 Indented table with blank lines in between (T85627)
27353 Indented block & table
27367 <div data-parsoid='{"stx":"html"}'>foo</div>
27369 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27374 Indent and comment before table row
27389 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27390 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27394 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27396 Empty TR followed by a template-generated TR
27402 {{echo|<tr><td>foo</td></tr>}}
27407 <tr class='mw-empty-elt'></tr>
27408 <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}}]}'>
27413 ## PHP and parsoid output differ for this, and since this is primarily
27414 ## for testing Parsoid's serializer, marking this Parsoid only
27416 Empty TR followed by mixed-ws-comment line should RT correctly
27429 <tr class='mw-empty-elt'></tr>
27432 <!--c--> </tr><!--d-->
27438 Multi-line image caption generated by templates with/without trailing newlines
27440 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27441 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27443 <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>
27444 <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>
27448 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27452 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27454 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27456 <includeonly>foo</includeonly>
27464 ## PHP emits broken html for this, and since this is primarily
27465 ## a Parsoid serializer test, marking this Parsoid only
27467 Improperly nested inline or quotes tags with whitespace in between
27469 <span> <s>x</span> </s>
27472 <p><span> <s>x</s></span><s> </s>
27473 <b> <i>x</i></b><i> </i>
27478 Encapsulate protected attributes from wt
27480 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27482 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27486 <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>
27488 <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">
27489 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
27493 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27494 ## Having nested or stray pre tags results in the attempt to add duplicates,
27495 ## causing an assertion fail. This test tries to prevent that situation.
27497 Ensure ParagraphWrapper can deal with stray closing pre tags
27506 ## Remex doesn't account for fostered content.
27508 1. Ensure fostered text content is wrapped in element nodes
27512 <table>hi</table><table>ho</table>
27514 hi<table></table>ho<table></table>
27516 <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>
27519 ## Remex doesn't account for fostered content.
27521 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27523 parsoid=wt2html,wt2wt
27533 </td></tr></tbody></table>
27535 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
27536 <table data-parsoid='{"stx":"html"}'>
27537 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
27538 </td></tr></tbody></table>
27541 ## Remex doesn't account for fostered content.
27543 Encapsulation properly handles null DSR information from foster box
27545 parsoid=wt2html,wt2wt
27547 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27549 <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>
27552 ## Remex doesn't account for fostered content.
27554 1. Encapsulate foster-parented transclusion content
27556 parsoid=wt2wt,wt2html
27558 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27560 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
27562 <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>
27566 2. Encapsulate foster-parented transclusion content
27568 parsoid=wt2wt,wt2html
27570 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27572 <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>
27583 3. Encapsulate foster-parented transclusion content
27585 parsoid=wt2wt,wt2html
27587 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27589 <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>"]}">
27602 4. Encapsulate foster-parented transclusion content
27604 parsoid=wt2wt,wt2html
27606 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27608 <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>"]}">
27620 ## Remex doesn't account for fostered content.
27622 5. Encapsulate foster-parented transclusion content
27624 parsoid=wt2wt,wt2html
27626 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27628 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27630 <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>
27633 ## Remex doesn't account for fostered content.
27635 6. Encapsulate foster-parented transclusion content
27637 parsoid=wt2wt,wt2html
27639 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27641 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
27643 <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>
27647 7. Encapsulate foster-parented transclusion content
27649 parsoid=wt2wt,wt2html
27651 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27653 <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>
27663 ## Remex doesn't account for fostered content.
27664 # Note that the wt is broken on purpose: the = should be {{=}} if you
27665 # don't want it to be a template parameter key.
27667 8. Encapsulate foster-parented transclusion content
27669 parsoid=wt2wt,wt2html
27672 }}{|{{echo|style='color:red'}}
27683 </td></tr></tbody></table>
27685 <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">
27686 </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">
27689 </td></tr></tbody></table>
27692 ## Remex doesn't account for fostered content.
27694 9. Encapsulate foster-parented transclusion content
27696 parsoid=wt2wt,wt2html
27698 <table>{{echo|hi</table>hello}}
27700 hi<table></table><p>hello
27703 <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>
27707 Table in fosterable position
27718 <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">
27720 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27726 # Parsoid only for T66747
27728 Properly encapsulate empty-content transclusions in fosterable positions
27736 <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"}]]}'>
27742 Always encapsulate foster box when template range is expanded to table
27755 T115289: Unclosed table
27757 {{echo|<table>}}<!--c-->[[Category:Two]]
27759 <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>
27763 T115289: Don't migrate newlines out of tables with fostered content
27765 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27767 <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>
27771 T73074: More fostering fun
27773 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27775 <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>
27779 Support <object> element with .data attribute
27783 <object data="test.swf"></object>
27785 <object data="test.swf"></object>
27789 Don't block XML namespace declaration
27791 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27793 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27796 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27799 # -----------------------------------------------------------------
27800 # The following section of tests are primarily to spec requirements
27801 # around Parsoid's serialization (old, new, edited content)
27803 # All these tests are marked Parsoid html2wt and html2html only
27804 # ----------------------------------------------------------------
27807 Ignore rel attribute in a-tags during serialization to url-links
27811 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27812 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27813 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27815 http://en.wikipedia.org/wiki/Foobar
27816 http://en.wikipedia.org/wiki/Foobar
27817 http://en.wikipedia.org/wiki/Foobar
27820 # 'mi' is a localinterwiki prefix as well as a language
27822 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27826 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27832 Parsoid should accept interwiki shortcuts
27836 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27837 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27838 <a href='./fr:Foo'>Foo</a></p>
27839 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27840 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27841 <a href='fr%3AFoo'>Foo</a></p>
27842 <p><a href='FR%3AFoo'>Foo</a>
27843 <a href='./FR:Foo'>Foo</a></p>
27858 Parsoid should not accept invalid interwiki shortcuts
27862 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27863 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27864 <a href='news:Foo'>Foo</a></p>
27873 New wikilinks should be serialized properly
27877 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27878 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27879 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27880 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27881 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27885 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27886 http://en.wikipedia.org/wiki/Foo
27887 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27891 New wiki links (href variations)
27895 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27896 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27897 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27898 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27903 [[Toxine bactérienne]]
27907 New wiki links (content string variations)
27911 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27912 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27913 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27917 [[Foo_bar|./Foo_bar]]
27921 New category links (href variations)
27925 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27926 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27927 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27929 [[Category:Toxine bactérienne]]
27930 [[Category:Toxine bactérienne]]
27931 [[Category:Toxine bactérienne]]
27935 New sol transparent links don't need indent-pre nowiki protection
27940 <link rel="mw:PageProp/redirect" href="./Main_Page">
27941 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27942 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27944 #WEITERLEITUNG [[Main Page]]
27945 <!-- this is good --> [[Category:Good]]
27946 <!-- this is great --> [[Kategorie:Great]]
27950 New interlanguage links (href variations)
27954 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27955 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27956 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27958 [[es:Toxine bactérienne]]
27959 [[es:Toxine_bactérienne]]
27960 [[es:Toxine_bactérienne]]
27964 Image: Modifying size of an image (1)
27967 "modes": ["wt2wt"],
27969 ["img[height]", "attr", "height", "22"],
27970 ["img[width]", "attr", "width", "200"]
27974 [[Image:Foobar.jpg|230x230px]]
27976 [[Image:Foobar.jpg|200x200px]]
27980 Image: Modifying size of an image (2)
27983 "modes": ["wt2wt"],
27985 ["img[height]", "attr", "height", "100"],
27986 ["img[width]", "attr", "width", "500"]
27990 [[Image:Foobar.jpg|230x230px]]
27992 [[Image:Foobar.jpg|500x500px]]
27995 # Change in size is ignored so long as class='mw-default-size'
27997 Image: Modifying size of an image (3)
28000 "modes": ["wt2wt"],
28002 ["figure[class]", "removeClass", "mw-default-size"],
28003 ["figure img", "attr", "height", "19"],
28004 ["figure img", "attr", "width", "170"]
28008 [[Image:Foobar.jpg|thumb]]
28010 [[Image:Foobar.jpg|thumb|170x170px]]
28014 Image: Modifying alignment of an image (T50665)
28017 "modes": ["wt2wt"],
28019 ["figure[class]", "removeClass", "mw-halign-right"],
28020 ["figure[class]", "addClass", "mw-halign-left"]
28024 [[Image:Foobar.jpg|thumb|caption|right]]
28026 [[Image:Foobar.jpg|thumb|caption|left]]
28030 Image: Modifying mw-default-size of an frameless image (T64805)
28033 "modes": ["wt2wt"],
28035 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28039 [[Image:Foobar.jpg|frameless|right]]
28041 [[Image:Foobar.jpg|frameless|right|220x220px]]
28045 Image: Modifying valign of an image (T51221)
28048 "modes": ["wt2wt"],
28050 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28051 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28055 [[File:Foobar.jpg|20px|middle]]
28057 [[File:Foobar.jpg|20px|text-top]]
28061 Image: Modifying alt attribute of an image (T58400)
28064 "modes": ["wt2wt"],
28066 ["img[alt]", "attr", "alt", "some alternate edited text"]
28070 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28072 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28076 Image: Modifying caption of an image
28079 "modes": ["wt2wt"],
28081 ["figcaption", "text", "new caption"]
28085 [[Image:Foobar.jpg|thumb|original caption]]
28087 [[Image:Foobar.jpg|thumb|new caption]]
28091 Image: empty alt attribute (T50924)
28095 [[File:Foobar.jpg|thumb|alt=|bar]]
28097 <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>
28101 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28107 <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>
28109 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28113 Image: Block level image should have \n before and after
28116 [[File:Foobar.jpg|right|thumb|150x150px]]
28120 <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>
28125 Image: New block level image should have \n before and after (existing content)
28128 [[File:Foobar.jpg|right|thumb|150x150px]]
28132 <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>
28137 Image: upright option (parsoid)
28139 [[File:Foobar.jpg|thumb|upright|caption]]
28140 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28141 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28143 <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>
28144 <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>
28145 <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>
28149 Image: upright option is ignored on inline and frame images (parsoid)
28151 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28153 <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>
28157 Image: in template parameter with empty parameter
28159 {{echo|[[File:Foobar.jpg|link=]]}}
28161 <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>
28165 Image: from basic HTML (1)
28169 <span typeof="mw:Image">
28170 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28173 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28177 Image: from basic HTML (2)
28181 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28183 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28187 Image: from basic HTML (3)
28191 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28193 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28197 Image: from basic HTML (4)
28201 <img src="./File:Foobar.jpg">
28203 [[File:Foobar.jpg|link=]]
28207 Image: Invalid title as link
28209 [[File:Foobar.jpg|link=<]]
28211 <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>
28214 <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>
28218 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28223 <li><p>foo</p></li>
28230 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28234 <ul> <li>foo</li></ul>
28240 Don't strip leading whitespace when handling indent-pre suppressing tags
28245 <tr><td> indented row</td></tr>
28248 <b>This is very bold of you!</b>
28251 indented cell (no pre-wrapping!)
28261 '''This is very bold of you!'''
28265 indented cell (no pre-wrapping!)
28273 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28295 <nowiki> </nowiki></span>bar2
28298 <nowiki> </nowiki><span>bar</span>
28301 <nowiki> </nowiki><span>foo</span>
28306 Lists: Dont insert newlines in a serialized list item.
28310 <ul><li>a<br>b</li><li>c</li></ul>
28317 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28320 "modes": ["html2wt"],
28321 "scrubWikitext": false
28324 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28325 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28327 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28328 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28330 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28332 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28334 == hello there [[Category:A1]] ==
28336 == [[Category:A2]] hi pal ==
28338 == <!--foo--> [[Category:A3]] how goes it ==
28340 == it goes well [[Category:A4]] <!--bar--> ==
28342 ==howdy [[Category:A5]]==
28348 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28351 "modes": ["html2wt"],
28352 "scrubWikitext": true
28355 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28356 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28358 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28359 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28361 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28369 <!--foo-->[[Category:A3]]
28374 [[Category:A4]] <!--bar-->
28382 Headings: Don't hoist metas that come from templates
28385 "modes": ["html2wt"],
28386 "scrubWikitext": true
28389 <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>
28391 == {{echo|foo [[Category:Foo]]}} ==
28395 Headings: Category in ref isn't hoisted
28398 "modes": ["html2wt"],
28399 "scrubWikitext": true
28402 <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>
28404 <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>
28407 [[Category:Baz]] </ref> ==
28413 Parsoid: Serialize positional parameters with = in them as named parameter
28417 <p about="#mwt1" typeof="mw:Transclusion"
28418 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28420 <p about="#mwt1" typeof="mw:Transclusion"
28421 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28423 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28424 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28425 <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>
28429 {{echo|1=f=oo|2=bar}}
28431 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28432 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28433 {{echo|<nowiki>f=oo</nowiki>|bar}}
28437 Parsoid: Serialize positional parameters with = in extlink as named parameter
28441 <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>
28443 {{echo|1=http://stuff?is=ok}}
28447 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28451 <div>a<p>b</p></div>
28472 Substrings resembling wikitext in hrefs should not get nowiki escapes
28476 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28482 Enforce single-line context in the serializer
28489 <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">
28490 </span><span about="#mwt1">you</span> </h2>
28492 <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>
28494 <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
28495 there</span></li></ol>
28507 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28514 </tbody></table></dd></dl>
28518 == hi {{bogus|there
28529 * foo '''bar''' baz
28541 Serialize new placeholder space without spans
28545 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28547 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28549 <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>
28555 <ref>foo : bar</ref>ok
28559 #-----------------------
28560 # Tag minimization tests
28561 #-----------------------
28564 1. I/B quote minimization: wikitext-only tags should be combined
28568 <p><i>A</i><i>B</i></p>
28569 <p><b>A</b><b>B</b></p>
28570 <p><i>A</i><b><i>B</i></b></p>
28571 <p><b>A</b><i><b>B</b></i></p>
28572 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28573 <p><i><b>A</b></i><i><b>B</b></i></p>
28574 <p><i><b>A</b></i><b><i>B</i></b></p>
28575 <p><b><i>A</i></b><i><b>B</b></i></p>
28595 2. I/B quote minimization: wikitext and html tags should not be combined
28599 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28600 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28604 ''A''<nowiki/>'''<i>B</i>'''
28608 3. I/B quote minimization: templated content stops minimization
28612 <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>
28613 <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>
28615 ''A''{{echo|''B''}}
28617 ''A''{{echo|'''''B'''''}}
28621 4. I/B quote minimization: new content should be mimimized with adjacent old content
28625 <p><i>A</i><i>B</i></p>
28626 <p><b>A</b><b>B</b></p>
28627 <p><i>A</i><b><i>B</i></b></p>
28637 5a. Merge adjacent quote nodes if they've been edited
28640 "modes": ["wt2wt", "selser"],
28642 ["p", "contents", "remove", ":contains('b')"]
28652 5b. Merge adjacent quote nodes if they've been edited
28655 "modes": ["wt2wt", "selser"],
28661 ''a''<span id="x">b</span>''c''
28667 1. Merge adjacent link nodes as long as at least one element is new
28670 "modes": ["html2wt"],
28671 "scrubWikitext": true
28674 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28675 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28676 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28680 [[Football|Foot]][[Football|ball]]
28684 2. Merge adjacent link nodes and enable additional normalizations
28687 "modes": ["html2wt"],
28688 "scrubWikitext": true
28691 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28697 3. Don't merge adjacent link nodes if scrubWikitext is false
28700 "modes": ["html2wt"],
28701 "scrubWikitext": false
28704 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28706 [[Football|Foot]][[Football|ball]]
28710 1. Move format tags outside of WikiLink
28713 "modes": ["html2wt"],
28714 "scrubWikitext": true
28717 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
28718 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
28719 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
28722 '''''[[Football]]'''''
28723 <u>'''''[[Football]]'''''</u>
28727 2. Move format tags outside of WikiLink with mergable A tags
28730 "modes": ["html2wt"],
28731 "scrubWikitext": true
28734 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
28736 '''''[[Football]]'''''
28740 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
28743 "modes": ["html2wt"],
28744 "scrubWikitext": true
28747 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
28749 <font color="red"><u>'''[[Foo]]'''</u></font>
28753 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
28756 "modes": ["html2wt"],
28757 "scrubWikitext": true
28760 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
28761 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
28762 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
28764 [[Foo|<font color="red">Foo</font>]]
28765 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
28766 [[Foo|<span class="Bar">Foo</span>]]
28770 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
28773 "modes": ["selser"],
28774 "scrubWikitext": true,
28776 ["a", "html", "<i>Foo</i>"]
28786 6. Regression test: Manual edit test to ensure diff markers are not lost
28789 "modes": ["selser"],
28790 "scrubWikitext": true,
28792 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
28801 #------------------------------
28802 # End of tag minimization tests
28803 #------------------------------
28806 T56262: New entities
28810 <span typeof="mw:Entity"> </span>
28815 ## Note that there is no wikitext output for 'unknownproperty' ##
28816 ## Unknown magic words are silently dropped ##
28823 <meta property='mw:PageProp/toc' />
28824 <meta property='mw:PageProp/notoc' />
28825 <meta property='mw:PageProp/forcetoc' />
28826 <meta property='mw:PageProp/index' />
28827 <meta property='mw:PageProp/noindex' />
28828 <meta property='mw:PageProp/nogallery' />
28829 <meta property='mw:PageProp/noeditsection' />
28830 <meta property='mw:PageProp/notitleconvert' />
28831 <meta property='mw:PageProp/nocontentconvert' />
28832 <meta property='mw:PageProp/unknownproperty' />
28842 __NOCONTENTCONVERT__
28846 Consecutive <pre>s should not get merged
28848 parsoid=html2wt,html2html
28850 <pre>a</pre><pre>b</pre>
28878 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28882 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28884 [[Special:BookSources/1234567890|ISBN 1234567895]]
28888 Edited RFC links not serializable as RFC links should serialize as extlinks
28892 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28894 [https://tools.ietf.org/html/rfc123 New RFC]
28898 Edited PMID links not serializable as PMID links should serialize as extlinks
28902 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28904 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28908 WTS of autolinks with trailing/surrounding context
28912 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28913 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28914 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28915 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28916 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28917 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28919 http://cscott.net'''foo'''
28921 http://cscott.net<b>foo</b>
28923 '''http://cscott.net'''
28925 '''http://cscott.net '''
28927 '''http://cscott.net<nowiki/>x'''
28929 http://cscott.net<nowiki/>x
28933 WTS of autolinks with nowikis (round-trip)
28935 x<nowiki/>http://cscott.net<nowiki/>x
28937 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28940 # this is the "easy" test because it leaves in place all the
28941 # data-parsoid information indicating this is an autolink
28943 WTS of autolinks with escapes (editing)
28946 "modes": ["wt2wt"],
28948 [ "span", "remove" ]
28952 x<nowiki/>http://cscott.net<nowiki/>x
28954 x<nowiki/>http://cscott.net<nowiki/>x
28958 WTS of edited autolink-like text (T103364)
28961 "modes": ["wt2wt"],
28963 [ "span[typeof]", "removeAttr", "typeof" ]
28967 Not a link: <nowiki>http://example.com</nowiki>.
28969 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28973 WTS of newly-authored autolink-like text (T103364)
28977 <p>http://example.com is not a link.</p>
28979 <nowiki>http://example.com</nowiki> is not a link.
28983 WTS of autolink-like text after an autolink (T108563)
28987 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28989 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28993 Magic links inside links (not autolinked)
28995 [[Foo|http://example.com]]
28998 [[Foo|ISBN 123456789x]]
29000 [http://foo.com http://example.com]
29001 [http://foo.com RFC 1234]
29002 [http://foo.com PMID 1234]
29003 [http://foo.com ISBN 123456789x]
29005 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29006 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29007 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29008 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29009 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29010 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29011 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29012 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29015 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29016 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29017 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29018 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29020 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
29021 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
29022 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
29023 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
29027 Magic links inside image captions (autolinked)
29029 [[File:Foobar.jpg|thumb|http://example.com]]
29030 [[File:Foobar.jpg|thumb|RFC 1234]]
29031 [[File:Foobar.jpg|thumb|PMID 1234]]
29032 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
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 rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
29035 <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>
29036 <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>
29037 <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>
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 rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
29040 <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>
29041 <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>
29042 <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>
29046 WTS of magic word text (T109371)
29051 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
29052 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
29054 <nowiki>RFC 1234</nowiki>
29056 [http://foo.com RFC 1234]
29062 Edited Redirect link should emit a non-piped wikitext link
29066 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29072 T75121: Infer extension name from typeOf if data-mw is not present
29074 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29076 <div typeOf="mw:Extension/foo"></div>
29081 # Note that the <p> wrapping isn't present in PHP parser output
29082 # The important thing for this test is that P-wrapping doesn't
29083 # interfere with the <nowiki> protection for leading - in <td>
29084 # (which isn't necessary for <th>).
29086 T88318: p-wrapped dash in table.
29088 parsoid=html2wt,wt2wt
29091 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29092 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29093 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
29100 |<nowiki>-</nowiki>
29101 |<nowiki>- </nowiki>
29121 <td><small>-</small>
29128 </td></tr></tbody></table>
29132 T149209: WTS: Handle newlines in table cells properly
29140 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29142 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29148 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29150 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29172 T149209: Selser: Handle newlines in table cells properly
29175 "modes": ["selser"],
29177 [ "#h1", "html", "a\nb\n" ],
29178 [ "#h2", "html", "a\nb\n" ],
29179 [ "#c1", "html", "a\nb\n" ],
29180 [ "#c2", "html", "<p>a</p>" ],
29181 [ "#c3", "html", "<p>a</p>" ],
29182 [ "#c4", "html", "edit-me<p>a</p>" ]
29187 ! id="h1" |edit-me!!1
29189 ! id="h2" |edit-me||2
29191 | id="c1" |edit-me||3
29193 | id="c2" |edit-me||4
29195 | id="c3" |edit-me||p||q||r
29197 | id="c4" |edit-me||p||q||r
29226 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29231 <td id='mwAc'>foo</td>
29232 <td id='serialize-this'>bar</td>
29237 | id="serialize-this" |bar
29242 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29246 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29248 <div id="hello">ok</div>
29252 Testing serialization after deletion in references
29255 "modes": ["wt2wt"],
29261 hi <ref><div id="x">ho</div></ref>
29271 Testing serialization after deletion of table cells
29274 "modes": ["wt2wt", "selser"],
29282 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29292 Testing selser after addition of new row before first row (T125419)
29295 "modes": ["wt2wt", "selser"],
29297 [ "tr", "before", "<tr><td>X</td></tr>" ]
29313 Serialize new table rows in a HTML table using HTML tags
29316 "modes": ["wt2wt", "selser"],
29318 [ "tr", "before", "<tr><td>X</td></tr>" ]
29322 <table><tr><td>a</td></tr></table>
29324 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29328 Serialize new table cells in a HTML row using HTML tags
29331 "modes": ["wt2wt", "selser"],
29333 [ "td", "before", "<td>X</td>" ]
29337 <table><tr><td>a</td></tr></table>
29339 <table><tr><td>X</td><td>a</td></tr></table>
29343 Serialize wikitext list items as HTML list items when embedded in a HTML list
29347 <ul data-parsoid='{"stx": "html"}'>
29348 <li data-parsoid='{}'>a</li>
29358 # SSS FIXME: Is this actually a good thing given the
29359 # odd nested list output that is generated by MW?
29360 # <ul><li>foo<ul>..</ul></li></ul> instead of
29361 # <ul><li>foo</li><ul>..</ul></ul>
29363 Wikitext lists can be nested inside HTML lists
29367 <ul data-parsoid='{"stx": "html"}'>
29368 <li data-parsoid='{"stx": "html"}'>a
29369 <ul><li>b</li></ul>
29373 <ul data-parsoid='{"stx": "html"}'>
29375 <ul><li>y</li></ul>
29396 "modes": ["wt2wt"],
29398 [ "#xyz", "before", "<b>before</b> stuff " ],
29399 [ "#xyz", "after", " stuff <i>after</i>" ],
29400 [ "#xyz", "html", "x <b>y</b> z" ]
29404 <span id="xyz">hello</span>
29406 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29410 Never serialize a-tag as html, regardless of what data-parsoid has to say
29412 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29414 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29419 ## SSS FIXME: This is broken output nevertheless.
29420 ## What might be a reasonable non-broken output for this?
29421 ## This is an edge case unlikely to be seen in production
29422 ## that I am not wasting more time on this right now.
29424 Never serialize a-tag as html, no matter what attributes it has
29426 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29428 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29430 [http://boo.org http://boohoo.org]
29433 # Misnested is an indication that selser can reuse the source but these have
29434 # shown to sneak through on occasion. See T101768.
29435 # The original wikitext here is: [http://test.com [[one]] two three]
29437 Strip span tags added to mark misnested links
29441 <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>
29443 [http://test.com][[one]] two three
29447 Catch regression when unpacking misnested links
29451 {{echo|hi}}[http://example.com [[ho]]]
29453 <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>
29457 Catch regression when unpacking with trailing content
29459 {{echo|Foo <references/> bar}}
29461 <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>
29465 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29469 <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|}"]}'>
29481 ## This test verifies the presence and computation of this attribute indirectly
29482 ## by making an edit and ensuring that the serialization is correct (which it would be
29483 ## only if firstWikitextNode is properly set).
29485 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
29488 "modes": ["wt2wt"],
29490 [ "div#x", "remove" ],
29491 [ "div", "before", "<div>new</div>" ]
29495 <div id="x">foo</div>
29497 {{echo|<div>boo</div>
29505 {{echo|<div>boo</div>
29511 # --------------------------------------------
29512 # Tests spec'ing wikitext serialization norms |
29513 # --------------------------------------------
29516 Serialize multi-line indent-pre starting with wikitext syntax
29530 1. Categories should always be serialized on their own line
29534 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
29542 2. Categories that are part of templates should not introduce a line break
29544 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
29546 <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>
29549 # Careful while editing these next 2 tests. There are \u200f characters
29550 # before and after the <link> tags in the HTML and following some
29551 # of the categories in wikitext
29552 # Do not remove these characters in edits.
29554 # As part of the serialization, these bidi characters will get stripped.
29556 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
29559 "modes": ["html2wt"],
29560 "scrubWikitext": true
29563 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
29564 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
29567 [[קטגוריה: שיטות משפט]]
29571 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
29574 "modes": ["html2wt"],
29575 "scrubWikitext": true
29578 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
29585 Lists: Add space after bullets
29592 <li><span> baz</span></li>
29597 * <span> baz</span>
29601 1. Headings: Add space before/after == (T53744)
29608 <h2><span> baz</span></h2>
29616 == <span> baz</span> ==
29620 2. Headings: Add space before/after == even after hoisted content
29623 "modes": ["html2wt"],
29624 "scrubWikitext": true
29627 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29635 1. Headings: suppress newly created empty headings
29638 "modes": ["html2wt"],
29639 "scrubWikitext": true
29647 2. Headings: don't suppress empty headings if scrubWikitext is false
29657 3. Headings: suppress empty headings on edits
29660 "modes": ["selser"],
29661 "scrubWikitext": true,
29667 ==<span id="x">foo</span>==
29672 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29675 "modes": ["html2wt"],
29676 "scrubWikitext": true
29679 <h2>foo<br/>bar</h2>
29680 <h2>foo <span><br/>bar</span> baz</h2>
29684 == foo <span> bar</span> baz ==
29688 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29691 "modes": ["html2wt"],
29692 "scrubWikitext": false
29695 <h2>foo<br/>bar</h2>
29701 1. WT Quote Tags: suppress newly created empty style tags
29704 "modes": ["html2wt"],
29705 "scrubWikitext": true
29713 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29719 ''<nowiki/>'''''<nowiki/>'''
29723 3. WT Quote Tags: suppress empty style tags on edits
29726 "modes": ["selser"],
29727 "scrubWikitext": true,
29733 '''<span id="x">foo</span>'''
29738 1. Anchors: suppress newly created empty anchors
29741 "modes": ["html2wt"],
29742 "scrubWikitext": true
29745 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29750 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29753 "modes": ["html2wt"],
29754 "scrubWikitext": false
29757 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29763 3. Anchors: suppress empty anchors on edits
29766 "modes": ["selser"],
29767 "scrubWikitext": true,
29773 [[Test|<span id="x">foo</span>]]
29778 3a. Anchors: do not suppress numbered extlinks
29781 "modes": ["wt2wt"],
29782 "scrubWikitext": true
29787 <a rel="mw:ExtLink" href="http://foo.com"></a>
29791 3b. Anchors: do not suppress numbered extlinks
29794 "modes": ["wt2wt"],
29795 "scrubWikitext": true,
29801 [http://foo.com <span id="x">foo</span>]
29807 Normalizations should be restricted to edited content
29810 "modes": ["selser"],
29811 "scrubWikitext": true,
29813 [ "h1", "before", "<i></i>"]
29827 1. Multiple normalizations (html2wt)
29830 "modes": ["html2wt"],
29831 "scrubWikitext": true
29835 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29836 </a><b><i></i></b>x</p>
29845 2. Multiple normalizations (selser)
29848 "modes": ["selser"],
29849 "scrubWikitext": true,
29851 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29855 <span id="x">foo</span>
29857 <span id="x">foo</span>
29863 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29866 "modes": ["html2wt"],
29867 "scrubWikitext": true
29879 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29886 <nowiki> </nowiki>hi
29888 <nowiki> </nowiki> hello
29892 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29895 "modes": ["html2wt"],
29896 "scrubWikitext": true
29905 baz bang</td></tr></table>
29911 bar<span>boo</span></p>
29927 bar<span>boo</span>
29931 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29934 "modes": ["selser"],
29935 "scrubWikitext": true,
29937 [ "p", "html", " a\n b" ]
29948 1. New links that end in spaces
29951 "modes": ["html2wt"],
29952 "scrubWikitext": false
29955 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29956 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29957 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29959 [[Berlin ]]<nowiki/>is the capital of Germany.
29963 [[Boston ]] is a city.
29967 2. New links that end in spaces
29970 "modes": ["html2wt"],
29971 "scrubWikitext": true
29974 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29975 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29976 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29978 [[Berlin]] is the capital of Germany.
29982 [[Boston]] is a city.
29986 1. Table cells with escapable prefixes
29989 "modes": ["html2wt"],
29990 "scrubWikitext": false
29994 <tr><td>a</td></tr>
29995 <tr><td>-</td></tr>
29996 <tr><td>+</td></tr>
30002 |<nowiki>-</nowiki>
30004 |<nowiki>+</nowiki>
30009 2. Table cells with escapable prefixes
30012 "modes": ["html2wt"],
30013 "scrubWikitext": true
30017 <tr><td>a</td></tr>
30018 <tr><td>-</td></tr>
30019 <tr><td>+</td></tr>
30032 3a. Table cells with escapable prefixes after edits
30035 "modes": ["selser"],
30036 "scrubWikitext": true,
30038 [ "table tbody tr:first-child td:first-child", "remove"]
30052 3b. Table cells with escapable prefixes after edits
30055 "modes": ["selser"],
30056 "scrubWikitext": true,
30058 [ "table tbody tr:first-child td:first-child", "html", "-" ],
30065 |<span id="x">foo</span>+
30074 # FIXME: This test will fail because
30075 # normalization doesn't realize that the id attribute
30076 # will eliminate the escapable scenario
30078 4a. Table cells without escapable prefixes after edits
30081 "modes": ["selser"],
30082 "scrubWikitext": true,
30084 [ "#x", "html", "-" ]
30097 ## This tests normalizer's ability to discriminate between
30098 ## cells having identical content.
30100 4b. Table cells without escapable prefixes after edits
30103 "modes": ["selser"],
30104 "scrubWikitext": true,
30106 [ "td", "html", "-" ]
30119 ## This tests normalizer's ability to not be tripped by
30120 ## comments (and whitespace)
30122 4c. Table cells without escapable prefixes after edits
30125 "modes": ["selser"],
30126 "scrubWikitext": true,
30128 [ "table tbody tr td:first-child", "remove" ]
30143 ## This tests normalizer's ability to handle HTML cells
30145 4d. Table cells without escapable prefixes after edits
30148 "modes": ["selser"],
30149 "scrubWikitext": true,
30151 [ "td", "html", "-" ]
30156 <tr><td>a</td></tr>
30160 <tr><td>-</td></tr>
30164 ## T111151 Remove font elements without attributes
30166 5a. font tags without attributes should be dropped in scrubWikitext mode
30169 "modes": ["html2wt"],
30170 "scrubWikitext": true
30174 <font><font>bar</font></font>
30175 <font class="x">boo</font>
30179 <font class="x">boo</font>
30183 5b. font tags should not be dropped without scrubWikitext being enabled
30186 "modes": ["html2wt"],
30187 "scrubWikitext": false
30196 Escape nowiki DOM elements
30200 <nowiki><i>foo</i></nowiki>
30202 <nowiki>''foo''</nowiki>
30205 # This is meant to be an interim fix while we go about figuring out
30206 # how to not introduce these trailing <nowiki/>s in the first place.
30208 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30212 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30214 <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>
30215 <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>
30229 New list is serialized on newlines
30233 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30237 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30239 The quick brown fox jumps over the lazy dog.
30245 The quick onyx goblin jumps over the lazy dwarf.
30249 New lists in formatting elements serialized w/o newlines
30261 <small><ul><li>hi</li></ul></small>
30273 New list in table doesn't need newlines
30277 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30286 # ---------------------------------------------------
30287 # End of tests spec'ing wikitext serialization norms |
30288 # ---------------------------------------------------
30292 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30300 <td><b>c</b><p>d</p></td>
30319 Anchor without href scenarios
30321 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30324 <a class="no">dice</a>
30329 <span name="foo"></span>
30333 New transclusion added after a list should be serialized after the list
30337 <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>
30343 # -----------------------------------------------------------------
30344 # End of section for Parsoid-only html2wt tests for serialization
30346 # -----------------------------------------------------------------
30348 # -----------------------------------------------------------------
30349 # The following section of tests are primarily to spec behavior of
30350 # the selective serializer. All these tests have manual selser
30351 # changes. The automated selser changes for all tests handle the
30352 # wide variation of changes, but these tests here capture specs
30353 # deterministically.
30354 # ----------------------------------------------------------------
30358 Selser: New comments should not be lost
30361 "modes": ["selser"],
30363 [ "#a", "after", "<!--c1-->" ],
30364 [ "#b", "before", "<!--c2-->" ]
30368 <span id="a">a</span>
30370 <span id="b">b</span>
30372 <span id="a">a</span><!--c1-->
30374 <!--c2--><span id="b">b</span>
30379 Selser: Check for validity of DSR before using it
30382 "modes": ["selser"],
30384 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30388 <span id="a">a</span>
30390 {{DISPLAYTITLE:foo}}
30391 <span id="a">a</span>
30395 1. DOMDiff: Changes to <ref> content should be looked up using id
30398 "modes": ["selser"],
30400 ["#X", "after", "bar"],
30401 ["#Y", "after", "baz"]
30405 X <ref><span id="X">foo</span></ref>
30408 <ref name="a"><span id="Y">foo</span></ref>
30411 X <ref><span id="X">foo</span>bar</ref>
30414 <ref name="a"><span id="Y">foo</span>baz</ref>
30419 2. DOMDiff: Changes to <ref> content should be looked up using id
30422 "modes": ["selser"],
30424 ["#Z", "after", "bar"]
30428 A <ref>foo bar for a</ref>
30429 B <ref group="X" name="b" />
30433 <references group="X">
30434 <ref name="b"><span id="Z">foo</span></ref>
30437 A <ref>foo bar for a</ref>
30438 B <ref group="X" name="b" />
30442 <references group="X">
30443 <ref name="b"><span id="Z">foo</span>bar</ref>
30448 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30451 "modes": ["selser"],
30453 [ "div:first-child", "text", "bar" ]
30457 <div style="{{1x|color:red;}}%">foo</div>
30459 <div style="{{1x|color:red;}}%">bar</div>
30471 <li class="mw-empty-elt"></li>
30472 <li class="mw-empty-elt"></li>
30479 [[File:Thumb.png|thumb]]
30481 <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>
30483 <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>
30487 unclosed internal link XSS (T137264)
30489 [[#%3Cscript%3Ealert(1)%3C/script%3E|
30491 <p>[[#<script>alert(1)</script>|
30494 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
30498 Validating that <style> isn't eaten by tidy (T167349)
30503 <style>.foo::before { content: "<foo>"; }</style>
30504 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30508 <style>.foo::before { content: "<foo>"; }</style>
30509 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30514 Validating that <style> isn't wrapped in a paragraph (T186965)
30518 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30520 <style>.foo::before { content: "<foo>"; }</style>
30522 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30524 But if it's on a line with other content, let it be wrapped.
30526 <style>.foo::before { content: "<foo>"; }</style> bar
30528 foo <style>.foo::before { content: "<foo>"; }</style>
30530 foo <style>.foo::before { content: "<foo>"; }</style> bar
30532 And the same if we have non-paragraph-breaking whitespace
30535 <style>.foo::before { content: "<foo>"; }</style>
30538 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30540 <style>.foo::before { content: "<foo>"; }</style>
30541 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30542 <p>But if it's on a line with other content, let it be wrapped.
30543 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
30544 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
30545 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
30546 </p><p>And the same if we have non-paragraph-breaking whitespace
30548 <style>.foo::before { content: "<foo>"; }</style>
30554 Validating that <link> isn't wrapped in a paragraph (T186965)
30558 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30560 <link rel="foo" href="bar"/>
30562 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30564 But if it's on a line with other content, let it be wrapped.
30566 <link rel="foo" href="bar"/> bar
30568 foo <link rel="foo" href="bar"/>
30570 foo <link rel="foo" href="bar"/> bar
30572 And the same if we have non-paragraph-breaking whitespace
30575 <link rel="foo" href="bar"/>
30578 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30580 <link rel="foo" href="bar"/>
30581 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30582 <p>But if it's on a line with other content, let it be wrapped.
30583 </p><p><link rel="foo" href="bar"/> bar
30584 </p><p>foo <link rel="foo" href="bar"/>
30585 </p><p>foo <link rel="foo" href="bar"/> bar
30586 </p><p>And the same if we have non-paragraph-breaking whitespace
30588 <link rel="foo" href="bar"/>
30594 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
30596 wgFragmentMode=[ 'html5', 'legacy' ]
30598 ==A&B&C&amp;D&amp;amp;E==
30599 [[#A&B&C&amp;D&amp;amp;E]]
30601 <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>
30602 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
30605 <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>
30606 <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>
30610 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
30612 wgFragmentMode=[ 'legacy' ]
30614 ==A&B&C&amp;D&amp;amp;E==
30615 [[#A&B&C&amp;D&amp;amp;E]]
30617 <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>
30618 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
30623 Decoding of HTML entities in embedded HTML tags
30625 <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"><tr><td>x</td></tr></table>
30630 <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>
30634 Decoding of HTML entities in indicator names for IDs (T104196)
30636 parsoid=wt2html,html2html
30639 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30641 1&2&3&4&amp;5=Indicator
30644 <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>
30647 # this version of the test strips out the ambiguity so Parsoid rts cleanly
30649 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
30653 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30655 1&2&3&4&amp;5=Indicator
30658 <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>
30661 # This fragment mode is what Parsoid supports.
30663 HTML5 ids: fallback to legacy
30665 wgFragmentMode=[ 'html5', 'legacy' ]
30677 ==Hey < # " > % : '==
30678 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30680 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30682 <!-- These two links should produce identical HTML -->
30683 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30686 <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>
30688 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30689 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30690 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30691 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30692 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30693 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30697 <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>
30698 <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>
30699 <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>
30700 <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>
30701 <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>
30702 <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>
30703 <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>
30704 </p><p>💩 <span id="💩"></span>
30705 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30708 <h2 id="Foo_bar">Foo bar</h2>
30710 <h2 id="foo_Bar_2">foo Bar</h2>
30712 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30714 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30716 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30718 <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>
30719 <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>
30721 <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>
30723 <!-- These two links should produce identical HTML -->
30724 <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>
30727 # Parsoid doesn't support this mode
30729 HTML5 ids: legacy with a fallback to modern
30731 wgFragmentMode=[ 'legacy', 'html5' ]
30743 ==Hey < # " > % : '==
30744 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30746 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30748 <!-- These two links should produce identical HTML -->
30749 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30752 <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>
30754 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30755 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30756 <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>
30757 <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>
30758 <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>
30759 <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>
30763 <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>
30764 <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>
30765 <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>
30766 <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>
30767 <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>
30768 <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>
30769 <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>
30770 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30771 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30775 # Parsoid doesn't support this mode.
30777 HTML5 ids: no legacy
30779 wgFragmentMode=[ 'html5' ]
30791 ==Hey < # " > % : '==
30792 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30794 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30796 <!-- These two links should produce identical HTML -->
30797 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30800 <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>
30802 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30803 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30804 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30805 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30806 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30807 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30811 <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>
30812 <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>
30813 <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>
30814 <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>
30815 <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>
30816 <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>
30817 <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>
30818 </p><p>💩 <span id="💩"></span>
30819 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30824 T90902: Normalize weird characters in section IDs
30826 wgFragmentMode=[ 'html5', 'legacy' ]
30832 <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>
30833 <p><a href="#Foo_bar">#Foo bar</a>
30836 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30837 <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>
30841 T51672: Test for brackets in attributes of elements in external link texts
30843 [http://example.com/ link <span title="title with [brackets]">span</span>]
30844 [http://example.com/ link <span title="title with [brackets]">span</span>]
30847 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30848 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30851 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30852 <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>
30856 T72875: Test for brackets in attributes of elements in internal link texts
30858 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30859 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30862 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30863 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30866 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30867 <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>
30871 T179544: {{anchorencode:}} output should be always usable in links
30873 wgFragmentMode=[ 'html5' ]
30875 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30877 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30880 <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>
30883 ## ------------------------------
30884 ## Parsoid section-wrapping tests
30885 ## ------------------------------
30887 Section wrapping for well-nested sections (no leading content)
30890 "wrapSections": true
30911 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30914 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30917 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30920 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30923 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30926 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30933 Section wrapping for well-nested sections (with leading content)
30936 "wrapSections": true
30941 Para 2 with a <div>nested in it</div>
30954 <section data-mw-section-id="0"><p>Para 1.</p>
30956 <p>Para 2 with a </p><div>nested in it</div>
30960 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30963 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30966 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30969 </section></section>
30973 Section wrapping with template-generated sections (good nesting 1)
30976 "wrapSections": true
30993 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30996 <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">
30997 </span><p about="#mwt1">b</p>
30998 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
31001 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
31005 # In this example, the template scope is mildly expanded to incorporate the
31006 # trailing newline after the transclusion since that is part of section 1.1.1
31008 Section wrapping with template-generated sections (good nesting 2)
31011 "wrapSections": true,
31012 "modes": ["wt2html", "wt2wt"]
31027 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31030 <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">
31031 </span><p about="#mwt1">b</p><span about="#mwt1">
31032 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
31033 </span><p about="#mwt1">d</p><span about="#mwt1">
31034 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
31038 # In this example, the template scope is mildly expanded to incorporate the
31039 # trailing newline after the transclusion since that is part of section 1.2.1
31041 Section wrapping with template-generated sections (good nesting 3)
31044 "wrapSections": true,
31045 "modes": ["wt2html", "wt2wt"]
31063 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
31066 <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">
31067 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
31068 </span><p about="#mwt1">b</p><span about="#mwt1">
31069 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
31070 </span><p about="#mwt1">c</p><span about="#mwt1">
31071 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
31072 </span><p about="#mwt1">d</p><span about="#mwt1">
31073 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
31077 # Because of section-wrapping and template-wrapping interactions,
31078 # the scope of the template is expanded so that the template markup
31079 # is valid in the presence of <section> tags.
31080 # This exercises the s1 is null scenario in the wrapSections code
31082 Section wrapping with template-generated sections (bad nesting 1)
31085 "wrapSections": true
31099 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
31102 <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"]}'>
31103 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
31104 </span><p about="#mwt1">b
31105 </p><span about="#mwt1">
31107 </span><p about="#mwt1">c</p><span about="#mwt1">
31108 </span></section></div></section>
31111 # Because of section-wrapping and template-wrapping interactions,
31112 # the scope of the template is expanded so that the template markup
31113 # is valid in the presence of <section> tags.
31114 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
31116 Section wrapping with template-generated sections (bad nesting 2)
31119 "wrapSections": true
31137 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31140 </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">
31141 </span><p about="#mwt1">b</p><span about="#mwt1">
31142 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
31143 </span><p about="#mwt1">c</p><span about="#mwt1">
31145 </span><p about="#mwt1">d</p><span about="#mwt1">
31147 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
31151 # Because of section-wrapping and template-wrapping interactions,
31152 # additional template wrappers are added to <section> tags
31153 # so that template wrapping semantics are valid whether section
31154 # tags are retained or stripped. But, the template scope can expand
31155 # greatly when accounting for section tags.
31156 # This exercises the s1 and s2 are in different subtrees scenario
31158 Section wrapping with template-generated sections (bad nesting 3)
31161 "wrapSections": true,
31162 "modes": ["wt2html", "wt2wt"]
31180 <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>
31183 <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">
31184 </span><p about="#mwt1">b</p><span about="#mwt1">
31185 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
31186 </span><p about="#mwt1">c</p>
31189 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
31194 Section wrapping with uneditable lead section + div wrapping multiple sections
31197 "wrapSections": true
31202 <div style="border:1px solid red;">
31219 <section data-mw-section-id="-1"><p>foo</p>
31221 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31222 <section data-mw-section-id="1"><h1 id="1">1</h1>
31225 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31228 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31232 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31235 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31237 </section></section>
31241 Section wrapping with editable lead section + div overlapping multiple sections
31244 "wrapSections": true
31251 <div style="border:1px solid red;">
31268 <section data-mw-section-id="0"><p>foo</p>
31270 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31272 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31275 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31278 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31283 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31286 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31288 </section></section>
31292 HTML header tags should not be wrapped in section tags
31295 "wrapSections": true
31308 <section data-mw-section-id="0"><p>foo</p>
31310 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31312 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31314 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31316 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31320 Lead section containing only whitespace and comments.
31323 "wrapSections": true
31327 <!-- this is a comment, presumably significant to editors -->
31334 <section data-mw-section-id="0" data-parsoid="{}">
31335 <!-- this is a comment, presumably significant to editors -->
31336 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31339 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31344 Pseudo-sections emitted by templates should have id -2
31347 "wrapSections": true
31357 <section data-mw-section-id="-1"><p>foo</p>
31358 </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}}]}'>
31359 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31360 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31361 </section></div><span about="#mwt1">
31365 ##########################################################################
31366 Tests demonstrating white-space insensitivity in input wikitext
31367 for wikitext headings, wikitext list items, and wikitext table captions,
31368 headings, and cells. HTML versions of the same should preserve whitespace.
31369 ##########################################################################
31371 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31374 "modes": ["wt2html"],
31375 "preserveIEW": true
31379 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31380 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31381 == <!--Headings with fallback ids--> Личная жизнь ==
31382 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31383 ; <!--term to define--> term : <!--term's definition--> definition
31385 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31387 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31389 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31391 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
31393 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
31396 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31399 <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>
31400 <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>
31401 <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>
31402 <ul><li>List item</li></ul>
31403 <dl><dt>term </dt>
31404 <dd>definition</dd></dl>
31406 <caption>Table Caption
31409 <th>Table Heading 1</th>
31410 <th>Table Heading 2
31413 <td>Table Cell 1</td>
31417 <td>class="foo"</td>
31421 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
31422 </td></tr></tbody></table>
31425 <td>Table Cell 1</td>
31427 </td></tr></tbody></table> foo</dd></dl>
31429 <meta property="mw:PageProp/notoc">
31430 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
31431 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
31432 <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>
31433 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
31434 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
31436 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
31438 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
31440 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31442 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
31444 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
31447 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31448 </tbody></table> foo<!--c1--></dd></dl>
31451 # Looks like <caption> is not accepted in HTML
31453 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
31456 "modes": ["wt2html"],
31457 "preserveIEW": true
31461 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31462 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31464 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
31465 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
31468 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
31469 <ul><li> List item </li></ul>
31471 <tbody><tr><th> Table Heading </th><th></th></tr>
31472 <tr><td> Table Cell </td><th></th></tr>
31475 <meta property="mw:PageProp/notoc"/>
31476 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31477 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31479 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
31480 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
31485 Do not trim whitespace in links and quotes
31488 "modes": ["wt2html"],
31489 "preserveIEW": true
31492 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
31493 [[Foo| some text ]]
31495 <p>foo <i> italic </i> and <b> bold </b>
31496 <a href="/wiki/Foo" title="Foo"> some text </a>
31499 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
31500 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
31504 Remove p tags surrounding a single element in a figcaption
31508 [[File:Foobar.jpg|right|200x200px|Caption]]
31510 <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>
31514 Selser preserves lack of newline before list and allows newline after the list
31517 "modes": ["selser"],
31518 "scrubWikitext": true,
31520 [ "ul", "after", "<p>footer</p>" ]
31537 Selser does not introduce newlines between unedited paragraph preceding the list
31540 "modes": ["selser"],
31542 [ "table tbody tr td p:last-child", "empty" ]
31564 Selser does not introduce newlines between unedited paragraph following the list
31567 "modes": ["selser"],
31569 [ "table tbody tr td p:first-child", "empty" ]
31591 Remove a list item but do not insert newline above list
31594 "modes": ["selser"],
31596 [ "ul li:last-child", "remove" ]