1 # MediaWiki Parser test cases
2 # Some taken from https://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
66 Template:redirect to foo
68 #REDIRECT [[Template:Foo]]
89 MediaWiki:bad image list
91 * [[File:Bad.jpg]] except [[Nasty page]]
126 // For Serbian; localize Template namespace
134 Template:echo_with_span
140 Template:echo_with_div
146 Template:echo with depth
159 Template:table_attribs
162 |</noinclude>style="color:red;"|Foo
166 Template:table_attribs_2
169 |</noinclude>style="color:red;"|Foo
174 Template:table_attribs_3
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
181 Template:table_attribs_4
183 | style="background-color:#DC241f;" width="10px" |
187 Template:table_attribs_5
190 |</noinclude>style="color:red;"||Bar
194 Template:table_attribs_6
196 style="background: <nowiki>
203 Template:table_attribs_7
206 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
210 Template:table_header_cells
212 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
218 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
222 Template:PartialTable
229 Template:image_attribs
232 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
235 ## See T48811 for details
237 Template:mixed_attr_content_template
239 style="color:red;" title="T48811"
245 Template:definition_list
292 Template:EmptyTRWithHTMLAttrTest
295 <tr align="center"></tr>
296 <tr><td>foo</td></tr>
297 <tr align="center"></tr>
298 <tr><td>bar</td></tr>
321 This is a simple paragraph.
323 <p>This is a simple paragraph.
328 Paragraphs with extra newline spacing
359 Paragraphs with newline spacing with comment lines in between
367 <!--foo--><!--More than 1 comment, still stripped-->
371 <!--foo--> <!----> <!-- bar -->
432 Paragraphs with newline spacing with non-empty white-space lines in between
459 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
467 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
506 Extra newlines: More paragraphs with indented comment
521 Extra newlines followed by heading
535 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
536 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
539 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
544 Extra newlines between heading and content are swallowed (Parsoid does not)
552 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
553 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
560 <p><a rel="mw:WikiLink" href="./A" title="A">a</a></p>
564 Extra new lines before and after lists are preserved
591 # Parsoid regression test
593 Multiple newlines after tables are converted to p-br-p tags
595 parsoid=wt2html,wt2wt
609 </td></tr></tbody></table>
613 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
628 Heading with line break in nowiki
632 wgFragmentMode=[ 'html5', 'legacy' ]
637 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
639 C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
643 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
650 http://fr.wikipedia.org/wiki/🍺
651 <!-- EasterEgg we love beer, better be able be able to link to it -->
653 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
672 *plain''italic''plain
673 *plain''italic''plain''italic''plain
674 *plain'''bold'''plain
675 *plain'''bold'''plain'''bold'''plain
676 *plain''italic''plain'''bold'''plain
677 *plain'''bold'''plain''italic''plain
678 *plain''italic'''bold-italic'''italic''plain
679 *plain'''bold''bold-italic''bold'''plain
680 *plain'''''bold-italic'''italic''plain
681 *plain'''''bold-italic''bold'''plain
682 *plain''italic'''bold-italic'''''plain
683 *plain'''bold''bold-italic'''''plain
684 *plain l'''italic''plain
685 *plain l''''bold''' plain
688 <li>plain<i>italic</i>plain</li>
689 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
690 <li>plain<b>bold</b>plain</li>
691 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
692 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
693 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
694 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
695 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
696 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
697 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
698 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
699 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
700 <li>plain l'<i>italic</i>plain</li>
701 <li>plain l'<b>bold</b> plain</li></ul>
705 # this example taken from the [[simple:Moon]] article (T49326)
707 Italics and possessives (1)
709 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
711 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
715 # this example taken from [[en:Flaming Pie]] (T51926)
717 Italics and possessives (2)
719 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
721 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
725 # this example taken from [[en:Dictionary]] (T51926)
727 Italics and possessives (3)
729 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
731 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
737 ### 2-quote opening sequence tests
740 Italics and bold: 2-quote opening sequence: (2,2)
749 Italics and bold: 2-quote opening sequence: (2,3)
758 Italics and bold: 2-quote opening sequence: (2,4)
768 # same html as previous, but wikitext adjusted to match parsoid html2wt
770 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
772 ''foo<nowiki>''</nowiki>''
778 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
780 Italics and bold: 2-quote opening sequence: (2,5)
793 # same html as previous, but wikitext adjusted to match parsoid html2wt
795 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
797 ''foo'''''<nowiki/>'''
808 ### 3-quote opening sequence tests
812 Italics and bold: 3-quote opening sequence: (3,2)
821 Italics and bold: 3-quote opening sequence: (3,3)
830 Italics and bold: 3-quote opening sequence: (3,4)
838 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
840 Italics and bold: 3-quote opening sequence: (3,5)
853 # same html as previous, but wikitext adjusted to match parsoid html2wt
855 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
857 '''foo'''''<nowiki/>''
868 ### 4-quote opening sequence tests
872 Italics and bold: 4-quote opening sequence: (4,2)
882 # same html as previous, but wikitext adjusted to match parsoid html2wt
884 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
886 <nowiki>''</nowiki>''foo''
893 Italics and bold: 4-quote opening sequence: (4,3)
902 Italics and bold: 4-quote opening sequence: (4,4)
912 # same html as previous, but wikitext adjusted to match parsoid html2wt
914 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
922 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
924 Italics and bold: 4-quote opening sequence: (4,5)
933 <p>'<b>foo</b><i></i>
937 # same html as previous, but wikitext adjusted to match parsoid html2wt
939 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
941 '<nowiki/>'''foo'''''<nowiki/>''
946 <p>'<b>foo</b><i></i>
952 ### 5-quote opening sequence tests
956 Italics and bold: 5-quote opening sequence: (5,2)
966 # same html as previous, but wikitext adjusted to match parsoid html2wt
968 Italics and bold: 5-quote opening sequence: (5,2+3)
977 Italics and bold: 5-quote opening sequence: (5,3)
987 # same html as previous, but wikitext adjusted to match parsoid html2wt
989 Italics and bold: 5-quote opening sequence: (5,3+2)
998 Italics and bold: 5-quote opening sequence: (5,4)
1004 <p><i><b>foo'</b></i>
1009 Italics and bold: 5-quote opening sequence: (5,5)
1013 <p><i><b>foo</b></i>
1018 Italics and bold: 5-quote opening sequence: (5,6)
1022 <p><i><b>foo'</b></i>
1027 ### multiple quote sequences in a line
1031 Italics and bold: multiple quote sequences: (2,4,2)
1037 <p><i>foo'<b>bar</b></i>
1041 # same html as previous, but wikitext adjusted to match parsoid html2wt
1043 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
1045 ''foo'<nowiki/>'''bar'''''
1047 <p><i>foo'<b>bar</b></i>
1052 Italics and bold: multiple quote sequences: (2,4,3)
1058 <p><i>foo'<b>bar</b></i>
1062 # same html as previous, but wikitext adjusted to match parsoid html2wt
1064 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
1066 ''foo'<nowiki/>'''bar'''''
1068 <p><i>foo'<b>bar</b></i>
1073 Italics and bold: multiple quote sequences: (2,4,4)
1079 <p><i>foo'<b>bar'</b></i>
1083 # same html as previous, but wikitext adjusted to match parsoid html2wt
1085 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1087 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1089 <p><i>foo'<b>bar'</b></i>
1093 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1095 Italics and bold: multiple quote sequences: (3,4,2)
1104 <p><b>foo'</b>bar<i></i>
1108 # same html as previous, but wikitext adjusted to match parsoid html2wt
1110 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1112 '''foo''''bar''<nowiki/>''
1117 <p><b>foo'</b>bar<i></i>
1121 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1123 Italics and bold: multiple quote sequences: (3,4,3)
1132 <p><b>foo'</b>bar<b></b>
1136 # same html as previous, but wikitext adjusted to match parsoid html2wt
1138 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1140 '''foo''''bar'''<nowiki/>'''
1145 <p><b>foo'</b>bar<b></b>
1150 ### other quote tests
1153 Italics and bold: other quote tests: (2,3,5)
1155 ''this is about '''foo's family'''''
1157 <p><i>this is about <b>foo's family</b></i>
1163 Italics and bold: other quote tests: (2,(3,3),2)
1165 ''this is about '''foo's''' family''
1167 <p><i>this is about <b>foo's</b> family</i>
1173 Italics and bold: other quote tests: (3,2,3,2)
1177 '''this is about ''foo'''s family''
1179 <p><b>this is about <i>foo</i></b><i>s family</i>
1184 # same html as previous, but wikitext adjusted to match parsoid html2wt
1186 Italics and bold: other quote tests: (3,2,3+2+2,2)
1188 '''this is about ''foo'''''<nowiki/>''s family''
1190 <p><b>this is about <i>foo</i></b><i>s family</i>
1196 Italics and bold: other quote tests: (3,2,3,3)
1198 '''this is about ''foo'''s family'''
1200 <p>'<i>this is about </i>foo<b>s family</b>
1206 Italics and bold: other quote tests: (3,(2,2),3)
1208 '''this is about ''foo's'' family'''
1210 <p><b>this is about <i>foo's</i> family</b>
1216 Italicized possessive
1218 The ''[[Main Page]]'''s talk page.
1220 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1223 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1227 Quote balancing context should be restricted to td/th cells on the same wikitext line
1229 parsoid=wt2html,wt2wt
1243 </td></tr></tbody></table>
1251 Non-html5 tags should be accepted
1253 <center>''foo''</center>
1255 <font>''foo''</font>
1256 <strike>''foo''</strike>
1259 <center><i>foo</i></center>
1260 <p><big><i>foo</i></big>
1261 <font><i>foo</i></font>
1262 <strike><i>foo</i></strike>
1268 <wbr> is valid wikitext (T54468)
1276 # <strike> is HTML4, <s> is HTML4/5.
1278 <s> or <strike> for strikethrough
1280 <strike>strike</strike>
1284 <p><strike>strike</strike>
1292 Text-level semantic html elements in wikitext
1295 <strong>text</strong>
1311 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1318 <strong>text</strong>
1334 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1342 # test cases taken from
1343 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1345 Ruby markup (W3C-style)
1347 ;Mono-ruby for individual base characters
1348 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1350 :<ruby>今日<rt>きょう</rt></ruby>
1352 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1354 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1356 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1359 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1360 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1361 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1364 <dl><dt>Mono-ruby for individual base characters</dt>
1365 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1367 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1368 <dt>Jukugo ruby</dt>
1369 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1370 <dt>Inline ruby</dt>
1371 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1372 <dt>Double-sided ruby</dt>
1373 <dd><ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1375 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1376 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1377 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1382 # The next two test different paths in the sanitizer.
1384 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1386 <blockquote|>a</blockquote>
1388 <b→> doesn't terminate </b→>
1390 <bä> doesn't terminate </bä>
1392 <boo> doesn't terminate </boo>
1394 <s.foo> doesn't terminate </s.foo>
1398 <p><blockquote|>a</blockquote>
1399 </p><p><b→> doesn't terminate </b→>
1400 </p><p><bä> doesn't terminate </bä>
1401 </p><p><boo> doesn't terminate </boo>
1402 </p><p><s.foo> doesn't terminate </s.foo>
1403 </p><p><sub-ID#1>
1408 Non-word characters don't terminate tag names
1410 <blockquote|>a</blockquote>
1412 <b→> doesn't terminate </b→>
1414 <bä> doesn't terminate </bä>
1416 <boo> doesn't terminate </boo>
1418 <s.foo> doesn't terminate </s.foo>
1422 <p><blockquote|>a
1423 </p><p><b→> doesn't terminate </b→>
1424 </p><p><bä> doesn't terminate </bä>
1425 </p><p><boo> doesn't terminate </boo>
1426 </p><p><s.foo> doesn't terminate </s.foo>
1427 </p><p><sub-ID#1>
1432 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1433 ### This checks that HTML5 tags (with non-word characters in the tag
1434 ### name) make it safely through the parser -- the Sanitizer will
1435 ### munge them later, as it should.
1438 Non-word characters are valid in extension tags (T19663)
1449 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1453 Isolated close tags should be treated as literal text (T54760)
1461 <p class="mw-empty-elt">
1462 </p><p><s.foo>s
1465 <p><s.foo>s</p>
1469 ### Special characters
1473 Bare pipe character (T54363)
1482 Bare pipe character from a template (T54363)
1491 ### <nowiki> test cases
1495 <nowiki> unordered list
1497 <nowiki>* This is not an unordered list item.</nowiki>
1499 <p>* This is not an unordered list item.
1502 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1508 <nowiki>Lorem ipsum dolor
1516 <p>Lorem ipsum dolor
1525 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1535 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1537 <nowiki><span class="error"></nowiki>
1539 <p><span class="error">
1542 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1548 :There is not nowiki.
1549 :There is <nowiki>nowiki</nowiki>.
1551 #There is not nowiki.
1552 #There is <nowiki>nowiki</nowiki>.
1554 *There is not nowiki.
1555 *There is <nowiki>nowiki</nowiki>.
1557 <dl><dd>There is not nowiki.</dd>
1558 <dd>There is nowiki.</dd></dl>
1559 <ol><li>There is not nowiki.</li>
1560 <li>There is nowiki.</li></ol>
1561 <ul><li>There is not nowiki.</li>
1562 <li>There is nowiki.</li></ul>
1565 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1566 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1568 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1569 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1571 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1572 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1576 Entities inside <nowiki>
1578 <nowiki><</nowiki>
1583 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1587 Entities inside template parameters
1594 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1598 Properly escape nowiki when combined with other wiki markup
1602 <p>* </nowiki> tag</p>
1604 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1608 T93824: Put escaped HTML tags inside nowiki
1612 <p><h2>foo</h2></p>
1614 <nowiki><h2>foo</h2></nowiki>
1618 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1622 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1623 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1624 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1626 This text: L'[[Foo]]
1627 This text: L<nowiki>''</nowiki>[[Foo]]
1628 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1631 # This test fails because wikitext whitespace is not normalized before comparing.
1633 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1637 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1640 This text : L<nowiki>''</nowiki>[[Foo]]
1643 # This test and the next one are html2wt only as they test that incorrect wikitext
1644 # passed in template arguments gets escaped or wrapped in nowikis where required.
1646 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1650 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1651 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1653 {{echo|foo{{!}}bar}}
1654 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1658 T53961: Output correct nowikis in template arguments
1662 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1663 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1664 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1665 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1666 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1669 {{echo|<nowiki>a }} b</nowiki>}}
1670 {{echo|<nowiki>a [[ b</nowiki>}}
1671 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1672 {{echo|a <nowiki>}</nowiki>}}
1676 Cases where "!!" needs nowiki protection
1681 <tr><th>this needs protection !! here</th></tr>
1685 <tr><th>this does not need
1686 protection !! here</th></tr>
1690 !<nowiki>this needs protection !! here</nowiki>
1703 Comments and Indent-Pre
1705 <!-- comment 1 --> asdf
1707 <!-- comment 1 --> asdf
1710 <!-- comment 1 --> asdf
1711 <!-- comment 2 -->xyz
1713 <!-- comment 1 --> asdf
1714 <!-- comment 2 --> xyz
1770 asdf<!-- comment 1 -->jkl
1780 <!-- foo --> b <!-- bar -->
1794 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1800 Comment semantics and delimiters
1802 <!-- --><!----><!-----><!------>
1806 <!-- --><!----><!-----><!------>
1810 Comment semantics and delimiters, redux
1812 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1813 -- foo -- funky huh? ... -->
1817 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1818 -- foo -- funky huh? ... -->
1822 Comment semantics and delimiters: directors cut
1824 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1825 everything starting with < followed by !-- until the first -- and > we see,
1826 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1832 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1833 everything starting with < followed by !-- until the first -- and > we see,
1834 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1839 Comment semantics: nesting
1841 <!--<!-- no, we're not going to do anything fancy here -->-->
1846 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1849 # Parsoid closes the unclosed comment, even if it means a slight
1852 Comment semantics: unclosed comment at end
1854 parsoid=wt2html,html2html
1856 <!--This comment will run out to the end of the document
1860 <!--This comment will run out to the end of the document-->
1864 Comment semantics: normalize comments to play nice with XML and browsers
1866 <!-- Browsers --!> think this is closed -->
1867 <!--> This would normally be text -->
1868 <!---> As would this -->
1869 <!-- XML doesn't like trailing dashes -------->
1870 <!-- Nor doubled hyphens -- anywhere in the data -->
1871 But this is not a comment.
1873 <p>But this is not a comment.
1876 <!-- Browsers --!> think this is closed -->
1877 <!--> This would normally be text -->
1878 <!---> As would this -->
1879 <!-- XML doesn't like trailing dashes -------->
1880 <!-- Nor doubled hyphens -- anywhere in the data -->
1881 <p>But this is not a comment.</p>
1885 Comment semantics: round-trip even text which contains encoded -->
1887 <!-- hello & goodbye - > --> --&gt; --&xx -->
1889 <!-- hello & goodbye - > --> --&gt; --&xx -->
1893 Comment in template title
1902 Comment on its own line post-expand
1914 Comment on its own line post-expand with non-significant whitespace
1926 post-expand include size being exceeded
1930 {{echo3|1234567890}}
1932 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1937 max template depth being reached
1941 {{echo with depth|too deep!}}
1943 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1948 multiple templates that are redirects
1959 Multiple comments should still parse as SOL-transparent
1961 parsoid=wt2html,wt2wt
1964 <!--c2--><!--c3--><!--c4-->*b
1973 <!--c2--><!--c3--><!--c4-->
1979 ## Make sure ">" gets escaped in comments to avoid XSS
1981 IE conditional comments
1984 <script>alert('hi');</script>
1987 <!--[if lt IE 9]>
1988 <script>alert('hi');</script>
1993 ### paragraph wrapping tests
2009 Block tag on one line (<div>)
2019 <p>a </p><div>foo</div>
2024 # Remex wraps empty tag runs with p-tags.
2025 # Parsoid strips them out during p-wrapping.
2027 No p-wrappable content
2029 <span><div>x</div></span>
2030 <span><s><div>x</div></s></span>
2031 <small><em></em></small><span><s><div>x</div></s></span>
2033 <span><div>x</div></span>
2034 <span><s><div>x</div></s></span>
2035 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2037 <span><div>x</div></span>
2038 <span><s><div>x</div></s></span>
2039 <small><em></em></small><span><s><div>x</div></s></span>
2042 # T177612: Parsoid-only test
2044 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2046 {{echo|<span><div>x</div></span>}}
2049 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
2054 Block tag on one line (<blockquote>)
2056 a <blockquote>foo</blockquote>
2060 a <blockquote>foo</blockquote>
2064 <p>a </p><blockquote><p>foo</p></blockquote>
2070 Block tag on both lines (<div>)
2080 <p>a </p><div>foo</div><p>
2081 b </p><div>foo</div>
2085 Block tag on both lines (<blockquote>)
2087 a <blockquote>foo</blockquote>
2089 b <blockquote>foo</blockquote>
2091 a <blockquote>foo</blockquote>
2092 b <blockquote>foo</blockquote>
2095 <p>a </p><blockquote><p>foo</p></blockquote><p>
2096 b </p><blockquote><p>foo</p></blockquote>
2100 Multiple lines without block tags
2121 x </p><div>foo</div><p> z
2125 # The difference between Parsoid & Remex here
2126 # is because of Parsoid's Tidy-emulation code
2127 # for p-wrapping. We'll start work to remove this
2128 # emulation code in Parsoid sooner than later.
2129 # Remex wraps empty tag runs with p-tags.
2130 # Parsoid strips them out in a separate pass.
2132 Empty lines between lines with block tags
2167 </p><div>b</div><p>d
2172 <div data-parsoid='{"stx":"html"}'></div>
2175 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2178 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2180 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2183 <div data-parsoid='{"stx":"html"}'>e</div>
2187 Unclosed HTML p-tags should be handled properly
2194 <div><p>foo</p></div>
2199 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2204 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2205 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2208 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2212 a [[Category:A1]] [[Category:A2]]
2217 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2221 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2227 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2231 No paragraph necessary for SOL transparent template
2233 <span><div>foo</div></span>
2236 <span><div>foo</div></span>
2237 {{echo|[[Category:Foo]]}}
2239 <span><div>foo</div></span>
2240 <span><div>foo</div></span>
2243 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2244 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2246 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2247 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]"}},"i":0}}]}'/>
2251 Avoid expanding multiline sol transparent template ranges unnecessarily
2269 <br about="#mwt1" typeof="mw:Transclusion" data-parsoid='{}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<br/>\n"}},"i":0}}]}'/><span about="#mwt1">
2272 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2276 Paragraph wrapping following unclosed table
2278 parsoid=wt2html,html2html
2299 </td></tr></tbody></table>
2305 <table data-parsoid='{"autoInsertedEnd":true}'>
2306 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2308 </tbody></table><table>
2309 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2320 Paragraph wrapping suppressed in html p
2322 parsoid=wt2html,html2html
2342 <p data-parsoid='{"stx":"html"}'>
2353 ### Preformatted text
2363 And a [[Main Page|link]]
2369 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2374 Tabs don't trigger preformatted text
2378 This is preformatted text.
2384 <pre>This is preformatted text.
2389 preformatted text.</p>
2390 <pre>This is preformatted text.
2395 Space before tab needs nowiki pre protection
2401 <nowiki> </nowiki> a
2405 Ident preformatting with inline content
2416 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2433 Regression with preformatted in <center>
2447 T54763: Preformatted in <blockquote>
2453 indented cell (no pre-wrapping!)
2463 <p> indented cell (no pre-wrapping!)
2471 T53086: Double newlines in blockquotes should be turned into paragraphs
2488 T17491: <ins>/<del> in blockquote
2491 Foo <del>bar</del> <ins>baz</ins> quux
2495 <p>Foo <del>bar</del> <ins>baz</ins> quux
2501 <p>Foo <del>bar</del> <ins>baz</ins> quux
2507 T17491: <ins>/<del> in blockquote (2)
2509 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2512 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2516 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2521 <pre> with attributes (T5202)
2523 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2525 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2530 <pre> with width attribute (T5202)
2532 <pre width="8">Narrow screen goodies</pre>
2534 <pre width="8">Narrow screen goodies</pre>
2539 <pre> with forbidden attribute (T5202)
2541 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2543 <pre width="8">Narrow screen goodies</pre>
2548 Entities inside <pre>
2557 <pre> with forbidden attribute values (T5202)
2559 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2561 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2566 <nowiki> inside <pre> (T15238)
2574 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2582 <pre><nowiki>Foo</nowiki></pre>
2587 <nowiki> inside of #tag:pre
2589 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2591 <pre>Foo →bar</pre>
2594 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2597 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2598 ## aren't enclosed in nowikis.
2600 <nowiki> and <pre> preference (first one wins)
2631 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2636 <p><span typeof="mw:Nowiki">
2644 </pre> inside nowiki
2646 <nowiki></pre></nowiki>
2653 Empty pre; pre inside other HTML tags (T56946)
2670 <div data-parsoid='{"stx":"html"}'><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
2672 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2676 HTML pre followed by indent-pre
2689 <p><pre>foo</pre></p>
2691 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2693 <p class='mw-empty-elt' data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2697 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2705 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2715 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2727 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2748 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2752 {{echo| foo}}{{echo| bar}}
2757 {{echo|<!--cmt--> foo}}
2759 <!--cmt-->{{echo| foo}}
2761 {{echo|{{echo| }}bar}}
2779 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2815 ## Hmm, should Parsoid rt this?
2817 Pres with newline attributes
2819 parsoid=wt2html,html2html
2824 <pre class="one two">hi</pre>
2827 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2831 Things that look like <pre> tags aren't treated as such
2833 Barack Obama <President> of the United States
2834 <President></President>
2836 <p>Barack Obama <President> of the United States
2837 <President></President>
2842 Handle broken pre-like tags (T66025)
2846 {{echo|<pre <pre>x</pre>}}
2848 <table><pre </table>
2851 <table><pre </table>
2855 <pre <table></table>
2857 <pre typeof="mw:Transclusion mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html","a":{"<pre":null},"sa":{"<pre":""},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2859 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'><pre </span><table data-parsoid='{"stx":"html"}'></table>
2863 Parsoid: handle pre with space after attribute
2867 <pre style="width:50%;" >{{echo|foo}}</pre>
2869 <pre style="width:50%;">{{echo|foo}}</pre>
2872 <pre typeof="mw:Extension/pre" about="#mwt2" style="width:50%;" data-mw='{"name":"pre","attrs":{"style":"width:50%;"},"body":{"extsrc":"{{echo|foo}}"}}'>{{echo|foo}}</pre>
2875 # TODO / maybe: fix wt2wt for this
2877 Parsoid: Don't paragraph-wrap fosterable content
2910 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2914 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2942 #--------------------------------------------------------------------
2943 # Transclusion parameter whitespace stripping tests
2944 # Behavior is different for positional and named parameters
2945 #--------------------------------------------------------------------
2947 Templates: Strip leading and trailing whitespace from named-param values
2951 {{echo|1= {{echo|b}} }}
2969 Templates: Don't strip whitespace from positional-param values
2973 {{echo|{{echo|b}} }}
3013 Templates: Don't recognize targets split by newlines
3029 Templates: Recognize targets when newlines and comments don't split the target
3034 <!--X--> ech<!--X-->o<!--X-->
3042 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech<!--X-->o<!--X--> \n <!--X--> <!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3046 Templates: Handle empty comment-and-ws-only lines correctly
3049 <!--should be ignored-->
3050 <!--should be ignored as well-->
3057 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n<!--should be ignored-->\n <!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
3061 Templates: Handle comments in the target
3064 <!-- should be ignored -->
3068 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3071 {{echo<!-- should be ignored -->
3074 {{echo<!-- should be ignored -->|foo}}
3076 {{<!-- should be ignored -->echo|foo}}
3085 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3087 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3089 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3091 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3093 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3097 Templates: Handle comments in parameter names (T69657)
3100 <!-- should be ignored -->
3104 <!-- should be ignored -->
3107 {{echo|1<!-- should be ignored -->=foo}}
3109 {{echo|<!-- should be ignored -->1=foo}}
3117 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3119 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
3121 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3123 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
3127 Templates: Other wikitext in parameter names (T69657)
3134 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3138 Templates: With colons
3142 <p>Template with colon
3145 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"With: Colon","href":"./Template:With:_Colon"},"params":{},"i":0}}]}'>Template with colon</p>
3148 #--------------------------------------------------------------------
3149 # Transclusion parameter escaping tests
3150 #--------------------------------------------------------------------
3153 Templates: Parsoid parameter escaping test 1
3155 {{echo|[foo]|{{echo|[bar]}}}}
3160 <p about="#mwt1" typeof="mw:Transclusion"
3161 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3165 Parsoid: Pipes in external links in template parameter
3167 {{echo|[{{echo|http://example.com}} link]}}
3169 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3172 <p><a rel="mw:ExtLink" class="external text" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
3176 Parsoid: pipe in transclusion parameter
3178 {{echo|http://foo.com/a|b}}
3180 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3183 <p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
3187 Parsoid: Pipe in external link target and content in template parameter
3189 parsoid=html2wt,wt2wt
3191 {{echo|[http://foo.com/a|b a|b]}}
3193 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3196 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3197 typeof="mw:Transclusion"
3198 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3199 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3203 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3207 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3209 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
3213 Templates: Don't escape already nowiki-escaped text in template parameters
3215 parsoid=html2wt,wt2wt
3217 {{echo|foo<nowiki>|</nowiki>bar}}
3218 {{echo|<nowiki><div></nowiki>}}
3219 {{echo|<nowiki></nowiki>}}
3226 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
3227 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
3228 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
3234 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3236 parsoid=html2wt,wt2wt
3238 {{echo|{{echo|1=bar}}}}
3243 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
3248 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3255 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
3260 Templates: Preserve blank parameter names
3267 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3271 Templates: Preserve blank parameter names in other positions
3273 {{blank_param|bar|=foo}}
3279 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
3284 ### Parsoid-centric tests for testing RT edge cases for pre
3288 1a. Indent-Pre and Comments
3301 1b. Indent-Pre and Comments
3314 1c. Indent-Pre and Comments
3327 1d. Indent-Pre and Comments
3328 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3341 2a. Indent-Pre and tables
3362 2b. Indent-Pre and tables
3378 2c. Indent-Pre and tables (T44252)
3395 2d. Indent-Pre and tables
3412 <tbody><tr><td> b</td></tr>
3417 2e. Indent-Pre and table-line syntax
3430 2f. Indent-pre started by table-line syntax
3449 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3454 Text that should be rendered preformatted
3462 <pre>Text that should be rendered preformatted
3471 2h. Indent pre in tables
3473 parsoid=wt2html,html2html
3516 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3518 </td></tr></tbody></table>
3522 3a. Indent-Pre and block tags (single-line html)
3526 c <blockquote> foo </blockquote>
3531 c <blockquote> foo </blockquote>
3532 <pre><span> foo </span>
3535 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3536 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3537 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3538 <pre><span> foo </span>
3541 <p> a </p><p> foo </p><p>
3542 b </p><div> foo </div><p>
3543 c </p><blockquote><p> foo </p></blockquote>
3544 <pre><span> foo </span>
3549 3b. Indent-Pre and block tags (multi-line html)
3552 <!-- comment --> b <div> foo </div>
3554 <pre>a <span>foo</span>
3559 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3560 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3562 <pre>a <span>foo</span>
3564 b </p><div> foo </div>
3568 3c. Indent-Pre and block tags (pre-content on separate line)
3632 4. Indent-Pre and extension tags
3643 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3647 5. Indent-Pre and html pre
3649 <pre class="123">hi</pre>
3651 <pre class="123">hi</pre>
3654 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3658 Render paragraphs when indent-pre is suppressed in blocklevels
3675 4. Multiple spaces at start-of-line
3693 ## NOTE: the leading white-space chars on empty line are significant
3695 5a. White-space in indent-pre
3707 ## NOTE: the leading white-space chars on empty line are significant
3709 5b. White-space in indent-pre
3728 5c. White-space in indent-pre
3741 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3764 7a. Indent-pre and category links
3766 parsoid=wt2html,wt2wt
3768 [[Category:foo]] <!-- No pre-wrapping -->
3769 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3772 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3773 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3776 ## We used to, but no longer wt2wt this test since the default serializer
3777 ## will normalize all categories to serialize on their own line.
3778 ## This wikitext usage is going to be fairly uncommon in production and
3779 ## selser will take care of preserving formatting in those scenarios.
3781 7b. Indent-pre and category links
3786 [[Category:foo]] {{echo|b}}
3788 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3789 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
3793 Indent-Pre: Newlines in comments shouldn't affect sol state
3808 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3812 HTML-pre: 1. embedded newlines
3844 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3846 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3849 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3854 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3862 HTML-pre: big spaces
3898 <pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n"}}'>
3917 HTML-pre: 2: indented text
3930 HTML-pre: 3: other wikitext
3949 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n* foo\n# bar\n= no-h =\n'' no-italic ''\n[[ NoLink ]]\n"}}'>* foo
3958 ### Definition lists
3965 <dl><dt>name </dt>
3966 <dd>Definition</dd></dl>
3971 Definition list for indentation only
3975 <dl><dd>Indented text</dd></dl>
3980 Definition list with no space
3985 <dd>Definition</dd></dl>
3990 Definition list with URL link
3992 ;http://example.com/ :definition
3994 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3995 <dd>definition</dd></dl>
4000 Definition list with bracketed URL link
4002 ;[http://www.example.com/ Example]:Something about it
4004 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4005 <dd>Something about it</dd></dl>
4010 Definition list with wikilink containing colon
4012 ;[[Help:FAQ]]:The least-read page on Wikipedia
4014 <dl><dt><a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
4015 <dd>The least-read page on Wikipedia</dd></dl>
4019 # At Brion's and JeLuF's insistence... :)
4021 Definition list with news link containing colon
4023 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4025 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> </dt>
4026 <dd>This isn't even a real newsgroup!</dd></dl>
4029 <dl><dt><a rel="mw:ExtLink" class="external free" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'>This isn't even a real newsgroup!</dd></dl>
4033 Malformed definition list with colon
4035 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4037 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
4042 Definition lists: colon in external link text
4044 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4046 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a> </dt>
4047 <dd>OK, I made that up</dd></dl>
4052 Definition lists: colon in HTML attribute
4054 ;<b style="display: inline">bold</b>
4056 <dl><dt><b style="display: inline">bold</b></dt></dl>
4061 Definition lists: self-closed tag
4063 ;one<br/>two :two-line fun
4065 <dl><dt>one<br />two </dt>
4066 <dd>two-line fun</dd></dl>
4071 Definition lists: ignore colons inside tags
4073 ;one <b>two : tag <i>fun:</i>:</b>:def
4075 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4081 Definition lists: excess closed tags
4083 ;one</b>two :bad tag fun
4085 <dl><dt>onetwo </dt>
4086 <dd>bad tag fun</dd></dl>
4090 <dd>bad tag fun</dd>
4095 T13748: Literal closing tags
4099 <dd>test test test test test</dd>
4101 <dd>test test test test test</dd>
4106 <dd>test test test test test</dd>
4108 <dd>test test test test test</dd>
4114 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4122 <dl><dt>term </dt>
4123 <dd>description</dd></dl>
4124 <ul><li>unordered</li></ul>
4130 Definition list with empty definition and following paragraph
4143 Nested definition lists using html syntax
4156 Definition Lists: No nesting: Multiple dd's
4169 Definition Lists: Indentation: Regular
4177 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4182 Definition Lists: Indentation: Missing 1st level
4188 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4193 Definition Lists: Indentation: Multi-level indent
4197 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4202 Definition Lists: Hacky use to indent tables
4209 should be left alone
4211 <dl><dd><dl><dd><table>
4216 </td></tr></table></dd></dl></dd></dl>
4218 should be left alone
4223 Definition Lists: Hacky use to indent tables (with content following table)
4228 |} <!--c1--> this text should be part of the dl
4235 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4242 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4246 Definition Lists: Hacky use to indent tables, with comments (T65979)
4254 should be left alone
4257 <dl><dd><dl><dd><table><tr>
4260 </tr></table><!-- bar --></dd></dl></dd></dl>
4262 should be left alone</p>
4266 Definition Lists: Hacky use to indent tables, with comment before table
4274 <dl><dd><dl><dd><!-- foo --><table><tr>
4276 </tr></table></dd></dl></dd></dl>
4279 # The trailing whitespace in this test is to catch a regression in
4280 # Parsoid after T54473.
4282 Definition Lists: Hacky use to indent tables (WS-insensitive)
4291 </td></tr></table></dd></dl>
4295 <tbody><tr><td>a</td></tr>
4296 </tbody></table></dd></dl>
4299 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4300 ## as an empty dt item. It also ignores all but the last ";" when followed
4301 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4302 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4305 ## Ex: ";;t2 ::d2" is transformed into:
4317 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4318 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4329 ## All Parsoid only definition list tests have this difference.
4331 ## See also: https://phabricator.wikimedia.org/T8569
4332 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4335 Table / list interaction: indented table with lists in table contents
4357 </td></tr></table></dd></dl>
4362 Table / list interaction: lists nested in tables nested in indented lists
4385 </td></tr></table></dd></dl>
4392 Definition Lists: Nesting: Multi-level (Parsoid only)
4420 Definition Lists: Nesting: Test 2
4427 <dl><dd>d2</dd></dl></dd></dl>
4432 Definition Lists: Nesting: Test 3
4437 <dl><dd><dl><dt>t1</dt>
4439 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4444 Definition Lists: Nesting: Test 4
4449 <dl><dd><dl><dd><dl><dt>t3</dt>
4450 <dd>d3</dd></dl></dd></dl></dd></dl>
4455 ## The Parsoid team believes the following three test exposes a
4456 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4457 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4458 ## It also exposes a "misfeature" in tidy, which doesn't like
4459 ## <dl> tags with a single <dt> child; it converts the <dt> into
4460 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4462 Definition Lists: Mixed Lists: Test 1
4468 <dl><dd><dl><dt><ul><li>foo</li>
4469 <li>bar</li></ul></dt></dl>
4470 <dl><dt>baz</dt></dl></dd></dl>
4473 <dl><dd><dl><dt><ul><li>foo</li>
4474 <li>bar</li></ul></dt></dl>
4475 <dl><dt>baz</dt></dl></dd></dl>
4493 Definition Lists: Mixed Lists: Test 2
4498 <ul><li><dl><dd>d1</dd>
4499 <dd>d2</dd></dl></li></ul>
4505 Definition Lists: Mixed Lists: Test 3
4510 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4511 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4517 Definition Lists: Mixed Lists: Test 4
4522 <ul><li><dl><dt>d1 </dt>
4525 <dd>d4</dd></dl></li></ul>
4531 Definition Lists: Mixed Lists: Test 5
4537 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4543 Definition Lists: Mixed Lists: Test 6
4548 <ol><li><ul><li><dl><dd>d1
4549 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4555 Definition Lists: Mixed Lists: Test 7
4560 <dl><dd><ul><li>d1</li>
4561 <li>d2</li></ul></dd></dl>
4567 Definition Lists: Mixed Lists: Test 8
4572 <dl><dd><ul><li>d1</li></ul>
4573 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4579 Definition Lists: Mixed Lists: Test 9
4583 <ul><li><dl><dt>foo </dt>
4584 <dd>bar</dd></dl></li></ul>
4590 Definition Lists: Mixed Lists: Test 10
4594 <ul><li><ol><li><dl><dt>foo </dt>
4595 <dd>bar</dd></dl></li></ol></li></ul>
4599 # The Parsoid team disagrees with the PHP parser's seemingly-random
4600 # rules regarding dd/dt on the next few tests. Parsoid is more
4601 # consistent, and recognizes the shared nesting and keeps the
4602 # still-open tags around until the nesting is complete.
4604 # This is a regression test for T175099
4606 Definition Lists: Mixed Lists: Test 11
4613 <ul><li>b</li></ul></dd></dl>
4617 <dd><ul><li>b</li></ul></dd></dl>
4620 # FIXME: Maybe get rid of this test?
4622 Definition Lists: Mixed Lists: Test 12
4627 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4628 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4629 <dl><dt>boo </dt>
4630 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4633 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4634 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4635 <dl><dt>boo </dt>
4636 <dd>baz</dd></dl></li></ol></li></ul>
4653 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4654 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4658 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4659 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4667 # FIXME: Maybe get rid of this test?
4669 # * The test is wrong, there are two colons where there should be :;
4670 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4672 Definition Lists: Weird Ones: Test 1
4674 *#;*::;;foo :bar (who uses this?)
4676 <ul><li><ol><li><dl><dt>foo </dt>
4677 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt>bar (who uses this?)</dt></dl></dt></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
4694 <dt>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4695 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4707 Definition Lists: colons occurring in tags
4724 <dt><span>a:b</span></dt>
4725 <dt><div>a:b</div></dt>
4726 <dt><div>a</div></dt>
4730 <dt><i>a:b</i></dt></dl>
4731 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4733 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4735 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4736 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4737 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4738 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4740 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4741 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4742 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4745 # Parsoid's output differs here again because it shares
4746 # nesting between the two lists unlike the PHP parser.
4747 # Unsure which is more desirable.
4749 Definition Lists: colons and tables 1
4761 </td></tr></table></dd></dl>
4765 </td></tr></table></dd></dl>
4771 </td></tr></table></dd>
4775 </td></tr></table></dd></dl>
4778 # FIXME: Does this need a html/php section?
4780 Definition Lists: template interaction
4782 ::{{definition_list}}
4785 ::{{definition_list}}
4790 <dl><dd><dl data-parsoid='{}'><dd about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[":",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}}]}'>one</dd><span about="#mwt1">
4791 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4793 <dl><dd data-parsoid='{}'>one
4794 <dl><dd about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":["::",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}},"\n:::two\n:::three"]}'>one</dd><span about="#mwt2">
4795 </span><dd about="#mwt2">two
4797 <dd>three</dd></dl></dd>
4798 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4806 External links: non-bracketed
4808 Non-bracketed: http://example.com
4810 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4814 # parsoid doesn't explicitly mark autonumbered links, see T55505
4816 External links: numbered
4818 Numbered: [http://example.com]
4819 Numbered: [http://example.net]
4820 Numbered: [http://example.com]
4822 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4823 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4824 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4827 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4828 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4829 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4833 External links: specified text
4835 Specified text: [http://example.com link]
4837 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4842 External links: trail
4844 Linktrails should not work for external links: [http://example.com link]s
4846 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4851 External links: dollar sign in URL
4853 http://example.com/1$2345
4855 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4859 # parsoid doesn't explicitly mark autonumbered links, see T55505
4861 External links: dollar sign in URL (autonumber)
4863 [http://example.com/1$2345]
4865 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4868 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4872 External links: open square bracket forbidden in URL (T6377)
4874 parsoid=wt2html,wt2wt,html2html
4876 http://example.com/1[2345
4878 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4881 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4885 External links: open square bracket forbidden in URL (named) (T6377)
4887 parsoid=wt2html,html2html
4889 [http://example.com/1[2345]
4891 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4894 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4897 # parsoid adds a space before the link name
4899 External links: open square bracket forbidden in URL (named) (T6377)
4902 [http://example.com/1 [2345]
4904 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4909 External links: nowiki in URL link text (T8230)
4911 [http://example.com/ <nowiki>''example site''</nowiki>]
4913 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4918 External links: newline forbidden in text (T8230 regression check)
4920 [http://example.com/ first
4923 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4929 External links: Pipe char between url and text
4931 [http://example.com | link]
4933 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4938 External links: protocol-relative URL in brackets
4940 [//example.com/ Test]
4942 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4946 # parsoid doesn't explicitly mark autonumbered links, see T55505
4948 External links: protocol-relative URL in brackets without text
4952 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4955 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4959 External links: protocol-relative URL in free text is left alone
4963 <p>//example.com/Foo
4968 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4970 foo//example.com/Foo
4972 <p>foo//example.com/Foo
4976 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4978 External links: with no contents
4980 parsoid=wt2html,wt2wt
4982 [http://en.wikipedia.org/wiki/Foo]
4984 [[wikipedia:Foo|Bar]]
4986 [[wikipedia:Foo|<span>Bar</span>]]
4988 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4989 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4990 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4993 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4994 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4995 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4999 External links: Free with trailing punctuation
5009 http://example.com/url_with_(brackets)
5010 (http://example.com/url_without_brackets)
5011 http://example.com/url_with_entity&
5012 http://example.com/url_with_entity&
5013 http://example.com/url_with_entity&
5014 http://example.com/url_with_entity
5015 http://example.com/url_with_entity 
5016 http://example.com/url_with_entity 
5017 http://example.com/url_with_entity<
5018 http://example.com/url_with_entity<
5019 http://example.com/url_with_entity<
5021 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5022 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5023 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5024 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5025 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5026 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5027 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5028 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5029 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5030 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5031 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5032 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5033 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5034 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5035 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5036 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5037 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5038 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5039 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5042 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5043 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5044 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5045 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5046 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5047 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5048 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5049 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5050 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5051 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5052 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5053 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5054 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5055 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
5056 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
5057 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
5058 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
5059 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
5060 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
5064 External links: tricky Parsoid html2html case
5066 parsoid=wt2html,wt2wt,html2html
5068 http://example.com/url_with_entity&amp;
5070 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5073 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
5077 External links: Free with trailing quotes (T113666)
5079 '''News:''' Stuff here
5083 <p><b>News:</b> Stuff here
5084 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5087 <p><b>News:</b> Stuff here</p>
5088 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5092 External links: with entity
5094 [http:// www.librarieswithoutborders.org Libraries without borders]
5096 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5099 <p><a rel="mw:ExtLink" class="external text" href="http://+www.librarieswithoutborders.org" data-parsoid='{"a":{"href":"http://+www.librarieswithoutborders.org"},"sa":{"href":"http://&#x20;www.librarieswithoutborders.org"}}'>Libraries without borders</a></p>
5103 External links: Lone protocols are never linked (T105697)
5122 External links: No preceding word characters allowed (T67278)
5124 NOPEhttp://example.com
5125 N0http://example.com
5126 ok:http://example.com
5127 ok-http://example.com
5129 <p>NOPEhttp://example.com
5130 N0http://example.com
5131 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5132 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5137 External links: nofollow domain exception
5139 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5141 <p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>.
5148 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5150 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5155 External image from https
5157 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5159 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5164 External image (when not allowed)
5166 wgAllowExternalImages=0
5168 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5170 <p>External image: <a rel="nofollow" class="external free" href="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png">http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png</a>
5175 Link to non-http image, no img tag
5177 Link to non-http image, no img tag: ftp://example.com/test.jpg
5179 <p>Link to non-http image, no img tag: <a rel="nofollow" class="external free" href="ftp://example.com/test.jpg">ftp://example.com/test.jpg</a>
5184 External links: terminating separator
5186 Terminating separator: http://example.com/thing,
5188 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5193 External links: intervening separator
5195 Intervening separator: http://example.com/1,2,3
5197 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5202 External links: old bug with URL in query
5204 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5206 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5211 External links: old URL-in-URL bug, mixed protocols
5213 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5215 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5219 # Since Parsoid is starting to emit canonical wikitext for links,
5220 # [http://example.com http://example.com] will not RT back to that
5223 External links: URL in text
5227 URL in text: [http://example.com http://example.com]
5229 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5232 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5236 External links: Clickable images
5238 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5240 <p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/></a>
5243 <p>ja-style clickable images: <a rel="mw:ExtLink" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
5247 External links: raw ampersand
5249 Old & use: http://x&y
5251 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5256 External links: encoded ampersand
5258 Old & use: http://x&y
5260 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5263 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5267 External links: encoded equals (T8102)
5269 http://example.com/?foo=bar
5271 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5274 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5278 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5279 ## does it number them. As discussed in T55505, we can identify
5280 ## autonumbered links via CSS.
5284 External links: [raw ampersand]
5286 Old & use: [http://x&y]
5288 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5291 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5294 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5295 # mode will return the [raw ampersand] wikitext
5297 External links: [encoded ampersand]
5299 parsoid=wt2html,wt2wt,html2html
5301 Old & use: [http://x&y]
5303 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5306 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5310 External links: [raw equals]
5312 [http://example.com/?foo=bar]
5314 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5317 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5320 # note that parsoid html is identical to [raw equals] case; so html2wt
5321 # mode will return the [raw equals] wikitext
5323 External links: [encoded equals] (T8102)
5325 parsoid=wt2html,wt2wt,html2html
5327 [http://example.com/?foo=bar]
5329 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5332 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5335 # xxx parsoid strips the IDN character, so the round-trip tests will
5336 # obviously fail and are disabled. --cscott
5338 External links: [IDN ignored character reference in hostname; strip it right off]
5340 parsoid=wt2html,wt2wt,html2html
5342 [http://e‌xample.com/]
5344 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5347 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5350 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5351 # Where an external link could easily circumvent the sanitization of the text of
5352 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5353 # test demands a higher standard. That's a bit strange.
5357 # http://example.com -> [http://example.com|http://example.com]
5358 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5360 # The first example is sanitized, but the second is not. Any security benefits
5361 # from this production are trivial to circumvent. Either remove this test and
5362 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5363 # the test accordingly.
5367 # xxx parsoid strips the IDN character, so the round-trip tests will
5368 # obviously fail and are disabled. --cscott
5370 External links: IDN ignored character reference in hostname; strip it right off
5372 parsoid=wt2html,html2html
5374 http://e‌xample.com/
5376 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5379 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5383 External links: www.jpeg.org (T2554)
5387 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5391 # parsoid doesn't explicitly mark autonumbered links, see T55505
5393 External links: URL within URL (T2002)
5395 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5397 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5400 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5404 T2361: URL inside bracketed URL
5406 [http://www.example.com/foo http://www.example.com/bar]
5408 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5413 T2361: URL within URL, not bracketed
5415 http://www.example.com/foo?=http://www.example.com/bar
5417 <p><a rel="nofollow" class="external free" href="http://www.example.com/foo?=http://www.example.com/bar">http://www.example.com/foo?=http://www.example.com/bar</a>
5422 T2289: ">"-token in URL-tail
5424 http://www.example.com/<hello>
5426 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5431 T2289: literal ">"-token in URL-tail
5433 http://www.example.com/<b>html</b>
5435 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5438 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
5442 T2289: ">"-token in bracketed URL
5444 [http://www.example.com/<hello> stuff]
5446 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5451 T2289: literal ">"-token in bracketed URL
5453 [http://www.example.com/<b>html</b> stuff]
5455 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5460 T2289: literal double quote at end of URL
5462 http://www.example.com/"hello"
5464 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5469 T2289: literal double quote in bracketed URL
5471 [http://www.example.com/"hello" stuff]
5473 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5478 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5480 [http://www.example.com test]
5482 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5487 External links: link text with spaces
5489 [http://www.example.com a b c]
5490 [http://www.example.com ''a'' ''b'']
5492 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5493 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5497 # Note edge case difference between PHP and Parsoid here.
5499 External links: wiki links within external link (T5695)
5501 parsoid=wt2html,html2html
5503 [http://example.com [[wikilink]] embedded in ext link]
5505 [http://example.com test [[wikilink]] embedded in ext link]
5507 <p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5508 </p><p><a rel="nofollow" class="external text" href="http://example.com">test </a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5511 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5512 <p><a rel="mw:ExtLink" class="external text" href="http://example.com">test </a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5516 T2787: Links with one slash after the url protocol are invalid
5520 [http:/example.com title]
5522 <p>http:/example.com
5523 </p><p>[http:/example.com title]
5528 Bracketed external links with template-generated invalid target
5530 [{{echo|http:/example.com}} title]
5532 <p>[http:/example.com title]
5536 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5538 Broken wikilinks (but not external links) prevent templates from closing
5542 [http://example.com x
5544 {{echo|[http://example.com x}}
5550 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5551 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5553 </p><p>{{echo|[[Foo}}
5556 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5557 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://example.com x"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5559 <p>{{echo|[[Foo}}</p>
5563 Wikilinks with embedded newlines are not broken
5574 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[ Foo\nB\nC]]"}},"i":0}}]}'>[[ Foo B C]]</p>
5586 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5590 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5591 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5595 T4702: Mismatched <i>, <b> and <a> tags are invalid
5597 ''[http://example.com text'']
5598 [http://example.com '''text]'''
5599 ''Something [http://example.com in italic'']
5600 ''Something [http://example.com mixed''''', even bold]'''
5601 '''''Now [http://example.com both''''']
5603 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5604 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5605 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5606 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5607 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5615 http://www.example.com/?title=AT%26T
5617 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5620 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5623 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5624 # % is actually legal in HTML5. Any change in output would need testing though.
5626 T6781, T7267: %25 in URL
5628 http://www.example.com/?title=100%25_Bran
5630 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a>
5633 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5637 T6781, T7267: %28, %29 in URL
5639 http://www.example.com/?title=Ben-Hur_%281959_film%29
5641 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
5644 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
5649 T6781: %26 in autonumber URL
5651 [http://www.example.com/?title=AT%26T]
5653 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5656 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5660 T6781, T7267: %26 in autonumber URL
5662 [http://www.example.com/?title=100%25_Bran]
5664 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5667 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5671 T6781, T7267: %28, %29 in autonumber URL
5673 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5675 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5678 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5683 T6781: %26 in bracketed URL
5685 [http://www.example.com/?title=AT%26T link]
5687 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5690 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5694 T6781, T7267: %25 in bracketed URL
5696 [http://www.example.com/?title=100%25_Bran link]
5698 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5703 T6781, T7267: %28, %29 in bracketed URL
5705 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5707 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5710 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5714 External link containing a period in the anchor. (T65947)
5716 [//foo.org/bar#baz. bang]
5718 [//foo.org/bar. bang]
5720 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5721 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5724 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5725 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5729 External link containing a single quote. (T65947)
5733 [//foo.org/bar'baz bang]
5735 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5736 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5739 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5740 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5744 External link containing double-single-quotes in text '' (T6598 sanity check)
5746 Some [http://example.com/ pretty ''italics'' and stuff]!
5748 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5753 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5755 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5757 <p><i>Some </i><a rel="nofollow" class="external text" href="http://example.com/"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
5761 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5763 External link containing double-single-quotes with no space separating the url from text in italics
5765 [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
5767 <p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.
5770 <p><a rel="mw:ExtLink" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
5774 External link with comments in link text
5776 [http://www.google.com Google <!-- comment -->]
5778 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5781 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5785 External link to bare IPv4 address
5787 [http://192.168.0.1 Link]
5789 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5792 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5796 URL-encoding in URL functions (single parameter)
5798 {{localurl:Some page|amp=&}}
5800 <p>/index.php?title=Some_page&amp=&
5805 URL-encoding in URL functions (multiple parameters)
5807 {{localurl:Some page|q=?&=&}}
5809 <p>/index.php?title=Some_page&q=?&amp=&
5816 http://example.com/index.php?foozoid%5B%5D=bar
5818 http://example.com/index.php?foozoid[]=bar
5820 <p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5821 </p><p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5824 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5826 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar" data-parsoid='{"stx":"url","a":{"href":"http://example.com/index.php?foozoid%5B%5D=bar"},"sa":{"href":"http://example.com/index.php?foozoid&#x5B;&#x5D;=bar"}}'>http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5830 IPv6 urls, autolink format (T23261)
5832 http://[2404:130:0:1000::187:2]/index.php
5834 Examples from RFC 2373, section 2.2:
5836 *http://[1080::8:800:200C:417A]/unicast
5837 *http://[FF01::101]/multicast
5838 *http://[::1]/loopback
5839 *http://[::]/unspecified
5840 *http://[::13.1.68.3]/ipv4compat
5841 *http://[::FFFF:129.144.52.38]/ipv4compat
5843 Examples from RFC 2732, section 2:
5845 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5846 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5847 *http://[3ffe:2a00:100:7031::1]
5848 *http://[1080::8:800:200C:417A]/foo
5849 *http://[::192.9.5.5]/ipng
5850 *http://[::FFFF:129.144.52.38]:80/index.html
5851 *http://[2010:836B:4179::836B:4179]
5853 <p><a rel="nofollow" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a>
5854 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5856 <ul><li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5857 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5858 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5859 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5860 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5861 <li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5862 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5864 <ul><li><a rel="nofollow" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5865 <li><a rel="nofollow" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5866 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5867 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5868 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5869 <li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5870 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5873 <p><a rel="mw:ExtLink" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5875 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external mw-magiclink">RFC 2373</a>, section 2.2:</p>
5876 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5877 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5878 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5879 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5880 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5881 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5883 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5884 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5885 <li><a rel="mw:ExtLink" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5886 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5887 <li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5888 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5889 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5890 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5894 IPv6 urls, bracketed format (T23261)
5896 [http://[2404:130:0:1000::187:2]/index.php test]
5898 Examples from RFC 2373, section 2.2:
5900 *[http://[1080::8:800:200C:417A] unicast]
5901 *[http://[FF01::101] multicast]
5902 *[http://[::1]/ loopback]
5903 *[http://[::] unspecified]
5904 *[http://[::13.1.68.3] ipv4compat]
5905 *[http://[::FFFF:129.144.52.38] ipv4compat]
5907 Examples from RFC 2732, section 2:
5909 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5910 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5911 *[http://[3ffe:2a00:100:7031::1] 3]
5912 *[http://[1080::8:800:200C:417A]/foo 4]
5913 *[http://[::192.9.5.5]/ipng 5]
5914 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5915 *[http://[2010:836B:4179::836B:4179] 7]
5917 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5918 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5920 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5921 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5922 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5923 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5924 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5925 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5926 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5928 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5929 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5930 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5931 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5932 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5933 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5934 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5937 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5939 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external mw-magiclink">RFC 2373</a>, section 2.2:</p>
5940 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5941 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5942 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5943 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5944 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5945 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5947 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5948 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5949 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5950 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5951 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5952 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5953 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5954 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5958 Non-extlinks in brackets
5967 [{{echo|foo}} ''bar'']
5968 [{{echo|foo}}l's] errand
5969 [{{echo|foo}}l's errand]
5971 [url=http://example.com]
5972 [http:// bare protocols don't count]
5985 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5986 [http:// bare protocols don't count]
5994 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5995 [<span about="#mwt20" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> bar]
5996 [<span about="#mwt21" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> <i>bar</i>]
5997 [<span about="#mwt22" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's] errand
5998 [<span about="#mwt23" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's errand]
5999 [url=<span about="#mwt24" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6000 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6001 [http:// bare protocols don't count]</p>
6005 Percent encoding in external links
6007 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6009 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6012 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6016 Use url link syntax for links where the content is equal the link target
6020 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6023 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6027 Parenthesis in external links, especially URL links
6031 http://example.com/test)
6033 http://example.com/(test)
6035 http://example.com/((test)
6037 (http://example.com/(test))
6039 (http://example.com/(test)))))
6041 http://example.com/a)b
6043 [http://example.com) foo]
6045 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6046 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6047 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6048 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6049 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6050 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6051 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6052 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6055 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6056 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6057 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6058 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6059 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6060 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6061 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6062 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6066 Parenthesis in external links, w/ transclusion or comment
6068 (http://example.com/{{echo|hi}})
6070 (http://example.com<!-- hi -->)
6072 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6073 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6076 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" class="external free" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span>"}]]}'>http://example.com/hi</a>)</p>
6078 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
6082 Serialize <a> tags with invalid link targets as plain text
6084 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6086 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6087 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6088 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6089 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6092 <nowiki>*</nowiki>text
6093 <nowiki>[[foo]]</nowiki>
6094 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6098 mw:ExtLink -vs- mw:WikiLink (T94723)
6102 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6103 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6104 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6105 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6107 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6108 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6116 [[:en:European_Robin|European Robin]]
6117 [[:en:European_Robin|European Robin]]
6121 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6125 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6127 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6138 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6140 Normal text. '''''Bold italic text.''''' Normal text.
6142 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6143 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6148 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6149 # parser strips. The wikitext contains just the first half of the bold
6152 Unclosed and unmatched quotes
6154 '''''Bold italic text '''with bold deactivated''' in between.'''''
6156 '''''Bold italic text ''with italic deactivated'' in between.'''''
6160 ..spanning two paragraphs (should not work).'''
6162 '''Bold tag left open
6164 ''Italic tag left open
6168 <!-- Unmatching number of opening, closing tags: -->
6169 '''This year''''s election ''should'' beat '''last year''''s.
6171 ''Tom'''s car is bigger than ''Susan'''s.
6173 Plain ''italic'''s plain
6175 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6176 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6177 </p><p><b>Bold text..</b>
6178 </p><p>..spanning two paragraphs (should not work).
6179 </p><p><b>Bold tag left open</b>
6180 </p><p><i>Italic tag left open</i>
6182 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6183 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6184 </p><p>Plain <i>italic'</i>s plain
6187 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6188 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6189 </p><p><b>Bold text..</b>
6190 </p><p>..spanning two paragraphs (should not work).<b></b>
6191 </p><p><b>Bold tag left open</b>
6192 </p><p><i>Italic tag left open</i>
6195 <!-- Unmatching number of opening, closing tags: -->
6196 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6197 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6198 </p><p>Plain <i>italic'</i>s plain
6205 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6208 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6209 # is the bare minimum required by the spec, see:
6210 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6211 # Parsoid team replies: empty table tags are legal in HTML5
6213 A table with no data.
6226 A table with stray table end tags on start tag line (wt2html)
6230 {|style="color: red;"|}
6232 {|style="color: red;" |}
6236 {|style="color: red;"|} id="foo"
6240 {|style="color: red;" |} id="foo"
6244 <table style="color: red;"></table>
6246 <table style="color: red;">
6252 <table style="color: red;" id="foo">
6258 <table style="color: red;" id="foo">
6267 A table with no data (take 2)
6275 # A table with nothing but a caption is invalid XHTML, we might want to render
6276 # this as <p>caption</p>
6277 # Parsoid team replies: table with only a caption is legal in HTML5
6279 A table with nothing but a caption
6287 </caption><tr><td></td></tr></table>
6290 <table><caption>caption</caption></table>
6294 A table with caption with default-spaced attributes and a table row
6297 |+ style="color: red;" |caption1
6303 <caption style="color: red;">caption1
6312 A table with captions with non-default spaced attributes and a table row
6315 |+style="color: red;"|caption2
6316 |+ style="color: red;"|caption3
6322 <caption style="color: red;">caption2
6324 <caption style="color: red;">caption3
6333 Table td-cell syntax variations
6338 |style='color:red;'|baz
6339 |style='color:red;'||baz
6346 <td>foo bar foo</td>
6349 <td style="color:red;">baz
6351 <td>style='color:red;'</td>
6379 Simple table but with multiple dashes for row wikitext
6398 Multiplication table
6400 {| border="1" cellpadding="2"
6401 |+Multiplication table
6421 <table border="1" cellpadding="2">
6422 <caption>Multiplication table
6469 Accept "||" in table headings
6484 Accept "!!" in table data
6498 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6503 Accept "||" in indented table headings
6513 </th></tr></table></dd></dl>
6518 Accept "!!" in templates
6532 <tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["!a ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b!!c"}},"i":0}}]}'>a b</th><th about="#mwt1">c</th></tr>
6536 Accept "!!" in table headings after newline
6553 <p>b!!c</p></th></tr>
6558 Accept "!!" in table data of mixed wikitext / html syntax
6562 <tr><td>b!!c</td></tr>
6568 </th></tr><tr><td>b!!c</td></tr>
6572 <tbody><tr><th>a</th></tr>
6573 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6578 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6595 Accept "| !" at start of line in tables (ignore !-attribute)
6599 |!style="color:red"|bar
6611 Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present, or in 1st cell when there is a space between "|" and +/-
6615 |style='color:red;'|+1
6616 |style='color:blue;'|-1
6628 <td style="color:red;">+1
6630 <td style="color:blue;">-1
6654 |rowspan=2|Cell 2, row 1 (and 2)
6665 <td rowspan="2">Cell 2, row 1 (and 2)
6683 {| bgcolor=#ABCDEF border=2
6688 |the original table again
6696 <table bgcolor="#ABCDEF" border="2">
6704 <td>the original table again
6710 Invalid attributes in table cell (T3830)
6724 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6728 |title="foo<nowiki>|</nowiki>" |bar
6729 |title="foo<nowiki>|</nowiki>" bar
6736 <td title="foo|">bar
6738 <td>title="foo|" bar
6743 <tbody><tr><td title="foo">bar</td>
6744 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6745 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6749 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6750 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6751 # *2wt modes will fail.
6753 Table security: embedded pipes
6755 parsoid=wt2html,html2html
6758 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6762 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6763 <td>]" onmouseover="alert(document.cookie)">test
6771 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" class="external free" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6775 Element attributes with double ! should not be broken up by <th>
6778 !hi <div class="!!">ha</div> ho
6783 <th>hi <div class="!!">ha</div> ho
6788 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6793 ! and || in element attributes should not be parsed as <th>/<td>
6796 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6801 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6806 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6810 # FIXME: The output seems broken. Filed as T110268.
6812 ! and || in td attributes should not be parsed as <th>/<td>
6817 |style="color: red !important;" data-contrived="put this here ||"|foo
6822 <td>style="color: red !important;" data-contrived="put this here</td>
6828 <tbody><tr><td>style="color: red !important;" data-contrived="put this here</td><td data-parsoid='{"stx":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'>foo</td></tr>
6833 Break on | in element attribute in template
6835 parsoid=wt2html,html2html
6837 {{echo|1=<div class="hi|ho">ha</div>}}
6839 <p>ho">ha</div>
6842 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</span>
6846 Break on | in element attribute name in template
6848 {{echo|<div cla|ss="hiho">ha</div>}}
6850 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"ss","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div cla"},"ss":{"wt":"\"hiho\">ha</div>"}},"i":0}}]}'><div cla</p>
6854 Don't break on | in extension attribute in template
6856 {{echo|<ref name="hi|ho">ha</ref>}}
6860 <p><sup about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
6862 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Main_Page#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
6865 ## We don't support roundtripping of these attributes in Parsoid.
6866 ## Selective serialization takes care of preventing dirty diffs.
6867 ## But, on edits, we dirty-diff the invalid attribute text.
6869 Invalid text in table attributes should be discarded
6873 {| <span>boo</span> style='border:1px solid black'
6874 | <span>boo</span> style='color:blue' |1
6875 |<span>boo</span> style='color:blue'|2
6878 <table style="border:1px solid black">
6880 <td style="color:blue">1
6882 <td style="color:blue">2
6886 <table style="border:1px solid black">
6888 <td style="color:blue">1</td>
6889 <td style="color:blue">2</td>
6895 Invalid text in table attributes should be preserved by selective serializer
6898 "modes": ["selser"],
6900 ["td:first-child", "text", "abc"],
6901 ["td + td", "text", "xyz"]
6905 {| <span>boo</span> style='border:1px solid black'
6906 | <span>boo</span> style='color:blue' | 1
6907 |<span>boo</span> style='color:blue'| 2
6910 {| <span>boo</span> style='border:1px solid black'
6911 | <span>boo</span> style='color:blue' | abc
6912 |<span>boo</span> style='color:blue'| xyz
6917 1. Template-generated table cell attributes and cell content
6922 || {{table_attribs_5}}
6923 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6924 |align=center {{table_attribs}}
6925 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6930 <td style="color:red;">Foo
6932 <td style="color:red;">Foo
6934 <td>style="color:red;"</td>
6937 <td style="color:red;">Foo
6939 <td align="center" style="color:red;">Foo
6941 <td align="center" style="color:red;">Foo
6947 2. Template-generated table cell attributes and cell content
6950 |{{table_attribs_2}}
6955 <td style="color:red;">Foo
6963 <tbody><tr><td about="#mwt1" typeof="mw:Transclusion" style="color:red;" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_2","href":"./Template:Table_attribs_2"},"params":{},"i":0}}]}'>Foo</td>
6964 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6969 3. Template-generated table cell attributes and cell content
6972 !align=center {{table_header_cells}}
6974 |align=center {{table_cells}}
6979 <th align="center" style="color:red;">Foo</th>
6980 <th style="color:red;"><i>Bar</i></th>
6981 <th style="color:brown;"><i>Foo</i> and Baz
6984 <td align="center" style="color:red;">Foo</td>
6985 <td style="color:red;"><i>Bar</i></td>
6986 <td style="color:brown;"><i>Foo</i> and Baz
6991 <tbody><tr><th align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":0}}]}'>Foo</th><th about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></th><th about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</th></tr><tr>
6992 <td align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":0}}]}'>Foo</td><td about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></td><td about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</td></tr>
6997 4. Template-generated table cell attributes and cell content inside a templated table
7000 !align=center {{table_header_cells}}
7002 |align=center {{table_cells}}
7007 <th align="center" style="color:red;">Foo</th>
7008 <th style="color:red;"><i>Bar</i></th>
7009 <th style="color:brown;"><i>Foo</i> and Baz
7012 <td align="center" style="color:red;">Foo</td>
7013 <td style="color:red;"><i>Bar</i></td>
7014 <td style="color:brown;"><i>Foo</i> and Baz
7018 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":1}},"\n|-\n|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":2}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":3}}]}'>
7019 <tbody><tr><th align="center" style="color:red;">Foo</th><th style="color:red;"><i>Bar</i></th><th style="color:brown;"><i>Foo</i> and Baz</th></tr>
7021 <td align="center" style="color:red;">Foo</td><td style="color:red;"><i>Bar</i></td><td style="color:brown;"><i>Foo</i> and Baz</td></tr>
7025 ## Edge case fix to prevent future regressions
7027 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7030 |{{table_attribs_7}}
7035 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
7037 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
7041 Table with row followed by newlines and table heading
7043 parsoid=wt2html,html2html
7061 Table with empty line following the start tag
7063 parsoid=wt2html,html2html
7081 Table attributes with empty value
7083 parsoid=wt2html,html2html
7096 <tbody><tr><td style="">hello</td></tr>
7101 Wikitext table with a lot of comments
7124 Wikitext table comments represented in parsoid dom
7126 {|<!--c1--><!--c2-->
7135 </td></tr></tbody></table>
7137 <table><!--c1--><!--c2-->
7138 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7139 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7144 Wikitext table with double-line table cell
7161 Table cell with a single comment
7178 Table-cell after a comment-only-empty-line
7195 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7197 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7203 Build table with {{!}}
7205 {{{!}} class="wikitable"
7208 {{!}}- style="color:red;"
7209 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7212 <table class="wikitable">
7218 <tr style="color:red;">
7220 <td style="color:red;">second data
7226 Build table with pipe as data
7228 {| class="wikitable"
7231 |- style="color:red;"
7232 |data|| style="color:red;" |second data
7234 | style="color:red;" |data with | || style="color:red;" | second data with |
7236 ||data with | |||second data with |
7239 <table class="wikitable">
7245 <tr style="color:red;">
7247 <td style="color:red;">second data
7250 <td style="color:red;">data with |</td>
7251 <td style="color:red;">second data with |
7254 <td>data with |</td>
7255 <td>second data with |
7261 Build table with wikilink
7263 {| class="wikitable"
7264 !header||second header
7265 |- style="color:red;"
7266 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7268 |data||second data [[Main Page|link|text with pipe]]
7271 <table class="wikitable">
7276 <tr style="color:red;">
7277 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7278 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7282 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7287 # The expected HTML structure in this test is debatable. The PHP parser does
7288 # not parse this kind of table at all. The main focus for Parsoid is on
7289 # round-tripping, so this output is ok for now. TODO: revisit!
7291 Wikitext table with html-syntax row
7301 <td>foo</td></tr></tbody></table>
7305 Fostered content in tables: Plain text
7307 parsoid=wt2html,html2html
7325 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7328 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7332 Fostered content in tables: Lists
7334 parsoid=wt2html,html2html
7347 <ul><li>a</li></ul><table>
7352 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7353 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7355 </tr></tbody></table>
7359 Template generated table cell with attributes
7363 {{table_attribs_4}} ||a||b
7369 <td style="background-color:#DC241f;" width="10px"></td>
7372 </td></tr></tbody></table>
7375 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7376 <td style="background-color:#DC241f;" width="10px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"table_attribs_4","href":"./Template:Table_attribs_4"},"params":{},"i":0}}," ||a||b"]}'></td><td about="#mwt1">a</td><td about="#mwt1">b</td></tr>
7380 Parsoid: Round-trip tables directly followed by content (T53219)
7382 parsoid=wt2html,wt2wt
7395 </td></tr></tbody></table><p> bar
7399 </td></tr></tbody></table><p><b>quux</b>
7404 Parsoid: Default to a newline after tables in new content (T53219)
7409 <tr><td>foo</td></tr></tbody></table> bar
7411 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7416 <nowiki> </nowiki>bar
7424 Parsoid: Row-syntax table headings followed by comment & table cells
7426 parsoid=wt2html,wt2wt
7430 <!-- foo --> ||baz||quux
7444 <tbody><tr><th>foo</th><th>bar
7445 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7450 Parsoid: Recover better from broken table attributes
7464 </td></tr></tbody></table>
7469 <p>foo</p></td></tr>
7474 Tables: Digest broken attributes on table and tr tag
7485 <tr class='mw-empty-elt'></tr>
7486 <tr class='mw-empty-elt'></tr>
7491 Table with missing opening <tr> tag
7493 parsoid=wt2html,wt2wt
7501 <tbody><tr><td>foo</td>
7506 # T137406: Whitespace in the HTML
7508 1. Generate correct wikitext for tables with thead/tbody/tfoot
7513 <caption>Test</caption>
7575 </td></tr></tbody></table>
7578 # T137406: No whitespace in the HTML
7580 2. Generate correct wikitext for tables with thead/tbody/tfoot
7584 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7594 Wikitext tables can be nested inside HTML tables
7598 <table data-parsoid='{"stx":"html"}'>
7601 <tr><td>foo</td></tr>
7619 Plain link, capitalized
7623 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7628 Plain link, uncapitalized
7632 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7639 [[Main Page|The Main Page]]
7641 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7646 Piped link with comment in link text
7648 [[Main Page|The Main<!--front--> Page]]
7650 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7655 Piped link with multiple pipe characters in link text
7657 [[Main Page||The|Main|Page|]]
7659 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7662 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7666 Piped link with no link text
7668 [[Thomas Bek (bishop of St David's)|]]
7670 <p>[[Thomas Bek (bishop of St David's)|]]
7673 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7677 Piped link with empty link text
7679 [[Main Page|<nowiki/>]] - empty nowiki
7680 [[Main Page| ]] - empty space
7681 [[Main Page| ]] - empty non breaking space
7683 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7684 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7685 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7688 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7689 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7690 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></a> - empty non breaking space</p>
7698 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7703 Broken link with fragment
7705 [[Zigzagzogzagzig#zug]]
7707 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7712 Special page link with fragment
7714 [[Special:Version#anchor]]
7716 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7721 Nonexistent special page link with fragment
7723 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7725 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7732 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7734 <p>xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a>, xxx<a href="/wiki/Main_Page" title="Main Page">Main Page</a>, Xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a> XXX<a href="/wiki/Main_Page" title="Main Page">main Page</a>, XXX<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7741 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7743 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>!!!
7754 T45661: Piped links with identical prefixes
7756 [[prefixed article|prefixed articles with spaces]]
7758 [[prefixed article|prefixed articlesaoeu]]
7760 [[Main Page|Main Page test]]
7762 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7763 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7764 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7770 Link with HTML entity in suffix / tail
7772 [[Main Page]]", [[Main Page]]a
7774 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7777 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&quot;","srcContent":"\""}'>"</span>, <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&#97;","srcContent":"a"}'>a</span></p>
7781 Link with 3 brackets
7792 Link with 4 brackets
7796 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7801 Piped link with 3 brackets
7803 [[[main page|the main page]]]
7805 <p>[[[main page|the main page]]]
7810 Piped link with extlink-like text
7813 [[Main Page|This is a [bar]]]
7816 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7817 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7818 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7821 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7822 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7823 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7827 Link with multiple pipes
7829 [[Main Page|The|Main|Page]]
7831 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7836 Anchor containing a #. (T65430)
7838 wgFragmentMode=[ 'html5', 'legacy' ]
7840 [[Main Page#And#Link]]
7842 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7845 <p><a rel="mw:WikiLink" href="./Main_Page#And#Link" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#And#Link"},"sa":{"href":"Main Page#And#Link"}}'>Main Page#And#Link</a></p>
7851 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7853 <p><a href="/index.php?title=Talk:Parser_testing&action=edit&redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a>
7858 Link with space in namespace
7860 [[User talk:Foo bar]]
7862 <p><a href="/index.php?title=User_talk:Foo_bar&action=edit&redlink=1" class="new" title="User talk:Foo bar (page does not exist)">User talk:Foo bar</a>
7867 MemoryAlpha:AlphaTest
7869 This is an article in the MemoryAlpha namespace
7870 (which shadows the memoryalpha interwiki link).
7874 Namespace takes precedence over interwiki link (T53680)
7876 [[MemoryAlpha:AlphaTest]]
7878 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7882 # The previous test doesn't work correctly in html2*, due to not recognizing the
7883 # link as an internal one. This one checks for the correct behavior.
7885 Link to namespace preferred over interwiki with correct rel attribute
7887 parsoid=html2wt,html2html
7889 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7891 [[MemoryAlpha:AlphaTest]]
7895 Piped link to namespace
7897 [[Meta:Disclaimers|The disclaimers]]
7899 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7906 [[Usually caused by a typo (oops}]]
7908 <p>[[Usually caused by a typo (oops}]]
7915 Just a test of an article title containing a percent.
7919 Link containing % (not as a hex sequence)
7922 [[7% Solution|7%25 Solution]]
7924 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7925 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7928 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7929 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7932 # note that the parsoid HTML is identical to the previous test output,
7933 # so the previous test ensures that the html2wt mode will generate the
7934 # "not as a hex sequence" wikitext.
7936 Link containing % as a single hex sequence interpreted to char
7938 parsoid=wt2wt,wt2html,html2html
7941 [[7%25 Solution|7%25 Solution]]
7943 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7944 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7947 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7948 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7952 Link containing % as a double hex sequence interpreted to hex sequence
7956 <p>[[7%2525 Solution]]
7960 ## Example for such a section: == < ==
7962 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7964 wgFragmentMode=[ 'html5', 'legacy' ]
7966 [[%23%3c]][[%23%3e]]
7968 <p><a href="#<">#<</a><a href="#>">#></a>
7971 <p><a rel="mw:WikiLink" href="./Main_Page#<" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#<"},"sa":{"href":"%23%3c"}}'>#<</a><a rel="mw:WikiLink" href="./Main_Page#>" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#>"},"sa":{"href":"%23%3e"}}'>#></a></p>
7974 ## Example for such a section: == < ==
7976 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7978 wgFragmentMode=[ 'legacy' ]
7980 [[%23%3c]][[%23%3e]]
7982 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7987 Link containing "<#" and ">#" as a hex sequences
7989 [[%3c%23]][[%3e%23]]
7991 <p>[[%3c%23]][[%3e%23]]
7996 Link containing an equals sign
7998 [[Special:BookSources/isbn=4-00-026157-6]]
8000 <p><a href="/wiki/Special:BookSources/isbn%3D4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a>
8003 <p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
8009 Just a test of an article title containing a tilde.
8012 # note that links containing signatures, like [[Foo~~~~]], are
8013 # massaged by the pre-save transform (PST) and so the tildes are never
8014 # seen by the parser.
8016 Link containing a tilde
8020 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8023 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8027 Link containing double-single-quotes '' (T6598)
8029 [[Lista d''e paise d''o munno]]
8031 <p><a href="/index.php?title=Lista_d%27%27e_paise_d%27%27o_munno&action=edit&redlink=1" class="new" title="Lista d''e paise d''o munno (page does not exist)">Lista d''e paise d''o munno</a>
8034 <p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno" title="Lista d''e paise d''o munno">Lista d''e paise d''o munno</a></p>
8038 Link containing double quotes and spaces
8042 <p><a href="/index.php?title=Cool_%22Gator%22&action=edit&redlink=1" class="new" title="Cool "Gator" (page does not exist)">Cool "Gator"</a>
8045 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8049 File containing double quotes and spaces
8051 [[File:Cool "Gator".png]]
8053 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Cool_%22Gator%22.png" data-parsoid='{"a":{"href":"./File:Cool_%22Gator%22.png"},"sa":{"href":"File:Cool \"Gator\".png"}}'><img resource='./File:Cool_"Gator".png' src="./Special:FilePath/Cool_%22Gator%22.png" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Cool_\"Gator\".png","height":"220","width":"220","src":"./Special:FilePath/Cool_%22Gator%22.png"},"sa":{"resource":"File:Cool \"Gator\".png","src":"./Special:FilePath/Cool_\"Gator\".png"}}'/></a></figure-inline></p>
8057 Redirect containing double quotes and spaces
8059 #REDIRECT [[Cool "Gator"]]
8061 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8065 Link containing double-single-quotes '' in text (T6598 sanity check)
8067 Some [[Link|pretty ''italics'' and stuff]]!
8069 <p>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!
8072 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8076 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8078 ''Some [[Link|pretty ''italics'' and stuff]]!''
8080 <p><i>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!</i>
8085 Link with double quotes in title part (literal) and alternate part (interpreted)
8087 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8091 [[''Pentecoste''|Pentecoste]]
8093 [[''Pentecoste''|''Pentecoste'']]
8095 <p><a href="/index.php?title=Special:Upload&wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko ''Pentecoste''.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a>
8096 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a>
8097 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a>
8098 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)"><i>Pentecoste</i></a>
8101 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Denys_Savchenko_''Pentecoste''.jpg"><img resource="./File:Denys_Savchenko_''Pentecoste''.jpg" src="./Special:FilePath/Denys_Savchenko_''Pentecoste''.jpg" height="220" width="220"/></a></figure-inline></p>
8102 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8103 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8104 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8108 Broken image links with HTML captions (T41700)
8110 [[File:Nonexistent|<script></script>]]
8111 [[File:Nonexistent|100x100px|<script></script>]]
8112 [[File:Nonexistent|<]]
8113 [[File:Nonexistent|a<i>b</i>c]]
8115 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8116 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8117 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8118 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8121 <p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8122 <figure-inline typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"100","width":"100"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8123 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[107,111,null,null]}'>&lt;</span>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
8124 <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"a<i data-parsoid='{\"stx\":\"html\",\"dsr\":[134,142,3,4]}'>b</i>c"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline></p>
8130 [[http://www.example.com]]
8132 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8135 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8139 Plain link to URL with link text
8141 [[http://www.example.com Link text]]
8143 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8148 Plain link to protocol-relative URL
8150 [[//www.example.com]]
8152 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8155 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8159 Plain link to protocol-relative URL with link text
8161 [[//www.example.com Link text]]
8163 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8168 Plain link to page with question mark in title
8174 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8175 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8179 # I'm fairly sure the expected result here is wrong.
8180 # We want these to be URL links, not pseudo-pages with URLs for titles....
8181 # However the current output is also pretty screwy.
8184 # I'm changing it to match the current output--it arguably makes more
8185 # sense in the light of the test above. Old expected result was:
8186 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8188 # But I think this test is bordering on "garbage in, garbage out" anyway.
8193 Piped link to URL: [[http://www.example.com|an example URL]]
8195 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8198 <p>Piped link to URL: [<a rel="mw:ExtLink" class="external text" href="http://www.example.com%7Can" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
8202 Plain link in template argument
8206 {{echo|[http://www.example.com |123]}}
8208 {{echo|[[http://www.example.com |123]]}}
8210 {{echo|[[http://www.example.com |123]}}
8212 {{echo|[http://www.example.com |123]]}}
8214 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8215 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8216 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8217 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8220 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8222 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[http://www.example.com |123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external text" href="http://www.example.com">|123</a>]</p>
8224 <p>{{echo|[<a rel="mw:ExtLink" class="external text" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
8226 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8230 T2002: [[page|http://url/]] should link to page, not http://url/
8232 [[Main Page|http://url/]]
8234 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8237 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8240 # Parsoid does not mark self-links, by design.
8242 T2337: Escaped self-links should be bold
8246 [[Bug462]] [[Bug462]]
8248 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8251 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8255 Self-link to section should not be bold
8259 [[Main Page#section]]
8261 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8272 Self-link to numeric title
8278 <p><a class="mw-selflink selflink">0</a>
8283 Link to numeric-equivalent title
8289 <p><a href="/wiki/00" title="00">00</a>
8294 <nowiki> inside a link
8296 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8298 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8303 Non-breaking spaces in title
8305 [[ Main Page ]]
8307 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8311 # Add new article for the test below so that it doesn't red-link
8319 Multiple spaces in titles should normalize to a single underscore
8321 parsoid=wt2html,wt2wt
8327 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8328 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8329 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8332 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8333 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8334 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8339 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8345 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8350 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8356 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8361 Internal link with en linktrail: no apostrophes (T29473)
8367 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8372 Internal link with ca linktrail with apostrophes (T29473)
8378 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8383 Internal link with kaa linktrail with apostrophes (T29473)
8389 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8394 Link with multiple ":" in a subpage-supporting namespace (T65636)
8396 [[User:Foo/Test/63636:Bar|Test]]
8398 <p><a href="/index.php?title=User:Foo/Test/63636:Bar&action=edit&redlink=1" class="new" title="User:Foo/Test/63636:Bar (page does not exist)">Test</a>
8401 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8404 ## Mainly a sanity check for Parsoid
8406 Handle title parsing for subpages
8426 Link to a subpage from a namespace other than main
8433 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8436 <p><a rel="mw:WikiLink" href="./User:Test/123" title="User:Test/123" data-parsoid='{"stx":"simple","a":{"href":"./User:Test/123"},"sa":{"href":"/123"}}'>/123</a></p>
8440 Ensure that transclusion titles are not url-decoded
8442 subpage title=[[Test]]
8445 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8447 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8450 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8454 Purely hash wikilink
8456 title=[[User:Test/123]]
8461 <p><a href="#a">b</a>
8464 <p><a rel="mw:WikiLink" href="./User:Test/123#a" data-parsoid='{"stx":"piped","a":{"href":"./User:Test/123#a"},"sa":{"href":"#a"}}'>b</a></p>
8468 Serialization of purely hash wikilink
8470 title=[[User:Test/123]]
8474 <p><a href="#a">[[</a></p>
8476 [[#a|<nowiki>[[</nowiki>]]
8478 <p><a href="#a">[[</a>
8483 1. Interaction of linktrail and template encapsulation
8487 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo]]"}},"i":0}},"l"]}'>Fool</a></p>
8491 2. Interaction of linktrail and template encapsulation
8495 {{echo|Some [[Fool]]}}s
8497 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]"}},"i":0}},"s"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some </span><a rel="mw:WikiLink" href="./Fool" title="Fool" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a></p>
8501 3. Interaction of linktrail and template encapsulation
8505 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8507 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]s are '''bold and foolish'''"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some <a rel="mw:WikiLink" href="./Fool" title="Fool" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a> are <b>bold and foolish</b></p>
8517 Internal link with is link prefix
8521 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8523 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8534 Internal link with is link trail and link prefix
8538 [[mótmælendatrú|xxx]]ar
8540 mótmælenda[[söfnuður]]
8541 mótmælenda[[söfnuður|söfnuðir]]
8542 mótmælenda[[söfnuður|söfnuðir]]xxx
8544 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8545 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8546 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8547 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8548 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8553 Parsoid link trail escaping
8555 parsoid=html2wt,html2html
8557 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8563 Parsoid link prefix escaping
8566 parsoid=html2wt,html2html
8568 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8570 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8574 Parsoid link bracket escaping
8576 parsoid=html2wt,html2html
8578 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8579 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8580 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8581 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8582 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8583 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8591 [[[<nowiki/>[[Test]]]]]
8595 [[[[[<nowiki/>[[Test]]]]]]]
8599 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8607 [http://wp.org ''foo'']
8609 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8610 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8611 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8612 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8617 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8619 [[Foo|{{echo|a}} b {{echo|c}}]]
8621 <p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span> b <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c"}},"i":0}}]}'>c</span></a></p>
8625 Link with angle bracket after anchor
8627 wgFragmentMode=[ 'html5', 'legacy' ]
8631 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8634 <p><a rel="mw:WikiLink" href="./Foo#<bar>" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#<bar>"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
8638 Link with angle bracket after anchor (legacy)
8640 wgFragmentMode=[ 'legacy' ]
8644 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8649 ### Interwiki links (see maintenance/interwiki.sql)
8653 Inline interwiki link
8655 parsoid=wt2html,wt2wt,html2html
8657 [[MeatBall:SoftSecurity]]
8659 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8662 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8666 Inline interwiki link with empty title (T4372)
8668 parsoid=wt2html,wt2wt,html2html
8672 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8675 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8678 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8680 Interwiki link encoding conversion (T3636)
8682 parsoid=wt2html,wt2wt
8684 *[[Wikipedia:ro:Olteniţa]]
8685 *[[Wikipedia:ro:Olteniţa]]
8687 <ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8688 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li></ul>
8692 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8693 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8697 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8698 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8703 Interwiki link with fragment (T4130)
8705 [[MeatBall:SoftSecurity#foo]]
8707 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8712 Link scenarios with escaped fragments
8714 wgFragmentMode=[ 'html5', 'legacy' ]
8717 [[Foo#Is this great?]]
8718 [[meatball:Foo#Is this great?]]
8720 <p><a href="#Is_this_great?">#Is this great?</a>
8721 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8722 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8725 <p><a rel="mw:WikiLink" href="./Main_Page#Is_this_great?" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Is_this_great?"},"sa":{"href":"#Is this great?"}}'>#Is this great?</a>
8726 <a rel="mw:WikiLink" href="./Foo#Is_this_great?" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#Is_this_great?"},"sa":{"href":"Foo#Is this great?"}}'>Foo#Is this great?</a>
8727 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
8731 Link scenarios with escaped fragments (legacy)
8733 wgFragmentMode=[ 'legacy' ]
8736 [[Foo#Is this great?]]
8737 [[meatball:Foo#Is this great?]]
8739 <p><a href="#Is_this_great.3F">#Is this great?</a>
8740 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8741 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8745 # Ideally the wikipedia: prefix here should be proto-relative too
8746 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8747 # define the 'en' prefix, and originally the test used 'wikipedia',
8748 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8751 Different interwiki prefixes mapping to the same URL
8759 [[:wikipedia:Foo|Foo]]
8761 [[wikipedia:en:Foo]]
8763 [[:wikipedia:en:Foo]]
8767 <p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">en:Foo</a></p>
8769 <p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">Foo</a></p>
8771 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">wikipedia:Foo</a></p>
8773 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">Foo</a></p>
8775 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8777 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8779 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":" wikiPEdia :Foo"},"isIW":true}' title="wikipedia:Foo"> wikiPEdia :Foo</a></p>
8783 Interwiki links that cannot be represented in wiki syntax
8786 [[meatball:ok#foo|ok with fragment]]
8787 [[meatball:ok_as_well?|ok ending with ? mark]]
8788 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8789 [http://de.wikipedia.org/wiki/#foo is just fragment]
8792 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8793 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8794 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" class="extiw" title="meatball:ok as well?">ok ending with ? mark</a>
8795 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8796 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8799 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8800 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8801 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
8802 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8803 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8807 Interwiki links: trail
8809 [[wikipedia:Foo|Ba]]r
8811 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8814 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}' title="wikipedia:Foo">Bar</a></p>
8818 Local interwiki link
8820 parsoid=wt2html,wt2wt,html2html
8822 [[local:Template:Foo]]
8824 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8827 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8830 # Parsoid does not mark self-links, by design.
8832 Local interwiki link: self-link to current page
8835 parsoid=wt2html,wt2wt,html2html
8839 <p><a class="mw-selflink selflink">local:Main Page</a>
8842 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8846 Local interwiki link: prefix only (T66167)
8848 parsoid=wt2html,wt2wt,html2html
8852 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8855 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8859 Local interwiki link: with additional interwiki prefix (T63357)
8861 parsoid=wt2html,wt2wt,html2html
8863 [[local:meatball:Hello]]
8865 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8868 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8872 Multiple local interwiki link prefixes
8874 [[local:local:local:local:mi:local:Foo]]
8876 parsoid=wt2html,wt2wt,html2html
8878 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8881 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8885 ### Interlanguage links
8886 ### Language links (so that searching for '### language' matches..)
8898 <p>Blah blah blah</p>
8899 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8902 ## parsoid html2wt will lose the space variations
8904 Interlanguage link with spacing
8906 parsoid=wt2html,wt2wt,html2html
8914 <p>Blah blah blah</p>
8915 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8919 Double interlanguage link
8928 <p>Blah blah blah</p>
8929 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8930 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8933 ## parsoid html2wt will lose the space variations
8935 Interlanguage link variations
8937 parsoid=wt2html,wt2wt,html2html
8947 <p>Blah blah blah</p>
8948 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8949 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8950 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8954 Escaping of interlanguage links (T129218, T156308)
8958 [[ : zh : Chinese ]]
8961 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8962 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8966 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8967 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8971 Multiple colons escaping interlanguage links
8979 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8984 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8986 [[:::es:Spanish]]</p>
8989 ## parsoid html2wt will normalize the space to _
8991 Space and question mark encoding in interlanguage links (T95473)
8993 parsoid=wt2html,wt2wt,html2html
9001 <p>Blah blah blah</p>
9002 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9006 Interlanguage link, with prefix links
9016 <p>Blah blah blah</p>
9017 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9021 Double interlanguage link, with prefix links (T10897)
9032 <p>Blah blah blah</p>
9033 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9034 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9038 "Extra" interlanguage links (T34189 / gerrit 111390)
9046 <p>Blah blah blah</p>
9047 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9050 ## PHP parser tests script needs an update
9051 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9053 Language links render as inline links if $wgInterwikiMagic=false
9055 wgInterwikiMagic=false
9056 parsoid=wt2html,wt2wt,html2html
9061 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9064 ## PHP parser tests script needs an update
9065 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9067 Language links render as inline links in the Talk namespace
9070 parsoid=wt2html,wt2wt,html2html
9075 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9079 Parsoid-specific test: Wikilinks with should RT properly
9085 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9090 Parsoid T55221: Wikilinks should be properly entity-escaped
9092 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9094 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9095 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9097 He&nbsp;llo [[Foo|He&nbsp;llo]]
9099 He&nbsp;llo He&nbsp;llo
9101 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9102 </p><p>He&nbsp;llo He&nbsp;llo
9106 # html2wt will fail because of title normalization without data-parsoid
9108 Parsoid: handle constructor well
9110 parsoid=wt2html,wt2wt
9116 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9117 </p><p><a href="/index.php?title=Constructor:foo&action=edit&redlink=1" class="new" title="Constructor:foo (page does not exist)">constructor:foo</a>
9120 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9122 <p><a rel="mw:WikiLink" href="./Constructor:foo" title="Constructor:foo" data-parsoid='{"stx":"simple","a":{"href":"./Constructor:foo"},"sa":{"href":"constructor:foo"}}'>constructor:foo</a></p>
9126 Template parameter named "constructor"
9128 {{echo| constructor = |hi}}
9130 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"constructor","named":true,"spc":[" "," ",""," "]},{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"},"constructor":{"wt":""}},"i":0}}]}'>hi</p>
9139 # Note that `ko` isn't a known interlanguage prefix
9141 Parsoid: recognize interlanguage links without a target page
9151 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9153 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9156 # Note that `ko` isn't a known interwiki prefix
9158 Parsoid: recognize interwiki links without a target page
9160 parsoid=wt2html,wt2wt,html2html
9166 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9167 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9170 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9171 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9175 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9179 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9182 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9186 Interlanguage link with preceding local interwiki link (T70085)
9188 parsoid=wt2html,wt2wt,html2html
9191 [[local:es:Spanish]]
9194 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9198 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9202 Looks like an interlanguage link, but is actually a local interwiki
9204 parsoid=wt2html,wt2wt,html2html
9210 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9214 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9218 ### Redirects, Parsoid-only
9222 1. Simple redirect to page
9224 #REDIRECT [[Main Page]]
9226 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9230 2. Other redirect variants
9232 #REDIRECT [[Main_Page]]
9234 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9237 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9238 # This tests the Parsoid bail-out code.
9240 3. Other redirect variants
9244 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9246 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9250 4. Redirect to a templated destination
9252 #REDIRECT [[{{echo|Foo}}bar]]
9254 <link about="#mwt2" typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-parsoid='{"a":{"href":"./Foobar"},"sa":{"href":"{{echo|Foo}}bar"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,24,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span>bar"}]]}'/>
9260 parsoid=wt2html,wt2wt
9265 <li>REDIRECT [[]]</li></ol>
9269 Optional colon in #REDIRECT
9271 # the colon is archaic syntax. we support it for wt2html, but we
9272 # don't care that it roundtrips back to the modern syntax.
9273 parsoid=wt2html,html2html
9275 #REDIRECT:[[Main Page]]
9277 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9281 Whitespace in #REDIRECT with optional colon
9283 # the colon and gratuitous whitespace is archaic syntax. we support
9284 # it for wt2html, but we don't care that it roundtrips back to the
9285 # modern syntax (without extra whitespace)
9286 parsoid=wt2html,html2html
9293 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9297 Piped link in #REDIRECT
9299 # content after piped link is ignored. we support this syntax,
9300 # but don't care that the piped link is lost when we roundtrip this.
9303 #REDIRECT [[Main Page|bar]]
9305 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9309 Redirect to category (T104502)
9311 parsoid=wt2html,wt2wt
9313 #REDIRECT [[Category:Foo]]
9315 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9319 Redirect to category with URL encoding (T104502)
9323 #REDIRECT [[Category%3AFoo]]
9325 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9329 Redirect to category page
9331 #REDIRECT [[:Category:Foo]]
9333 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9337 Redirect to image page (1)
9339 #REDIRECT [[File:Wiki.png]]
9341 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9345 Redirect to image page (2)
9347 #REDIRECT [[Image:Wiki.png]]
9349 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9352 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9353 # Next test confirms this.
9355 Redirect to language (1) (T104918)
9357 parsoid=wt2html,wt2wt,html2html
9359 #REDIRECT [[en:File:Wiki.png]]
9361 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9365 Redirect to language (2) (T104918)
9367 #REDIRECT [[:en:File:Wiki.png]]
9369 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9373 Redirect to interwiki (T104918)
9375 #REDIRECT [[meatball:File:Wiki.png]]
9377 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9381 Non-English #REDIRECT
9385 #TILVÍSUN [[Main Page]]
9387 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9391 Redirect syntax under text isn't considered a redirect
9395 #redirect [[Main Page]]
9398 <ol data-parsoid='{}'><li data-parsoid='{}'>redirect <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'>Main Page</a></li></ol>
9406 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9413 Redirect followed by block on the same line
9417 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9419 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9423 Redirect followed by a newline
9425 #REDIRECT [[Main Page]]
9428 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9433 Redirect followed by multiple newlines
9435 #REDIRECT [[Main Page]]
9440 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9447 Drop duplicate redirects
9451 <link rel="mw:PageProp/redirect" href="./Foo"/>
9452 <link rel="mw:PageProp/redirect" href="./Bar"/>
9453 <link rel="mw:PageProp/redirect" href="./Baz"/>
9472 Broken br tag sanitization
9480 # TODO: Fix html2html mode (T53055)!
9482 Parsoid: Broken br tag recognition
9496 Incorrecly removing closing slashes from correctly formed XHTML
9498 <br style="clear:both;" />
9500 <p><br style="clear:both;" />
9505 Failing to transform badly formed HTML into correct XHTML
9507 <br style="clear: left;">
9508 <br style="clear: right;">
9509 <br style="clear: both;">
9511 <p><br style="clear: left;" />
9512 <br style="clear: right;" />
9513 <br style="clear: both;" />
9517 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9518 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9520 Handling html with a div self-closing tag
9529 <p><div title />
9533 <p><div title=bar />
9534 <div title=bar/>
9536 <div title="bar/"></div>
9540 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9541 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9542 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9543 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9544 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9545 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9549 Handling html with a br self-closing tag
9576 Horizontal ruler (should it add that extra space?)
9585 foo </p><hr /><p> bar
9590 Horizontal ruler -- 4+ dashes render hr
9599 Horizontal ruler -- eats additional dashes on the same line
9608 Horizontal ruler -- does not collapse dashes on consecutive lines
9619 Horizontal ruler -- <4 dashes render as plain text
9628 Horizontal ruler -- Supports content following dashes on same line
9640 ### Block-level elements
9649 <ul><li>Common list</li>
9651 <li>item 3</li></ul>
9662 <ol><li>Numbered list</li>
9664 <li>item 3</li></ol>
9668 # the switch from level 3 to ordered should not introduce a newline between
9679 ***#Number on level 4
9681 **#Number on level 3
9682 **#Number on level 3
9686 #**Level 3, but ordered
9689 <ol><li>with numbers</li></ol>
9690 <ul><li>and bullets</li></ul>
9691 <ol><li>and numbers</li></ol></li>
9693 <ul><li>bullet level 2
9694 <ul><li>bullet level 3
9695 <ol><li>Number on level 4</li></ol></li></ul></li>
9697 <ol><li>Number on level 3</li>
9698 <li>Number on level 3</li></ol></li></ul>
9699 <ol><li>number level 2</li></ol></li>
9701 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9702 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9707 1. Nested mixed wikitext and html list
9710 *<ul><li>ho</li></ul>
9715 <li><ul><li>ho</li></ul></li>
9717 <ul><li>ho</li></ul></li></ul>
9721 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9723 <ul><li>ho</li></ul></li></ul>
9727 2. Nested mixed wikitext and html list (incompatible)
9730 :{{echo|<li>ho</li>}}
9733 <dd><li>ho</li></dd></dl>
9737 <dd><li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>ho</li>"}},"i":0}}]}'>ho</li></dd></dl>
9747 <ul><li>bar</li></ul></li></ul>
9757 <ul><li><ul><li>foo</li></ul></li>
9763 Nested lists 3 (first element empty)
9769 <ul><li>bar</li></ul></li></ul>
9774 Nested lists 4 (first element empty)
9779 <ul><li><ul><li></li></ul></li>
9785 Nested lists 5 (both elements empty)
9790 <ul><li><ul><li></li></ul></li>
9796 Nested lists 6 (both elements empty)
9802 <ul><li></li></ul></li></ul>
9807 Nested lists 7 (skip initial nesting levels)
9811 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9816 Nested lists 8 (multiple nesting transitions)
9824 <ul><li><ul><li>bar</li></ul></li>
9825 <li>baz</li></ul></li>
9831 Nested lists 9 (extension interaction)
9837 <ul><li data-parsoid='{}'><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9841 1. Lists with start-of-line-transparent tokens before bullets: Comments
9854 Nested lists 10 (list and span siblings: wt2wt regression)
9859 <ul><li>a <span>x</span>
9860 <ul><li>b <span>y</span></li></ul></li></ul>
9864 2. Lists with start-of-line-transparent tokens before bullets: Template close
9869 <ul><li>foo bar</li>
9875 List items are not parsed correctly following a <pre> block (T2785)
9881 <ul><li><pre>foo</pre></li>
9882 <li><pre>bar</pre></li>
9886 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9887 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9891 # FIXME: Might benefit from a html/parsoid since this has a template
9893 List items from template
9904 *notSOL{{inner list}}
9908 <li>item 2</li></ul>
9911 <li>item 2</li></ul>
9915 <li>item 2</li></ul>
9920 List interrupted by empty line or heading
9928 <ul><li>foo</li></ul>
9929 <ul><li><ul><li>bar</li></ul></li></ul>
9930 <h2><span class="mw-headline" id="A_heading">A heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
9931 <ul><li>Another list item</li></ul>
9936 Multiple list tags generated by templates
9954 <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
9955 </li><li about="#mwt1">b
9956 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9960 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9963 <!--This line will NOT split the list-->
9965 <!--This line will NOT split the list either-->
9967 <!--foo--> <!----> <!--This line NOT split the list either-->
9978 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9981 <!--This line will NOT split the list-->
9983 <!--This line will NOT split the list either-->
9985 <!--foo--> <!----> <!--This line NOT split the list
9996 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
9997 # That pass could possibly be removed.
9999 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10001 parsoid=wt2html,wt2wt
10005 *{{echo|<li>templated li-hack}}
10006 *<!--foo--><li> unsupported li-hack with preceding comments
10009 <li><li>not a li-hack
10014 <li class="mw-empty-elt"></li><li>li-hack</li>
10015 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10016 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10018 <li class="mw-empty-elt"></li><li>not a li-hack
10023 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10024 <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>
10025 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10027 <ul data-parsoid='{"stx":"html"}'>
10028 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10035 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10064 Parsoid: Test of whitespace serialization with Templated bullets
10071 <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>
10075 # ------------------------------------------------------------------------
10076 # The next set of tests are about Parsoid's ability to handle badly nested
10077 # tags (parse, minimize scope of fixup, and roundtrip back)
10078 # ------------------------------------------------------------------------
10080 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10081 # Parsoid's list handling is more aware of block structure.
10083 Unbalanced closing block tags break a list
10090 <ul><li>a</li></ul></div><div>
10102 Unbalanced closing non-block tags don't break a list
10110 <ul><li>a<span></span></li>
10115 <li>a<span></span></li>
10121 # Parsoid does some post-dom-building cleanup
10122 # which is why its output differs from Remex.
10124 Unclosed formatting tags that straddle lists are closed and reopened
10126 parsoid=wt2html,wt2wt,html2html
10131 <ol><li><s> a</s></li><s>
10132 </s><li><s>b </s></li></ol>
10134 <ol><li><s> a</s></li>
10135 <li><s>b </s></li></ol>
10138 # Output is ugly because of all the misnested tag fixups.
10139 # Remex is wrapping p-tags around empty elements.
10140 # Parsoid has special-case handling of this pattern of
10141 # wrapping lists in formatting tags.
10142 # FIXME: Should we remove this code from Parsoid? Or add
10143 # special support in Remex? If the latter, maybe just wait
10144 # for Parsoid to become the default parser.
10147 1. List embedded in a formatting tag
10154 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10164 # Output is ugly because of all the misnested tag fixups
10165 # Remex is wrapping p-tags around empty elements.
10166 # Parsoid has code that strips useless p-tags.
10168 2. List embedded in a formatting tag in a misnested way
10175 </small></p><small></small><ul><small><li>a</li>
10176 </small><li><small>b</small></li></ul>
10182 <li><small>b</small></li>
10190 # Note that the current date is hard-coded as
10191 # 1970-01-01T00:02:03Z (a Thursday)
10192 # when running parser tests. The timezone is also fixed to GMT, so
10193 # local date will be identical to current date.
10196 Magic Word: {{CURRENTDAY}}
10205 Magic Word: {{CURRENTDAY2}}
10214 Magic Word: {{CURRENTDAYNAME}}
10223 Magic Word: {{CURRENTDOW}}
10232 Magic Word: {{CURRENTMONTH}}
10241 Magic Word: {{CURRENTMONTH1}}
10250 Magic Word: {{CURRENTMONTHABBREV}}
10252 {{CURRENTMONTHABBREV}}
10259 Magic Word: {{CURRENTMONTHNAME}}
10261 {{CURRENTMONTHNAME}}
10268 Magic Word: {{CURRENTMONTHNAMEGEN}}
10270 {{CURRENTMONTHNAMEGEN}}
10277 Magic Word: {{CURRENTTIME}}
10286 Magic Word: {{CURRENTHOUR}}
10295 Magic Word: {{CURRENTWEEK}} (T6594)
10304 Magic Word: {{CURRENTYEAR}}
10313 Magic Word: {{CURRENTTIMESTAMP}}
10315 {{CURRENTTIMESTAMP}}
10322 Magic Words LOCAL (UTC)
10326 *{{LOCALMONTHNAME}}
10327 *{{LOCALMONTHNAMEGEN}}
10328 *{{LOCALMONTHABBREV}}
10337 *{{LOCALTIMESTAMP}}
10352 <li>19700101000203</li></ul>
10357 Magic Word: {{FULLPAGENAME}}
10359 title=[[User:Ævar Arnfjörð Bjarmason]]
10360 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10364 <p>User:Ævar Arnfjörð Bjarmason
10369 Magic Word: {{FULLPAGENAMEE}}
10371 title=[[User:Ævar Arnfjörð Bjarmason]]
10372 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10376 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10381 Magic Word: {{TALKSPACE}}
10383 title=[[User:Ævar Arnfjörð Bjarmason]]
10384 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10393 Magic Word: {{TALKSPACE}}, same namespace
10395 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10396 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10405 Magic Word: {{TALKSPACE}}, main namespace
10407 title=[[Parser Test]]
10408 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10417 Magic Word: {{TALKSPACEE}}
10419 title=[[User:Ævar Arnfjörð Bjarmason]]
10420 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10429 Magic Word: {{SUBJECTSPACE}}
10431 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10432 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10441 Magic Word: {{SUBJECTSPACE}}, same namespace
10443 title=[[User:Ævar Arnfjörð Bjarmason]]
10444 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10453 Magic Word: {{SUBJECTSPACE}}, main namespace
10455 title=[[Parser Test]]
10456 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10464 Magic Word: {{SUBJECTSPACEE}}
10466 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10467 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10476 Magic Word: {{NAMESPACE}}
10478 title=[[User:Ævar Arnfjörð Bjarmason]]
10479 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10488 Magic Word: {{NAMESPACEE}}
10490 title=[[User:Ævar Arnfjörð Bjarmason]]
10491 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10500 Magic Word: {{NAMESPACENUMBER}}
10502 title=[[User:Ævar Arnfjörð Bjarmason]]
10503 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10505 {{NAMESPACENUMBER}}
10512 Magic Word: {{SUBPAGENAME}}
10514 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10515 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10524 Magic Word: {{SUBPAGENAMEE}}
10526 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10527 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10536 Magic Word: {{ROOTPAGENAME}}
10538 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10539 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10543 <p>Ævar Arnfjörð Bjarmason
10548 Magic Word: {{ROOTPAGENAMEE}}
10550 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10551 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10555 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10560 Magic Word: {{BASEPAGENAME}}
10562 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10563 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10567 <p>Ævar Arnfjörð Bjarmason
10572 Magic Word: {{BASEPAGENAMEE}}
10574 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10575 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10579 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10584 Magic Word: {{TALKPAGENAME}}
10586 title=[[User:Ævar Arnfjörð Bjarmason]]
10587 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10591 <p>User talk:Ævar Arnfjörð Bjarmason
10596 Magic Word: {{TALKPAGENAMEE}}
10598 title=[[User:Ævar Arnfjörð Bjarmason]]
10599 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10603 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10608 Magic Word: {{SUBJECTPAGENAME}}
10610 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10611 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10613 {{SUBJECTPAGENAME}}
10615 <p>User:Ævar Arnfjörð Bjarmason
10620 Magic Word: {{SUBJECTPAGENAMEE}}
10622 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10623 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10625 {{SUBJECTPAGENAMEE}}
10627 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10632 Magic Word: {{NUMBEROFFILES}}
10634 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10643 Magic Word: {{PAGENAME}}
10645 title=[[User:Ævar Arnfjörð Bjarmason]]
10646 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10650 <p>Ævar Arnfjörð Bjarmason
10655 Magic Word: {{PAGENAME}} with metacharacters
10657 title=[['foo & bar = baz']]
10658 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10662 <p><i>'foo & bar = baz'</i>
10667 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10669 title=[[*RFC 1234 http://example.com/]]
10670 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10674 <p>*RFC 1234 http://example.com/
10679 Magic Word: {{PAGENAMEE}}
10681 title=[[User:Ævar Arnfjörð Bjarmason]]
10682 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10686 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10691 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10693 title=[[*RFC 1234 http://example.com/]]
10694 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10698 <p>*RFC_1234_http://example.com/
10703 Magic Word: {{REVISIONID}}
10705 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10712 flags=vary-revision-id
10716 Magic Word: {{SCRIPTPATH}}
10718 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10726 Magic Word: {{STYLEPATH}}
10728 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10737 Magic Word: {{SERVER}}
10739 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10743 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10748 Magic Word: {{SERVERNAME}}
10750 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10759 Magic Word: {{SITENAME}}
10761 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10770 Magic Word: {{PAGELANGUAGE}}
10773 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10782 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10784 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10793 Case-sensitive magic words, when cased differently, should just be template transclusions
10800 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10801 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10802 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10803 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10808 Case-insensitive magic words should still work with weird casing.
10818 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10822 # From plwiki:PLOS_ONE
10824 Parsoid: Page property magic word with magic word contents
10826 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10828 <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>"}]]}'/>
10831 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10832 # But, this is a limitation of our representation and is documented in
10833 # TemplateHandler.js in processSpecialMagicWord
10835 Parsoid: Template-generated DISPLAYTITLE
10837 {{{{echo|DISPLAYTITLE}}:Foo}}
10841 wgAllowDisplayTitle=true
10842 wgRestrictDisplayTitle=false
10847 <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"}]]}'/>
10851 Namespace 1 {{ns:1}}
10860 Namespace 1 {{ns:01}}
10869 Namespace 0 {{ns:0}} (T6783)
10877 Namespace 0 {{ns:00}} (T6783)
10885 Namespace -1 {{ns:-1}}
10894 Namespace User {{ns:User}}
10903 Namespace User talk {{ns:User_talk}}
10912 Namespace User talk {{ns:uSeR tAlK}}
10921 Namespace File {{ns:File}}
10930 Namespace File {{ns:Image}}
10939 Namespace (lang=de) Benutzer {{ns:User}}
10950 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10956 <p>Benutzer Diskussion
10963 {{urlencode:hi world?!}}
10964 {{urlencode:hi world?!|WIKI}}
10965 {{urlencode:hi world?!|PATH}}
10966 {{urlencode:hi world?!|QUERY}}
10976 Magic Word: prioritize type info over data-parsoid
10980 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10986 Magic Word: serialize on separate line (parsoid)
10988 parsoid=wt2wt,html2wt
10994 foo<meta property="mw:PageProp/notoc"/>bar
10998 Magic Word: rt non-english wikis
11005 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11009 __proto__ is treated as normal wikitext (T105997)
11021 Magic links: internal link to RFC (T2479)
11025 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11028 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11032 Magic links: RFC (T2479)
11036 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11039 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11043 Magic links: RFC (T67278)
11045 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11047 <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.
11050 <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>
11054 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11056 RFC      822
11060 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11065 <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>
11071 Magic links: ISBN (T3937)
11075 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11078 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11082 Magic links: ISBN (T67278)
11084 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11086 <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.
11089 <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>
11093 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11095 ISBN      978 0 316 09811 3
11101 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11108 <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>
11116 Magic links: PMID incorrectly converts space to underscore
11120 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11123 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11127 Magic links: PMID (T67278)
11129 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11131 <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.
11134 <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>
11138 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11140 PMID      1234
11144 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11149 <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>
11154 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11155 # since these are ExtLinkText, not MagicLinkText
11157 Magic links: use appropriate serialization for "almost" magic links.
11159 X[[Special:BookSources/0978739256|foo]]
11161 X[https://tools.ietf.org/html/rfc1234 foo]
11163 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11164 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11167 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11168 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11172 Magic links: All disabled (T47942)
11174 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11180 <p>ISBN 0-306-40615-2
11191 Nonexistent template
11193 {{thistemplatedoesnotexist}}
11195 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11200 Template with invalid target containing tags
11202 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11204 <p>{{a<b>b</b>|foo|a=b|a = b}}
11209 Template with invalid target containing unclosed tag
11211 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11213 <p>{{a<b>|foo|a=b|a = b}}</b>
11218 Template with invalid target containing wikilink
11222 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11225 <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>
11229 Template with just whitespace in it, T70421
11233 <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>
11239 This is a test template
11247 <p>This is a test template
11252 Template with explicit namespace
11256 <p>This is a test template
11264 This is a test template with parameter {{{param}}}
11270 {{paramtest|param=foo}}
11272 <p>This is a test template with parameter foo
11277 Template:paramtestnum
11279 [[{{{1}}}|{{{2}}}]]
11283 Template unnamed parameter
11285 {{paramtestnum|Main Page|the main page}}
11287 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11292 Template:templatesimple
11298 Template:templateredirect
11300 #redirect [[Template:templatesimple]]
11304 Template:templateasargtestnum
11310 Template:templateasargtest
11312 {{template{{{templ}}}}}
11316 Template:templateasargtest2
11322 Template with template name as unnamed argument
11324 {{templateasargtestnum|templatesimple}}
11331 Template with template name as argument
11333 {{templateasargtest|templ=simple}}
11340 Template with template name as argument (2)
11342 {{templateasargtest2|templ=templatesimple}}
11349 Template:templateasargtestdefault
11351 {{{{{templ|templatesimple}}}}}
11361 Template with default value
11363 {{templateasargtestdefault}}
11370 Template with default value (value set)
11372 {{templateasargtestdefault|templ=templa}}
11381 {{templateredirect}}
11386 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11390 Template with argument in separate line
11392 {{ templateasargtest |
11400 Template with complex template as argument
11403 param ={{ templateasargtest |
11404 templ = simple }}}}
11406 <p>This is a test template with parameter (test)
11411 Templates with templated name
11413 {{{{echo|echo}}|foo}}
11414 {{{{echo|inner list}} }}
11418 <ul><li>item 1</li></ul>
11421 <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>
11422 <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>
11425 ## Regression test; the output here isn't really that interesting.
11427 Templates with templated name and top level template args
11429 {{1{{2{{{3}}}|4=5}}}}
11431 <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>
11434 # Parsoid markup is deliberate "broken". This is an edge case.
11435 # See long comment in TemplateHandler.js:convertAttribsToString.
11437 Templates with invalid templated targets
11448 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11453 Template with thumb image (with link in description)
11455 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11457 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>
11460 <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>
11462 <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>
11466 Template:complextemplate
11468 {{{1}}} {{paramtest|
11469 param ={{{param}}}}}
11473 Template with complex arguments
11476 param ={{ templateasargtest |
11477 templ = simple }}|[[Template:complextemplate|link]]}}
11479 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11484 T2553: link with two variables in a piped link
11487 |[[{{{1}}}|{{{2}}}]]
11492 <td>[[{{{1}}}|{{{2}}}]]
11497 <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>
11503 Abort table cell attribute parsing on wikilink
11506 |testing [[one|two]] |three||four
11507 |testing one two |three||four
11508 |testing="[[one|two]]" |three||four
11513 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11519 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11525 <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>
11526 <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>
11527 <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>
11532 Don't abort table cell attribute parsing if wikilink is found in template arg
11535 |Test {{#tag:ref|One two "[[three]]" four}}
11539 <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>
11544 Magic variable as template parameter
11546 {{paramtest|param={{SITENAME}}}}
11548 <p>This is a test template with parameter MediaWiki
11555 [[{{{param}}}|link]]
11559 Template parameter as link source
11561 {{linktest|param=Main Page}}
11563 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11568 Template:paramtest2
11570 including another template, {{paramtest|param={{{arg}}}}}
11574 Template passing argument to another template
11576 {{paramtest2|arg='hmm'}}
11578 <p>including another template, This is a test template with parameter 'hmm'
11589 Template as link source
11593 [[{{linktest2}}|Main Page]]
11595 [[{{linktest2}}]]Page
11597 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11598 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11599 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11617 Template infinite loop
11621 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11626 Template from main namespace
11635 Template from non-includable namespace
11637 wgNonincludableNamespaces=10
11641 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11656 T2529: Template with table, not included at beginning of line
11675 T2523: Template shouldn't eat newline (or add an extra one before table)
11695 T2041: Template parameters shown as broken links
11704 Template with targets containing wikilinks
11710 {{[[{{echo|foo}}]]}}
11712 {{{{echo|[[foo}}]]}}
11714 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11715 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11719 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11720 <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>
11721 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11731 Templates: Double quotes as template target
11738 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11742 ## This test is about making sure Parsoid's data-mw is well formed in the
11743 ## face of multiple templates with intersecting and overlapping ranges. The
11744 ## wikitext itself is wretched.
11746 Templates with intersecting and overlapping ranges
11757 </table><p>ho</p><table>
11761 </td></tr></tbody></table>
11763 <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":""}]]}'>
11765 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11767 <tbody><tr><td>hi</td></tr>
11772 Template:MSGNW test
11774 ''None'' of '''this''' should be
11776 but rather passed unmodified
11784 # hmm, fix this or just deprecate msgnw and document its behavior?
11788 {{msgnw:MSGNW test}}
11790 <p>''None'' of '''this''' should be
11792  but rather passed unmodified
11793 {{test}}
11797 <!-- comment -->
11804 {{int:youhavenewmessages|lots of money|not!}}
11806 <p>You have lots of money (not!).
11811 int keyword - non-existing message
11822 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11826 <includeonly> and <noinclude> being included
11837 <onlyinclude>Foo</onlyinclude>bar
11841 <onlyinclude> being included
11853 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11857 <onlyinclude> and <includeonly> being included
11866 <includeonly> and <noinclude> on a page
11868 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11875 Un-closed <noinclude>
11882 <onlyinclude> on a page
11884 <onlyinclude>Foo</onlyinclude>bar
11891 Un-closed <onlyinclude>
11898 Self-closed noinclude, includeonly, onlyinclude tags
11909 Unbalanced includeonly and noinclude tags
11913 |b</noinclude></noinclude>
11914 |c</noinclude></includeonly>
11915 |d</includeonly></includeonly>
11924 <td>c</includeonly>
11926 <td>d</includeonly></includeonly>
11932 Template:Includeonly section
11935 ==Includeonly section==
11941 T8563: Edit link generation for section shown by <includeonly>
11943 {{includeonly section}}
11945 <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>
11946 <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>
11950 # Uses same input as the contents of [[Template:Includeonly section]]
11952 T8563: Section extraction for section shown by <includeonly>
11957 ==Includeonly section==
11965 T8563: Edit link generation for section suppressed by <includeonly>
11968 ==Includeonly section==
11972 <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>
11977 T8563: Section extraction for section suppressed by <includeonly>
11982 ==Includeonly section==
11990 Un-closed <includeonly>
11995 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11998 ## We used to, but no longer wt2wt this test since the default serializer
11999 ## will normalize the include directives to serialize on their own line.
12000 ## Selser will take care of preserving formatting in scenarios where they
12001 ## intermingled with other wikitext.
12003 Includes and comments at SOL
12005 parsoid=wt2html,html2html
12007 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12014 <includeonly>can have stuff</includeonly>===here===
12017 <h2><span class="mw-headline" id="hu">hu</span></h2>
12022 <h3><span class="mw-headline" id="here">here</span></h3>
12025 <!-- 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>
12027 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12029 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12032 <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>
12036 # TODO: test with DOM fragment reuse!
12038 Parsoid: DOM fragment reuse
12040 parsoid=wt2wt,wt2html
12042 a{{echo|b<table></table>c}}d
12054 <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>
12056 <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">
12057 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12058 </span><p about="#mwt2">cd</p>
12060 <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">
12062 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12064 </span><p about="#mwt3">b</p>
12068 Parsoid: Merge double tds (T52603)
12073 |{{echo|{{!}} foo}}
12077 <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>
12082 Parsoid: Merge double tds in nested transclusion content (T52603)
12088 |{{echo|{{!}} foo}}
12092 <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}}]}'>
12094 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12100 ### <includeonly> and <noinclude> in attributes
12103 0. includeonly around the entire attribute
12105 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12107 <p><span id="v2">bar</span>
12112 1. includeonly in html attr key
12114 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12116 <p><span id="foo">bar</span>
12121 2. includeonly in html attr value
12123 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12124 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12126 <p><span id="v1">bar</span>
12127 <span id="v1">bar</span>
12132 3. includeonly in part of an attr value
12134 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12136 <p><span style="color:red;">bar</span>
12141 4. includeonly in table attributes
12165 ### Preprocessor precedence tests
12166 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12168 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12170 Preprocessor precedence 1: link is rightmost opening
12176 But close-brace is not a valid character in a link title:
12179 However, we can still tell this was handled as a link in the preprocessor:
12180 {{echo|[[Foo}}|bar]]|bat}}
12182 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12183 </p><p>But close-brace is not a valid character in a link title:
12185 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12189 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12190 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12191 <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>
12195 Preprocessor precedence 2: template is rightmost opening
12204 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12208 Preprocessor precedence 3: language converter is rightmost opening
12224 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12225 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12226 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12230 Preprocessor precedence 4: left-most angle bracket
12241 Template:Precedence5
12247 Preprocessor precedence 5: tplarg takes precedence over template
12249 {{Precedence5|Bullet}}
12251 <ul><li>Bar</li></ul>
12254 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12258 Preprocessor precedence 6: broken link is rightmost opening
12264 {{echo|[[Foo|bar|bat=baz}}
12267 </p><p>{{echo|[[Foo|bar|bat=baz}}
12270 <p>{{echo|[[Foo}}</p>
12271 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12274 # This next test exposes a difference between PHP and Parsoid:
12275 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12276 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12277 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12278 # outer `[[Foo` extends until the `y]]`
12279 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12280 # intermediate result (after template expansion), and link processing
12281 # happens on this intermediate result, which moves the wikilink
12282 # boundary leftward to `[[Foo|Bar]]`
12283 # 2b) Parsoid works in a single step, so it's going to keep the
12284 # wikilink as extending to the `y]]`
12285 # 3a) Then PHP does linktrail processing which slurps up the trailing
12286 # `xy` inside the link.
12287 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12288 # `z` inside the link.
12289 # This is "correct" behavior. Parsoid's basic worldview is that the
12290 # `]]` inside the template shouldn't be allowed to leak out to affect
12291 # the surrounding wikilink. PHP may match Parsoid (in the future)
12292 # if you use {{#balance}} (T114445).
12295 Preprocessor precedence 7: broken template is rightmost opening
12301 [[Foo|{{echo|Bar]]-x}}-y]]-z
12303 Careful: linktrails can move the end of the wikilink:
12304 [[Foo|{{echo|y']]a}}l]]l
12306 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12307 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12308 </p><p>Careful: linktrails can move the end of the wikilink:
12309 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12312 <p>[[Foo|{{echo|Bar]]</p>
12313 <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>
12314 <p>Careful: linktrails can move the end of the wikilink:
12315 <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>
12319 Preprocessor precedence 8: broken language converter is rightmost opening
12330 Template:Preprocessor_precedence_9
12335 ;7: {{{{{{{4}}}}}}}
12339 Preprocessor precedence 9: groups of braces
12341 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12347 <ul><li>Bar</li></ul>
12351 <dd>{Bullet}</dd></dl>
12354 <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}}]}'>
12359 </dl><ul about="#mwt1">
12361 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12370 Template:Preprocessor_precedence_10
12377 ;6: -{{{{{{4}}}}}}-
12378 ;7: -{{{{{{{5}}}}}}}-
12382 Preprocessor precedence 10: groups of braces with leading dash
12386 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12392 <ul><li>Bar-</li></ul>
12399 <ul><li>Bar-</li></ul>
12406 <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}}]}'>
12408 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12411 </dl><ul about="#mwt1">
12413 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12417 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12420 </dl><ul about="#mwt1">
12422 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12426 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12431 Preprocessor precedence 11: found during visual diff testing
12433 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12435 {{echo|-{{echo|-{{echo|x}}}}}}
12437 {{echo|-{{echo|x}}}}
12439 <p><span>-<span>-x</span></span>
12444 <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>
12446 <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>
12448 <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>
12452 Preprocessor precedence 12: broken language converter closed by brace.
12456 This form breaks the template, which is unfortunate:
12457 *{{echo|foo-{bar}bat}}
12459 But if the broken language converter markup is inside an extension
12460 tag, nothing bad happens:
12461 *<nowiki>foo-{bar}bat</nowiki>
12462 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12463 *<pre>foo-{bar}bat</pre>
12464 *{{echo|<pre>foo-{bar}bat</pre>}}
12466 <tag>foo-{bar}bat</tag>
12467 {{echo|<tag>foo-{bar}bat</tag>}}
12470 <p>This form breaks the template, which is unfortunate:
12472 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12473 <p>But if the broken language converter markup is inside an extension
12474 tag, nothing bad happens:
12476 <ul><li>foo-{bar}bat</li>
12477 <li>foo-{bar}bat</li>
12478 <li><pre>foo-{bar}bat</pre></li>
12479 <li><pre>foo-{bar}bat</pre></li></ul>
12480 <pre>'foo-{bar}bat'
12484 <pre>'foo-{bar}bat'
12489 <p>This form breaks the template, which is unfortunate:</p>
12491 <li>{{echo|foo-{bar}bat}}</li>
12493 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12495 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12496 <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>
12497 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12498 <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>
12500 <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>
12504 Preprocessor precedence 13: broken language converter in external link
12508 *[http://example.com/-{foo Example in URL]
12509 *[http://example.com Example in -{link} description]
12510 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12512 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12513 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12514 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12517 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12518 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12519 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12524 Preprocessor precedence 14: broken language converter in comment
12526 *<!--{{foo}}-->...should be ok
12527 *<!---{{foo}}-->...extra dashes
12528 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12530 <ul><li>...should be ok</li>
12531 <li>...extra dashes</li>
12532 <li>foobat...should be ok</li></ul>
12535 <li><!--{{foo}}-->...should be ok</li>
12536 <li><!---{{foo}}-->...extra dashes</li>
12537 <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>
12542 Preprocessor precedence 15: broken brace markup in headings
12544 wgFragmentMode=[ 'html5', 'legacy' ]
12548 __NOTOC__ __NOEDITSECTION__
12557 ===5 foo{{{bar 5===
12562 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12565 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12568 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12571 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12574 <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>
12577 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12581 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12582 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12584 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12586 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12588 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12590 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12592 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12597 Preprocessor precedence 16: matching closing braces to opening braces
12602 -{{{echo|foo}}bar}-
12607 <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>
12611 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12620 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12624 Preprocessor precedence 18: another rightmost wins scenario
12628 {{ -{{{{1|tplarg}}} }} }-
12630 <p>{{ -{tplarg }} }-
12633 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12637 Preprocessor precedence 19: break syntax
12650 ### Token Stream Patcher tests
12652 ### These tests won't always pass wt2wt and other modes because
12653 ### on serialization, the table will be output on a new line.
12654 ### For now, we are blacklisting them, and using this to test selser.
12658 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12660 parsoid=wt2html,wt2wt
12662 {{echo|}}{| width = '100%'
12666 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12667 <tbody><tr><td>foo</td></tr>
12671 ## We used to, but no longer wt2wt this test since the default serializer
12672 ## will normalize the include directives to serialize on their own line.
12673 ## Selser will take care of preserving formatting in scenarios where they
12674 ## intermingled with other wikitext.
12676 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12680 <includeonly>a</includeonly>{| {{{b}}}
12684 <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":""}]]}'>
12685 <tbody><tr><td>c</td></tr>
12690 Table wikitext syntax outside wiki-tables
12694 ! not a table heading
12697 | class="foo bar" | baz
12705 ! not a table heading
12708 | class="foo bar" | baz
12717 ### Testing parsing of templates where a template arg
12718 ### has the same name as the template itself.
12724 {{{quote|{{{1}}}}}}
12728 Templates: Template Name/Arg clash: 1. Use of positional param
12737 Templates: Template Name/Arg clash: 2. Use of named param
12739 {{quote|quote=foo}}
12746 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12755 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12759 Templates: 1. Simple use
12768 Templates: 2. Inside a block tag
12770 <div>{{echo|Foo}}</div>
12771 <blockquote>{{echo|Foo}}</blockquote>
12774 <blockquote>Foo</blockquote>
12778 <blockquote><p>Foo</p></blockquote>
12782 Templates: P-wrapping: 1a. Templates on consecutive lines
12793 Templates: P-wrapping: 1b. Templates on consecutive lines
12807 Templates: P-wrapping: 1c. Templates on consecutive lines
12810 {{echo|bar}} <div>baz</div>
12819 bar </p><div>baz</div>
12823 Templates: P-wrapping: 1d. Template preceded by comment-only line
12832 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12836 Templates: Inline Text: 1. Multiple template uses
12838 {{echo|Foo}}bar{{echo|baz}}
12845 Templates: Inline Text: 2. Back-to-back template uses
12847 {{echo|Foo}}{{echo|bar}}
12854 Templates: Block Tags: 1. Multiple template uses
12856 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12858 <div>Foo</div><div>bar</div><div>baz</div>
12863 Templates: Block Tags: 2. Back-to-back template uses
12865 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12867 <div>Foo</div><div>bar</div>
12871 ## This is an edge case relating to paragraph wrapping.
12872 ## Note that Parsoid fails to match Remex because it's using the closing tag
12873 ## as a heuristic to determine if it's in a block, rather than SAX based events.
12874 ## And Parsoid drops empty elements in templates.
12876 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12883 b</p><p class="mw-empty-elt"></p>
12885 <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">
12886 </span><span about="#mwt1">b</span>
12890 Templates: Links: 1. Simple example
12892 {{echo|[[Foo|bar]]}}
12894 <p><a href="/wiki/Foo" title="Foo">bar</a>
12899 Templates: Links: 2. Generation of link href
12901 [[{{echo|Foo}}|bar]]
12903 <p><a href="/wiki/Foo" title="Foo">bar</a>
12908 Templates: Links: 3. Generation of part of a link href
12910 [[Fo{{echo|o}}|bar]]
12912 [[Foo{{echo|bar}}]]
12914 [[Foo{{echo|bar}}baz]]
12916 [[Foo{{echo|bar}}|bar]]
12918 [[:Foo{{echo|bar}}]]
12920 [[:Foo{{echo|bar}}|bar]]
12922 <p><a href="/wiki/Foo" title="Foo">bar</a>
12923 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12924 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12925 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12926 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12927 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12932 Templates: Links: 4. Multiple templates generating link href
12934 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12936 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12941 Templates: Links: 5. Generation of link text
12943 [[Foo|{{echo|bar}}]]
12945 <p><a href="/wiki/Foo" title="Foo">bar</a>
12950 Templates: Links: 5. Nested templates (only outermost template should be marked)
12952 {{echo|[[{{echo|Foo}}|bar]]}}
12954 <p><a href="/wiki/Foo" title="Foo">bar</a>
12959 Templates: HTML Tag: 1. Generation of HTML attr. key
12961 <div {{echo|style}}="color:red;">foo</div>
12963 <div style="color:red;">foo</div>
12968 Templates: HTML Tag: 2. Generation of HTML attr. value
12970 <div style={{echo|'color:red;'}}>foo</div>
12972 <div style="color:red;">foo</div>
12977 Templates: HTML Tag: 3. Generation of HTML attr key and value
12979 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12981 <div style="color:red;">foo</div>
12986 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12988 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12990 <div title="This is a long title with just one piece templated">foo</div>
12995 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12997 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12999 <div title="This is a long title with just one piece templated">foo</div>
13004 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13006 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13008 <div title="This is a long title with just one piece templated">foo</div>
13012 # SSS FIXME: While it is great we added support for all this,
13013 # do we want to make this part of the spec? Maybe we want to
13014 # deprecate this kind of usage in the future?
13016 Templates: HTML Tag: 7. Generation of partial attribute key string
13018 <div st{{echo|yle}}="color:red;">foo</div>
13020 <div style="color:red;">foo</div>
13025 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13027 <div {{echo|1=id="v1"}}>bar</div>
13029 <div id="v1">bar</div>
13034 Templates: HTML Tag: 9. Multiple template-generated attributes
13036 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13038 <div id="v1" title="foo">bar</div>
13043 Templates: Support for templates generating attributes and content
13045 {| {{mixed_attr_content_template}}
13050 <table style="color:red;" title="T48811">
13060 <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|}"]}'>
13069 Template:attribute_from_template
13075 Table cell with attribute before expanded attribute
13078 | align="center" {{attribute_from_template}} |456
13082 <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>
13087 1. Entities and nowikis inside templated attributes should be handled correctly
13089 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13091 <div style="background:#f9f9f9;">foo</div>
13094 <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>
13098 2. Entities and nowikis inside templated attributes should be handled correctly
13101 |{{table_attribs_3}}
13106 <td style="background:#f9f9f9;">Foo
13111 <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>
13116 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13119 |{{table_attribs_3}}
13124 <td style="background:#f9f9f9;">Foo
13128 <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}}]}'>
13129 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13135 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13138 |{{table_attribs_6}} hi
13143 <td style="background: red;">hi
13148 <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>
13153 Templates: HTML Tables: 1. Generating start of a HTML table
13155 {{echo|<table><tr><td>foo</td>}}</tr></table>
13157 <table><tr><td>foo</td></tr></table>
13162 Templates: HTML Tables: 2a. Generating middle of a HTML table
13164 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13166 <table><tr><td>foo</td></tr></table>
13171 Templates: HTML Tables: 2b. Generating middle of a HTML table
13173 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13175 <table><tr><td>foo</td></tr></table>
13180 Templates: HTML Tables: 3. Generating end of a HTML table
13182 <table><tr>{{echo|<td>foo</td></tr></table>}}
13184 <table><tr><td>foo</td></tr></table>
13189 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13191 {{echo|<table>}}<tr><td>foo</td></tr></table>
13193 <table><tr><td>foo</td></tr></table>
13198 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13200 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13202 <table><tr><td>foo</td></tr></table>
13207 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13209 <table><tr>{{echo|<td>}}foo</td></tr></table>
13211 <table><tr><td>foo</td></tr></table>
13216 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13218 <table><tr><td>foo{{echo|</td>}}</tr></table>
13220 <table><tr><td>foo</td></tr></table>
13225 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13227 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13229 <table><tr><td>foo</td></tr></table>
13234 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13236 <table><tr><td>foo</td></tr>{{echo|</table>}}
13238 <table><tr><td>foo</td></tr></table>
13243 Templates: HTML Tables: 5. Proper fostering of categories from inside
13245 parsoid=wt2html,wt2wt
13247 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13248 <!--Two categories (T52330)-->
13249 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13251 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13252 <!--Two categories (T52330)-->
13253 <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>
13257 Templates: Wiki Tables: 1a. Fostering of entire template content
13265 <tr><td></td></tr></table>
13270 <table><tbody><tr><td></td></tr></tbody></table>
13272 <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}},"\n|}"]}'>a</span><table about="#mwt2">
13278 Templates: Wiki Tables: 1b. Fostering of entire template content
13291 <tr><td></td></tr></table>
13299 <tbody><tr><td></td></tr></tbody></table>
13301 <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|}"]}'>
13303 </div><table about="#mwt3">
13309 Templates: Wiki Tables: 2. Fostering of partial template content
13319 <tr><td></td></tr></table>
13324 <div>b</div><table>
13325 <tbody><tr><td></td></tr></tbody></table>
13327 <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n<div>b</div>"}},"i":0}},"\n|}"]}'>a</span><div about="#mwt2">b</div><table about="#mwt2">
13334 Templates: Wiki Tables: 3. td-content via multiple templates
13337 {{echo|{{pipe}}a}}{{echo|b}}
13348 Templates: Wiki Tables: 4. Templated tags, no content
13354 <tr><td></td></tr></table>
13359 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13373 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13386 ## This test case is very specific to Parsoid's internals
13387 ## and is hence only tested for Parsoid's code. Parsoid uses
13388 ## a <meta> marker tag for <ref> tags and they are expanded
13389 ## much later. We are verifying that this <meta> tag usage
13390 ## doesn't prevent foster parenting.
13392 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13394 {{PartialTable}}<ref>foo</ref>
13399 <sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></sup><table about="#mwt2">
13403 <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>
13407 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13417 <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{{!}}}"]}'>
13418 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13422 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13427 Templates: Lists: Multi-line list-items via templates
13429 *{{echo|a {{nonexistent|
13431 *{{echo|b {{nonexistent|
13434 <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>
13435 <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>
13440 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13442 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13444 <p><i>ab</i>c<i>d</i>e
13449 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13450 (PHP parser generates misnested html)
13452 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13454 <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>
13458 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13459 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13461 parsoid=wt2html,wt2wt
13463 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13465 <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>
13466 <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>
13467 <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>
13471 Templates: Ugly nesting: 4. Divs opened/closed across templates
13473 a<div>b{{echo|c</div>d}}e
13478 <p>a</p><div>bc</div><p>de
13483 Templates: Ugly templates: 3. newline-only template parameter
13492 # This looks like a bug: a single newline triggers p/br for some reason.
13494 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13503 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13504 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13506 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13512 <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
13513 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13517 # T66017 -- ugly wikitext with fostered content generates two template ranges
13518 # that are "identical" and generate nesting cycles in the algorithm
13520 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13522 {{echo|<table><tr><td><table>}}
13526 <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"}'>
13527 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13528 </table></td></tr></tbody></table>
13532 Templates: Parameters substituted at the top-level
13534 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13538 <p><i>who</i> me? <b>never!</b>
13542 <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>
13544 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13548 Templates: Param with empty arg in the final position
13552 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13556 Parser Functions: 1. Simple example
13565 Parser Functions: 2. Nested use (only outermost should be marked up)
13573 ## Note that the templates inside the references are not wrapped
13575 Template nested in extension tag in template
13577 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13578 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13581 <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>
13582 <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>
13583 <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>
13587 ### Pre-save transform tests
13590 pre-save transform: subst:
13596 This is a test template
13600 pre-save transform: normal template
13610 pre-save transform: nonexistent template
13614 {{thistemplatedoesnotexist}}
13616 {{thistemplatedoesnotexist}}
13620 pre-save transform: subst magic variables
13629 # This is T2089, which I fixed. -- wtm
13631 pre-save transform: subst: templates with parameters
13635 {{subst:paramtest|param="something else"}}
13637 This is a test template with parameter "something else"
13641 Template:nowikitest
13643 <nowiki>'''not wiki'''</nowiki>
13647 pre-save transform: nowiki in subst (T3188)
13651 {{subst:nowikitest}}
13653 <nowiki>'''not wiki'''</nowiki>
13657 Template:commenttest
13659 This template has <!-- a comment --> in it.
13663 pre-save transform: comment in subst (T3936)
13667 {{subst:commenttest}}
13669 This template has <!-- a comment --> in it.
13673 pre-save transform: unclosed tag
13677 <nowiki>'''not wiki'''
13679 <nowiki>'''not wiki'''
13683 pre-save transform: mixed tag case
13687 <NOwiki>'''not wiki'''</noWIKI>
13689 <NOwiki>'''not wiki'''</noWIKI>
13693 pre-save transform: unclosed comment in <nowiki>
13697 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13699 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13702 # Leading @ in this template definition works around a limitation
13703 # in parsoid's parserTests which otherwise strips the <span> from the
13704 # result (confusing it for a template wrapper)
13708 @<span onmouseover="alert('crap')">Oh no</span>
13712 (confirming safety of fix for subst T3936)
13714 {{Template:dangerous}}
13716 <p>@<span>Oh no</span>
13721 pre-save transform: comment containing gallery (T7024)
13725 <!-- <gallery>data</gallery> -->
13727 <!-- <gallery>data</gallery> -->
13731 pre-save transform: comment containing extension
13735 <!-- <tag>data</tag> -->
13737 <!-- <tag>data</tag> -->
13741 pre-save transform: comment containing nowiki
13745 <!-- <nowiki>data</nowiki> -->
13747 <!-- <nowiki>data</nowiki> -->
13751 pre-save transform: <noinclude> in subst (T5298)
13761 pre-save transform: <onlyinclude> in subst (T5298)
13765 {{subst:Includes2}}
13773 {{<includeonly>subst:</includeonly>Includes}}
13777 Template:SafeSubstTest
13779 {{<includeonly>safesubst:</includeonly>Includes}}
13783 T24297: safesubst: works during PST
13787 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13793 T24297: safesubst: works during normal parse
13802 subst: does not work during normal parse
13806 <p>{{subst:Includes}}
13811 pre-save transform: context links ("pipe trick")
13815 [[Article (context)|]]
13818 [[Bar:Article (context)|]]
13819 [[:Bar:Article (context)|]]
13821 [[|Article (context)]]
13825 [[Article (context)|Article]]
13826 [[Bar:Article|Article]]
13827 [[:Bar:Article|Article]]
13828 [[Bar:Article (context)|Article]]
13829 [[:Bar:Article (context)|Article]]
13831 [[Article (context)]]
13832 [[Bar:X (Y) Z|X (Y) Z]]
13833 [[:Bar:X (Y) Z|X (Y) Z]]
13837 pre-save transform: context links ("pipe trick") with interwiki prefix
13841 [[interwiki:Article|]]
13842 [[:interwiki:Article|]]
13843 [[interwiki:Bar:Article|]]
13844 [[:interwiki:Bar:Article|]]
13846 [[interwiki:Article|Article]]
13847 [[:interwiki:Article|Article]]
13848 [[interwiki:Bar:Article|Bar:Article]]
13849 [[:interwiki:Bar:Article|Bar:Article]]
13853 pre-save transform: context links ("pipe trick") with parens in title
13855 pst title=[[Somearticle (context)]]
13859 [[Article (context)|Article]]
13863 pre-save transform: context links ("pipe trick") with comma in title
13865 pst title=[[Someplace, Somewhere]]
13868 [[Otherplace, Elsewhere|]]
13869 [[Otherplace, Elsewhere, Anywhere|]]
13871 [[Otherplace, Somewhere|Otherplace]]
13872 [[Otherplace, Elsewhere|Otherplace]]
13873 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13877 pre-save transform: context links ("pipe trick") with parens and comma
13879 pst title=[[Someplace (IGNORED), Somewhere]]
13882 [[Otherplace (place), Elsewhere|]]
13884 [[Otherplace, Somewhere|Otherplace]]
13885 [[Otherplace (place), Elsewhere|Otherplace]]
13889 pre-save transform: context links ("pipe trick") with comma and parens
13891 pst title=[[Who, me? (context)]]
13894 [[Me, Myself, and I (1937 song)|]]
13896 [[Yes, you. (context)|Yes, you.]]
13897 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13901 pre-save transform: context links ("pipe trick") with namespace
13903 pst title=[[Ns:Somearticle]]
13907 [[Ns:Article|Article]]
13911 pre-save transform: context links ("pipe trick") with namespace and parens
13913 pst title=[[Ns:Somearticle (context)]]
13917 [[Ns:Article (context)|Article]]
13921 pre-save transform: context links ("pipe trick") with namespace and comma
13923 pst title=[[Ns:Somearticle, Context, Whatever]]
13927 [[Ns:Article, Context, Whatever|Article]]
13931 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13933 pst title=[[Ns:Somearticle, Context (context)]]
13937 [[Ns:Article (context)|Article]]
13941 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13943 pst title=[[Ns:Somearticle (IGNORED), Context]]
13947 [[Ns:Article, Context|Article]]
13951 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13955 [[Article(context)|]]
13956 [[Bar:Article(context)|]]
13957 [[:Bar:Article(context)|]]
13958 [[|Article(context)]]
13962 [[Article(context)|Article]]
13963 [[Bar:Article(context)|Article]]
13964 [[:Bar:Article(context)|Article]]
13965 [[Article(context)]]
13966 [[Bar:X(Y)Z|X(Y)Z]]
13967 [[:Bar:X(Y)Z|X(Y)Z]]
13971 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13975 [[Article (context)|]]
13976 [[Bar:Article (context)|]]
13977 [[:Bar:Article (context)|]]
13978 [[|Article (context)]]
13982 [[Article (context)|Article]]
13983 [[Bar:Article (context)|Article]]
13984 [[:Bar:Article (context)|Article]]
13985 [[Article (context)]]
13986 [[Bar:X (Y) Z|X (Y) Z]]
13987 [[:Bar:X (Y) Z|X (Y) Z]]
13991 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13995 [[Article(context)|]]
13996 [[Bar:Article(context)|]]
13997 [[:Bar:Article(context)|]]
13998 [[|Article(context)]]
14002 [[Article(context)|Article]]
14003 [[Bar:Article(context)|Article]]
14004 [[:Bar:Article(context)|Article]]
14005 [[Article(context)]]
14006 [[Bar:X(Y)Z|X(Y)Z]]
14007 [[:Bar:X(Y)Z|X(Y)Z]]
14011 pre-save transform: context links ("pipe trick") with commas (T23660)
14015 [[Article (context), context|]]
14016 [[Article (context),context|]]
14017 [[Bar:Article (context), context|]]
14018 [[Bar:Article (context),context|]]
14019 [[:Bar:Article (context), context|]]
14020 [[:Bar:Article (context),context|]]
14022 [[Article (context), context|Article]]
14023 [[Article (context),context|Article]]
14024 [[Bar:Article (context), context|Article]]
14025 [[Bar:Article (context),context|Article]]
14026 [[:Bar:Article (context), context|Article]]
14027 [[:Bar:Article (context),context|Article]]
14031 Parsoid: backwards pipe trick
14038 <p>[[|<b>bar</b>]]</p>
14042 pre-save transform: trim trailing empty lines
14046 Empty lines are trimmed
14052 Empty lines are trimmed
14056 pre-save transform: Signature expansion
14063 * <noinclude>~~~</noinclude>
14064 * <includeonly>~~~</includeonly>
14065 * <onlyinclude>~~~</onlyinclude>
14067 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14068 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14069 * 00:02, 1 January 1970 (UTC)
14070 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14071 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14072 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14077 ParserOutput flags from signature expansion (T84843)
14084 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14085 flags=user-signature
14090 pre-save transform: Signature expansion in nowiki tags (T2093)
14096 <nowiki>~~~~</nowiki>
14098 <includeonly><nowiki>~~~~</nowiki></includeonly>
14100 <noinclude><nowiki>~~~~</nowiki></noinclude>
14102 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14104 {{subst:Foo}} shall be converted to FOO
14106 As well as inside noinclude/onlyinclude
14107 <noinclude>{{subst:Foo}}</noinclude>
14108 <onlyinclude>{{subst:Foo}}</onlyinclude>
14110 But not inside includeonly
14111 <includeonly>{{subst:Foo}}</includeonly>
14115 <nowiki>~~~~</nowiki>
14117 <includeonly><nowiki>~~~~</nowiki></includeonly>
14119 <noinclude><nowiki>~~~~</nowiki></noinclude>
14121 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14123 FOO shall be converted to FOO
14125 As well as inside noinclude/onlyinclude
14126 <noinclude>FOO</noinclude>
14127 <onlyinclude>FOO</onlyinclude>
14129 But not inside includeonly
14130 <includeonly>{{subst:Foo}}</includeonly>
14134 Parsoid: Recognize nowiki with trailing space in tags
14138 <nowiki ><div>[[foo]]</nowiki >
14146 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14153 Parsoid: Recognize nowiki with odd capitalization
14157 <noWikI ><div>[[foo]]</Nowiki >
14159 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14164 Parsoid: Escape nowiki with trailing space in tags
14168 <p><nowiki > foo </nowiki ></p>
14169 <p>a<nowiki />b</p>
14170 <p>c<nowiki/ >d</p>
14172 <nowiki > foo </nowiki >
14180 Parsoid: Escape weird noWikI capitalizations
14184 <p><noWikI > foo </NoWikI ></p>
14186 <noWikI > foo </NoWikI >
14190 ### Message transform tests
14193 message transform: magic variables
14203 message transform: should not transform wiki markup
14213 message transform: <noinclude> in transcluded template (T6926)
14223 message transform: <onlyinclude> in transcluded template (T6926)
14233 {{#special:}} page name, known
14237 {{#special:Recentchanges}}
14239 Special:RecentChanges
14243 {{#special:}} page name with subpage, known
14247 {{#special:Recentchanges/param}}
14249 Special:RecentChanges/param
14253 {{#special:}} page name, unknown
14257 {{#special:foobar nonexistent}}
14259 Special:Foobar nonexistent
14263 {{#speciale:}} page name, known
14267 {{#speciale:Recentchanges}}
14269 Special:RecentChanges
14273 {{#speciale:}} page name with subpage, known
14277 {{#speciale:Recentchanges/param}}
14279 Special:RecentChanges/param
14283 {{#speciale:}} page name, unknown
14287 {{#speciale:foobar nonexistent}}
14289 Special:Foobar_nonexistent
14295 ### For Parsoid-specific tests, see
14296 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14301 parsoid=wt2html,wt2wt,html2html
14303 [[Image:foobar.jpg]]
14305 <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>
14308 <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>
14312 Serialize simple image with span wrapper
14316 <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>
14318 [[File:Foobar.jpg]]
14322 Simple image (using File: namespace, now canonical)
14324 [[File:Foobar.jpg]]
14326 <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>
14329 <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>
14333 Right-aligned image
14335 [[File:Foobar.jpg|right]]
14337 <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>
14340 <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>
14346 [[File:Foobar.jpg|right|Caption text]]
14348 <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>
14351 <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>
14355 Image with caption, T55312 #1
14357 [[File:Foobar.jpg|right|Caption page stuff]]
14359 <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>
14362 <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>
14366 Image with caption, T55312 #2
14368 [[File:Foobar.jpg|right|Caption page=]]
14370 <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>
14373 <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>
14377 Image with caption, T55312 #3
14379 [[File:Foobar.jpg|right|Caption page=stuff]]
14381 <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>
14384 <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>
14388 Image caption with pipe entity
14390 [[File:Foobar.jpg|thumb|one | two]]
14391 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14393 <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>
14394 <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>
14397 <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>
14398 <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>
14402 Allow empty links in image captions (T62753)
14406 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14411 <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>
14414 <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>
14416 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14417 </figcaption></figure>
14421 Titles in unlinked images (T23454)
14423 [[File:Foobar.jpg|link=|stuff]]
14425 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14428 <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>
14432 Link with empty target
14441 Image with link trail
14443 Linktrails should not work for images: [[File:Foobar.jpg]]s
14445 <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
14448 <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>
14452 Image with empty attribute
14454 parsoid=wt2html,wt2wt,html2html
14456 [[File:Foobar.jpg|right||Caption text]]
14458 <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>
14461 <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>
14465 1. Block image with individual attributes from templates
14467 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14469 <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>
14472 <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>
14476 2. Block Image with individual attributes from templates
14478 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14480 <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>
14483 <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>
14487 3. Inline image with individual attributes from templates
14489 [[File:Foobar.jpg|{{echo|50px}}]]
14491 <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>
14494 <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>
14497 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14498 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14500 Image with multiple attributes from the same template
14502 [[File:Foobar.jpg|{{image_attribs}}]]
14504 <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>
14507 <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>
14511 Image with link tails
14515 123[[File:Foobar.jpg]]456
14516 123[[File:Foobar.jpg|right]]456
14517 123[[File:Foobar.jpg|thumb]]456
14519 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
14521 123<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
14522 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
14525 <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
14527 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
14528 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
14531 <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>
14532 <p>123</p><figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure><p>456</p>
14533 <p>123</p><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure><p>456</p>
14537 Image with multiple captions -- only last one is accepted
14539 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14541 <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>
14544 <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>
14548 Image with multiple widths -- use last
14550 [[File:Foobar.jpg|200px|300px|caption]]
14552 <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>
14555 <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>
14559 Image with multiple alignments -- use first (T50664)
14563 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14565 [[File:Foobar.jpg|middle|text-top|caption]]
14567 <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>
14568 <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>
14571 <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>
14572 <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>
14576 Image with width attribute at different positions
14578 [[File:Foobar.jpg|200px|right|Caption]]
14579 [[File:Foobar.jpg|right|200px|Caption]]
14580 [[File:Foobar.jpg|right|Caption|200px]]
14582 <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>
14583 <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>
14584 <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>
14587 <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>
14588 <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>
14589 <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>
14592 # a sad bit of backward-compatibility
14594 Image with size specified with pxpx (T15500, T53628)
14596 parsoid=wt2html,wt2wt,html2html
14598 [[File:Foobar.jpg|20pxpx]]
14599 [[File:Foobar.jpg|200x20pxpx]]
14601 <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>
14602 <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>
14605 <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>
14609 Image with link parameter, wiki target
14611 [[File:Foobar.jpg|link=Main Page]]
14613 <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>
14616 <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>
14619 # parsoid T51293 (part 1)
14621 Image with link parameter, URL target
14623 [[File:Foobar.jpg|link=http://example.com/]]
14625 <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>
14628 <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>
14631 # parsoid T51293 (part 2)
14633 Image with link parameter, protocol-less URL target
14635 [[File:Foobar.jpg|link=//example.com/]]
14637 <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>
14640 <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>
14644 Escaping non-block captions (T107435)
14647 "modes": ["wt2wt"],
14649 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14653 [[Image:Foobar.jpg|caption]]
14655 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14658 # wgExternalLinkTarget not supported by Parsoid
14660 Image with link parameter, wgExternalLinkTarget
14662 [[Image:foobar.jpg|link=http://example.com/]]
14664 wgExternalLinkTarget='foobar'
14666 <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>
14671 Image with link parameter, wgNoFollowLinks set to false
14673 [[Image:foobar.jpg|link=http://example.com/]]
14675 wgNoFollowLinks=false
14677 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14682 Image with link parameter, wgNoFollowDomainExceptions
14684 [[Image:foobar.jpg|link=http://example.com/]]
14686 wgNoFollowDomainExceptions='example.com'
14688 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14692 # wgExternalLinkTarget not supported by Parsoid
14694 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14696 [[Image:foobar.jpg|link=http://example.com/|Title]]
14698 wgExternalLinkTarget='foobar'
14700 <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>
14705 Image with empty link parameter
14707 [[File:Foobar.jpg|link=]]
14709 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14712 <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>
14716 Image with link parameter (wiki target) and unnamed parameter
14718 [[File:Foobar.jpg|link=Main_Page|Title]]
14720 <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>
14723 <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>
14727 Image with link parameter (URL target) and unnamed parameter
14729 [[File:Foobar.jpg|link=http://example.com/|Title]]
14731 <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>
14734 <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>
14738 Thumbnail image with link parameter
14741 parsoid=wt2html,wt2wt,html2html
14743 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14745 <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>
14748 <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>
14752 Manually-specified thumbnail image
14756 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14758 <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>
14761 <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>
14765 Manually-specified thumbnail image with explicit link to wiki page
14768 parsoid=wt2html,wt2wt,html2html
14770 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14772 <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>
14775 <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>
14779 Manually-specified thumbnail image with explicit link to url
14782 parsoid=wt2html,wt2wt,html2html
14784 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14786 <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>
14789 <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>
14793 Manually-specified thumbnail image with explicit no link
14796 parsoid=wt2html,wt2wt,html2html
14798 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14800 <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>
14803 <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>
14807 Manually-specified thumbnail image with explicit link and alt text
14810 parsoid=wt2html,wt2wt,html2html
14812 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14814 <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>
14817 <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>
14821 Image with frame and link
14823 parsoid=wt2html,wt2wt,html2html
14825 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14827 <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>
14830 <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>
14834 Image with frame and link and explicit alt
14836 parsoid=wt2html,wt2wt,html2html
14838 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14840 <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>
14843 <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>
14847 Image with wiki markup in implicit alt
14849 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14851 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14853 <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>
14854 </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>
14857 <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>
14859 <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>
14863 Alt image option should handle most kinds of wikitext without barfing
14865 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14867 <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>
14870 <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>
14874 Image with table with attributes in caption
14876 parsoid=wt2html,html2html
14878 [[File:Foobar.jpg|thumb|
14885 <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>
14886 <table class="123">
14887 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14890 </figcaption></figure>
14894 Image with table with rows from templates in caption
14896 [[File:Foobar.jpg|thumb|
14902 <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>
14904 <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>
14906 </figcaption></figure>
14910 Image with nested tables in caption
14912 [[File:Foobar.jpg|thumb|Foo<br />
14921 <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}'/>
14925 <tbody><tr><td>z</td></tr>
14926 </tbody></table></td></tr>
14928 </figcaption></figure>
14932 Image with heading and horizontal rule in caption
14934 [[File:Foobar.jpg|thumb|
14940 <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>
14943 <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>
14944 <h3 id="Testing">Testing</h3>
14946 <hr data-parsoid='{"extra_dashes":10}'/>
14947 </figcaption></figure>
14950 ###################
14951 # Conflicting image format options.
14952 # First option specified should 'win'.
14953 # All three cases in each test should be identical.
14956 Image with 'frameless' first.
14958 parsoid=wt2html,wt2wt,html2html
14960 [[File:Foobar.jpg|frameless|caption]]
14962 [[File:Foobar.jpg|frameless|frame|caption]]
14964 [[File:Foobar.jpg|frameless|thumb|caption]]
14966 <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>
14967 </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>
14968 </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>
14971 <p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
14972 <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>
14973 <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>
14977 Image with 'frame' first.
14979 parsoid=wt2html,wt2wt,html2html
14981 [[File:Foobar.jpg|frame|caption]]
14982 [[File:Foobar.jpg|frame|frameless|caption]]
14983 [[File:Foobar.jpg|frame|thumb|caption]]
14985 <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>
14986 <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>
14987 <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>
14990 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
14991 <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>
14992 <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>
14996 Image with 'thumb' first.
14998 parsoid=wt2html,wt2wt,html2html
15000 [[File:Foobar.jpg|thumb|caption]]
15001 [[File:Foobar.jpg|thumb|frameless|caption]]
15002 [[File:Foobar.jpg|thumb|frame|caption]]
15004 <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>
15005 <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>
15006 <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>
15009 <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>
15010 <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>
15011 <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>
15014 ###################
15016 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15017 # and https://phabricator.wikimedia.org/T64258
15018 # Foobar has actual size of 1941x220
15019 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15020 # a scalable format.
15021 # 2. Framed images always ignore size options; always render at default size.
15022 # 3. "Unspecified format" and border are the only types which can be
15026 Image: unspecified format and border enlarge
15028 parsoid=wt2html,wt2wt,html2html
15030 [[File:Foobar.jpg|2000px]]
15032 [[File:Foobar.jpg|border|2000px]]
15034 <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>
15035 </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>
15038 <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>
15039 <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>
15043 Image: "unspecified format" and border reduce
15045 parsoid=wt2html,wt2wt,html2html
15047 [[File:Foobar.jpg|1000px]]
15049 [[File:Foobar.jpg|border|1000px]]
15051 <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>
15052 </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>
15055 <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>
15056 <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>
15060 Image: thumbs reduce
15062 parsoid=wt2html,wt2wt,html2html
15064 [[File:Foobar.jpg|thumb|50px]]
15066 <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>
15069 <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>
15073 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15075 parsoid=wt2html,wt2wt,html2html
15077 [[File:Foobar.jpg|thumb|2000px]]
15079 [[File:Foobar.svg|thumb|2000px]]
15081 <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>
15082 <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>
15085 <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>
15086 <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>
15090 Image: frameless can reduce in size
15092 parsoid=wt2html,wt2wt,html2html
15094 [[File:Foobar.jpg|frameless|50px]]
15096 <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>
15099 <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>
15103 Image: bitmap frameless can't be enlarged past original size, but vector can
15105 parsoid=wt2html,wt2wt,html2html
15107 [[File:Foobar.jpg|frameless|2000px]]
15109 [[File:Foobar.svg|frameless|2000px]]
15111 <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>
15112 </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>
15115 <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>
15116 <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>
15120 Image: framed images are always unscaled.
15122 parsoid=wt2html,wt2wt,html2html
15124 [[File:Foobar.jpg|frame]]
15126 [[File:Foobar.jpg|frame|50px]]
15128 [[File:Foobar.jpg|frame|50x50px]]
15130 [[File:Foobar.jpg|frame|2000px]]
15132 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
15133 <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>
15134 <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>
15135 <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>
15138 <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>
15139 <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>
15140 <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>
15141 <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>
15144 ###################
15147 Link to image page- image page normally doesn't exists, hence edit link
15148 Add test with existing image page
15149 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15153 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15158 T20784 Link to non-existent image page with caption should use caption as link text
15160 [[:Image:test|caption]]
15162 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15167 Frameless image caption with a free URL
15169 [[File:Foobar.jpg|http://example.com]]
15171 <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>
15174 <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>
15178 Thumbnail image caption with a free URL
15182 [[File:Foobar.jpg|thumb|http://example.com]]
15184 <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>
15187 <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>
15191 Thumbnail image caption with a free URL and explicit alt
15194 parsoid=wt2html,wt2wt,html2html
15196 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15198 <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>
15201 <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>
15205 SVG thumbnails with no language set
15208 [[File:Foobar.svg|thumb|caption]]
15210 <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>
15213 <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>
15217 SVG thumbnails with language de
15219 parsoid=wt2html,wt2wt,html2html
15221 [[File:Foobar.svg|thumb|caption|lang=de]]
15223 <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>
15226 <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>
15230 SVG thumbnails with invalid language code
15232 parsoid=wt2html,wt2wt,html2html
15234 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15236 <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>
15239 <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>
15243 T3887: A ISBN with a thumbnail
15245 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15247 <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>
15250 <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>
15254 T3887: A RFC with a thumbnail
15256 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15258 <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>
15261 <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>
15265 T3887: A mailto link with a thumbnail
15267 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15269 <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>
15272 <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>
15275 # Pending resolution to T2368
15277 T2648: Frameless image caption with a link
15279 [[File:Foobar.jpg|text with a [[link]] in it]]
15281 <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>
15284 <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>
15288 T2648: Frameless image caption with a link (suffix)
15290 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15292 <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>
15295 <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>
15299 T2648: Frameless image caption with an interwiki link
15301 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15303 <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>
15306 <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>
15310 T2648: Frameless image caption with a piped interwiki link
15312 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15314 <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>
15317 <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>
15321 T107474: Frameless image caption with <nowiki>
15323 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15325 <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>
15329 Escape HTML special chars in image alt text
15331 [[File:Foobar.jpg|& < > "]]
15333 <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>
15336 <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>
15340 Escape HTML special chars in image alt text with LanguageConverter
15344 [[File:Foobar.jpg|& < > "]]
15346 <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>
15349 <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>
15353 Entities in file name and attributes
15355 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15357 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15360 <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>
15364 T2499: Alt text should have Ӓ, not &1234;
15366 [[File:Foobar.jpg|♀]]
15368 <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>
15371 <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>
15375 Broken image caption with link
15377 parsoid=wt2html,wt2wt,html2html
15379 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15381 <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.
15384 <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>
15388 Image caption containing another image
15390 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15392 <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>
15395 <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>
15399 Image: caption containing a newline
15401 [[File:Foobar.jpg|This
15404 <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>
15407 <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>
15411 Image: caption containing leading space
15412 (The leading space should not trigger nowiki escaping in wt2wt mode)
15414 [[File:Foobar.jpg|thumb| bar]]
15416 <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>
15419 <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>
15422 # html/php output not have newlines after table, td, th, etc. because
15423 # Linker::makeThumbLink2() replaces the newlines with spaces since
15424 # the table is inside a caption.
15425 # FIXME: Verify if that circa 2004 fix is still required.
15427 Image: caption containing a table
15429 parsoid=wt2html,wt2wt,html2html
15431 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15437 and some more text.]]
15439 <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>
15442 <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
15445 <tr><th>Foo</th><th>Bar</th></tr>
15448 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15452 T5090: External links other than http: in image captions
15454 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15456 <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>
15459 <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>
15465 parsoid=wt2html,wt2wt,html2html
15467 [[Image:foobar.jpg|a|class=b]]
15469 <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>
15472 <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>
15476 Localized image handling (1).
15478 parsoid=wt2html,wt2wt,html2html
15481 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15483 <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>
15486 <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>
15490 Localized image handling (2).
15493 parsoid=wt2html,wt2wt,html2html
15496 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15498 <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>
15501 <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>
15505 Localized image handling (3).
15510 <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>
15512 [[File:Foobar.jpg|بندانگشتی]]
15516 "border", "frameless" and "class" attributes on an image.
15519 parsoid=wt2html,wt2wt,html2html
15521 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15523 <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>
15526 <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>
15529 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15531 Invalid image attributes (T64500)
15534 parsoid=wt2html,wt2wt,html2html
15536 [[File:Foobar.jpg|thumb|float|left|caption]]
15538 [[File:Foobar.jpg|thumb|righ|caption]]
15540 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15542 <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>
15543 <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>
15544 <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>
15547 <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>
15548 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15549 <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>
15555 #REDIRECT [[File:Barfoo.jpg]]
15558 # FIXME: Parsoid should run this test -- but we'd need to teach the
15559 # mockAPI about the redirected Barfoo.jpg image.
15563 [[Image:Barfoo.jpg]]
15565 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15570 Missing image with uploads disabled
15574 [[File:Foobaz.jpg]]
15576 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15579 <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>
15582 # Parsoid-specific testing for images
15583 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15584 # Currently imperfect due to a flaw in the Parsoid testrunner
15586 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15590 Parsoid-specific image handling - simple image with size and middle alignment
15592 [[File:Foobar.jpg|middle|50px]]
15594 <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>
15598 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
15600 parsoid=wt2wt,wt2html,html2html
15602 [[Image:Foobar.jpg|middle|50px]]
15604 <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>
15608 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
15610 [[File:Foobar.jpg|50px|middle]]
15612 <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>
15616 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
15618 parsoid=wt2html,wt2wt,html2html
15620 [[Image:Foobar.jpg|50px|middle]]
15622 <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>
15626 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15628 [[File:Foobar.jpg|500x10px|baseline|caption]]
15630 <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>
15634 Parsoid-specific image handling - simple image with border and size spec
15636 [[File:Foobar.jpg|50px|border|caption]]
15638 <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>
15642 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15644 parsoid=wt2html,html2html
15646 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15648 <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>
15652 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
15654 parsoid=wt2html,html2html
15656 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15658 <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>
15662 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15664 parsoid=wt2html,html2html
15666 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15668 <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>
15672 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
15674 parsoid=wt2html,html2html
15676 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15678 <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>
15682 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
15684 parsoid=wt2html,wt2wt,html2html
15686 [[File:Foobar.jpg|frame|500x50px|caption]]
15688 <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>
15692 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
15694 parsoid=wt2html,html2html
15696 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15698 <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>
15702 Parsoid-specific image handling - frameless image with specific size, border, and caption
15704 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15706 <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>
15710 Parsoid-specific image handling - simple image with a formatted caption
15712 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15714 <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>
15718 Parsoid-specific image handling - caption with a template in it
15720 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15722 <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>
15726 Parsoid-specific image handling - caption with unbalanced tags in it
15728 parsoid=wt2html,wt2wt,html2html
15731 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15735 <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>
15740 Parsoid-specific image handling - empty caption (1)
15742 parsoid=wt2html,wt2wt
15744 [[File:Foobar.jpg|thumb|]]
15746 <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>
15749 # empty captions don't get serialized unless we're in the "round trip" case
15751 Parsoid-specific image handling - empty caption (2)
15755 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15756 <a href="./File:Foobar.jpg">
15757 <img resource="./File:Foobar.jpg"
15758 src="//example.com/images/3/3a/Foobar.jpg"
15759 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15760 height="25" width="220"/>
15762 <figcaption></figcaption>
15765 [[File:Foobar.jpg|thumb]]
15769 Parsoid-specific image handling - whitespace caption
15771 [[File:Foobar.jpg|thumb| ]]
15773 <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>
15777 Parsoid-specific image handling - lang option
15780 [[File:Foobar.svg|lang=de|caption]]
15784 <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>
15788 ## Edge case bugs in Parsoid from T93580
15790 T93580: 1. Templated <ref> inside block images
15792 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15796 <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>
15798 <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>
15802 T93580: 2. <ref> inside inline images
15804 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15808 <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>
15810 <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>
15814 T93580: 3. Templated <ref> inside inline images
15816 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15820 <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>
15822 <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>
15829 Subpage test/subpage
15837 subpage title=[[Subpage test]]
15841 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15846 Subpage noslash link
15848 subpage title=[[Subpage test]]
15852 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15857 Subpage test/1/2/subpage
15863 Relative subpage noslash link
15865 parsoid=wt2wt,wt2html,html2html
15866 subpage title=[[Subpage test/1/2/3/4]]
15872 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15873 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15876 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15877 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15881 Parsoid: dot-slash prefixed wikilinks
15891 </p><p>[[././baz/]]
15896 </p><p>[[././baz/]]
15901 Render invalid page names as plain text (T53090)
15913 [[foo[http://example.com]xyz]]
15915 [[{{echo|./../foo}}|bar]]
15916 [[{{echo|foo/.}}|bar]]
15917 [[{{echo|foo/..}}|bar]]
15918 [[{{echo|foo~~~~bar}}]]
15919 [[{{echo|foo>bar}}]]
15920 [[{{echo|foo././bar}}]]
15921 [[{{echo|foo{bar}}]]
15922 [[{{echo|foo}bar}}]]
15923 [[{{echo|foo[bar}}]]
15924 [[{{echo|foo]bar}}]]
15925 [[{{echo|foo<bar}}]]
15927 <p>[[./../foo|bar]]
15937 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15938 </p><p>[[./../foo|bar]]
15951 <p>[[./../foo|bar]]
15961 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
15963 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15964 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15965 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15966 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15967 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15968 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15969 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15970 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15971 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15972 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15973 [[<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>
15981 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15986 T2561: {{/Subpage}}
15988 subpage title=[[Page]]
15992 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16000 Category:MediaWiki User's Guide
16008 [[:Category:MediaWiki User's Guide]]
16010 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16019 [[Category:MediaWiki User's Guide]]
16021 cat=MediaWiki_User's_Guide sort=
16023 <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"}}'/>
16027 PAGESINCATEGORY invalid title fatal (r33546 fix)
16029 {{PAGESINCATEGORY:<bogus>}}
16036 Category with different sort key
16040 [[Category:MediaWiki User's Guide|Foo]]
16042 cat=MediaWiki_User's_Guide sort=Foo
16044 <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"}}'/>
16048 Category with identical sort key
16052 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16054 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16056 <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"}}'/>
16060 Category with empty sort key
16065 [[Category:MediaWiki User's Guide|]]
16067 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16071 Category with empty sort key and parentheses
16076 [[Category:Foo (bar)|]]
16078 [[Category:Foo (bar)|Foo]]
16082 Category with link tail
16087 123[[Category:Foo]]456
16089 123[[Category:Foo]]456
16093 Category with template
16098 [[Category:{{echo|Foo}}]]
16100 [[Category:{{echo|Foo}}]]
16104 Category with template in sort key
16109 [[Category:Foo|{{echo|Bar}}]]
16111 [[Category:Foo|{{echo|Bar}}]]
16115 Category with template in sort key and title
16120 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16122 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16125 ## We used to, but no longer wt2wt this test since the default serializer
16126 ## will normalize all categories to serialize on their own line.
16127 ## This wikitext usage is going to be fairly uncommon in production and
16128 ## selser will take care of preserving formatting in those scenarios.
16130 Category / paragraph interactions
16134 Foo [[Category:Baz]] Bar
16136 Foo [[Category:Baz]]
16144 [[Category:Baz]] Bar
16157 {{echo|[[Category:Baz]]}}
16170 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16171 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16172 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16173 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16174 <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>
16175 <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}}]}'/>
16176 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16179 ## We used to, but no longer wt2wt this test since the default serializer
16180 ## will normalize all categories to serialize on their own line.
16181 ## This wikitext usage is going to be fairly uncommon in production and
16182 ## selser will take care of preserving formatting in those scenarios.
16184 ## The whitespace on the empty line is part of the test. Please do not delete
16186 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16192 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16194 {{echo|[[Category:Foo]] and so should this!}}
16196 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16201 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16203 <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>
16206 ## Parsoid will not try to wt2wt this while preserving newlines because
16207 ## it suppresses excess newlines within list items -- and we don't want to
16208 ## introduce a special case just for categories, which is, in reality somewhat
16209 ## odd behavior -- categories are unlikely to be used in list items like this
16210 ## in top-level pages and are only likely to show up in template-generated
16211 ## list items where this RT-ing is a non-issue.
16213 ## The whitespace on the empty line is part of the test. Please do not delete
16215 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16221 [[Category:Foo]] and this should be part of the same list item
16224 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16226 <ul><li>This and this should be part of the same list item</li>
16227 <li>So should this and this should be part of the same list item</li></ul>
16230 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16231 <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>
16235 ## Newlines and categories that follow the last item of a list
16236 ## are treated differently because this (list followed by categories)
16237 ## is an extremely common pattern on wikis.
16239 3. Categories and newlines: newline suppression for last list item should RT properly
16260 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16262 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16263 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16265 <dl><dd>c</dd></dl>
16267 <link rel="mw:PageProp/Category" href="./Category:C"/>
16269 <dl><dt>d</dt></dl>
16271 <link rel="mw:PageProp/Category" href="./Category:D"/>
16275 4. Categories and newlines: newline suppression for last list item should RT properly
16283 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16285 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16288 ## only wt2html for this to make sure the algo only applies to the rightmost path
16290 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16303 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16305 <ul><li>d</li></ul></li></ul>
16306 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16309 ## We used to, but no longer wt2wt this test since the default serializer
16310 ## will normalize all categories to serialize on their own line.
16311 ## This wikitext usage is going to be fairly uncommon in production and
16312 ## selser will take care of preserving formatting in those scenarios.
16314 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16318 *a [[Category:Foo]]
16320 <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>
16323 # This test also demonstrates because of newline+category tunneling
16324 # through the list hander, template wrapping doesn't expand to the
16325 # containing list when the list item swallows the category.
16327 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16332 <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
16333 </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>
16337 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16341 {{echo|[[Category:Foo]]
16345 <ul><li>a</li></ul>
16347 <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">
16348 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16349 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16353 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16357 [[Category:Bar]]<!--boo1--> <!--boo2-->
16358 [[Category:Baz]]<!--boo3--> <!--boo4-->
16360 <ul><li>a</li></ul>
16362 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16363 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16367 Categories and newlines: should behave properly with linkprefix (T87753)
16382 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16383 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16387 No regressions on internal links following category (T174639)
16389 parsoid=wt2html,html2html
16391 [[Category:Foo]]<div>a
16396 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16399 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16401 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16404 # Note that Parsoid differs slightly from PHP due to T175421
16406 11. Special case where only newlines separate links (T175416)
16408 parsoid=wt2html,html2html
16412 [[Foo]][[es:Alimento]]
16417 <a href="/wiki/Foo" title="Foo">Foo</a>
16418 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16421 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16423 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16425 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16429 Category links with multiple namespaces
16431 [[Category:Project:Foo]]
16433 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16437 Parsoid: Serialize link to category page with colon escape
16443 [[:Category:Foo|Bar]]
16446 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16447 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16451 # We used to, but no longer wt2wt this test since the default serializer
16452 # will normalize all categories to serialize on their own line.
16453 # This wikitext usage is going to be fairly uncommon in production and
16454 # selser will take care of preventing whitespace insertion if this
16455 # occurs in an article.
16457 # html2html disabled for the same reason (whitespace insertion between
16460 # html2wt disabled because it localizes the "Category" namespace.
16462 Link prefix/suffixes aren't applied to category links
16472 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16476 Link prefix/suffixes aren't applied to language links
16486 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16490 Parsoid: Serialize link to file page with colon escape
16496 [[:File:Foo.png|Bar]]
16499 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16500 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16505 Parsoid: Serialize a genuine category link without colon escape
16510 [[Category:Foo|Bar]]
16512 <link rel="mw:PageProp/Category" href="./Category:Foo">
16513 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16517 Normalize hrefs properly before testing for invalid link targets (T72894)
16521 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16523 [[Category:Toxine bactérienne]]
16527 Parsoid: Defaultsort
16529 {{DEFAULTSORT:Foo}}
16531 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16534 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16535 # But, this is a limitation of our representation and is documented in
16536 # TemplateHandler.js in processSpecialMagicWord
16538 Parsoid: Defaultsort (template-generated)
16540 {{{{echo|DEFAULTSORT}}:Foo}}
16542 <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"}]]}'/>
16546 ### Inter-language links
16549 Interlanguage links
16557 es:Alimento fr:Nourriture zh:食品
16559 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16560 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16561 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16565 Duplicate interlanguage links (T26502)
16576 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16577 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16578 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16579 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16586 Basic section headings
16593 ===Smaller headline===
16596 <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>
16599 <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>
16602 <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>
16608 Section headings with TOC
16611 ===Subheadline 1===
16612 =====Skipping a level=====
16613 ======Skipping a level======
16617 ===Another headline===
16619 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16621 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16623 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16625 <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>
16627 <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>
16634 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16636 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16642 <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>
16643 <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>
16644 <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>
16645 <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>
16646 <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>
16649 <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>
16654 TOC anchors don't collide
16662 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16664 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16665 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16666 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16667 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16671 <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>
16672 <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>
16673 <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>
16674 <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>
16678 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16679 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16681 Handling of sections up to level 6 and beyond
16686 ==Level 2 Heading==
16687 ===Level 3 Heading===
16688 ====Level 4 Heading====
16689 =====Level 5 Heading=====
16690 ======Level 6 Heading======
16691 =======Level 7 Heading=======
16692 ========Level 8 Heading========
16693 =========Level 9 Heading=========
16694 ==========Level 10 Heading==========
16696 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16698 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16700 <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>
16702 <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>
16704 <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>
16706 <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>
16708 <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>
16709 <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>
16710 <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>
16711 <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>
16712 <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>
16726 <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>
16727 <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>
16728 <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>
16729 <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>
16730 <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>
16731 <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>
16732 <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>
16733 <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>
16734 <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>
16735 <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>
16738 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16739 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16740 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16741 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16742 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16743 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16744 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16745 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16746 <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>
16747 <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>
16751 TOC regression (T11764)
16755 ====title 1.1.1====
16760 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16762 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16764 <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>
16766 <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>
16769 <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>
16772 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16774 <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>
16780 <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>
16781 <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>
16782 <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>
16783 <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>
16784 <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>
16785 <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>
16790 TOC for heading containing <span id="..."></span> (T96153)
16793 ==<span id="old-anchor"></span>New title==
16795 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16797 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16801 <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>
16806 TOC with wgMaxTocLevel=3 (T8204)
16812 ====title 1.1.1====
16817 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16819 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16821 <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>
16822 <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>
16825 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16827 <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>
16833 <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>
16834 <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>
16835 <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>
16836 <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>
16837 <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>
16838 <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>
16843 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16849 ====Section 1.1.1====
16850 ====Section 1.1.1.1====
16853 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16855 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16857 <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>
16860 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16864 <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>
16865 <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>
16866 <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>
16867 <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>
16868 <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>
16874 Resolving duplicate section names
16879 <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>
16880 <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>
16885 Resolving duplicate section names with differing case (T12721)
16890 <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>
16891 <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>
16903 Template with sections, __NOTOC__
16910 <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>
16911 <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>
16912 <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>
16913 <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>
16918 __NOEDITSECTION__ keyword
16924 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16925 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16930 Link inside a section heading
16932 ==Section with a [[Main Page|link]] in it==
16934 <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>
16939 TOC regression (T14077)
16946 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16948 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16950 <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>
16953 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16957 <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>
16958 <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>
16959 <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>
16964 T3219 URL next to image (good)
16966 http://example.com [[File:Foobar.jpg]]
16968 <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>
16971 <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>
16974 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16976 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16978 parsoid=wt2html,html2html
16981 The line above must have a trailing space!
16984 But just in case it doesn't...
16986 <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>
16987 <p>The line above must have a trailing space!
16989 <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>
16990 <p>But just in case it doesn't...
16993 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16994 <p>The line above must have a trailing space!</p>
16995 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16997 <p>But just in case it doesn't...</p>
17001 Header with special characters (T27462)
17003 The tooltips shall not show entities to the user (ie. be double escaped)
17020 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17022 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17024 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17025 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17026 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17027 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17028 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17032 <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>
17035 <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>
17038 <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>
17041 <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>
17044 <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>
17048 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17050 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17053 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17056 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17059 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17062 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17067 Header with space, plus and underscore as entity
17069 Id should not contain + for spaces
17071 ==Space between Text==
17074 ==Space-Entity between Text==
17077 ==Plus+between+Text==
17080 ==Plus-Entity+between+Text==
17083 ==Underscore_between_Text==
17086 ==Underscore-Entity_between_Text==
17089 [[#Space between Text]]
17090 [[#Space-Entity between Text]]
17091 [[#Plus+between+Text]]
17092 [[#Plus-Entity+between+Text]]
17093 [[#Underscore_between_Text]]
17094 [[#Underscore-Entity_between_Text]]
17096 <p>Id should not contain + for spaces
17098 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17100 <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>
17101 <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>
17102 <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>
17103 <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>
17104 <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>
17105 <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>
17109 <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>
17112 <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>
17115 <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>
17118 <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>
17121 <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>
17124 <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>
17126 </p><p><a href="#Space_between_Text">#Space between Text</a>
17127 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17128 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17129 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17130 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17131 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17134 <p>Id should not contain + for spaces</p>
17136 <h2 id="Space_between_Text">Space between Text</h2>
17139 <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>
17142 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17145 <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>
17148 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17151 <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>
17154 <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>
17155 <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>
17156 <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>
17157 <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>
17158 <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>
17159 <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>
17162 # Parsoid html2wt disabled because it adds padding spaces around =
17164 Headers with excess '=' characters
17165 (Are similar tests necessary beyond the 1st level?)
17167 parsoid=wt2html,wt2wt,html2html
17171 =''italic'' heading==
17172 ==''italic'' heading=
17174 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17176 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17177 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17178 <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>
17179 <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>
17183 <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>
17184 <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>
17185 <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>
17186 <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>
17189 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17190 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17191 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17192 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17196 HTML headers vs TOC (T25393)
17197 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17209 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17211 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17213 <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>
17214 <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>
17217 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17219 <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>
17220 <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>
17226 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17227 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17228 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17229 <h1><span class="mw-headline" id="Header_2">Header 2
17231 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17232 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17235 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17236 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17237 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17239 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17241 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17242 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17243 <meta property="mw:PageProp/noeditsection"/>
17247 Single-line or multiline-comments can follow headings
17249 parsoid=wt2html,wt2wt
17257 <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>
17258 <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>
17259 <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>
17262 <h2 id="foo">foo</h2><!---->
17263 <h2 id="bar">bar</h2><!--c1-->
17264 <h2 id="baz">baz</h2><!--
17270 T3219 URL next to image (broken)
17272 http://example.com[[File:Foobar.jpg]]
17274 <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>
17277 <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>
17281 T3186 news: in the middle of text
17283 http://en.wikinews.org/wiki/Wikinews:Workplace
17285 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17291 Namespaced link must have a title
17300 Namespaced link must have a title (bad fragment version)
17302 [[Project:#fragment]]
17304 <p>[[Project:#fragment]]
17310 ### HTML tags and HTML attributes
17314 div with no attributes
17316 <div>HTML rocks</div>
17318 <div>HTML rocks</div>
17323 div with double-quoted attribute
17325 <div id="rock">HTML rocks</div>
17327 <div id="rock">HTML rocks</div>
17332 div with single-quoted attribute
17334 <div id='rock'>HTML rocks</div>
17336 <div id="rock">HTML rocks</div>
17341 div with unquoted attribute
17343 <div id=rock>HTML rocks</div>
17345 <div id="rock">HTML rocks</div>
17350 div with illegal double attributes
17352 <div id="a" id="b">HTML rocks</div>
17354 <div id="b">HTML rocks</div>
17359 div with empty attribute value, space before equals
17361 parsoid=wt2html,html2html
17363 <div class =>HTML rocks</div>
17365 <div class="">HTML rocks</div>
17368 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17372 div with multiple empty attribute values
17374 wgFragmentMode=[ 'html5', 'legacy' ]
17376 parsoid=wt2html,html2html
17378 <div id= title=>HTML rocks</div>
17380 <div id="title=">HTML rocks</div>
17383 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17386 # FIXME Parsoid doesn't actually match PHP here.
17387 # Probably we should use the synthetic <foo /> or <indicator>
17388 # extensions for this test, which are enabled when running parser tests.
17390 Extension tag in attribute value
17392 <span title="<translate>123</translate>">ok</span>
17393 !! html/php+disabled
17394 <p><span title="<translate>123</translate>">ok</span>
17397 <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>
17401 table with multiple empty attribute values
17403 parsoid=wt2html,html2html
17409 <table title="id=">
17415 <table title="id=">
17416 <tbody><tr><td>hi</td></tr>
17421 div with braces in attribute value
17423 <div title="{}">Foo</div>
17425 <div title="{}">Foo</div>
17428 <div title="{}">Foo</div>
17432 div with empty attribute value, no space before equals
17434 parsoid=wt2html,html2html
17436 <div class=>HTML rocks</div>
17438 <div class="">HTML rocks</div>
17441 <div class="">HTML rocks</div>
17445 HTML multiple attributes correction
17447 <p class="error" class="awesome">Awesome!</p>
17449 <p class="awesome">Awesome!</p>
17454 Table multiple attributes correction
17457 !+ class="error" class="awesome"|status
17462 <th class="awesome">status
17470 <DIV ID="x">HTML ROCKS</DIV>
17472 <div id="x">HTML ROCKS</div>
17477 Non-ASCII pseudo-tags are rendered as text
17486 Pseudo-tag with URL 'name' renders as url link
17488 <http://example.com/>
17490 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17495 text with amp in the middle of nowhere
17499 <p>Remember AT&T?
17504 text with character entity: eacute
17506 I always thought é was a cute letter.
17508 <p>I always thought é was a cute letter.
17513 text with entity-escaped character entity-like string: eacute
17515 I always thought &eacute; was a cute letter.
17517 <p>I always thought &eacute; was a cute letter.
17522 text with undefined character entity: xacute
17524 I always thought &xacute; was a cute letter.
17526 <p>I always thought &xacute; was a cute letter.
17533 <data value="5">five</data>
17534 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17535 <mark>This highlighted text</mark>
17537 <p><data value="5">five</data>
17538 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17539 <mark>This highlighted text</mark>
17544 HTML tag with leading space is parsed as text
17548 <p>< div>foo< /div>
17552 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17553 ## the HTML5 parsing spec.
17555 Element with broken attribute syntax
17559 <div style=" style="123">hi</div>
17562 <div style="123">hi</div>
17566 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17567 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17571 ### Nesting tests (see T43545, T52604, T53081)
17574 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17575 # Note that html2wt is considerably more difficult if we use <b> in
17576 # the test case, instead of <small>
17578 Ensure that HTML adoption agency algorithm is properly implemented.
17580 <small>X<small>Y</small>Z</small>
17582 <p><small>X<small>Y</small>Z</small>
17586 # This was T43545 in the PHP parser.
17590 <kbd>X<kbd>Y</kbd>Z</kbd>
17592 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17596 # The following cases were T53081 in the PHP parser.
17597 # Note that there are some other nestable tags (b, i, etc) which are
17598 # not covered; see T53081 for discussion.
17603 <em>X<em>Y</em>Z</em>
17605 <p><em>X<em>Y</em>Z</em>
17610 Nesting of <strong>
17612 <strong>X<strong>Y</strong>Z</strong>
17614 <p><strong>X<strong>Y</strong>Z</strong>
17623 <p><q>X<q>Y</q>Z</q>
17630 <ruby>X<ruby>Y</ruby>Z</ruby>
17632 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17639 <bdo>X<bdo>Y</bdo>Z</bdo>
17641 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17653 [[Media:Foobar.jpg]]
17654 [[Media:Video.ogv]]
17655 [[:Media:Video.ogv]]
17657 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17658 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17659 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17662 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17663 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17664 <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>
17668 Media link with text
17670 [[Media:Foobar.jpg|A neat file to look at]]
17672 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17675 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17678 # FIXME: this is still bad HTML tag nesting
17679 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17680 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17682 Media link with nasty text
17684 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17686 <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>
17689 <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>
17691 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true}'>Safe Link</a></p><div style="display:none" data-parsoid='{"stx":"html"}'><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'>" onmouseover="alert(document.cookie)" onfoo="</a></div>
17696 Media link to nonexistent file (T3702)
17698 [[Media:No such.jpg]]
17699 [[Media:No_such file.jpg]]
17701 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17702 <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>
17705 <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>
17706 <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>
17710 Image link to nonexistent file (T3850 - good)
17712 [[File:No_such.jpg]]
17714 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17717 <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>
17721 :Image link to nonexistent file (T3850 - bad)
17723 [[:Image:No such.jpg]]
17725 <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>
17728 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17732 Character reference normalization in link text (T3938)
17734 [[Main Page|this&that]]
17736 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17743 Test for unicode normalization
17745 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17749 (T21451) Links should refer to the normalized form.
17757 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17758 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17759 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17760 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17761 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17766 Empty attribute crash test (T4067)
17768 <font color="">foo</font>
17770 <p><font color="">foo</font>
17775 Empty attribute crash test single-quotes (T4067)
17777 <font color=''>foo</font>
17779 <p><font color="">foo</font>
17784 Attribute test: equals, then nothing
17786 parsoid=wt2html,html2html
17788 <font color=>foo</font>
17790 <p><font color="">foo</font>
17793 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17797 Attribute test: unquoted value
17799 parsoid=wt2html,html2html
17801 <font color=x>foo</font>
17803 <p><font color="x">foo</font>
17806 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17810 Attribute test: unquoted but illegal value (hash)
17812 <font color=#x>foo</font>
17814 <p><font color="#x">foo</font>
17818 # Parsoid does not serialize to empty attribute syntax,
17819 # so wt2wt and html2wt cases are skipped
17821 Attribute test: no value (T54330)
17823 parsoid=wt2html,html2html
17825 <font color>foo</font>
17827 <p><font color="">foo</font>
17830 <p><font color="">foo</font></p>
17834 T4095: link with three closing brackets
17838 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17841 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17845 T4095: link with pipe and three closing brackets
17847 [[Main Page|link]]]
17849 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17852 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17856 T4095: link with pipe and three closing brackets, version 2
17858 [[Main Page|[http://example.com/]]]
17860 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17863 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17872 Template:Dangerous attribute
17874 " onmouseover="alert(document.cookie)
17878 Template:Dangerous style attribute
17880 border-size: expression(alert(document.cookie))
17886 <div style="float: right; {{{1}}}">Magic div</div>
17890 T4304: HTML attribute safety (safe template; regression T4309)
17892 <div title="{{test}}"></div>
17894 <div title="This is a test template"></div>
17897 <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>
17900 # Parsoid has enough context to handle this case
17902 T4304: HTML attribute safety (dangerous template; 2309)
17904 <div title="{{dangerous attribute}}"></div>
17906 <div title=""></div>
17909 <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>
17913 T4304: HTML attribute safety (dangerous style template; 2309)
17915 <div style="{{dangerous style attribute}}"></div>
17917 <div style="/* insecure input */"></div>
17920 <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>
17924 T4304: HTML attribute safety (safe parameter; 2309)
17926 {{div style|width: 200px}}
17928 <div style="float: right; width: 200px">Magic div</div>
17931 <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>
17935 T4304: HTML attribute safety (unsafe parameter; 2309)
17937 {{div style|width: expression(alert(document.cookie))}}
17939 <div style="/* insecure input */">Magic div</div>
17942 <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>
17945 ## Parsoid output here differs; needs investigation.
17947 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17949 {{div style|"><script>alert(document.cookie)</script>}}
17951 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17955 ## Parsoid output here differs; needs investigation.
17957 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17959 {{div style|" ><script>alert(document.cookie)</script>}}
17961 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17966 T4304: HTML attribute safety (link)
17968 <div title="[[Main Page]]"></div>
17970 <div title="[[Main Page]]"></div>
17973 <div title="[[Main Page]]"></div>
17977 T4304: HTML attribute safety (italics)
17979 <div title="''foobar''"></div>
17981 <div title="''foobar''"></div>
17986 T4304: HTML attribute safety (bold)
17988 <div title="'''foobar'''"></div>
17990 <div title="'''foobar'''"></div>
17995 T4304: HTML attribute safety (ISBN)
17997 <div title="ISBN 1234567890"></div>
17999 <div title="ISBN 1234567890"></div>
18004 T4304: HTML attribute safety (RFC)
18006 <div title="RFC 1234"></div>
18008 <div title="RFC 1234"></div>
18013 T4304: HTML attribute safety (PMID)
18015 <div title="PMID 1234567890"></div>
18017 <div title="PMID 1234567890"></div>
18022 T4304: HTML attribute safety (web link)
18024 <div title="http://example.com/"></div>
18026 <div title="http://example.com/"></div>
18031 T4304: HTML attribute safety (named web link)
18033 <div title="[http://example.com/ link]"></div>
18035 <div title="[http://example.com/ link]"></div>
18038 <div title="[http://example.com/ link]"></div>
18042 T5244: HTML attribute safety (extension; safe)
18044 <div style="<nowiki>background:blue</nowiki>"></div>
18046 <div style="background:blue"></div>
18049 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18053 T5244: HTML attribute safety (extension; unsafe)
18055 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18057 <div style="/* insecure input */"></div>
18060 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18063 # More MSIE fun discovered by Tom Gilder
18066 MSIE CSS safety test: spurious slash
18068 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18070 <div style="/* insecure input */">evil</div>
18073 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18077 MSIE CSS safety test: hex code
18079 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18081 <div style="/* insecure input */">evil</div>
18084 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18088 MSIE CSS safety test: comment in url
18090 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18092 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18095 <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>
18099 MSIE CSS safety test: comment in expression
18101 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18103 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18106 <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>
18110 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18112 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18114 <p style="/* invalid control char */">A</p>
18117 <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>
18121 MSIE 6 CSS safety test: Fullwidth (T57332)
18123 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18124 <div style="top:EXPRESSION(alert())">B</div>
18126 <p style="/* insecure input */">A</p>
18127 <div style="/* insecure input */">B</div>
18130 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18131 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18135 MSIE 6 CSS safety test: IPA extensions (T57332)
18137 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18138 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18140 <div style="/* insecure input */">A</div>
18141 <p style="/* insecure input */">B</p>
18144 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18145 <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>
18149 MSIE 6 CSS safety test: sup/sub script (T57332)
18151 <div style="background-image:url⁽javascript:alert())">A</div>
18152 <div style="background-image:url₍javascript:alert())">B</div>
18153 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18155 <div style="/* insecure input */">A</div>
18156 <div style="/* insecure input */">B</div>
18157 <p style="/* insecure input */">C</p>
18160 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18161 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18162 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18168 parsoid=wt2html,html2html
18171 title="data:text/html,<img src=1 onerror=alert(1)>"
18172 style="-o-link:attr(title);-o-link-source:current">X</div>
18174 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18177 <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>
18181 MSIE 6 CSS safety test: Repetition markers (T57332)
18183 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18184 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18185 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18186 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18187 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18188 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18189 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18191 <p style="/* insecure input */">A</p>
18192 <p style="/* insecure input */">B</p>
18193 <p style="/* insecure input */">C</p>
18194 <p style="/* insecure input */">D</p>
18195 <p style="/* insecure input */">E</p>
18196 <p style="/* insecure input */">F</p>
18197 <p style="/* insecure input */">G</p>
18200 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expres〱ion((title='XSSed'),'red')"}}'>A</p>
18201 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresゝion((title='XSSed'),'red')"}}'>B</p>
18202 <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>
18203 <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>
18204 <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>
18205 <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>
18206 <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>
18210 Table attribute legitimate extension
18213 !+ style="<nowiki>color:blue</nowiki>"|status
18218 <th style="color:blue">status
18224 Table attribute safety
18227 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18232 <th style="/* insecure input */">status
18238 CSS line continuation 1
18240 <div style="background-image: u\ rl(test.jpg);"></div>
18242 <div style="/* insecure input */"></div>
18247 CSS line continuation 2
18249 <div style="background-image: u\ rl(test.jpg); "></div>
18251 <div style="/* invalid control char */"></div>
18262 Expansion of multi-line templates in attribute values (T8255)
18264 <div style="background: {{identity|#00FF00}}">-</div>
18266 <div style="background: #00FF00">-</div>
18271 Expansion of multi-line templates in attribute values (T8255 sanity check)
18273 <div style="background:
18276 <div style="background: #00FF00">-</div>
18279 <div style="background:
18284 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18286 <div style="background: #00FF00">-</div>
18288 <div style="background: #00FF00">-</div>
18293 Tags which are hidden from tidiers cannot pass through the Sanitizer
18295 <mw:toc><script>alert();</script></mw:toc>
18297 <p><mw:toc><script>alert();</script></mw:toc>
18302 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18306 Parser hook: empty input
18317 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18320 ## Don't expect parsoid to rt this form.
18322 Parser hook: empty input using terminated empty elements
18324 parsoid=wt2html,html2html
18335 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18339 Parser hook: empty input using terminated empty elements (space before)
18350 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18354 Parser hook: basic input
18365 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18368 ## Don't expect parsoid to rt this form.
18370 Parser hook: case insensitive
18372 parsoid=wt2html,html2html
18383 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18386 ## Don't expect parsoid to rt this form.
18388 Parser hook: case insensitive, redux
18390 parsoid=wt2html,html2html
18401 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18405 Parser hook: nested tags
18407 <tag><tag></tag></tag>
18416 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18420 Parser hook: basic arguments
18422 <tag width="200" height="100" depth="50" square=""></tag>
18435 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18438 ## Don't expect parsoid to rt this form.
18440 Parser hook: basic arguments, variations
18442 parsoid=wt2html,html2html
18444 <tag width=200 height = "100" depth = '50' square></tag>
18457 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18461 Parser hook: argument containing a forward slash (T7344)
18463 <tag filename="/tmp/bla"></tag>
18468 'filename' => '/tmp/bla',
18473 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18476 ## Don't expect parsoid to rt this form.
18478 Parser hook: empty input using terminated empty elements (T4374)
18480 parsoid=wt2html,html2html
18492 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18495 ## </tag> should be output literally since there is no matching tag that begins it
18496 ## Don't expect parsoid to rt this form.
18498 Parser hook: basic arguments using terminated empty elements (T4374)
18502 <tag width=200 height = "100" depth = '50' square/>
18519 <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
18523 ## Don't expect parsoid to rt this form.
18525 Parser hook: Don't allow unclosed extension tags
18531 this is a '''test'''
18533 <p>test <tag>123
18534 </p><p>this is a <b>test</b>
18537 <p>test <tag>123</p>
18539 <p>this is a <b>test</b></p>
18543 Parser hook: horizontal rule inside extension tag that outputs <pre>
18564 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18568 Parser hook: static parser hook not inside a comment
18570 <statictag>hello, world</statictag>
18572 <statictag action="flush" />
18578 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18579 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18583 Parser hook: static parser hook inside a comment
18585 <!-- <statictag>hello, world</statictag> -->
18586 <statictag action="flush" />
18591 <!-- <statictag>hello, world</statictag> -->
18592 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18595 # Nested template calls; this case was broken by Parser.php rev 1.506,
18599 Template:One-parameter
18601 (My parameter is: {{{1}}})
18605 Template:Map-one-parameter
18607 {{{{{1}}}|{{{2}}}}}
18611 Nested template calls
18613 {{Map-one-parameter|One-parameter|param}}
18615 <p>(My parameter is: param)
18624 # Remex wraps empty tag runs with p-tags.
18625 # Parsoid strips them out during p-wrapping.
18627 Sanitizer: Closing of open tags
18629 <s></s><table></table>
18631 <p><s></s></p><table></table>
18633 <s></s><table></table>
18637 Sanitizer: Closing of open but not closed tags
18646 Sanitizer: Closing of closed but not open tags
18652 <p class="mw-empty-elt">
18658 Sanitizer: Closing of closed but not open table tags
18662 Table not started</td></tr></table>
18664 <p>Table not started
18669 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18671 wgFragmentMode=[ 'html5', 'legacy' ]
18673 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18675 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18678 <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>
18682 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18684 wgFragmentMode=[ 'legacy' ]
18686 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18688 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18692 # In HTML5, the restrictions are that id must contain at least one character,
18693 # and must not contain any space characters.
18695 Sanitizer: Validating the contents of the id attribute (T6515)
18699 <br id="" /><br id="a space" />
18704 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18706 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18710 <br id="foo" /><br id="foo" />
18712 Something need to be done. foo-2 ?
18716 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18719 <meta itemprop="hello" content="world">
18720 <meta http-equiv="refresh" content="5">
18721 <meta itemprop="hello" http-equiv="refresh" content="5">
18722 <link itemprop="hello" href="{{SERVER}}">
18723 <link rel="stylesheet" href="{{SERVER}}">
18724 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18728 <p> <meta itemprop="hello" content="world" />
18729 <meta http-equiv="refresh" content="5">
18730 <meta itemprop="hello" content="5" />
18731 <link itemprop="hello" href="http://example.org" />
18732 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18733 <link itemprop="hello" href="http://example.org" />
18740 Sanitizer: Strip comments from CSS attributes
18742 parsoid=wt2html,wt2wt
18744 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18746 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18749 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18753 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18755 [[meatball:Soft"Security]]
18757 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18760 <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>
18764 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18766 [[meatball:Foo<Bar]]
18767 [[meatball:Foo>Bar]]
18768 [[meatball:Foo<bar]]
18769 [[meatball:Foo>bar]]
18771 <p>[[meatball:Foo<Bar]]
18772 [[meatball:Foo>Bar]]
18773 [[meatball:Foo<bar]]
18774 [[meatball:Foo>bar]]
18777 <p>[[meatball:Foo<Bar]]
18778 [[meatball:Foo>Bar]]
18779 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18780 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18784 Language converter: output gets cut off unexpectedly (T7757)
18788 this bit is safe: }-
18790 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18792 then we get cut off here: }-
18794 all additional text is vanished
18796 <p>this bit is safe: }-
18797 </p><p>but if we add a conversion instance: xxx
18798 </p><p>then we get cut off here: }-
18799 </p><p>all additional text is vanished
18802 <p>this bit is safe: }-</p>
18803 <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>
18804 <p>then we get cut off here: }-</p>
18805 <p>all additional text is vanished</p>
18809 Language converter glossary rules inside attributes (T119158)
18811 language=sr variant=sr-el
18813 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18815 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18818 </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>
18821 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18823 <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>
18827 Self closed html pairs (T7487)
18829 <center><font id="bug" />Centered text</center>
18830 <div><font id="bug2" />In div text</div>
18832 <center><font id="bug"></font>Centered text</center>
18833 <div><font id="bug2"></font>In div text</div>
18837 Punctuation: nbsp before exclamation
18841 <p>C'est grave !
18846 Punctuation: CSS !important (T13874)
18848 <div style="width:50% !important">important</div>
18850 <div style="width:50% !important">important</div>
18855 Punctuation: CSS ! important (T13874; with space after)
18857 <div style="width:50% ! important">important</div>
18859 <div style="width:50% ! important">important</div>
18864 HTML bullet list, closed tags (T7497)
18877 <ul data-parsoid='{"stx":"html"}'>
18878 <li data-parsoid='{"stx":"html"}'>One</li>
18879 <li data-parsoid='{"stx":"html"}'>Two</li>
18885 HTML bullet list, unclosed tags (T7497)
18897 <ul data-parsoid='{"stx":"html"}'>
18898 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18899 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18905 HTML ordered list, closed tags (T7497)
18918 <ol data-parsoid='{"stx":"html"}'>
18919 <li data-parsoid='{"stx":"html"}'>One</li>
18920 <li data-parsoid='{"stx":"html"}'>Two</li>
18926 HTML ordered list, unclosed tags (T7497)
18939 <ol data-parsoid='{"stx":"html"}'>
18940 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18941 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18947 HTML nested bullet list, closed tags (T7497)
18970 <ul data-parsoid='{"stx":"html"}'>
18971 <li data-parsoid='{"stx":"html"}'>One</li>
18972 <li data-parsoid='{"stx":"html"}'>Two:
18973 <ul data-parsoid='{"stx":"html"}'>
18974 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18975 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18982 HTML nested bullet list, open tags (T7497)
19004 HTML nested ordered list, closed tags (T7497)
19029 HTML nested ordered list, open tags (T7497)
19066 HTML ordered list item with parameters oddity
19068 <ol><li id="fragment">One</li>
19071 <ol><li id="fragment">One</li>
19076 # parsoid doesn't explicitly mark autonumbered links, see T55505
19078 T7918: autonumbering
19080 [http://first/] [http://second] [ftp://ftp]
19084 [mailto:enclosed@mail.tld With target]
19086 [mailto:enclosed@mail.tld]
19088 mailto:inline@mail.tld
19090 <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>
19091 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19092 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19093 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19094 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19097 <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>
19098 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19099 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19100 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19101 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19106 # Security and HTML correctness
19107 # From Nick Jenkins' fuzz testing
19111 Fuzz testing: Parser13
19125 # Note that Parsoid output differs from the PHP parser here: the PHP
19126 # parser breaks the URL for the magic word, while in Parsoid the URL
19127 # production takes precedence.
19129 Fuzz testing: Parser14
19134 <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>
19135 http://<div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
19137 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19143 <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>
19144 http://</p><div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
19146 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19150 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19151 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19155 Fuzz testing: Parser14-table
19157 parsoid=wt2html,html2html
19162 <h2><span class="mw-headline" id="a">a</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19163 <table style="__TOC__">
19168 <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>
19169 <table style="__TOC__">
19176 <table style="__TOC__"></table>
19179 # Known to produce bogus xml (extra </td>)
19180 # Don't add the html/php section since it generates broken HTML
19182 Fuzz testing: Parser16
19199 Fuzz testing: Parser21
19202 !irc://{{ftp://a" onmouseover="alert('hello world');"
19207 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19217 Fuzz testing: Parser22
19219 http://===r:::https://b
19223 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19231 # Known to produce bad XML for now
19233 Fuzz testing: Parser24
19240 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19241 <br style="onmouseover='alert(document.cookie);' " />
19243 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19248 <u class="|">}}}} >
19249 <br style="onmouseover='alert(document.cookie);'" />
19251 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19259 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19260 <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>"}'/>}}}} >
19261 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/></u></p><p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true,"autoInsertedStart":true}'>MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p><table data-parsoid='{"autoInsertedEnd":true}'>
19265 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19268 # Note: the current result listed for this is not what the original one was,
19269 # but the original bug was JavaScript injection, which is fixed in any case.
19270 # It's not clear that the original result listed was any more correct than the
19271 # current one. Original result:
19274 # <li class="||">
19275 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19277 Fuzz testing: Parser25 (T8055)
19283 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19285 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19288 <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"]}'>
19289 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19293 Fuzz testing: URL adjacent extension (with space, clean)
19295 http://example.com <nowiki>junk</nowiki>
19297 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19300 <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>
19304 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19306 http://example.com<nowiki>junk</nowiki>
19308 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19311 <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>
19315 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19317 http://example.com<pre>junk</pre>
19319 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19322 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19324 <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>
19328 Fuzz testing: image with bogus manual thumbnail
19330 [[Image:foobar.jpg|thumbnail= ]]
19332 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19335 <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>
19338 # Parsoid will emit the newline literally in wt2wt; see next test case.
19340 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19344 <pre dir=" "></pre>
19346 <pre dir=" "></pre>
19349 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19350 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19354 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19358 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19359 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19369 Templates in extension attributes are not expanded
19371 <pre dir="{{echo|ltr}}"></pre>
19373 <pre dir="{{echo|ltr}}"></pre>
19376 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19380 Parsing optional HTML elements (T8171)
19385 <td> Some tabular data</td>
19386 <td> More tabular data ...
19387 <td> And yet som tabular data</td>
19393 <td> Some tabular data</td>
19394 <td> More tabular data ...
19395 </td><td> And yet som tabular data</td>
19402 Correct handling of <td>, <tr> (T8171)
19407 <td> Some tabular data</td>
19408 <td> More tabular data ...</td>
19409 <td> And yet som tabular data</td>
19415 <td> Some tabular data</td>
19416 <td> More tabular data ...</td>
19417 <td> And yet som tabular data</td>
19425 Parsing crashing regression (fr:JavaScript)
19429 <p></body></x>
19434 Inline wiki vs wiki block nesting
19440 <p><b>Bold paragraph</b>
19441 </p><p>New wiki paragraph
19445 # FIXME: The current php output is documented
19446 # and desired output is the parsoid target.
19448 Inline HTML vs wiki block nesting
19454 <p><b>Bold paragraph
19455 </p><p>New wiki paragraph</b>
19458 <p><b>Bold paragraph</b>
19459 </p><p>New wiki paragraph
19463 # Original result was this:
19464 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19466 # While that might be marginally more intuitive, maybe, the six-apostrophe
19467 # construct is clearly pathological and the result stated here (which is what
19468 # the parser actually does) is about as reasonable as anything.
19470 Mixing markup for italics and bold
19473 '''bold''''''bold''bolditalics'''''
19475 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19483 Article for special page transclusion test
19487 Special page transclusion
19490 {{Special:Prefixindex/Xyzzyx}}
19492 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19498 Special page transclusion twice (T7021)
19501 {{Special:Prefixindex/Xyzzyx}}
19502 {{Special:Prefixindex/Xyzzyx}}
19504 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19506 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19512 Transclusion of default MediaWiki message
19514 {{MediaWiki:Mainpage}}
19521 Transclusion of nonexistent MediaWiki message
19523 {{MediaWiki:Mainpagexxx}}
19525 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19530 Transclusion of MediaWiki message with underscore
19532 {{MediaWiki:history_short}}
19539 Transclusion of MediaWiki message with space
19541 {{MediaWiki:history short}}
19548 Invalid header with following text
19558 Section extraction test (section 0)
19578 Section extraction test (section 1)
19600 Section extraction test (section 2)
19621 Section extraction test (section 3)
19641 Section extraction test (section 4)
19665 Section extraction test (section 5)
19685 Section extraction test (section 6)
19706 Section extraction test (section 7)
19726 Section extraction test (section 8)
19746 Section extraction test (section 9)
19767 Section extraction test (section 10)
19787 Section extraction test (nonexistent section 11)
19806 Section extraction test with bogus heading (section 1)
19811 ==bogus== not a legal section
19815 ==bogus== not a legal section
19819 Section extraction test with bogus heading (section 2)
19824 ==bogus== not a legal section
19831 Section extraction test with comment after heading (section 1)
19843 Section extraction test with comment after heading (section 2)
19855 Section extraction test with bogus <nowiki> heading (section 1)
19860 ==bogus== <nowiki>not a legal section</nowiki>
19864 ==bogus== <nowiki>not a legal section</nowiki>
19868 Section extraction test with bogus <nowiki> heading (section 2)
19873 ==bogus== <nowiki>not a legal section</nowiki>
19879 # Formerly testing for T4587, now resolved by the use of unmarked sections
19880 # instead of respecting commented sections
19882 Section extraction prefixed by comment (section 1)
19893 Section extraction prefixed by comment (section 2)
19903 # Formerly testing for T4607, now resolved by the use of unmarked sections
19904 # instead of respecting HTML-style headings
19906 Section extraction, mixed wiki and html (section 1)
19922 Section extraction, mixed wiki and html (section 2)
19938 # Formerly testing for T5342
19940 Section extraction, heading surrounded by <noinclude>
19944 <noinclude>==unmarked==</noinclude>
19950 # Test behavior of T21910
19952 Sectiion with all-equals
19957 The line above must have a trailing space
19960 But just in case it doesn't...
19964 But just in case it doesn't...
19968 Section replacement test (section 0)
19999 Section replacement test (section 1)
20028 Section replacement test (section 2)
20058 Section replacement test (section 3)
20089 Section replacement test (section 4)
20116 Section replacement test (section 5)
20147 Section replacement test (section 6)
20177 Section replacement test (section 7)
20208 Section replacement test (section 8)
20239 Section replacement test (section 9)
20268 Section replacement test (section 10)
20298 Section replacement test with initial whitespace (T15728)
20302 Preformatted initial line
20306 Preformatted initial line
20313 Section extraction, heading followed by pre with 20 spaces (T8398)
20325 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20338 Section extraction, <pre> around bogus header (T12309)
20355 Section replacement, <pre> around bogus header (T12309)
20376 Handling of 
 in URLs
20380 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20383 <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>
20387 Handling of %0A in URLs
20391 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20394 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20397 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20399 5 quotes, code coverage +1 line
20409 # same html as previous, but wikitext adjusted to match parsoid html2wt
20410 # note that wt2html and html2html will put the <i> before the <b>
20412 5 quotes, code coverage +1 line w/ nowiki (1)
20414 parsoid=wt2wt,html2wt
20416 '''''<nowiki/>'''''
20421 <p><b><i></i></b></p>
20424 # same as previous, just swapping the <i> and <b>
20426 5 quotes, code coverage +1 line w/ nowiki (2)
20428 '''''<nowiki/>'''''
20433 <p><i><b></b></i></p>
20437 Special:Search page linking.
20441 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20446 {{!}} is a magic word
20448 {{!}} is a magic word there and {{!}} is still a magic word here
20449 | is not a magic word here but {{!}} is still a magic word here
20451 <p>| is a magic word there and | is still a magic word here
20452 | is not a magic word here but | is still a magic word here
20455 <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
20456 | 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>
20462 title=[[Parser test]]
20476 *{{SUBJECTPAGENAME}}
20477 *{{SUBJECTPAGENAMEE}}
20480 *{{NAMESPACENUMBER}}
20485 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20487 <ul><li>Parser test</li>
20488 <li>Parser_test</li>
20489 <li>Parser test</li>
20490 <li>Parser_test</li>
20491 <li>Parser test</li>
20492 <li>Parser_test</li>
20493 <li>Parser test</li>
20494 <li>Parser_test</li>
20495 <li>Parser test</li>
20496 <li>Parser_test</li>
20497 <li>Talk:Parser test</li>
20498 <li>Talk:Parser_test</li>
20499 <li>Parser test</li>
20500 <li>Parser_test</li>
20508 <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>
20511 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20514 Gallery with valid attributes
20516 <gallery type="123" summary="345">
20517 File:File:Foobar.jpg
20520 <ul class="gallery mw-gallery-traditional" type="123">
20521 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20522 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20523 <div class="gallerytext">
20529 <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"}}'>
20530 <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>
20534 ## Parsoid thinks the "centre" here is a property, not a caption.
20539 "modes": ["wt2html"],
20540 "nativeGallery": true
20548 image4 |300px| centre
20549 image5.svg| http://///////
20554 <ul class="gallery mw-gallery-traditional">
20555 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20556 <div class="thumb" style="height: 150px;">Image1.png</div>
20557 <div class="gallerytext">
20560 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20561 <div class="thumb" style="height: 150px;">Image2.gif</div>
20562 <div class="gallerytext">
20565 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20566 <div class="thumb" style="height: 150px;">Image3</div>
20567 <div class="gallerytext">
20570 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20571 <div class="thumb" style="height: 150px;">Image4</div>
20572 <div class="gallerytext">
20577 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20578 <div class="thumb" style="height: 150px;">Image5.svg</div>
20579 <div class="gallerytext">
20580 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20584 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20585 <div class="thumb" style="height: 150px;">* image6</div>
20586 <div class="gallerytext">
20592 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20593 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File: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>
20594 <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>
20595 <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>
20596 <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>
20597 <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>
20598 <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>
20603 Gallery (with options, html)
20606 "modes": ["wt2html", "html2html"],
20607 "nativeGallery": true
20610 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20611 File:Nonexistent.jpg|caption
20612 File:Nonexistent.jpg
20613 image:foobar.jpg|some '''caption''' [[Main Page]]
20615 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20618 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20619 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20620 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20621 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20622 <div class="gallerytext">
20627 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20628 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20629 <div class="gallerytext">
20632 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20633 <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>
20634 <div class="gallerytext">
20635 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20639 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20640 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="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>
20641 <div class="gallerytext">
20644 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20645 <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>
20646 <div class="gallerytext">
20654 <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":{}}'>
20655 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20656 <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>
20657 <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>
20658 <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>
20659 <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>
20660 <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>
20665 Gallery (with options, extsrc)
20668 "nativeGallery": false
20671 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20672 File:Nonexistent.jpg|caption
20673 File:Nonexistent.jpg
20674 image:foobar.jpg|some '''caption''' [[Main Page]]
20676 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20679 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20680 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20681 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20682 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20683 <div class="gallerytext">
20688 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20689 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20690 <div class="gallerytext">
20693 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20694 <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>
20695 <div class="gallerytext">
20696 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20700 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20701 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="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>
20702 <div class="gallerytext">
20705 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20706 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="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>
20707 <div class="gallerytext">
20715 <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"}}'>
20716 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20717 <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>
20718 <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>
20719 <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>
20720 <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>
20721 <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>
20726 Gallery (without px units)
20728 <gallery widths="70" heights="40">
20732 <ul class="gallery mw-gallery-traditional">
20733 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20734 <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>
20735 <div class="gallerytext">
20741 <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"}}'>
20742 <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>
20747 Gallery (with invalid units)
20749 <gallery widths="70em" heights="40em">
20753 <ul class="gallery mw-gallery-traditional">
20754 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20755 <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>
20756 <div class="gallerytext">
20762 <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"}}'>
20763 <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>
20768 Gallery with link that has fragment
20771 "modes": ["wt2html", "html2html"],
20772 "nativeGallery": true
20776 image:foobar.jpg|link=Main_Page
20777 image:foobar.jpg|link=Main_Page#section
20778 image:foobar.jpg|link=Main Page#section|caption
20781 <ul class="gallery mw-gallery-traditional">
20782 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20783 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
20784 <div class="gallerytext">
20787 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20788 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="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>
20789 <div class="gallerytext">
20792 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20793 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
20794 <div class="gallerytext">
20802 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20803 <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>
20804 <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>
20805 <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>
20809 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20811 Gallery with template inside caption
20814 "nativeGallery": true
20817 <gallery caption="{{echo|hi}}">
20818 File:Foobar.jpg|{{echo|ho}}
20821 <ul class="gallery mw-gallery-traditional">
20822 <li class='gallerycaption'>{{echo|hi}}</li>
20823 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20824 <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>
20825 <div class="gallerytext">
20833 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20834 <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>
20835 <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>
20840 Gallery with wikitext inside caption
20843 "nativeGallery": true
20847 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20848 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20851 <ul class="gallery mw-gallery-traditional">
20852 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20853 <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>
20854 <div class="gallerytext">
20855 <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>
20859 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20860 <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>
20861 <div class="gallerytext">
20862 <p>This is a test template
20869 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20870 <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>
20871 <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>
20876 Gallery (with showfilename option)
20879 "nativeGallery": true
20882 <gallery showfilename="">
20883 File:Nonexistent.jpg|caption
20884 File:Nonexistent.jpg
20885 File:Foobar.jpg|some '''caption''' [[Main Page]]
20889 <ul class="gallery mw-gallery-traditional">
20890 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20891 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20892 <div class="gallerytext">
20893 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20898 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20899 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20900 <div class="gallerytext">
20901 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20905 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20906 <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>
20907 <div class="gallerytext">
20908 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20909 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20913 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20914 <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>
20915 <div class="gallerytext">
20916 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20923 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20924 <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>
20925 <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>
20926 <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>
20927 <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>
20931 ## Should Parsoid be preserving these variations? See T151367
20933 Gallery (with namespace-less filenames)
20936 "modes": ["wt2html", "html2html"],
20937 "nativeGallery": true
20941 File:Nonexistent.jpg
20947 <ul class="gallery mw-gallery-traditional">
20948 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20949 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20950 <div class="gallerytext">
20953 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20954 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20955 <div class="gallerytext">
20958 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20959 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
20960 <div class="gallerytext">
20963 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20964 <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>
20965 <div class="gallerytext">
20971 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20972 <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>
20973 <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>
20974 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20975 <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>
20980 Gallery override link with wikilink (T36852)
20983 "nativeGallery": true
20987 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20990 <ul class="gallery mw-gallery-traditional">
20991 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20992 <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>
20993 <div class="gallerytext">
20999 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21000 <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>
21005 Gallery override link with absolute external link (T36852)
21008 "nativeGallery": true
21012 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21015 <ul class="gallery mw-gallery-traditional">
21016 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21017 <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>
21018 <div class="gallerytext">
21024 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21025 <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>
21030 Gallery override link with absolute external link with LanguageConverter
21035 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21038 <ul class="gallery mw-gallery-traditional">
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="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>
21041 <div class="gallerytext">
21049 <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"}}'>
21050 <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>
21055 Gallery override link with malicious javascript (T36852)
21058 "modes": ["wt2html", "html2html"],
21059 "nativeGallery": true
21063 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
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/%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>
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="./%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>
21080 # Note that parsoid uses the invalid link as a caption, PHP does not.
21082 Gallery with invalid title as link (T45964)
21085 "modes": ["wt2html", "html2html"],
21086 "nativeGallery": true
21090 File:Foobar.jpg|link=<
21093 <ul class="gallery mw-gallery-traditional">
21094 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21095 <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>
21096 <div class="gallerytext">
21102 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21103 <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>
21108 Serialize gallery without attrs in data-mw
21111 "modes": ["html2wt"],
21112 "nativeGallery": true
21115 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21116 <li class="gallerycaption">123</li>
21117 <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>
21120 <gallery caption="123">
21126 Gallery with class and style attributes
21129 "nativeGallery": true
21132 <gallery class="center" style="text-align: center;">
21136 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21137 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21138 <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>
21139 <div class="gallerytext">
21145 <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":{}}'>
21146 <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>
21151 Gallery in slideshow mode
21154 "nativeGallery": true
21157 <gallery mode="slideshow" showthumbnails="">
21161 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21162 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21163 <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>
21164 <div class="gallerytext">
21170 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21171 <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>
21176 Serialize gallery image captions on a line
21179 "modes": ["html2wt"],
21180 "nativeGallery": true
21183 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21184 <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>
21185 <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>
21189 File:Foobar.jpg| hi ho
21190 File:Foobar.jpg|hi<br />ho
21195 HTML Hex character encoding (spells the word "JavaScript")
21197 parsoid=wt2html,wt2wt,html2html
21199 JavaScript
21201 <p>JavaScript
21204 <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>
21208 HTML Hex character encoding bogus encoding (T28437 regression check)
21212 <p>&#xsee;&#XSEE;
21217 HTML Hex character encoding mixed case
21219 parsoid=wt2html,wt2wt,html2html
21226 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21229 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21230 # Note that U+000C (form feed) is not a valid XML character, so
21231 # it is banned even though allowed in HTML5.
21233 Illegal character references (T106578)
21238 ; Control (low): 
21239 ; Control (high):  Ÿ
21240 ; Surrogate: ��
21241 ; This is an okay astral character: 💩
21249 <dt>Control (low)</dt>
21251 <dt>Control (high)</dt>
21252 <dd>&#x7F; &#x9F;</dd>
21254 <dd>&#xD83D;&#xDCA9;</dd>
21255 <dt>This is an okay astral character</dt>
21256 <dd>💩</dd></dl>
21260 __FORCETOC__ override
21272 ISBN 978-0-1234-56 789
21274 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21277 <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>
21281 ISBN followed by 5 spaces
21292 ISBN ISBN 1234567890
21294 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21297 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21300 # Uppercase X and lowercase x as well
21311 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21312 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21313 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21314 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21315 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21316 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21319 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21320 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21321 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21322 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21323 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21324 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21328 ISBN with empty prefix (parsoid test)
21332 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21335 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21339 T24905: <abbr> followed by ISBN followed by </a>
21341 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21343 <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>
21346 <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>
21354 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21357 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21361 Double RFC with a wiki link
21365 <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>
21368 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21376 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21379 <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>
21383 Centre-aligned image
21385 [[Image:foobar.jpg|centre]]
21387 <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>
21390 <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>
21396 [[Image:foobar.jpg|none]]
21398 <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>
21401 <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>
21405 Width + Height sized image (using px) (height is ignored)
21407 [[Image:foobar.jpg|640x480px]]
21409 <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>
21412 <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>
21416 Width-sized image (using px, no following whitespace)
21418 [[Image:foobar.jpg|640px]]
21420 <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>
21423 <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>
21427 Width-sized image (using px, with following whitespace - test regression from r39467)
21429 [[Image:foobar.jpg|640px ]]
21431 <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>
21434 <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>
21438 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21440 [[Image:foobar.jpg| 640px]]
21442 <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>
21445 <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>
21449 Image with page parameter
21453 [[File:LoremIpsum.djvu|page=2]]
21455 <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>
21458 <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>
21462 Another italics / bold test
21470 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21476 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21479 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21483 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21485 Images with the "|" character in the comment
21487 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21489 <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>
21492 <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>
21496 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21498 <html><script>alert(1);</script></html>
21500 <p><html><script>alert(1);</script></html>
21505 HTML with raw HTML ($wgRawHtml==true)
21509 <html><script>alert(1);</script></html>
21511 <p><script>alert(1);</script>
21516 Parents of subpages, one level up
21518 subpage title=[[Subpage test/L1/L2/L3]]
21522 <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>
21528 Parents of subpages, one level up, not named
21530 subpage title=[[Subpage test/L1/L2/L3]]
21534 <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>
21541 Parents of subpages, two levels up
21543 subpage title=[[Subpage test/L1/L2/L3]]
21549 <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
21550 </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>
21555 Parents of subpages, two levels up, without trailing slash or name.
21557 subpage title=[[Subpage test/L1/L2/L3]]
21566 Parents of subpages, two levels up, with lots of extra trailing slashes.
21568 subpage title=[[Subpage test/L1/L2/L3]]
21572 <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>
21577 Subpage test/L1/L2/L3Sibling
21583 Transclusion of a sibling page (one level up)
21585 subpage title=[[Subpage test/L1/L2/L3]]
21594 Transclusion of a child page
21596 subpage title=[[Subpage test/L1/L2]]
21604 # This is wt2html only in Parsoid because we add <nowiki>
21605 # because of {{..}} and we don't expect to fix that to
21606 # eliminate the nowikis selective for {{..}} markup.
21608 Non-transclusion because of too many up levels
21610 subpage title=[[Subpage test/L1/L2/L3]]
21613 {{../../../../More than parent}}
21615 <p>{{../../../../More than parent}}
21618 <p>{{../../../../More than parent}}</p>
21622 Definition list code coverage
21628 <dl><dt>title  </dt>
21630 <dt>title </dt>
21636 <dl><dt>title <span typeof="mw:Placeholder"> </span></dt><dd>def</dd>
21637 <dt>title<span typeof="mw:Placeholder"> </span></dt><dd>def</dd>
21638 <dt>title</dt><dd>def</dd></dl>
21642 Don't fall for the self-closing div
21644 <div>hello world</div/>
21646 <div>hello world</div>
21655 <p>[[:Template:Msg]]
21664 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21668 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21670 Always escape literal '>' in output, not just after '<'
21684 <p>This is a test template
21685 This is a test template
21697 Inclusion of !userCanEdit() content
21701 <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>
21707 Out-of-order TOC heading levels
21716 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
21718 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21720 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21721 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21724 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21726 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21727 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21733 <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>
21734 <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>
21735 <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>
21736 <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>
21737 <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>
21738 <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>
21744 ISBN with a dummy number
21754 ISBN with space-delimited number
21758 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21761 <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>
21766 ISBN with multiple spaces, no number
21785 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21786 </p><p>ISBN 12345678901
21789 <p>ISBN 123456789</p>
21791 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21793 <p>ISBN 12345678901</p>
21798 ISBN with trailing year (T9110)
21800 ISBN 1-234-56789-0 - 2006
21802 ISBN 1 234 56789 0 - 2006
21804 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21805 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21808 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21810 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21817 wgFragmentMode=[ 'html5', 'legacy' ]
21819 {{anchorencode:foo bar©#%n}}
21824 <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>
21828 anchorencode (legacy)
21830 wgFragmentMode=[ 'legacy' ]
21832 {{anchorencode:foo bar©#%n}}
21834 <p>foo_bar.C2.A9.23.25n
21839 anchorencode trims spaces
21841 wgFragmentMode=[ 'html5', 'legacy' ]
21843 {{anchorencode: __pretty__please__}}
21848 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21852 anchorencode deals with links
21854 wgFragmentMode=[ 'html5', 'legacy' ]
21856 {{anchorencode: [[hello|world]] [[hi]]}}
21861 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21865 anchorencode deals with templates
21867 wgFragmentMode=[ 'html5', 'legacy' ]
21869 {{anchorencode: {{Foo}} x}}
21874 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21878 anchorencode encodes like the TOC generator: (T20431)
21880 wgFragmentMode=[ 'html5', 'legacy' ]
21882 ===_ +:.3A%3A _ &&]] x===
21883 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21886 <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>
21887 <p>+:.3A%3A_&&]]_x
21890 <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>
21891 <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>
21892 <meta property="mw:PageProp/noeditsection"/>
21896 anchorencode encodes like the TOC generator: (T20431) (legacy)
21898 wgFragmentMode=[ 'legacy' ]
21900 ===_ +:.3A%3A&&]]===
21901 {{anchorencode: _ +:.3A%3A&&]] }}
21904 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21905 <p>.2B:.3A.253A.26.26.5D.5D
21910 T8200: blockquotes and paragraph formatting
21931 T10293: Use of center tag ruins paragraph formatting
21952 Parsing of overlapping (improperly nested) inline html tags
21954 <span><s>x</span></s>
21956 <p><span><s>x</span></s></span>
21959 <p><span><s>x</s></span>
21964 ### Language variants related tests
21967 # Parsoid does not mark self-links.
21968 # Parsoid does not convert links; PHP will do any necessary redirects.
21971 Self-link in language variants
21973 title=[[Dunav]] language=sr
21975 Both [[Dunav]] and [[Дунав]] are names for this river.
21977 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21980 <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>
21990 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21992 title=[[Duna]] language=sr
21994 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21996 <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.
21999 <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>
22003 Link to a section of a variant of this title shouldn't be parsed as self-link
22005 title=[[Duna]] language=sr
22007 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22009 <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.
22012 <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>
22016 Link to pages in language variants
22020 Main Page can be written as [[Маин Паге]]
22022 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22025 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22030 Multiple links to pages in language variants
22034 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22036 <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>.
22039 <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>
22044 Simple template in language variants
22050 <p>This is a test template
22056 Template with explicit namespace in language variants
22062 <p>This is a test template
22068 Basic test for template parameter in language variants
22072 {{парамтест|param=foo}}
22074 <p>This is a test template with parameter foo
22079 Simple category in language variants
22083 [[Category:МедиаWики Усер'с Гуиде]]
22085 cat=МедиаWики_Усер'с_Гуиде sort=
22087 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22102 ## We used to, but no longer wt2wt this test since the default serializer
22103 ## will normalize all categories to serialize on their own line.
22104 ## This wikitext usage is going to be fairly uncommon in production and
22105 ## selser will take care of preserving formatting in those scenarios.
22107 Don't convert blue categorylinks to another variant (T35210)
22113 [[A]][[Category:分类]]
22117 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22118 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22122 Stripping -{}- tags (language variants)
22126 Latin proverb: -{Ne nuntium necare}-
22128 <p>Latin proverb: Ne nuntium necare
22131 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22136 Prevent conversion with -{}- tags (language variants)
22138 language=sr variant=sr-ec
22140 Latinski: -{Ne nuntium necare}-
22142 <p>Латински: Ne nuntium necare
22145 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22150 Prevent conversion of text with -{}- tags (language variants)
22152 language=sr variant=sr-ec
22154 Latinski: -{Ne nuntium necare}-
22156 <p>Латински: Ne nuntium necare
22159 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22164 Prevent conversion of links with -{}- tags (language variants)
22166 language=sr variant=sr-ec
22170 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22173 <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>
22178 -{}- tags within headlines (within html for parserConvert())
22180 wgFragmentMode=[ 'html5', 'legacy' ]
22182 language=sr variant=sr-ec
22186 Note that even an unprotected headline ID is not affected by language
22191 <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>
22192 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22195 <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>
22198 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22200 <p>Note that even an unprotected headline ID is not affected by language
22203 <h2 id="Latinski">Latinski</h2>
22207 Explicit definition of language variant alternatives
22209 language=zh variant=zh-tw
22211 -{zh:China;zh-tw:Taiwan}-, not China
22213 <p>Taiwan, not China
22216 <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>
22220 Filter syntax for language variants
22222 language=zh variant=zh-tw
22224 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22226 <p>fooblog, WEBJOURNAL, WEBLOGquux
22229 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22232 # Note that Parsoid post-processing for language variants needs to
22233 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22235 Conversion around HTML tags
22237 language=sr variant=sr-ec
22239 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22240 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22243 <span title="ЛаCтин">ски</span>
22246 <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"}]}'/>
22247 <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>
22251 Explicit session-wise two-way language variant mapping (A flag and - flag)
22253 language=zh variant=zh-tw
22255 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22257 Taiwan is not China.
22259 But -{A|zh:China; zh-tw:Taiwan}- is China,
22261 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22263 and -{China}- is China.
22265 <p>This is Taiwan, but we'll forget that now.
22266 </p><p>Taiwan is not China.
22267 </p><p>But Taiwan is Taiwan,
22268 </p><p>(This should be stripped!)
22269 </p><p>and China is China.
22272 <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>
22273 <p>Taiwan is not China.</p>
22274 <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>
22275 <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>
22276 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22280 Explicit session-wise one-way language variant mapping (A flag and - flag)
22282 language=zh variant=zh-tw
22284 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22286 COUNTRY is China or Taiwan.
22288 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22290 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22292 and -{COUNTRY}- is COUNTRY.
22294 <p>This is Taiwan, but we'll forget that now.
22295 </p><p>COUNTRY is China or Taiwan.
22296 </p><p>But Taiwan is Taiwan,
22297 </p><p>(This should be stripped!)
22298 </p><p>and COUNTRY is COUNTRY.
22301 <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>
22302 <p>COUNTRY is China or Taiwan.</p>
22303 <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>
22304 <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>
22305 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22309 Explicit session-wise two-way language variant mapping (H flag for hide)
22311 language=zh variant=zh-tw
22313 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22317 <p>(This should be stripped!)
22318 </p><p>Taiwan is Taiwan.
22321 <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>
22322 <p>Taiwan is China.</p>
22326 Explicit session-wise one-way language variant mapping (H flag for hide)
22328 language=zh variant=zh-tw
22330 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22332 COUNTRY is Taiwan or China.
22334 <p>(This should be stripped!)
22335 </p><p>Taiwan is Taiwan or China.
22338 <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>
22339 <p>COUNTRY is Taiwan or China.</p>
22342 ## Note that parsoid test runner does not support 'showtitle' option.
22344 Adding explicit conversion rule for title (T flag)
22346 language=zh variant=zh-tw showtitle
22348 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22353 <p>Should be stripped!
22354 </p><p>Taiwan is China.
22357 <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>
22358 <p>Taiwan is China.</p>
22362 Code coverage: T combined with H flag
22364 language=zh variant=zh-tw showtitle
22366 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22371 <p>Should be stripped!
22372 </p><p>Taiwan is Taiwan.
22375 <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>
22376 <p>Taiwan is China.</p>
22380 Code coverage: T with no variants
22382 language=zh variant=zh-tw showtitle
22384 -{H|zh:China; zh-tw:Taiwan}-
22385 Taiwan is China.-{T|Taiwan is China}-
22392 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22393 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22397 Code coverage: rules with no variants
22399 language=zh variant=zh-tw
22401 -{H|zh:China; zh-tw:Taiwan}-
22412 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22414 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22415 Taiwan is China.</p>
22420 Code coverage: D flag for conversion rule
22422 language=zh variant=zh-tw
22424 -{D|zh-cn:XA; zh-tw:YA}-
22425 -{A;D|zh-cn:XB; zh-tw:YB}-
22426 -{D;H|zh-cn:XC; zh-tw:YC}-
22428 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22434 XA XB XC YA YB YC FOO BAR BAT 012345
22439 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22443 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22446 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22447 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22448 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22449 <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>
22450 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22451 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22452 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22453 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22457 Code coverage: N flag for conversion rule
22459 language=zh variant=zh-cn
22469 </p><p>српски (ћирилица)
22472 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22473 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22474 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22477 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22479 Code coverage: N flag for conversion rule (wt2html only)
22481 language=zh variant=zh-cn
22482 parsoid=wt2html,html2html
22489 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22493 Testing that changing the language variant here in the tests actually works
22495 language=zh variant=zh showtitle
22497 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22500 <p>Should be stripped!
22503 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22507 Recursive conversion of alt and title attrs shouldn't clear converter state
22509 language=zh variant=zh-cn
22512 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22513 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22517 Should be stripped<span title="Exclamation">!</span>
22520 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22521 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>
22525 T26072: more test on conversion rule for title
22527 language=zh variant=zh-tw showtitle
22529 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22531 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22534 <p>This should be stripped!
22535 </p><p>This won't take interferes with the title rule.
22538 <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>
22539 <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>
22543 Partly disable title conversion if variant == main language code
22545 language=zh variant=zh title=[[ZH]] showtitle
22547 -{T|zh-cn:CN;zh-tw:TW}-
22553 <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>
22557 Partly disable title conversion if variant == main language code, more
22559 language=zh variant=zh title=[[ZH]] showtitle
22567 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22571 Raw output of variant escape tags (R flag)
22573 language=zh variant=zh-tw
22575 Raw: -{R|zh:China;zh-tw:Taiwan}-
22577 <p>Raw: zh:China;zh-tw:Taiwan
22580 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22583 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22585 Raw output of variant escape tags (R flag) (wt2html only)
22587 language=zh variant=zh-tw
22588 parsoid=wt2html,html2html
22590 -{Variant}- -{D|syntax}- -{D;R|options}-
22592 <p>Variant syntax options
22595 <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>
22599 Nested markup inside raw output of variant escape tags (R flag)
22601 language=zh variant=zh-tw
22603 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22605 <p>Nested raw: nested Taiwan nested
22608 <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>
22612 Nested markup and spaces inside raw output of variant escape tags (R flag)
22614 language=zh variant=zh-tw
22616 X-{ outer -{ inner }- outer }-X
22618 <p>X outer inner outer X
22621 <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>
22625 Templates inside raw output of variant escape tags (R flag)
22627 language=zh variant=zh-tw
22629 Nested raw: -{R|nested {{echo|hi}} templates}-
22631 <p>Nested raw: nested hi templates
22634 <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>
22638 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22640 language=zh variant=zh-cn
22642 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22647 <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>
22651 Conversion rules from [numeric-only string] to [something else] (T48634)
22653 language=zh variant=zh-cn
22655 -{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
22660 <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>
22664 Two-way converter rule entries with an empty value should be ignored (T53551)
22666 language=zh variant=zh-cn
22668 -{H|zh-cn:foo;zh-tw:;}-foobar
22673 <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>
22677 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22679 language=zh variant=zh-cn
22681 -{H|=>zh-cn:foo;}-foobar
22686 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22690 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22692 language=zh variant=zh-cn
22699 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22703 Nested using of manual convert syntax
22705 language=zh variant=zh-hk
22707 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22709 <p>Nested: Hello Hong Kong!
22712 <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>
22716 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22718 language=zh variant=zh-cn
22720 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22722 <p><span title="X">A</span>
22725 <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>
22729 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22731 language=zh variant=zh-cn
22733 -{<span title="-{X}-">A</span>}-
22734 !! html/php+disabled
22735 <p><span title="X">A</span>
22738 <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>
22741 # Parsoid and PHP disagree on how to parse this example: Parsoid
22742 # insists that the content of a language converter element be a valid
22743 # DOM fragment or attribute string
22745 Language converter markup with block content
22747 language=zh variant=zh-cn
22749 <span>a-{b<div>c}-d
22751 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22753 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22758 </span></div></span></div></span>
22760 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><div typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[10,16,5,0]}'>c</div>"}}'></div><p>d</p>
22762 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><div typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[50,56,5,0]}'>c</div>"}}'></div><p>d</p>
22764 <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>
22768 LanguageConverter selser (1)
22770 language=zh variant=zh-cn
22772 "modes": ["wt2wt", "selser"],
22774 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22784 LanguageConverter selser (2)
22786 language=zh variant=zh-cn
22788 "modes": ["wt2wt", "selser"],
22790 ["span[class='x']", "contents", "text", "-{foo}-"],
22791 ["a", "contents", "text", "-{"],
22792 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22796 <span class="x">TEXT1</span>
22797 [http://example.com TEXT2]
22801 <span class="x"><nowiki>-{foo}-</nowiki></span>
22802 [http://example.com -{]
22803 [[Foo|<nowiki>-{</nowiki>]]
22804 {{1x|<nowiki>-{</nowiki>}}
22807 # Tests LanguageVariantText in ConstrainedText
22809 LanguageConverter selser (3)
22811 language=zh variant=zh-cn
22813 "modes": ["wt2wt", "selser"],
22815 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22816 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22827 |<nowiki/>-{edited}-
22831 # Tests LanguageVariantText._fromSelSer
22833 LanguageConverter selser (4)
22835 language=zh variant=zh-cn
22837 "modes": ["wt2wt", "selser"],
22839 ["td > span.x", "remove"]
22845 |<span class="x">Foo</span>-{Bar}-
22846 ||<span class="x">Foo</span>-{Bar}-
22856 # Since Parsoid is starting to emit canonical wikitext for links,
22857 # [http://example.com http://example.com] will not RT back to that
22859 # Parsoid does not language-convert links (it is done in a
22860 # post-processing step)
22862 Proper conversion of text in external links
22864 language=sr variant=sr-ec
22867 http://www.google.com
22868 gopher://www.google.com
22869 [http://www.google.com http://www.google.com]
22870 [gopher://www.google.com gopher://www.google.com]
22871 [https://www.google.com irc://www.google.com]
22872 [ftp://www.google.com www.google.com/ftp://dir]
22873 [//www.google.com www.google.com]
22875 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22876 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22877 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22878 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22879 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22880 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22881 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22884 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22885 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22886 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
22887 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22888 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22889 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22890 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22894 Do not convert roman numbers to language variants
22896 language=sr variant=sr-ec
22900 <p>Фридрих IV је цар.
22903 <p>Fridrih IV je car.</p>
22907 Unclosed language converter markup "-{"
22918 Don't convert raw rule "-{R|=>}-" to "=>"
22927 <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>
22931 Don't break link parsing if language converter markup is in the caption.
22933 language=sr variant=sr-ec
22935 [[Main Page|-{R|main page}-]]
22937 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22940 <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>
22944 T146304: Don't break template parsing if language converter markup is in the parameter.
22946 language=sr variant=sr-ec
22953 <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>
22957 T146305: Don't break image parsing if language converter markup is in the caption.
22961 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22963 <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>
22966 <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>
22970 T146305: Don't break image parsing if nested language converter markup is in the caption.
22972 language=zh variant=zh-cn
22974 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22976 <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>
22979 <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>
22982 # XXX html2wt disabled because rich markup in alt is not preserved.
22984 Don't break gallery if language converter markup is inside.
22989 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22990 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22993 <ul class="gallery mw-gallery-traditional">
22994 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22995 <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>
22996 <div class="gallerytext">
22997 <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>
23001 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23002 <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>
23003 <div class="gallerytext">
23004 <p>This is a test template
23011 <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"}}'>
23012 <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>
23013 <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>
23018 T153135: Don't break list handling if language converter markup is in the item.
23020 language=zh variant=zh-cn
23022 ;-{zh-cn:AAA;zh-tw:BBB}-
23026 <dt>foo:bar</dt></dl>
23029 <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>
23030 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23034 // Note that parsoid does not protect colons unless language converter
23035 // markup is properly nested, because it is a backtracking parser.
23037 T153135: Unclosed markup in definition list (code coverage)
23039 language=zh variant=zh-cn
23044 <dl><dt><b>foo:bar</b></dt><b>
23045 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23048 <dl><dt data-parsoid='{"dsr":[0,11,1,0]}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23049 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
23050 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
23055 T153135: Nested language converter markup in definition list (code coverage)
23057 language=zh variant=zh-cn
23059 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23061 <dl><dt>AAA foo:bar bat:baz</dt>
23065 <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>
23066 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23070 # html2wt mode disabled due to <nowiki> insertion.
23072 T153140: Don't break table handling if language converter markup is in the cell.
23074 language=sr variant=sr-ec
23075 parsoid=wt2html,wt2wt,html2html
23092 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23099 Language converter tricky html2wt cases (1)
23102 parsoid=html2wt,wt2wt
23104 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23106 -{<nowiki>}-</nowiki>}-
23113 Language converter tricky html2wt cases (2)
23116 parsoid=html2wt,wt2wt
23120 <nowiki>-{foo}-</nowiki>
23122 <p>-{foo}-
23127 Language converter tricky html2wt cases (3)
23130 parsoid=html2wt,wt2wt
23132 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23133 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23134 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23140 -{<nowiki>-{foo}-</nowiki>}-
23144 </p><p>-{foo}-
23149 Language converter tricky html2wt cases (4)
23152 parsoid=html2wt,wt2wt
23154 <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>
23162 # Note that the <nowiki> escaping added by parsoid for source text,
23163 # destination text, and language names only works on the PHP side
23164 # for *destination text*. (HTML entity escaping wouldn't work
23165 # any better.) This is probably a bug, at least for source texts.
23166 # (For language names PHP uses a precise regexp based on the languages
23167 # it currently knows have variants, which is fragile since this set
23168 # can grow/shrink over time.)
23170 Language converter tricky html2wt cases (5)
23172 language=zh variant=zh-cn
23174 <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>
23175 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23176 <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>
23177 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23180 -{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
23182 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23184 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23186 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23189 !! html/php+disabled
23190 <p>foobat;xyz=>zh-cn:abc
23194 </p><p>a:b=>c 0;zh-tw:bar
23199 T179579: Nowiki and lc interaction
23206 -{123<nowiki>|</nowiki>456}-
23208 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23210 <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>
23214 T2529: Uncovered bullet
23224 T2529: Uncovered bullet in a deeply nested list
23226 *******Foo {{bullet}}
23228 <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>
23234 T2529: Uncovered table already at line-start
23257 T2529: Uncovered bullet in parser function result
23259 *Foo {{lc:{{bullet}} }}
23267 T7678: Double-parsed template argument
23269 {{lc:{{{1}}}|hello}}
23276 T7678: Double-parsed template invocation
23278 {{lc:{{paramtest {{!}} param = hello }} }}
23280 <p>{{paramtest | param = hello }}
23285 Case insensitivity of parser functions for non-ASCII characters (T10143)
23288 title=[[Main Page]]
23290 {{PRVNÍVELKÉ:ěščř}}
23291 {{prvnívelké:ěščř}}
23311 Morwen/13: Unclosed link followed by heading
23318 <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>
23323 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23330 <h1><span class="mw-headline" id="heading">heading</span></h1>
23335 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23342 <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>
23357 Paragraphs inside divs (no extra line breaks)
23369 Paragraphs inside divs (extra line break on open)
23384 Paragraphs inside divs (extra line break on close)
23399 Paragraphs inside divs (extra line break on open and close)
23415 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23416 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23418 Nesting tags, paragraphs on lines which begin with <div>
23420 <div></div><strong>A
23423 <div></div><p><strong>A
23424 </strong></p><strong></strong><p><strong>B</strong>
23433 # T8200: <blockquote> should behave like <div> with respect to line breaks
23435 T8200: paragraphs inside blockquotes (no extra line breaks)
23437 <blockquote>Line one
23439 Line two</blockquote>
23441 <blockquote>Line one
23442 Line two</blockquote>
23445 <blockquote><p>Line one
23446 Line two</p></blockquote>
23450 T8200: paragraphs inside blockquotes (extra line break on open)
23455 Line two</blockquote>
23460 Line two</blockquote>
23466 Line two</p></blockquote>
23469 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23471 T8200: paragraphs inside blockquotes (extra line break on close)
23473 <blockquote>Line one
23478 <blockquote>Line one
23484 <blockquote><p>Line one
23491 T8200: paragraphs inside blockquotes (extra line break on open and close)
23507 ## This is a corner case interaction between the paragraph wrapping in the
23508 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
23509 ## some tags which close paragraphs (and thus prevent wrapping on their line),
23510 ## of which "div" is one, but do p-wrapping inside them. These are referred
23511 ## to as "never suppressing". Remex, for its part, doesn't traverse into
23512 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
23514 Paragraphs inside blockquotes/divs (no extra line breaks)
23516 <blockquote><div>Line one
23518 Line two</div></blockquote>
23520 <blockquote><div>Line one
23521 Line two</div></blockquote>
23526 Paragraphs inside blockquotes/divs (extra line break on open)
23531 Line two</div></blockquote>
23536 Line two</div></blockquote>
23541 Paragraphs inside blockquotes/divs (extra line break on close)
23543 <blockquote><div>Line one
23546 </div></blockquote>
23548 <blockquote><div>Line one
23551 </div></blockquote>
23556 Paragraphs inside blockquotes/divs (extra line break on open and close)
23562 </div></blockquote>
23568 </div></blockquote>
23573 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23575 wgLinkHolderBatchSize=0
23581 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23582 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23583 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23588 Free external link invading image caption
23590 [[Image:Foobar.jpg|thumb|http://x|hello]]
23592 <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>
23595 <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>
23599 T17196: localised external link numbers
23603 [http://en.wikipedia.org/]
23605 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23608 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23612 Multibyte character in padleft
23614 {{padleft:-Hello|7|Æ}}
23619 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23623 Multibyte character in padright
23625 {{padright:Hello-|7|Æ}}
23630 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23634 formatdate parser function
23636 {{#formatdate:2009-03-24}}
23638 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23643 formatdate parser function, with default format
23645 {{#formatdate:2009-03-24|mdy}}
23647 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23652 Spacing of numbers in formatted dates
23654 {{#formatdate:January 15}}
23656 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23661 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
23663 language=nl title=[[MediaWiki:Common.css]]
23665 {{#formatdate:2009-03-24|dmy}}
23667 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23680 Edit comment with link
23684 I like the [[Main Page]] a lot
23686 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23690 Edit comment with link and link text
23694 I like the [[Main Page|best pages]] a lot
23696 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23700 Edit comment with link and link text with suffix
23704 I like the [[Main Page|best page]]s a lot
23706 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23710 Edit comment with section link (non-local, eg in history list)
23712 comment title=[[Main Page]]
23714 /* External links */ removed bogus entries
23716 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23720 Edit comment with section link and text before it (non-local, eg in history list)
23722 comment title=[[Main Page]]
23724 pre-comment text /* External links */ removed bogus entries
23726 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>
23730 Edit comment with section link (local, eg in diff view)
23732 comment local title=[[Main Page]]
23734 /* External links */ removed bogus entries
23736 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23740 Edit comment with subpage link (T16080)
23744 title=[[Subpage test]]
23746 Poked at a [[/subpage]] here...
23748 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23752 Edit comment with subpage link and link text (T16080)
23756 title=[[Subpage test]]
23758 Poked at a [[/subpage|neat little page]] here...
23760 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23764 Edit comment with bogus subpage link in non-subpage NS (T16080)
23767 title=[[Subpage test]]
23769 Poked at a [[/subpage]] here...
23771 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23775 Edit comment with bare anchor link (local, as on diff)
23779 title=[[Main Page]]
23783 <a href="#section">#section</a>
23787 Edit comment with bare anchor link (non-local, as on history)
23790 title=[[Main Page]]
23794 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23798 Anchor starting with underscore
23804 <p><a href="#_ref">One</a>
23807 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23811 Id starting with underscore
23813 <div id="_ref"></div>
23815 <div id="_ref"></div>
23820 Edit comment with link with more than one pipe (T99346)
23824 [[Main Page|Many|pipes]]
23826 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23830 Complex edit comment with link with more than one pipe (T99346)
23834 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23836 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..."
23840 Space normalisation on autocomment (T24784)
23843 title=[[Main Page]]
23845 /* __hello__world__ */
23847 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23851 percent-encoding and + signs in comments (T28410)
23855 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23857 <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>
23860 # Parsoid doesn't support this yet: see T75581
23861 # but it *should* omit the 'src' attribute if the image is bad.
23862 # PHP side of tests was disabled in
23863 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23864 # because of issues in the PHP parserTests infrastructure
23865 # (but the output below is indeed what the PHP side emits)
23867 Bad images - basic functionality
23870 !! html/php+disabled
23872 <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>
23876 Bad images - T18039: text after bad image disappears
23881 !! html/php+disabled
23887 <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>
23892 Verify that displaytitle works (T24501) no displaytitle
23896 wgAllowDisplayTitle=true
23897 wgRestrictDisplayTitle=false
23899 this is not the the title
23902 <p>this is not the the title
23907 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23912 wgAllowDisplayTitle=true
23913 wgRestrictDisplayTitle=false
23915 this is not the the title
23916 {{DISPLAYTITLE:whatever}}
23919 <p>this is not the the title
23924 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23929 wgAllowDisplayTitle=true
23930 wgRestrictDisplayTitle=true
23932 this is not the the title
23933 {{DISPLAYTITLE:whatever}}
23936 <p>this is not the the title
23941 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23946 wgAllowDisplayTitle=true
23947 wgRestrictDisplayTitle=true
23949 this is not the the title
23950 {{DISPLAYTITLE:screen}}
23953 <p>this is not the the title
23958 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23963 wgAllowDisplayTitle=false
23965 this is not the the title
23966 {{DISPLAYTITLE:screen}}
23969 <p>this is not the the title
23970 <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>
23975 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23980 wgAllowDisplayTitle=false
23982 this is not the the title
23985 <p>this is not the the title
23990 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23995 wgAllowDisplayTitle=true
23996 wgRestrictDisplayTitle=true
23998 this is not the the title
23999 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24001 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24002 <p>this is not the the title
24007 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24012 wgAllowDisplayTitle=true
24013 wgRestrictDisplayTitle=true
24015 this is not the the title
24016 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24018 <span style="color: red;">s</span>creen
24019 <p>this is not the the title
24024 Page status indicators: Empty name is invalid
24028 <indicator name=" "></indicator>
24029 <indicator></indicator>
24031 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24032 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24037 Page status indicators: Weird syntaxes that are okay
24041 <indicator name="empty" />
24042 <indicator name="name"></indicator>
24051 Page status indicators: Torture test
24055 <indicator name="01">hello world</indicator>
24056 <indicator name="02">[[Main Page]]</indicator>
24057 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24058 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24059 <indicator name="05">*foo
24061 <indicator name="06"><nowiki>foo</nowiki></indicator>
24062 <indicator name="07"> Preformatted</indicator>
24063 <indicator name="08"><div>Broken tag</indicator>
24064 <indicator name="09">{| class=wikitable
24067 <indicator name="10">Two
24069 paragraphs</indicator>
24072 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24073 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" />
24074 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>
24075 05=<ul><li>foo</li>
24079 07=<pre>Preformatted
24081 08=<div>Broken tag</div>
24083 09=<table class="wikitable">
24100 preload: check <noinclude> and <includeonly>
24104 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24110 preload: check <onlyinclude>
24114 Goodbye <onlyinclude>Hello world</onlyinclude>
24120 preload: can pass tags through if we want to
24124 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24126 <includeonly>Hello world</includeonly>
24130 preload: check that it doesn't try to do tricks
24134 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24136 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24140 Play a bit with r67090 and T5158
24142 <div style="width:50% !important"> </div>
24143 <div style="width:50% !important"> </div>
24144 <div style="width:50% !important"> </div>
24145 <div style="border : solid;"> </div>
24147 <div style="width:50% !important"> </div>
24148 <div style="width:50% !important"> </div>
24149 <div style="width:50% !important"> </div>
24150 <div style="border : solid;"> </div>
24153 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24154 <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>
24155 <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>
24156 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24161 T5158: Test for French spaces in attributes
24163 <br style=" clear : both ; " />
24165 <p><br style="clear : both ;" />
24170 HTML5 data attributes
24172 <span data-foo="bar">Baz</span>
24173 <p data-abc-def_hij="">Quuz</p>
24175 <p><span data-foo="bar">Baz</span>
24177 <p data-abc-def_hij="">Quuz</p>
24180 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24181 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24185 Strip reserved data attributes
24187 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24189 <div data-ok="fred">d</div>
24192 <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>
24196 percent-encoding and + signs in internal links (T28410)
24198 [[User:+%]] [[Page+title%]]
24199 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24200 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24201 [[%33%45]] [[%33%45+]]
24203 <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>
24204 <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>
24205 <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>
24206 <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>
24209 <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>
24210 <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>
24211 <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>
24212 <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>
24216 Special characters in embedded file links (T29679)
24218 [[File:Contains & ampersand.jpg]]
24219 [[File:Does not exist.jpg|Title with & ampersand]]
24221 <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>
24222 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24225 <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>
24226 <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>
24230 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24232 Text's been normalized?
24234 <p>Text's been normalized?
24239 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24241 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24243 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24248 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24250 [http://www.example.org/ ideograms]
24252 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24257 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24259 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24261 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24285 T33098 Template which includes system messages which includes the template
24289 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24290 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24295 T33490 Turkish: ucfirst 'blah'
24306 T33490 Turkish: ucfirst 'ix'
24317 T33490 Turkish: lcfirst 'BLAH'
24328 T33490 Turkish: ucfırst (with a dotless i)
24334 <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>
24339 T33490 ucfırst (with a dotless i) with English language
24345 <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>
24349 # Note that Parsoid doesn't emit an explicit TOC.
24350 # Note also that the html2wt direction tends to emit an extra newline
24351 # between the __TOC__ magicword and the first heading unless *both*
24352 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24356 T28375: TOC with italics
24358 title=[[Main Page]]
24361 ==''Lost'' episodes==
24363 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24365 <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>
24369 <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>
24372 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24373 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24377 T28375: TOC with bold
24379 title=[[Main Page]]
24382 =='''should be bold''' then normal text==
24384 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24386 <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>
24390 <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>
24393 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24394 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24398 T35845: Headings become cursive in TOC when they contain an image
24400 title=[[Main Page]]
24403 ==Image [[Image:foobar.jpg]]==
24405 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24407 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24411 <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>
24414 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24415 <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>
24419 T35845 (2): Headings become bold in TOC when they contain a blockquote
24421 title=[[Main Page]]
24424 ==<blockquote>Quote</blockquote>==
24426 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24428 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24432 <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>
24435 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24437 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24441 <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>
24443 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24444 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24448 Unclosed tags in TOC
24450 wgFragmentMode=[ 'html5', 'legacy' ]
24452 title=[[Main Page]]
24456 <small>Hanc marginis exiguitas non caperet.</small>
24459 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24461 <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>
24465 <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>
24466 <p><small>Hanc marginis exiguitas non caperet.</small>
24470 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24471 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24472 <p><small>Hanc marginis exiguitas non caperet.</small>
24477 Multiple tags in TOC
24480 ==<i>Foo</i> <b>Bar</b>==
24482 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24484 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24486 <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>
24487 <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>
24491 <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>
24492 <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>
24495 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24497 <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>
24498 <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>
24502 <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>
24503 <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>
24505 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24506 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24508 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24511 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24512 # html5 tag parsing.
24514 Tags with parameters in TOC
24519 ==<sup class="in-h2">Hello</sup>==
24521 ==<sup class="a > b">Evilbye</sup>==
24523 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24525 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24526 <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>
24530 <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>
24531 <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>
24534 <meta property="mw:PageProp/toc" />
24535 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24537 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24541 span tags with directionality in TOC
24544 ==<span dir="ltr">C++</span>==
24546 ==<span dir="rtl">זבנג!</span>==
24548 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24550 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24552 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24554 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24556 <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>
24557 <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>
24558 <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>
24559 <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>
24560 <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>
24564 <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>
24565 <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>
24566 <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>
24567 <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>
24568 <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>
24571 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24572 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24573 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24574 <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>
24575 <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>
24576 <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>
24580 T74884: bdi element in ToC
24583 ==<bdi>test</bdi>==
24585 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24587 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24591 <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>
24594 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24595 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24599 T35715: s/strike element in ToC
24602 ==<s>test</s> test <strike>test</strike>==
24604 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24606 <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>
24610 <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>
24613 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24614 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24618 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24623 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24625 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24629 <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>
24632 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24633 <h2 id="x" data-parsoid='{}'>x</h2>
24639 == {{int:headline_sample}} ==
24643 T34057: Title needed when expanding <h> nodes.
24645 title=[[Main Page]]
24649 <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>
24654 Strip marker in urlencode
24656 {{urlencode:x<nowiki/>y}}
24657 {{urlencode:x<nowiki/>y|wiki}}
24658 {{urlencode:x<nowiki/>y|path}}
24659 {{urlencode:x<pre id="one">two</pre>y}}
24687 Strip marker in formatNum
24689 {{formatnum:1<nowiki/>2}}
24690 {{formatnum:1<nowiki/>2|R}}
24698 Check noCommafy in formatNum
24702 {{formatnum:123456.78}}
24703 {{formatnum:123456.78|NOSEP}}
24711 Wrong option for formatNum (T58199)
24713 {{formatnum:1,234.56|Random}}
24714 {{formatnum:1,234.56|EVERYTHING}}
24715 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24724 Strip marker in grammar
24728 {{grammar:elative|foo<nowiki/>bar}}
24735 Strip marker in padleft
24737 {{padleft:|2|x<nowiki/>y}}
24744 Strip marker in padright
24746 {{padright:|2|x<nowiki/>y}}
24753 Strip marker in anchorencode
24755 {{anchorencode:x<nowiki/>y}}
24760 <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>
24764 nowiki inside link inside heading (T20295)
24766 ==[[foo|x<nowiki>y</nowiki>z]]==
24768 <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>
24773 new support for bdi element (T33817)
24775 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24777 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24782 Ignore pipe between table row attributes
24786 |- id=foo | style='color: red'
24794 <tr id="foo" style="color: red">
24801 Language parser function
24810 Padleft and padright (default 0-padding)
24819 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24820 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24824 Padleft and padright (partial fill)
24826 {{padleft:xyz|6|ab}}
24827 {{padright:xyz|6|ab}}
24833 <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>
24834 <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>
24838 Padleft and padright as substr
24840 {{padleft:|3|abcde}}
24841 {{padright:|3|abcde}}
24847 <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>
24848 <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>
24852 Padleft and padright with non-numerical length (T180403)
24854 {{padleft:abcdef|junk}}
24855 {{padright:abcdef|junk}}
24863 Special parser function
24865 {{#special:RandomPage}}
24866 {{#special:BaDtItLe}}
24867 {{#special:Foobar}}
24876 T36939 - Case insensitive link parsing ([HttP://])
24878 [HttP://MediaWiki.Org/]
24880 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24883 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24887 T36939 - Case insensitive link parsing ([HttP:// title])
24889 [HttP://MediaWiki.Org/ MediaWiki]
24891 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24896 T36939 - Case insensitive link parsing (HttP://)
24898 HttP://MediaWiki.Org/
24900 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24903 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24921 <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>
24922 <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>
24923 <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>
24924 <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>
24925 <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>
24931 ### Parsoid-specific tests
24932 ### Parsoid-PHP parser incompatibilities
24935 1. SOL-sensitive wikitext tokens as template-args
24937 parsoid=wt2html,wt2wt
24943 <span about="#mwt1" typeof="mw:Transclusion">
24944 </span><ul about="#mwt1"><li>a</li>
24946 <span about="#mwt2" typeof="mw:Transclusion">
24947 </span><ol about="#mwt2"><li>a</li>
24949 <span about="#mwt3" typeof="mw:Transclusion">
24950 </span><dl about="#mwt3"><dd>a</dd>
24954 #### -----------------------------------------------------------------
24955 #### Parsoid-specific functionality tests
24956 #### -----------------------------------------------------------------
24958 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24959 # We know wt2wt will fail, but we expect selser to pass.
24960 # Due to the nature of our testing, wt2wt and selser tests will enter the
24961 # blacklist and we'll catch selser regressions based on changes to the
24962 # blacklist entries for selser tests.
24964 1. Bad treebuilder fixup of formatting elt is cleaned up
24966 parsoid=wt2html,wt2wt
24971 [[Image:Foobar.jpg|right|Test]]
24978 <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>
24985 2. Bad treebuilder fixup of formatting elt is cleaned up
24987 parsoid=wt2html,wt2wt
24989 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24991 <small>[[Image:Foobar.jpg|right|300px]]</small>
24995 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><b>caption</b></figcaption></figure>
24997 <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>
25001 3. Bad treebuilder fixup of formatting elt is cleaned up
25003 parsoid=wt2html,wt2wt
25005 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25007 <p><small><b>foo</b></small></p>
25008 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><small><b>caption</b></small></figcaption></figure>
25009 <p><small><b>bar</b></small></p>
25013 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
25015 parsoid=wt2html,wt2wt
25017 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25019 <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>
25022 #### ----------------------------------------------------------------
25023 #### Parsoid-only testing of Parsoid's impl of LST
25024 #### Not implemented yet, see
25025 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25026 #### ----------------------------------------------------------------
25028 ## We still need to support serializing the older format while content is stored.
25030 LST Sections: Backwards compatibility
25033 "suppressErrors": true,
25034 "modes": ["html2wt"]
25037 <section begin="2011-05-16" />
25038 <section end="2014-04-10 (MW 1.23wmf22)" />
25040 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25041 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25045 LST Sections: Newfangled approach
25047 <section begin="2011-05-16" />
25048 <section end="2014-04-10 (MW 1.23wmf22)" />
25050 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
25052 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
25056 #--------- Test stripping of empty nodes in template content ----------
25059 Empty LI and TR nodes should be stripped from template content
25064 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25068 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25081 Empty LI and TR nodes should not be stripped from top-level content
25095 <li class='mw-empty-elt'></li>
25100 <tr class='mw-empty-elt'></tr>
25109 Empty TR nodes should not be stripped if they have any attributes set
25111 {{EmptyTRWithHTMLAttrTest}}
25113 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25114 <tr align='center'></tr>
25115 <tr><td>foo</td></tr>
25116 <tr align='center'></tr>
25117 <tr><td>bar</td></tr>
25121 #### ----------------------------------------------------------------
25122 #### The following section of tests are primarily to test
25123 #### wikitext escaping capabilities of Parsoid. Given that
25124 #### escaping can be done any number of ways, the wikitext (input)
25125 #### is always adjusted to reflect how Parsoid adds nowiki
25128 #### We are marking several tests as parsoid-only since the
25129 #### HTML in the result section is different from what the
25130 #### PHP parser generates for it.
25131 #### ----------------------------------------------------------------
25134 #### --------------- Headings ---------------
25136 #### 1. Nested inside html <h1>=foo=</h1>
25137 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25138 #### 3. Nested inside html with wikitext split by html tags
25139 #### 4. No escape needed
25140 #### 5. Empty headings <h1></h1>
25141 #### 6. Heading chars in SOL context
25142 #### ----------------------------------------
25144 Headings: 0. Unnested
25154 <p>=foo<i>a</i>=</p>
25156 <nowiki>=foo=</nowiki>
25158 <nowiki> </nowiki>=foo=
25160 <nowiki>=foo=</nowiki>
25162 =foo''a''<nowiki>=</nowiki>
25165 # New headings and existing headings are handled differently
25167 Headings: 1. Nested inside html
25175 <h1 data-parsoid=''>=foo=</h1>
25176 <h2 data-parsoid=''>=foo=</h2>
25177 <h3 data-parsoid=''>=foo=</h3>
25178 <h4 data-parsoid=''>=foo=</h4>
25179 <h5 data-parsoid=''>=foo=</h5>
25180 <h6 data-parsoid=''>=foo=</h6>
25188 =<nowiki>=foo=</nowiki>=
25189 ==<nowiki>=foo=</nowiki>==
25190 ===<nowiki>=foo=</nowiki>===
25191 ====<nowiki>=foo=</nowiki>====
25192 =====<nowiki>=foo=</nowiki>=====
25193 ======<nowiki>=foo=</nowiki>======
25198 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25207 <nowiki>*</nowiki>bar
25213 <nowiki>=bar=</nowiki>
25217 Headings: 3. Nested inside html with wikitext split by html tags
25221 <h1>=<b>bold</b>foo=</h1>
25223 = ='''bold'''foo= =
25227 Headings: 4a. No escaping needed (testing just h1 and h2)
25238 <h1><i>=</i>foo=</h1>
25258 Headings: 4b. No escaping needed (inside p-tags)
25275 Headings: 4c. Short headings (1)
25282 <nowiki>===</nowiki>
25288 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25290 Headings: 4d. Short headings (2)
25292 parsoid=wt2html,html2html
25303 <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>
25304 <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>
25305 <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>
25310 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25311 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25312 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25316 Headings: 5. Empty headings
25320 <h1 data-parsoid='{}'></h1>
25322 <h2 data-parsoid='{}'></h2>
25324 <h3 data-parsoid='{}'></h3>
25326 <h4 data-parsoid='{}'></h4>
25328 <h5 data-parsoid='{}'></h5>
25330 <h6 data-parsoid='{}'></h6>
25340 =====<nowiki/>=====
25342 ======<nowiki/>======
25346 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25356 <nowiki>=a=</nowiki>
25358 <nowiki>=a=</nowiki>
25360 <nowiki>=a=</nowiki>
25364 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25377 <nowiki>=a=</nowiki>
25380 <nowiki>=a=</nowiki>
25383 <nowiki>=a=</nowiki>
25388 Headings: 6c. Heading chars in SOL context (leading newline break)
25396 <nowiki>=b=</nowiki>
25400 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25404 <!--c0--><p>=a=</p>
25406 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25408 <!--c0--><nowiki>=a=</nowiki>
25410 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25414 Headings: 6d. Heading chars in SOL context (No escaping needed)
25424 Headings: 7. Insert a newline between new content and headings
25430 <h2 data-parsoid='{}'>A</h2>
25431 <p data-parsoid='{}'>a</p>
25442 Headings: Used as horizontal rule
25444 wgFragmentMode=[ 'html5', 'legacy' ]
25450 <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>
25453 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25456 #### --------------- Lists ---------------
25457 #### 0. Outside nests (*foo, etc.)
25458 #### 1. Nested inside html <ul><li>*foo</li></ul>
25459 #### 2. Inside definition lists
25460 #### 3. Only bullets at start should be escaped
25461 #### 4. No escapes needed
25462 #### 5. No unnecessary escapes
25463 #### 6. Escape bullets in SOL position
25464 #### 7. Escape bullets in a multi-line context
25465 #### ----------------------------------------
25468 Lists: 0. Outside nests
25478 <nowiki>*</nowiki>foo
25480 <nowiki>#</nowiki>foo
25482 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25485 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25486 ## to test wikitext escaping, and insignificant whitespace diffs
25487 ## cause PHP parser tests to barf
25489 Lists: 1. Nested inside html (No unnecessary escapes)
25498 <li data-parsoid='{}'>*foo</li>
25499 <li data-parsoid='{}'>#foo</li>
25500 <li data-parsoid='{}'>:foo</li>
25501 <li data-parsoid='{}'>;foo</li>
25509 <li data-parsoid='{}'>*foo</li>
25510 <li data-parsoid='{}'>#foo</li>
25511 <li data-parsoid='{}'>:foo</li>
25512 <li data-parsoid='{}'>;foo</li>
25519 *<nowiki>*foo</nowiki>
25520 *<nowiki>#foo</nowiki>
25521 *<nowiki>:foo</nowiki>
25522 *<nowiki>;foo</nowiki>
25528 #<nowiki>*foo</nowiki>
25529 #<nowiki>#foo</nowiki>
25530 #<nowiki>:foo</nowiki>
25531 #<nowiki>;foo</nowiki>
25535 Lists: 2. Inside definition lists
25539 <dl><dt>;foo</dt></dl>
25540 <dl><dt>:foo</dt></dl>
25543 <dl><dd>:foo</dd></dl>
25547 ; <nowiki>:foo</nowiki>
25549 ; <nowiki>:foo</nowiki>
25556 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25562 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25566 *<nowiki>*foo</nowiki>''it''*bar
25570 Lists: 4. No escapes needed
25583 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25587 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25601 Lists: 5. No unnecessary escapes
25605 <ul><li> bar <span>[[foo]]</span></li></ul>
25606 <ul><li> =bar <span>[[foo]]</span></li></ul>
25607 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25608 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25609 <ul><li> =bar <span>foo]]</span>=</li></ul>
25610 <ul><li> <s></s>: a</li></ul>
25611 <ul><li> <i>* foo</i></li></ul>
25614 * bar <span><nowiki>[[foo]]</nowiki></span>
25616 * =bar <span><nowiki>[[foo]]</nowiki></span>
25618 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25620 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25622 * =bar <span>foo]]</span>=
25630 Lists: 6. Escape bullets in SOL position
25634 <p><!--cmt-->*foo</p>
25636 <!--cmt--><nowiki>*</nowiki>foo
25640 Lists: 7. Escape bullets in a multi-line context
25649 <nowiki>*</nowiki>b
25653 Lists: 8. Escape colons only if not present in tags
25657 <dl><dt>a:b<i>c:d</i></dt></dl>
25659 ; <nowiki>a:b</nowiki>''c:d''
25662 #### --------------- HRs ---------------
25663 #### 1. Single line
25664 #### -----------------------------------
25667 HRs: 1. Single line
25675 ----<nowiki>----</nowiki>
25680 #### --------------- Tables ---------------
25681 #### 1a. Simple example
25682 #### 1b. No escaping needed (!foo)
25683 #### 1c. No escaping needed (|foo)
25684 #### 1d. No escaping needed (|}foo)
25686 #### 2a. Nested in td (<td>foo|bar</td>)
25687 #### 2b. Nested in td (<td>foo||bar</td>)
25688 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25690 #### 3a. Nested in th (<th>foo!bar</th>)
25691 #### 3b. Nested in th (<th>foo!!bar</th>)
25692 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25696 #### 4c. No escaping needed
25697 #### --------------------------------------
25700 Tables: 1a. Simple example
25708 <nowiki>{|</nowiki>
25713 Tables: 1b. No escaping needed
25724 Tables: 1c. No escaping needed
25735 Tables: 1d. No escaping needed
25746 Tables: 2a. Nested in td
25751 <td>foo|bar</td></tr>
25752 <tr><td>x<div>a|b</div></td>
25756 |<nowiki>foo|bar</nowiki>
25758 |x<div><nowiki>a|b</nowiki></div>
25766 <td>x<div>a|b</div>
25767 </td></tr></tbody></table>
25771 Tables: 2b. Nested in td
25777 <td>a<i>b||c</i></td>
25778 <td>a<i><div>b||c</div></i></td>
25779 </tr></tbody></table>
25782 |<nowiki>foo||bar</nowiki>
25783 |a''<nowiki>b||c</nowiki>''
25784 |a''<div><nowiki>b||c</nowiki></div>''
25793 <td>a<i><div>b||c</div></i>
25799 Tables: 2c. Nested in td -- no escaping needed
25815 Tables: 3a. Nested in th
25831 Tables: 3b. Nested in th
25836 <tr><th>foo!!bar</th>
25837 <th><i>foo|bar</i></th>
25838 <th><i>foo!!bar</i></th>
25839 <th><i><span>foo!!bar</span></i></th>
25840 </tr></tbody></table>
25843 !<nowiki>foo!!bar</nowiki>
25844 !''<nowiki>foo|bar</nowiki>''
25845 !''<nowiki>foo!!bar</nowiki>''
25846 !''<span><nowiki>foo!!bar</nowiki></span>''
25855 <th><i>foo!!bar</i>
25857 <th><i><span>foo!!bar</span></i>
25863 Tables: 3c. Nested in th
25868 <tr><th>foo||bar</th>
25869 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25870 </tr></tbody></table>
25873 !<nowiki>foo||bar</nowiki>
25874 !<nowiki>foo||bar</nowiki>
25887 Tables: 4a. Escape -
25903 |<nowiki>-bar</nowiki>
25908 Tables: 4b. Escape +
25924 |<nowiki>+bar</nowiki>
25929 Tables: 4c. No escaping needed
25934 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25935 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25941 <div>a|b</div></td>
25986 Tables: 4d. No escaping needed
25991 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25992 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25993 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26004 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26014 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26018 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26020 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26022 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26024 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26027 | || align="center" | ||
26037 | {{!}}{{!}} align="center" | ||
26041 ! !! align="center" | !!
26047 <td align="center"></td>
26049 </td></tr></tbody></table>
26054 <td align="center">
26057 </td></tr></tbody></table>
26061 <td align="center"></td>
26063 </td></tr></tbody></table>
26067 <th align="center"></th>
26069 </th></tr></tbody></table>
26073 T97430: Don't emit empty nowiki pairs around marker meta tags
26077 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26078 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26080 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26081 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26085 Unclosed xmlish element in table line shouldn't eat end delimiters
26090 <tbody><tr><td> <foo</td>
26091 <td> bar></td></tr>
26108 #### --------------- Links ----------------
26109 #### 1. Quote marks in link text
26110 #### 2. Wikilinks: Escapes needed
26111 #### 3. Wikilinks: No escapes needed
26112 #### 4. Extlinks: Escapes needed
26113 #### 5. Extlinks: No escapes needed
26114 #### --------------------------------------
26116 Links 1. WikiLinks: No escapes needed
26120 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26121 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26122 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26126 [[Foo|x [Foobar] x]]
26128 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26129 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26130 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26135 Links 2. WikiLinks: Escapes needed
26139 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26140 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26141 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26142 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26143 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26144 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26145 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26146 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26147 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26148 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26150 [[Foo|<nowiki>Foobar]</nowiki>]]
26151 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26152 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26153 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26154 [[Foo|<nowiki>|Bar</nowiki>]]
26155 [[Foo|<nowiki>]]bar</nowiki>]]
26156 [[Foo|<nowiki>[[bar</nowiki>]]
26157 [[Foo|<nowiki>x [[ y</nowiki>]]
26158 [[Foo|<nowiki>x ]] y</nowiki>]]
26159 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26161 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26162 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26163 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26164 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26165 <a href="/wiki/Foo" title="Foo">|Bar</a>
26166 <a href="/wiki/Foo" title="Foo">]]bar</a>
26167 <a href="/wiki/Foo" title="Foo">[[bar</a>
26168 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26169 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26170 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26175 Links 3. WikiLinks: No escapes needed
26179 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26180 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26185 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26186 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26191 Links 4. ExtLinks: Escapes needed
26195 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26196 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26197 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26198 <p>[http://google.com]</p>
26199 <p>[http://google.com google]</p>
26200 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26201 <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>
26203 [http://google.com <nowiki>[google]</nowiki>]
26204 [http://google.com <nowiki>google]</nowiki>]
26205 [http://google.com <nowiki>goog] le</nowiki>]
26207 <nowiki>[http://google.com]</nowiki>
26209 <nowiki>[http://google.com google]</nowiki>
26211 [http://google.com<nowiki>]</nowiki>
26213 [{{echo|http://google.com}}<nowiki>]</nowiki>
26215 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26216 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26217 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26218 </p><p>[http://google.com]
26219 </p><p>[http://google.com google]
26220 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26221 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26226 Links 5. ExtLinks: No escapes needed
26230 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26231 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26233 [http://google.com [google]
26235 [[http://google.com]]
26237 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26238 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26243 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26247 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26248 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26249 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26250 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26251 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26252 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26253 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26254 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26255 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26256 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26257 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26258 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26259 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26262 x<nowiki/>http://example.com<nowiki/>y
26263 http://example.com<nowiki/>?x
26264 http://example.com<nowiki/>&x
26265 http://example.com<nowiki/>'x
26266 http://example.com<nowiki/>,x
26267 http://example.com<nowiki/>.x
26268 http://example.com<nowiki/>;x
26269 http://example.com<nowiki/>:x
26270 http://example.com<nowiki/>;x
26271 http://example.com<nowiki/>!x
26272 http://example.com<nowiki/>=x
26273 http://example.com<nowiki/>(x)
26274 http://example.com(x<nowiki/>)
26278 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26283 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26285 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26286 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26287 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26288 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26289 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26295 "http://example.com"
26296 (http://example.com)
26297 (http://example.com) foo
26298 http://example.com,
26299 http://example.com, foo
26302 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26304 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26305 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26306 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26307 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26308 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26313 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26317 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26318 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26320 http://example.com.,;:!?\
26321 -http://example.com:
26323 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26324 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26329 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26333 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26334 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26335 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26339 X<nowiki/>RFC 123<nowiki/>y
26343 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26347 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26348 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26349 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26356 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26357 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26358 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26363 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26367 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26368 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26369 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26373 X<nowiki/>PMID 123<nowiki/>y
26377 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26381 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26382 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26383 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26390 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26391 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26392 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26397 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26401 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26402 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26403 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26406 ISBN 1234567890<nowiki/>1
26407 ISBN 1234567890<nowiki/>x
26408 a<nowiki/>ISBN 1234567890<nowiki/>b
26412 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26416 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26420 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26425 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26429 <p>this is not a link: http://example.com
26432 this is not a link: <nowiki>http://example.com</nowiki>
26436 Links 15. Link trails can't become link prefixes.
26441 <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>
26443 [[Söfnuður]]-[[00]]
26445 <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>
26449 #### --------------- Quotes ---------------
26450 #### 1. Quotes inside <b> and <i>
26451 #### 2. Link fragments separated by <i> and <b> tags
26452 #### 3. Link fragments inside <i> and <b>
26453 #### 4. No escaping needed
26454 #### --------------------------------------
26456 1a. Quotes inside <b> and <i>
26467 <b>foo'<i>bar'</i>baz</b>
26476 <i>fools'<span> errand</span></i>
26477 <i><span>fool</span>'s errand</i>
26478 '<i>foo</i> bar '<i>baz</i>
26479 a|!*#-:;+-~[]{}b'<i>x</i>
26483 ''<nowiki>''foo''</nowiki>''
26484 ''<nowiki>'''foo'''</nowiki>''
26486 '''<nowiki/>'foo''''
26487 '''<nowiki>''foo''</nowiki>'''
26488 '''<nowiki>'''foo'''</nowiki>'''
26489 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26490 '''foo'''<nowiki/>'s
26496 '''foo'''<nowiki/>'
26497 ''''foo'''<nowiki/>'
26498 ''fools'<span> errand</span>''
26499 ''<span>fool</span>'s errand''
26500 '<nowiki/>''foo'' bar '''baz''
26501 a|!*#-:;+-~[]{}b'''x''
26505 1b. Quotes inside <b> and <i> with other tags on same line
26509 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26510 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26511 <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>
26512 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26513 '<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>
26514 '<i>foo</i> <div title="name">test</div>
26515 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26516 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26517 <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>
26520 '''a'' foo ''[[bar]]''
26521 ''a''' foo ''[[bar]]''
26522 ''a''' foo '''{{echo|[[bar]]}}'''
26523 [[foo]] x'''[[bar]]''
26524 '''foo'' <ref>test</ref>
26525 '''foo'' <div title="name">test</div>
26526 '''foo'' and <br> bar
26531 2. Link fragments separated by <i> and <b> tags
26535 <p>[[<i>foo</i>hello]]</p>
26536 <p>[[<b>foo</b>hello]]</p>
26538 [[''foo''<nowiki>hello]]</nowiki>
26540 [['''foo'''<nowiki>hello]]</nowiki>
26543 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26544 # this is one of the shortcomings of this format
26546 3. Link fragments inside <i> and <b>
26550 <p><i>[[foo</i>]]</p>
26551 <p><b>[[foo</b>]]</p>
26553 ''[[foo''<nowiki>]]</nowiki>
26555 '''[[foo'''<nowiki>]]</nowiki>
26559 4. No escaping needed
26563 <p>'<span><i>bar</i></span>'
26564 '<span><b>bar</b></span>'
26568 '<span>''bar''</span>'
26569 '<span>'''bar'''</span>'
26573 #### ----------- Paragraphs ---------------
26574 #### 1. No unnecessary escapes
26575 #### --------------------------------------
26578 1. No unnecessary escapes
26582 <p>bar <span>[[foo]]</span>
26583 </p><p>=bar <span>[[foo]]</span>
26584 </p><p>[[bar <span>[[foo]]</span>
26585 </p><p>]]bar <span>[[foo]]</span>
26586 </p><p>=bar <span>foo]]</span>=
26589 bar <span><nowiki>[[foo]]</nowiki></span>
26591 =bar <span><nowiki>[[foo]]</nowiki></span>
26593 [[bar <span><nowiki>[[foo]]</nowiki></span>
26595 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26597 =bar <span>foo]]</span><nowiki>=</nowiki>
26600 #### ----------------------- PRE --------------------------
26602 1. Leading whitespace in SOL context should be escaped
26625 <nowiki> </nowiki>a
26627 <nowiki> </nowiki> a
26631 <nowiki> </nowiki> a
26633 <nowiki> </nowiki>a
26636 <nowiki> </nowiki>b
26659 2. Leading whitespace in non-indent-pre contexts should not be escaped
26663 <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>
26664 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26665 <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>
26675 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26694 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26698 <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>
26700 [[File:Foobar.jpg|thumb|caption]]
26704 5. Nowiki escaping should account for indent-pres
26714 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26728 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
26731 "modes": ["html2wt"],
26732 "scrubWikitext": true
26740 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
26741 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
26742 <p> <!--boo-->*foo</p>
26743 <p><!--boo--> *foo</p>
26744 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
26745 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
26761 <nowiki>*</nowiki>foo
26763 <nowiki/><!--boo-->*foo
26765 <!--boo--><nowiki/>*foo
26767 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
26769 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
26772 #### --------------- Behavior Switches --------------------
26775 1. Valid behavior switches should be escaped
26782 <nowiki>__TOC__</nowiki>
26783 ''<nowiki>__TOC__</nowiki>''
26787 2. Invalid behavior switches should not be escaped
26798 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26800 Behavior switches should be SOL-transparent
26804 <meta property="mw:PageProp/toc" />
26806 <!-- this one's bogus -->
26809 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26811 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26815 <!-- this one's bogus -->
26824 #### --------------- HTML tags ---------------
26827 #### 3. multi-line html tag
26828 #### 4. extension tags
26829 #### -----------------------------------------
26835 <a href="http://google.com">google</a>
26837 <a href="http://google.com">google</a>
26845 <ul><li> <div>foo</div></li>
26846 <li> <div style="color:red">foo</div></li>
26847 <li> <td></li></ul>
26850 * <nowiki><div>foo</div></nowiki>
26851 * <nowiki><div style="color:red">foo</div></nowiki>
26852 * <nowiki><td></nowiki>
26856 3. multi-line html tag
26875 <p><ref>foo</ref>
26876 </p><p><ref>bar
26877 </p><p>baz</ref>
26880 <nowiki><ref>foo</ref></nowiki>
26882 <nowiki><ref>bar</nowiki>
26884 baz<nowiki></ref></nowiki>
26888 Parsoid: newline inducing block nodes don't suppress <nowiki>
26894 <nowiki> </nowiki>a
26899 #### --------------- Others ---------------
26905 <p><nowiki>foo</nowiki>
26908 <nowiki>foo</nowiki>
26911 ## The quote-char in the input is necessary for triggering the bug
26913 (T54035) Nowiki-escaping should not get tripped by " :" in text
26922 #----------- End of wikitext escaping tests --------------
26926 Tag-like HTML structures are passed through as text
26948 </p><p>1<d e>f
26953 HTML tag with necessary entities in attributes
26955 <span title="&amp;">foo</span>
26957 <p><span title="&amp;">foo</span>
26962 HTML tag with 'unnecessary' entity encoding in attributes
26964 <span title="&">foo</span>
26966 <p><span title="&">foo</span>
26971 HTML tag with broken attribute value quoting
26973 parsoid=wt2html,html2html
26975 <span title="Hello world>Foo</span>
26977 <p><span title="Hello world">Foo</span>
26980 <p><span title="Hello world">Foo</span></p>
26984 Self-closed tag with broken attribute value quoting
26986 parsoid=wt2html,html2html
26988 <div title="Hello world />Foo
26990 <div title="Hello world"></div><p>Foo
26993 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26997 Table with broken attribute value quoting
26999 parsoid=wt2html,html2html
27002 | title="Hello world|Foo
27007 <td title="Hello world">Foo
27013 <td title="Hello world">Foo
27019 Table with broken attribute value quoting on consecutive lines
27021 parsoid=wt2html,html2html
27024 | title="Hello world|Foo
27025 | style="color:red|Bar
27030 <td title="Hello world">Foo
27032 <td style="color:red">Bar
27038 <td title="Hello world">Foo
27039 </td><td style="color: red">Bar
27040 </td></tr></tbody></table>
27045 Accept empty td cell attribute
27048 | align="center" |foo|| |
27053 <td align="center">foo</td>
27060 Non-empty attributes in th-cells
27063 !Foo!! style="color: red" |Bar
27069 <th style="color: red">Bar
27075 Accept empty attributes in th-cells
27090 Empty table rows go away
27111 ### Parsoid-centric tests for testing RTing of inter-element separators
27112 ### Edge cases not tested by existing parser tests and specific to
27113 ### Parsoid-specific serialization strategies.
27117 RT-ed inter-element separators should be valid separators
27129 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27133 # Parsoid-only test of a DOM pass
27135 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27147 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27148 <p>bar</p></small></td></tr>
27152 <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>
27156 # Note that the "style" attribute is really a template parameter here.
27157 # The = would have to be {{=}} if you wanted the literal.
27159 Empty TD followed by TD with tpl-generated attribute
27164 |{{echo|style='color:red'}}|foo
27178 Indented table with an empty td
27196 ## We have some newline diffs RT-ing this edge case
27197 ## and it is not important enough -- we seem to be emitting
27198 ## at most 2 newlines after a </tr> and this is unrelated to
27199 ## the issue from T85627 that this is testing.
27201 Indented table with blank lines in between (T85627)
27220 Indented block & table
27234 <div data-parsoid='{"stx":"html"}'>foo</div>
27236 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27241 Indent and comment before table row
27256 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27257 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27261 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27263 Empty TR followed by a template-generated TR
27269 {{echo|<tr><td>foo</td></tr>}}
27274 <tr class='mw-empty-elt'></tr>
27275 <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}}]}'>
27280 ## PHP and parsoid output differ for this, and since this is primarily
27281 ## for testing Parsoid's serializer, marking this Parsoid only
27283 Empty TR followed by mixed-ws-comment line should RT correctly
27296 <tr class='mw-empty-elt'></tr>
27299 <!--c--> </tr><!--d-->
27305 Multi-line image caption generated by templates with/without trailing newlines
27307 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27308 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27310 <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>
27311 <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>
27315 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27319 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27321 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27323 <includeonly>foo</includeonly>
27331 ## PHP emits broken html for this, and since this is primarily
27332 ## a Parsoid serializer test, marking this Parsoid only
27334 Improperly nested inline or quotes tags with whitespace in between
27336 <span> <s>x</span> </s>
27339 <p><span> <s>x</s></span><s> </s>
27340 <b> <i>x</i></b><i> </i>
27345 Encapsulate protected attributes from wt
27347 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27349 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27353 <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>
27355 <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">
27356 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
27360 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27361 ## Having nested or stray pre tags results in the attempt to add duplicates,
27362 ## causing an assertion fail. This test tries to prevent that situation.
27364 Ensure ParagraphWrapper can deal with stray closing pre tags
27374 1. Ensure fostered text content is wrapped in element nodes
27378 <table>hi</table><table>ho</table>
27380 hi<table></table>ho<table></table>
27382 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>hi</span><table data-parsoid='{"stx":"html"}'></table><span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>ho</span><table data-parsoid='{"stx":"html"}'></table>
27386 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27388 parsoid=wt2html,wt2wt
27398 </td></tr></tbody></table>
27400 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||
27401 </span><table data-parsoid='{"stx":"html"}'>
27402 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
27403 </td></tr></tbody></table>
27407 Encapsulation properly handles null DSR information from foster box
27409 parsoid=wt2html,wt2wt
27411 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27413 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>foo<tr><td>bar</td></tr></table>"}},"i":0}}]}">foo</span><table><tbody><tr><td>bar</td></tr></tbody></table>
27417 1. Encapsulate foster-parented transclusion content
27419 parsoid=wt2wt,wt2html
27421 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27423 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
27425 <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<tr><td>bar</td></tr>"}},"i":0}},"</table>"]}'>foo</span><table about="#mwt2" data-parsoid='{"stx":"html}'><tbody><tr><td>bar</td></tr></tbody></table>
27429 2. Encapsulate foster-parented transclusion content
27431 parsoid=wt2wt,wt2html
27433 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27435 <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>
27446 3. Encapsulate foster-parented transclusion content
27448 parsoid=wt2wt,wt2html
27450 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27452 <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>"]}">
27465 4. Encapsulate foster-parented transclusion content
27467 parsoid=wt2wt,wt2html
27469 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27471 <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>"]}">
27484 5. Encapsulate foster-parented transclusion content
27486 parsoid=wt2wt,wt2html
27488 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27490 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27492 <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}'>foo</span><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27496 6. Encapsulate foster-parented transclusion content
27498 parsoid=wt2wt,wt2html
27500 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27502 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
27504 <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}'>foo</span><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p data-parsoid='{"stx":"html"}'>ok</p>
27508 7. Encapsulate foster-parented transclusion content
27510 parsoid=wt2wt,wt2html
27512 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27514 <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>
27524 # Note that the wt is broken on purpose: the = should be {{=}} if you
27525 # don't want it to be a template parameter key.
27527 8. Encapsulate foster-parented transclusion content
27529 parsoid=wt2wt,wt2html
27532 }}{|{{echo|style='color:red'}}
27543 </td></tr></tbody></table>
27545 <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">
27546 </span><span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"style","named":true}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"style":{"wt":"'color:red'"}},"i":0}},"\n|-\n|b\n|}"]}'>{{{1}}}</span><table about="#mwt3">
27549 </td></tr></tbody></table>
27553 9. Encapsulate foster-parented transclusion content
27555 parsoid=wt2wt,wt2html
27557 <table>{{echo|hi</table>hello}}
27559 hi<table></table><p>hello
27562 <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi</table>hello"}},"i":0}}]}'>hi</span><table about="#mwt2"></table><p about="#mwt2">hello</p>
27566 Table in fosterable position
27577 <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">
27579 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27585 # Parsoid only for T66747
27587 Properly encapsulate empty-content transclusions in fosterable positions
27595 <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"}]]}'>
27601 Always encapsulate foster box when template range is expanded to table
27614 T115289: Unclosed table
27616 {{echo|<table>}}<!--c-->[[Category:Two]]
27618 <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>
27622 T115289: Don't migrate newlines out of tables with fostered content
27624 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27626 <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>
27630 T73074: More fostering fun
27632 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27634 <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>
27638 Support <object> element with .data attribute
27642 <object data="test.swf"></object>
27644 <object data="test.swf"></object>
27648 Don't block XML namespace declaration
27650 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27652 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27655 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27658 # -----------------------------------------------------------------
27659 # The following section of tests are primarily to spec requirements
27660 # around Parsoid's serialization (old, new, edited content)
27662 # All these tests are marked Parsoid html2wt and html2html only
27663 # ----------------------------------------------------------------
27666 Ignore rel attribute in a-tags during serialization to url-links
27670 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27671 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27672 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27674 http://en.wikipedia.org/wiki/Foobar
27675 http://en.wikipedia.org/wiki/Foobar
27676 http://en.wikipedia.org/wiki/Foobar
27679 # 'mi' is a localinterwiki prefix as well as a language
27681 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27685 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27691 Parsoid should accept interwiki shortcuts
27695 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27696 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27697 <a href='./fr:Foo'>Foo</a></p>
27698 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27699 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27700 <a href='fr%3AFoo'>Foo</a></p>
27701 <p><a href='FR%3AFoo'>Foo</a>
27702 <a href='./FR:Foo'>Foo</a></p>
27717 Parsoid should not accept invalid interwiki shortcuts
27721 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27722 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27723 <a href='news:Foo'>Foo</a></p>
27732 New wikilinks should be serialized properly
27736 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27737 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27738 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27739 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27740 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27744 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27745 http://en.wikipedia.org/wiki/Foo
27746 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27750 New wiki links (href variations)
27754 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27755 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27756 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27757 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27762 [[Toxine bactérienne]]
27766 New wiki links (content string variations)
27770 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27771 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27772 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27776 [[Foo_bar|./Foo_bar]]
27780 New category links (href variations)
27784 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27785 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27786 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27788 [[Category:Toxine bactérienne]]
27789 [[Category:Toxine bactérienne]]
27790 [[Category:Toxine bactérienne]]
27794 New sol transparent links don't need indent-pre nowiki protection
27799 <link rel="mw:PageProp/redirect" href="./Main_Page">
27800 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27801 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27803 #WEITERLEITUNG [[Main Page]]
27804 <!-- this is good --> [[Category:Good]]
27805 <!-- this is great --> [[Kategorie:Great]]
27809 New interlanguage links (href variations)
27813 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27814 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27815 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27817 [[es:Toxine bactérienne]]
27818 [[es:Toxine_bactérienne]]
27819 [[es:Toxine_bactérienne]]
27823 Image: Modifying size of an image (1)
27826 "modes": ["wt2wt"],
27828 ["img[height]", "attr", "height", "22"],
27829 ["img[width]", "attr", "width", "200"]
27833 [[Image:Foobar.jpg|230x230px]]
27835 [[Image:Foobar.jpg|200x200px]]
27839 Image: Modifying size of an image (2)
27842 "modes": ["wt2wt"],
27844 ["img[height]", "attr", "height", "100"],
27845 ["img[width]", "attr", "width", "500"]
27849 [[Image:Foobar.jpg|230x230px]]
27851 [[Image:Foobar.jpg|500x500px]]
27854 # Change in size is ignored so long as class='mw-default-size'
27856 Image: Modifying size of an image (3)
27859 "modes": ["wt2wt"],
27861 ["figure[class]", "removeClass", "mw-default-size"],
27862 ["figure img", "attr", "height", "19"],
27863 ["figure img", "attr", "width", "170"]
27867 [[Image:Foobar.jpg|thumb]]
27869 [[Image:Foobar.jpg|thumb|170x170px]]
27873 Image: Modifying alignment of an image (T50665)
27876 "modes": ["wt2wt"],
27878 ["figure[class]", "removeClass", "mw-halign-right"],
27879 ["figure[class]", "addClass", "mw-halign-left"]
27883 [[Image:Foobar.jpg|thumb|caption|right]]
27885 [[Image:Foobar.jpg|thumb|caption|left]]
27889 Image: Modifying mw-default-size of an frameless image (T64805)
27892 "modes": ["wt2wt"],
27894 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27898 [[Image:Foobar.jpg|frameless|right]]
27900 [[Image:Foobar.jpg|frameless|right|220x220px]]
27904 Image: Modifying valign of an image (T51221)
27907 "modes": ["wt2wt"],
27909 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27910 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27914 [[File:Foobar.jpg|20px|middle]]
27916 [[File:Foobar.jpg|20px|text-top]]
27920 Image: Modifying alt attribute of an image (T58400)
27923 "modes": ["wt2wt"],
27925 ["img[alt]", "attr", "alt", "some alternate edited text"]
27929 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27931 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27935 Image: Modifying caption of an image
27938 "modes": ["wt2wt"],
27940 ["figcaption", "text", "new caption"]
27944 [[Image:Foobar.jpg|thumb|original caption]]
27946 [[Image:Foobar.jpg|thumb|new caption]]
27950 Image: empty alt attribute (T50924)
27954 [[File:Foobar.jpg|thumb|alt=|bar]]
27956 <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>
27960 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27966 <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>
27968 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27972 Image: Block level image should have \n before and after
27975 [[File:Foobar.jpg|right|thumb|150x150px]]
27979 <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>
27984 Image: New block level image should have \n before and after (existing content)
27987 [[File:Foobar.jpg|right|thumb|150x150px]]
27991 <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>
27996 Image: upright option (parsoid)
27998 [[File:Foobar.jpg|thumb|upright|caption]]
27999 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28000 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28002 <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>
28003 <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>
28004 <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>
28008 Image: upright option is ignored on inline and frame images (parsoid)
28010 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28012 <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>
28016 Image: in template parameter with empty parameter
28018 {{echo|[[File:Foobar.jpg|link=]]}}
28020 <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>
28024 Image: from basic HTML (1)
28028 <span typeof="mw:Image">
28029 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28032 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28036 Image: from basic HTML (2)
28040 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28042 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28046 Image: from basic HTML (3)
28050 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28052 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28056 Image: from basic HTML (4)
28060 <img src="./File:Foobar.jpg">
28062 [[File:Foobar.jpg|link=]]
28066 Image: Invalid title as link
28068 [[File:Foobar.jpg|link=<]]
28070 <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>
28073 <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>
28077 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28082 <li><p>foo</p></li>
28089 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28093 <ul> <li>foo</li></ul>
28099 Don't strip leading whitespace when handling indent-pre suppressing tags
28104 <tr><td> indented row</td></tr>
28107 <b>This is very bold of you!</b>
28110 indented cell (no pre-wrapping!)
28120 '''This is very bold of you!'''
28124 indented cell (no pre-wrapping!)
28132 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28154 <nowiki> </nowiki></span>bar2
28157 <nowiki> </nowiki><span>bar</span>
28160 <nowiki> </nowiki><span>foo</span>
28165 Lists: Dont insert newlines in a serialized list item.
28169 <ul><li>a<br>b</li><li>c</li></ul>
28176 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28179 "modes": ["html2wt"],
28180 "scrubWikitext": false
28183 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28184 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28186 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28187 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28189 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28191 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28193 == hello there [[Category:A1]] ==
28195 == [[Category:A2]] hi pal ==
28197 == <!--foo--> [[Category:A3]] how goes it ==
28199 == it goes well [[Category:A4]] <!--bar--> ==
28201 ==howdy [[Category:A5]]==
28207 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28210 "modes": ["html2wt"],
28211 "scrubWikitext": true
28214 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28215 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28217 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28218 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28220 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28228 <!--foo-->[[Category:A3]]
28233 [[Category:A4]] <!--bar-->
28241 Headings: Don't hoist metas that come from templates
28244 "modes": ["html2wt"],
28245 "scrubWikitext": true
28248 <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>
28250 == {{echo|foo [[Category:Foo]]}} ==
28254 Headings: Category in ref isn't hoisted
28257 "modes": ["html2wt"],
28258 "scrubWikitext": true
28261 <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>
28263 <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>
28266 [[Category:Baz]] </ref> ==
28272 Parsoid: Serialize positional parameters with = in them as named parameter
28276 <p about="#mwt1" typeof="mw:Transclusion"
28277 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28279 <p about="#mwt1" typeof="mw:Transclusion"
28280 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28282 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28283 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28284 <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>
28288 {{echo|1=f=oo|2=bar}}
28290 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28291 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28292 {{echo|<nowiki>f=oo</nowiki>|bar}}
28296 Parsoid: Serialize positional parameters with = in extlink as named parameter
28300 <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>
28302 {{echo|1=http://stuff?is=ok}}
28306 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28310 <div>a<p>b</p></div>
28331 Substrings resembling wikitext in hrefs should not get nowiki escapes
28335 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28341 Enforce single-line context in the serializer
28348 <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">
28349 </span><span about="#mwt1">you</span> </h2>
28351 <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>
28353 <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
28354 there</span></li></ol>
28366 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28373 </tbody></table></dd></dl>
28377 == hi {{bogus|there
28388 * foo '''bar''' baz
28400 Serialize new placeholder space without spans
28404 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28406 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28408 <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>
28414 <ref>foo : bar</ref>ok
28418 #-----------------------
28419 # Tag minimization tests
28420 #-----------------------
28423 1. I/B quote minimization: wikitext-only tags should be combined
28427 <p><i>A</i><i>B</i></p>
28428 <p><b>A</b><b>B</b></p>
28429 <p><i>A</i><b><i>B</i></b></p>
28430 <p><b>A</b><i><b>B</b></i></p>
28431 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28432 <p><i><b>A</b></i><i><b>B</b></i></p>
28433 <p><i><b>A</b></i><b><i>B</i></b></p>
28434 <p><b><i>A</i></b><i><b>B</b></i></p>
28454 2. I/B quote minimization: wikitext and html tags should not be combined
28458 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28459 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28463 ''A''<nowiki/>'''<i>B</i>'''
28467 3. I/B quote minimization: templated content stops minimization
28471 <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>
28472 <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>
28474 ''A''{{echo|''B''}}
28476 ''A''{{echo|'''''B'''''}}
28480 4. I/B quote minimization: new content should be mimimized with adjacent old content
28484 <p><i>A</i><i>B</i></p>
28485 <p><b>A</b><b>B</b></p>
28486 <p><i>A</i><b><i>B</i></b></p>
28496 5a. Merge adjacent quote nodes if they've been edited
28499 "modes": ["wt2wt", "selser"],
28501 ["p", "contents", "remove", ":contains('b')"]
28511 5b. Merge adjacent quote nodes if they've been edited
28514 "modes": ["wt2wt", "selser"],
28520 ''a''<span id="x">b</span>''c''
28526 1. Merge adjacent link nodes as long as at least one element is new
28529 "modes": ["html2wt"],
28530 "scrubWikitext": true
28533 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28534 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28535 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28539 [[Football|Foot]][[Football|ball]]
28543 2. Merge adjacent link nodes and enable additional normalizations
28546 "modes": ["html2wt"],
28547 "scrubWikitext": true
28550 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28556 3. Don't merge adjacent link nodes if scrubWikitext is false
28559 "modes": ["html2wt"],
28560 "scrubWikitext": false
28563 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28565 [[Football|Foot]][[Football|ball]]
28569 1. Move format tags outside of WikiLink
28572 "modes": ["html2wt"],
28573 "scrubWikitext": true
28576 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
28577 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
28578 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
28581 '''''[[Football]]'''''
28582 <u>'''''[[Football]]'''''</u>
28586 2. Move format tags outside of WikiLink with mergable A tags
28589 "modes": ["html2wt"],
28590 "scrubWikitext": true
28593 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
28595 '''''[[Football]]'''''
28599 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
28602 "modes": ["html2wt"],
28603 "scrubWikitext": true
28606 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
28608 <font color="red"><u>'''[[Foo]]'''</u></font>
28612 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
28615 "modes": ["html2wt"],
28616 "scrubWikitext": true
28619 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
28620 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
28621 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
28623 [[Foo|<font color="red">Foo</font>]]
28624 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
28625 [[Foo|<span class="Bar">Foo</span>]]
28629 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
28632 "modes": ["selser"],
28633 "scrubWikitext": true,
28635 ["a", "html", "<i>Foo</i>"]
28645 6. Regression test: Manual edit test to ensure diff markers are not lost
28648 "modes": ["selser"],
28649 "scrubWikitext": true,
28651 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
28660 #------------------------------
28661 # End of tag minimization tests
28662 #------------------------------
28665 T56262: New entities
28669 <span typeof="mw:Entity"> </span>
28674 ## Note that there is no wikitext output for 'unknownproperty' ##
28675 ## Unknown magic words are silently dropped ##
28682 <meta property='mw:PageProp/toc' />
28683 <meta property='mw:PageProp/notoc' />
28684 <meta property='mw:PageProp/forcetoc' />
28685 <meta property='mw:PageProp/index' />
28686 <meta property='mw:PageProp/noindex' />
28687 <meta property='mw:PageProp/nogallery' />
28688 <meta property='mw:PageProp/noeditsection' />
28689 <meta property='mw:PageProp/notitleconvert' />
28690 <meta property='mw:PageProp/nocontentconvert' />
28691 <meta property='mw:PageProp/unknownproperty' />
28701 __NOCONTENTCONVERT__
28705 Consecutive <pre>s should not get merged
28707 parsoid=html2wt,html2html
28709 <pre>a</pre><pre>b</pre>
28737 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28741 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28743 [[Special:BookSources/1234567890|ISBN 1234567895]]
28747 Edited RFC links not serializable as RFC links should serialize as extlinks
28751 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28753 [https://tools.ietf.org/html/rfc123 New RFC]
28757 Edited PMID links not serializable as PMID links should serialize as extlinks
28761 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28763 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28767 WTS of autolinks with trailing/surrounding context
28771 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28772 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28773 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28774 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28775 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28776 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28778 http://cscott.net'''foo'''
28780 http://cscott.net<b>foo</b>
28782 '''http://cscott.net'''
28784 '''http://cscott.net '''
28786 '''http://cscott.net<nowiki/>x'''
28788 http://cscott.net<nowiki/>x
28792 WTS of autolinks with nowikis (round-trip)
28794 x<nowiki/>http://cscott.net<nowiki/>x
28796 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28799 # this is the "easy" test because it leaves in place all the
28800 # data-parsoid information indicating this is an autolink
28802 WTS of autolinks with escapes (editing)
28805 "modes": ["wt2wt"],
28807 [ "span", "remove" ]
28811 x<nowiki/>http://cscott.net<nowiki/>x
28813 x<nowiki/>http://cscott.net<nowiki/>x
28817 WTS of edited autolink-like text (T103364)
28820 "modes": ["wt2wt"],
28822 [ "span[typeof]", "removeAttr", "typeof" ]
28826 Not a link: <nowiki>http://example.com</nowiki>.
28828 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28832 WTS of newly-authored autolink-like text (T103364)
28836 <p>http://example.com is not a link.</p>
28838 <nowiki>http://example.com</nowiki> is not a link.
28842 WTS of autolink-like text after an autolink (T108563)
28846 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28848 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28852 Magic links inside links (not autolinked)
28854 [[Foo|http://example.com]]
28857 [[Foo|ISBN 123456789x]]
28859 [http://foo.com http://example.com]
28860 [http://foo.com RFC 1234]
28861 [http://foo.com PMID 1234]
28862 [http://foo.com ISBN 123456789x]
28864 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28865 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28866 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28867 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28868 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28869 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28870 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28871 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28874 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28875 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28876 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28877 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28879 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28880 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28881 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28882 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28886 Magic links inside image captions (autolinked)
28888 [[File:Foobar.jpg|thumb|http://example.com]]
28889 [[File:Foobar.jpg|thumb|RFC 1234]]
28890 [[File:Foobar.jpg|thumb|PMID 1234]]
28891 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28893 <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>
28894 <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>
28895 <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>
28896 <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>
28898 <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>
28899 <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>
28900 <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>
28901 <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>
28905 WTS of magic word text (T109371)
28910 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28911 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28913 <nowiki>RFC 1234</nowiki>
28915 [http://foo.com RFC 1234]
28921 Edited Redirect link should emit a non-piped wikitext link
28925 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28931 T75121: Infer extension name from typeOf if data-mw is not present
28933 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28935 <div typeOf="mw:Extension/foo"></div>
28940 # Note that the <p> wrapping isn't present in PHP parser output
28941 # The important thing for this test is that P-wrapping doesn't
28942 # interfere with the <nowiki> protection for leading - in <td>
28943 # (which isn't necessary for <th>).
28945 T88318: p-wrapped dash in table.
28947 parsoid=html2wt,wt2wt
28950 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28951 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28952 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28959 |<nowiki>-</nowiki>
28960 |<nowiki>- </nowiki>
28980 <td><small>-</small>
28987 </td></tr></tbody></table>
28991 T149209: WTS: Handle newlines in table cells properly
28999 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29001 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29007 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29009 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29031 T149209: Selser: Handle newlines in table cells properly
29034 "modes": ["selser"],
29036 [ "#h1", "html", "a\nb\n" ],
29037 [ "#h2", "html", "a\nb\n" ],
29038 [ "#c1", "html", "a\nb\n" ],
29039 [ "#c2", "html", "<p>a</p>" ],
29040 [ "#c3", "html", "<p>a</p>" ],
29041 [ "#c4", "html", "edit-me<p>a</p>" ]
29046 ! id="h1" |edit-me!!1
29048 ! id="h2" |edit-me||2
29050 | id="c1" |edit-me||3
29052 | id="c2" |edit-me||4
29054 | id="c3" |edit-me||p||q||r
29056 | id="c4" |edit-me||p||q||r
29085 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29090 <td id='mwAc'>foo</td>
29091 <td id='serialize-this'>bar</td>
29096 | id="serialize-this" |bar
29101 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29105 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29107 <div id="hello">ok</div>
29111 Testing serialization after deletion in references
29114 "modes": ["wt2wt"],
29120 hi <ref><div id="x">ho</div></ref>
29130 Testing serialization after deletion of table cells
29133 "modes": ["wt2wt", "selser"],
29141 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29151 Testing selser after addition of new row before first row (T125419)
29154 "modes": ["wt2wt", "selser"],
29156 [ "tr", "before", "<tr><td>X</td></tr>" ]
29172 Serialize new table rows in a HTML table using HTML tags
29175 "modes": ["wt2wt", "selser"],
29177 [ "tr", "before", "<tr><td>X</td></tr>" ]
29181 <table><tr><td>a</td></tr></table>
29183 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29187 Serialize new table cells in a HTML row using HTML tags
29190 "modes": ["wt2wt", "selser"],
29192 [ "td", "before", "<td>X</td>" ]
29196 <table><tr><td>a</td></tr></table>
29198 <table><tr><td>X</td><td>a</td></tr></table>
29202 Serialize wikitext list items as HTML list items when embedded in a HTML list
29206 <ul data-parsoid='{"stx": "html"}'>
29207 <li data-parsoid='{}'>a</li>
29217 # SSS FIXME: Is this actually a good thing given the
29218 # odd nested list output that is generated by MW?
29219 # <ul><li>foo<ul>..</ul></li></ul> instead of
29220 # <ul><li>foo</li><ul>..</ul></ul>
29222 Wikitext lists can be nested inside HTML lists
29226 <ul data-parsoid='{"stx": "html"}'>
29227 <li data-parsoid='{"stx": "html"}'>a
29228 <ul><li>b</li></ul>
29232 <ul data-parsoid='{"stx": "html"}'>
29234 <ul><li>y</li></ul>
29255 "modes": ["wt2wt"],
29257 [ "#xyz", "before", "<b>before</b> stuff " ],
29258 [ "#xyz", "after", " stuff <i>after</i>" ],
29259 [ "#xyz", "html", "x <b>y</b> z" ]
29263 <span id="xyz">hello</span>
29265 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29269 Never serialize a-tag as html, regardless of what data-parsoid has to say
29271 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29273 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29278 ## SSS FIXME: This is broken output nevertheless.
29279 ## What might be a reasonable non-broken output for this?
29280 ## This is an edge case unlikely to be seen in production
29281 ## that I am not wasting more time on this right now.
29283 Never serialize a-tag as html, no matter what attributes it has
29285 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29287 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29289 [http://boo.org http://boohoo.org]
29292 # Misnested is an indication that selser can reuse the source but these have
29293 # shown to sneak through on occasion. See T101768.
29294 # The original wikitext here is: [http://test.com [[one]] two three]
29296 Strip span tags added to mark misnested links
29300 <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>
29302 [http://test.com][[one]] two three
29306 Catch regression when unpacking misnested links
29310 {{echo|hi}}[http://example.com [[ho]]]
29312 <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>
29316 Catch regression when unpacking with trailing content
29318 {{echo|Foo <references/> bar}}
29320 <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>
29324 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29328 <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|}"]}'>
29340 ## This test verifies the presence and computation of this attribute indirectly
29341 ## by making an edit and ensuring that the serialization is correct (which it would be
29342 ## only if firstWikitextNode is properly set).
29344 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
29347 "modes": ["wt2wt"],
29349 [ "div#x", "remove" ],
29350 [ "div", "before", "<div>new</div>" ]
29354 <div id="x">foo</div>
29356 {{echo|<div>boo</div>
29364 {{echo|<div>boo</div>
29370 # --------------------------------------------
29371 # Tests spec'ing wikitext serialization norms |
29372 # --------------------------------------------
29375 Serialize multi-line indent-pre starting with wikitext syntax
29389 1. Categories should always be serialized on their own line
29393 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
29401 2. Categories that are part of templates should not introduce a line break
29403 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
29405 <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>
29408 # Careful while editing these next 2 tests. There are \u200f characters
29409 # before and after the <link> tags in the HTML and following some
29410 # of the categories in wikitext
29411 # Do not remove these characters in edits.
29413 # As part of the serialization, these bidi characters will get stripped.
29415 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
29418 "modes": ["html2wt"],
29419 "scrubWikitext": true
29422 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
29423 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
29426 [[קטגוריה: שיטות משפט]]
29430 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
29433 "modes": ["html2wt"],
29434 "scrubWikitext": true
29437 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
29444 Lists: Add space after bullets
29451 <li><span> baz</span></li>
29456 * <span> baz</span>
29460 1. Headings: Add space before/after == (T53744)
29467 <h2><span> baz</span></h2>
29475 == <span> baz</span> ==
29479 2. Headings: Add space before/after == even after hoisted content
29482 "modes": ["html2wt"],
29483 "scrubWikitext": true
29486 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29494 1. Headings: suppress newly created empty headings
29497 "modes": ["html2wt"],
29498 "scrubWikitext": true
29506 2. Headings: don't suppress empty headings if scrubWikitext is false
29516 3. Headings: suppress empty headings on edits
29519 "modes": ["selser"],
29520 "scrubWikitext": true,
29526 ==<span id="x">foo</span>==
29531 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29534 "modes": ["html2wt"],
29535 "scrubWikitext": true
29538 <h2>foo<br/>bar</h2>
29539 <h2>foo <span><br/>bar</span> baz</h2>
29543 == foo <span> bar</span> baz ==
29547 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29550 "modes": ["html2wt"],
29551 "scrubWikitext": false
29554 <h2>foo<br/>bar</h2>
29560 1. WT Quote Tags: suppress newly created empty style tags
29563 "modes": ["html2wt"],
29564 "scrubWikitext": true
29572 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29578 ''<nowiki/>'''''<nowiki/>'''
29582 3. WT Quote Tags: suppress empty style tags on edits
29585 "modes": ["selser"],
29586 "scrubWikitext": true,
29592 '''<span id="x">foo</span>'''
29597 1. Anchors: suppress newly created empty anchors
29600 "modes": ["html2wt"],
29601 "scrubWikitext": true
29604 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29609 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29612 "modes": ["html2wt"],
29613 "scrubWikitext": false
29616 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29622 3. Anchors: suppress empty anchors on edits
29625 "modes": ["selser"],
29626 "scrubWikitext": true,
29632 [[Test|<span id="x">foo</span>]]
29637 3a. Anchors: do not suppress numbered extlinks
29640 "modes": ["wt2wt"],
29641 "scrubWikitext": true
29646 <a rel="mw:ExtLink" href="http://foo.com"></a>
29650 3b. Anchors: do not suppress numbered extlinks
29653 "modes": ["wt2wt"],
29654 "scrubWikitext": true,
29660 [http://foo.com <span id="x">foo</span>]
29666 Normalizations should be restricted to edited content
29669 "modes": ["selser"],
29670 "scrubWikitext": true,
29672 [ "h1", "before", "<i></i>"]
29686 1. Multiple normalizations (html2wt)
29689 "modes": ["html2wt"],
29690 "scrubWikitext": true
29694 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29695 </a><b><i></i></b>x</p>
29704 2. Multiple normalizations (selser)
29707 "modes": ["selser"],
29708 "scrubWikitext": true,
29710 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29714 <span id="x">foo</span>
29716 <span id="x">foo</span>
29722 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29725 "modes": ["html2wt"],
29726 "scrubWikitext": true
29738 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29745 <nowiki> </nowiki>hi
29747 <nowiki> </nowiki> hello
29751 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29754 "modes": ["html2wt"],
29755 "scrubWikitext": true
29764 baz bang</td></tr></table>
29770 bar<span>boo</span></p>
29786 bar<span>boo</span>
29790 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29793 "modes": ["selser"],
29794 "scrubWikitext": true,
29796 [ "p", "html", " a\n b" ]
29807 1. New links that end in spaces
29810 "modes": ["html2wt"],
29811 "scrubWikitext": false
29814 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29815 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29816 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29818 [[Berlin ]]<nowiki/>is the capital of Germany.
29822 [[Boston ]] is a city.
29826 2. New links that end in spaces
29829 "modes": ["html2wt"],
29830 "scrubWikitext": true
29833 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29834 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29835 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29837 [[Berlin]] is the capital of Germany.
29841 [[Boston]] is a city.
29845 1. Table cells with escapable prefixes
29848 "modes": ["html2wt"],
29849 "scrubWikitext": false
29853 <tr><td>a</td></tr>
29854 <tr><td>-</td></tr>
29855 <tr><td>+</td></tr>
29861 |<nowiki>-</nowiki>
29863 |<nowiki>+</nowiki>
29868 2. Table cells with escapable prefixes
29871 "modes": ["html2wt"],
29872 "scrubWikitext": true
29876 <tr><td>a</td></tr>
29877 <tr><td>-</td></tr>
29878 <tr><td>+</td></tr>
29891 3a. Table cells with escapable prefixes after edits
29894 "modes": ["selser"],
29895 "scrubWikitext": true,
29897 [ "table tbody tr:first-child td:first-child", "remove"]
29911 3b. Table cells with escapable prefixes after edits
29914 "modes": ["selser"],
29915 "scrubWikitext": true,
29917 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29924 |<span id="x">foo</span>+
29933 # FIXME: This test will fail because
29934 # normalization doesn't realize that the id attribute
29935 # will eliminate the escapable scenario
29937 4a. Table cells without escapable prefixes after edits
29940 "modes": ["selser"],
29941 "scrubWikitext": true,
29943 [ "#x", "html", "-" ]
29956 ## This tests normalizer's ability to discriminate between
29957 ## cells having identical content.
29959 4b. Table cells without escapable prefixes after edits
29962 "modes": ["selser"],
29963 "scrubWikitext": true,
29965 [ "td", "html", "-" ]
29978 ## This tests normalizer's ability to not be tripped by
29979 ## comments (and whitespace)
29981 4c. Table cells without escapable prefixes after edits
29984 "modes": ["selser"],
29985 "scrubWikitext": true,
29987 [ "table tbody tr td:first-child", "remove" ]
30002 ## This tests normalizer's ability to handle HTML cells
30004 4d. Table cells without escapable prefixes after edits
30007 "modes": ["selser"],
30008 "scrubWikitext": true,
30010 [ "td", "html", "-" ]
30015 <tr><td>a</td></tr>
30019 <tr><td>-</td></tr>
30023 ## T111151 Remove font elements without attributes
30025 5a. font tags without attributes should be dropped in scrubWikitext mode
30028 "modes": ["html2wt"],
30029 "scrubWikitext": true
30033 <font><font>bar</font></font>
30034 <font class="x">boo</font>
30038 <font class="x">boo</font>
30042 5b. font tags should not be dropped without scrubWikitext being enabled
30045 "modes": ["html2wt"],
30046 "scrubWikitext": false
30055 Escape nowiki DOM elements
30059 <nowiki><i>foo</i></nowiki>
30061 <nowiki>''foo''</nowiki>
30064 # This is meant to be an interim fix while we go about figuring out
30065 # how to not introduce these trailing <nowiki/>s in the first place.
30067 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30071 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30073 <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>
30074 <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>
30088 New list is serialized on newlines
30092 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30096 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30098 The quick brown fox jumps over the lazy dog.
30104 The quick onyx goblin jumps over the lazy dwarf.
30108 New lists in formatting elements serialized w/o newlines
30120 <small><ul><li>hi</li></ul></small>
30132 New list in table doesn't need newlines
30136 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30145 # ---------------------------------------------------
30146 # End of tests spec'ing wikitext serialization norms |
30147 # ---------------------------------------------------
30151 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30159 <td><b>c</b><p>d</p></td>
30178 Anchor without href scenarios
30180 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30183 <a class="no">dice</a>
30188 <span name="foo"></span>
30192 New transclusion added after a list should be serialized after the list
30196 <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>
30202 # -----------------------------------------------------------------
30203 # End of section for Parsoid-only html2wt tests for serialization
30205 # -----------------------------------------------------------------
30207 # -----------------------------------------------------------------
30208 # The following section of tests are primarily to spec behavior of
30209 # the selective serializer. All these tests have manual selser
30210 # changes. The automated selser changes for all tests handle the
30211 # wide variation of changes, but these tests here capture specs
30212 # deterministically.
30213 # ----------------------------------------------------------------
30217 Selser: New comments should not be lost
30220 "modes": ["selser"],
30222 [ "#a", "after", "<!--c1-->" ],
30223 [ "#b", "before", "<!--c2-->" ]
30227 <span id="a">a</span>
30229 <span id="b">b</span>
30231 <span id="a">a</span><!--c1-->
30233 <!--c2--><span id="b">b</span>
30238 Selser: Check for validity of DSR before using it
30241 "modes": ["selser"],
30243 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30247 <span id="a">a</span>
30249 {{DISPLAYTITLE:foo}}
30250 <span id="a">a</span>
30254 1. DOMDiff: Changes to <ref> content should be looked up using id
30257 "modes": ["selser"],
30259 ["#X", "after", "bar"],
30260 ["#Y", "after", "baz"]
30264 X <ref><span id="X">foo</span></ref>
30267 <ref name="a"><span id="Y">foo</span></ref>
30270 X <ref><span id="X">foo</span>bar</ref>
30273 <ref name="a"><span id="Y">foo</span>baz</ref>
30278 2. DOMDiff: Changes to <ref> content should be looked up using id
30281 "modes": ["selser"],
30283 ["#Z", "after", "bar"]
30287 A <ref>foo bar for a</ref>
30288 B <ref group="X" name="b" />
30292 <references group="X">
30293 <ref name="b"><span id="Z">foo</span></ref>
30296 A <ref>foo bar for a</ref>
30297 B <ref group="X" name="b" />
30301 <references group="X">
30302 <ref name="b"><span id="Z">foo</span>bar</ref>
30307 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30310 "modes": ["selser"],
30312 [ "div:first-child", "text", "bar" ]
30316 <div style="{{1x|color:red;}}%">foo</div>
30318 <div style="{{1x|color:red;}}%">bar</div>
30330 <li class="mw-empty-elt"></li>
30331 <li class="mw-empty-elt"></li>
30338 [[File:Thumb.png|thumb]]
30340 <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>
30342 <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>
30346 unclosed internal link XSS (T137264)
30348 [[#%3Cscript%3Ealert(1)%3C/script%3E|
30350 <p>[[#<script>alert(1)</script>|
30353 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
30357 Validating that <style> isn't eaten by tidy (T167349)
30362 <style>.foo::before { content: "<foo>"; }</style>
30363 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30367 <style>.foo::before { content: "<foo>"; }</style>
30368 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30373 Validating that <style> isn't wrapped in a paragraph (T186965)
30377 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30379 <style>.foo::before { content: "<foo>"; }</style>
30381 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30383 But if it's on a line with other content, let it be wrapped.
30385 <style>.foo::before { content: "<foo>"; }</style> bar
30387 foo <style>.foo::before { content: "<foo>"; }</style>
30389 foo <style>.foo::before { content: "<foo>"; }</style> bar
30391 And the same if we have non-paragraph-breaking whitespace
30394 <style>.foo::before { content: "<foo>"; }</style>
30397 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30399 <style>.foo::before { content: "<foo>"; }</style>
30400 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30401 <p>But if it's on a line with other content, let it be wrapped.
30402 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
30403 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
30404 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
30405 </p><p>And the same if we have non-paragraph-breaking whitespace
30407 <style>.foo::before { content: "<foo>"; }</style>
30413 Validating that <link> isn't wrapped in a paragraph (T186965)
30417 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30419 <link rel="foo" href="bar"/>
30421 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30423 But if it's on a line with other content, let it be wrapped.
30425 <link rel="foo" href="bar"/> bar
30427 foo <link rel="foo" href="bar"/>
30429 foo <link rel="foo" href="bar"/> bar
30431 And the same if we have non-paragraph-breaking whitespace
30434 <link rel="foo" href="bar"/>
30437 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30439 <link rel="foo" href="bar"/>
30440 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30441 <p>But if it's on a line with other content, let it be wrapped.
30442 </p><p><link rel="foo" href="bar"/> bar
30443 </p><p>foo <link rel="foo" href="bar"/>
30444 </p><p>foo <link rel="foo" href="bar"/> bar
30445 </p><p>And the same if we have non-paragraph-breaking whitespace
30447 <link rel="foo" href="bar"/>
30453 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
30455 wgFragmentMode=[ 'html5', 'legacy' ]
30457 ==A&B&C&amp;D&amp;amp;E==
30458 [[#A&B&C&amp;D&amp;amp;E]]
30460 <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>
30461 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
30464 <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>
30465 <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>
30469 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
30471 wgFragmentMode=[ 'legacy' ]
30473 ==A&B&C&amp;D&amp;amp;E==
30474 [[#A&B&C&amp;D&amp;amp;E]]
30476 <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>
30477 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
30482 Decoding of HTML entities in embedded HTML tags
30484 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30486 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30489 <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>
30493 Decoding of HTML entities in indicator names for IDs (T104196)
30495 parsoid=wt2html,html2html
30498 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30500 1&2&3&4&amp;5=Indicator
30503 <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>
30506 # this version of the test strips out the ambiguity so Parsoid rts cleanly
30508 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
30512 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30514 1&2&3&4&amp;5=Indicator
30517 <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>
30520 # This fragment mode is what Parsoid supports.
30522 HTML5 ids: fallback to legacy
30524 wgFragmentMode=[ 'html5', 'legacy' ]
30536 ==Hey < # " > % : '==
30537 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30539 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30541 <!-- These two links should produce identical HTML -->
30542 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30545 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
30547 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30548 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30549 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30550 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30551 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30552 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30556 <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>
30557 <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>
30558 <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>
30559 <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>
30560 <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>
30561 <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>
30562 <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>
30563 </p><p>💩 <span id="💩"></span>
30564 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30567 <h2 id="Foo_bar">Foo bar</h2>
30569 <h2 id="foo_Bar_2">foo Bar</h2>
30571 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30573 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30575 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30577 <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>
30578 <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>
30580 <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>
30582 <!-- These two links should produce identical HTML -->
30583 <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>
30586 # Parsoid doesn't support this mode
30588 HTML5 ids: legacy with a fallback to modern
30590 wgFragmentMode=[ 'legacy', 'html5' ]
30602 ==Hey < # " > % : '==
30603 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30605 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30607 <!-- These two links should produce identical HTML -->
30608 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30611 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
30613 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30614 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30615 <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>
30616 <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>
30617 <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>
30618 <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>
30622 <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>
30623 <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>
30624 <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>
30625 <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>
30626 <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>
30627 <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>
30628 <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>
30629 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30630 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30634 # Parsoid doesn't support this mode.
30636 HTML5 ids: no legacy
30638 wgFragmentMode=[ 'html5' ]
30650 ==Hey < # " > % : '==
30651 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30653 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30655 <!-- These two links should produce identical HTML -->
30656 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30659 <div id="toc" class="toc"><input type="checkbox" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
30661 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30662 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30663 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30664 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30665 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30666 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30670 <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>
30671 <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>
30672 <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>
30673 <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>
30674 <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>
30675 <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>
30676 <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>
30677 </p><p>💩 <span id="💩"></span>
30678 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30683 T90902: Normalize weird characters in section IDs
30685 wgFragmentMode=[ 'html5', 'legacy' ]
30691 <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>
30692 <p><a href="#Foo_bar">#Foo bar</a>
30695 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30696 <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>
30700 T51672: Test for brackets in attributes of elements in external link texts
30702 [http://example.com/ link <span title="title with [brackets]">span</span>]
30703 [http://example.com/ link <span title="title with [brackets]">span</span>]
30706 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30707 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30710 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30711 <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>
30715 T72875: Test for brackets in attributes of elements in internal link texts
30717 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30718 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30721 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30722 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30725 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30726 <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>
30730 T179544: {{anchorencode:}} output should be always usable in links
30732 wgFragmentMode=[ 'html5' ]
30734 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30736 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30739 <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>
30742 ## ------------------------------
30743 ## Parsoid section-wrapping tests
30744 ## ------------------------------
30746 Section wrapping for well-nested sections (no leading content)
30749 "wrapSections": true
30770 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30773 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30776 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30779 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30782 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30785 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30792 Section wrapping for well-nested sections (with leading content)
30795 "wrapSections": true
30800 Para 2 with a <div>nested in it</div>
30813 <section data-mw-section-id="0"><p>Para 1.</p>
30815 <p>Para 2 with a </p><div>nested in it</div>
30819 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30822 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30825 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30828 </section></section>
30832 Section wrapping with template-generated sections (good nesting 1)
30835 "wrapSections": true
30852 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30855 <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">
30856 </span><p about="#mwt1">b</p>
30857 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30860 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30864 # In this example, the template scope is mildly expanded to incorporate the
30865 # trailing newline after the transclusion since that is part of section 1.1.1
30867 Section wrapping with template-generated sections (good nesting 2)
30870 "wrapSections": true,
30871 "modes": ["wt2html", "wt2wt"]
30886 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30889 <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">
30890 </span><p about="#mwt1">b</p><span about="#mwt1">
30891 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30892 </span><p about="#mwt1">d</p><span about="#mwt1">
30893 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30897 # In this example, the template scope is mildly expanded to incorporate the
30898 # trailing newline after the transclusion since that is part of section 1.2.1
30900 Section wrapping with template-generated sections (good nesting 3)
30903 "wrapSections": true,
30904 "modes": ["wt2html", "wt2wt"]
30922 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30925 <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">
30926 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
30927 </span><p about="#mwt1">b</p><span about="#mwt1">
30928 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30929 </span><p about="#mwt1">c</p><span about="#mwt1">
30930 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30931 </span><p about="#mwt1">d</p><span about="#mwt1">
30932 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
30936 # Because of section-wrapping and template-wrapping interactions,
30937 # the scope of the template is expanded so that the template markup
30938 # is valid in the presence of <section> tags.
30939 # This exercises the s1 is null scenario in the wrapSections code
30941 Section wrapping with template-generated sections (bad nesting 1)
30944 "wrapSections": true
30958 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30961 <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"]}'>
30962 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
30963 </span><p about="#mwt1">b
30964 </p><span about="#mwt1">
30966 </span><p about="#mwt1">c</p><span about="#mwt1">
30967 </span></section></div></section>
30970 # Because of section-wrapping and template-wrapping interactions,
30971 # the scope of the template is expanded so that the template markup
30972 # is valid in the presence of <section> tags.
30973 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30975 Section wrapping with template-generated sections (bad nesting 2)
30978 "wrapSections": true
30996 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30999 </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">
31000 </span><p about="#mwt1">b</p><span about="#mwt1">
31001 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
31002 </span><p about="#mwt1">c</p><span about="#mwt1">
31004 </span><p about="#mwt1">d</p><span about="#mwt1">
31006 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
31010 # Because of section-wrapping and template-wrapping interactions,
31011 # additional template wrappers are added to <section> tags
31012 # so that template wrapping semantics are valid whether section
31013 # tags are retained or stripped. But, the template scope can expand
31014 # greatly when accounting for section tags.
31015 # This exercises the s1 and s2 are in different subtrees scenario
31017 Section wrapping with template-generated sections (bad nesting 3)
31020 "wrapSections": true,
31021 "modes": ["wt2html", "wt2wt"]
31039 <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>
31042 <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">
31043 </span><p about="#mwt1">b</p><span about="#mwt1">
31044 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
31045 </span><p about="#mwt1">c</p>
31048 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
31053 Section wrapping with uneditable lead section + div wrapping multiple sections
31056 "wrapSections": true
31061 <div style="border:1px solid red;">
31078 <section data-mw-section-id="-1"><p>foo</p>
31080 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31081 <section data-mw-section-id="1"><h1 id="1">1</h1>
31084 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31087 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31091 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31094 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31096 </section></section>
31100 Section wrapping with editable lead section + div overlapping multiple sections
31103 "wrapSections": true
31110 <div style="border:1px solid red;">
31127 <section data-mw-section-id="0"><p>foo</p>
31129 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31131 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31134 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31137 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31142 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31145 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31147 </section></section>
31151 HTML header tags should not be wrapped in section tags
31154 "wrapSections": true
31167 <section data-mw-section-id="0"><p>foo</p>
31169 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31171 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31173 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31175 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31179 Lead section containing only whitespace and comments.
31182 "wrapSections": true
31186 <!-- this is a comment, presumably significant to editors -->
31193 <section data-mw-section-id="0" data-parsoid="{}">
31194 <!-- this is a comment, presumably significant to editors -->
31195 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31198 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31203 Pseudo-sections emitted by templates should have id -2
31206 "wrapSections": true
31216 <section data-mw-section-id="-1"><p>foo</p>
31217 </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}}]}'>
31218 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31219 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31220 </section></div><span about="#mwt1">
31224 ##########################################################################
31225 Tests demonstrating white-space insensitivity in input wikitext
31226 for wikitext headings, wikitext list items, and wikitext table captions,
31227 headings, and cells. HTML versions of the same should preserve whitespace.
31228 ##########################################################################
31230 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31233 "modes": ["wt2html"],
31234 "preserveIEW": true
31238 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31239 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31240 == <!--Headings with fallback ids--> Личная жизнь ==
31241 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31242 ; <!--term to define--> term : <!--term's definition--> definition
31244 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31246 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31248 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31250 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
31252 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
31255 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31258 <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>
31259 <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>
31260 <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>
31261 <ul><li>List item</li></ul>
31262 <dl><dt>term </dt>
31263 <dd>definition</dd></dl>
31265 <caption>Table Caption
31268 <th>Table Heading 1</th>
31269 <th>Table Heading 2
31272 <td>Table Cell 1</td>
31276 <td>class="foo"</td>
31280 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
31281 </td></tr></tbody></table>
31284 <td>Table Cell 1</td>
31286 </td></tr></tbody></table> foo</dd></dl>
31288 <meta property="mw:PageProp/notoc">
31289 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
31290 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
31291 <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>
31292 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
31293 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
31295 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
31297 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
31299 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31301 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
31303 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
31306 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31307 </tbody></table><p> foo </p><!--c1--></dd></dl>
31310 # Looks like <caption> is not accepted in HTML
31312 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
31315 "modes": ["wt2html"],
31316 "preserveIEW": true
31320 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31321 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31323 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
31324 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
31327 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
31328 <ul><li> List item </li></ul>
31330 <tbody><tr><th> Table Heading </th><th></th></tr>
31331 <tr><td> Table Cell </td><th></th></tr>
31334 <meta property="mw:PageProp/notoc"/>
31335 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31336 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31338 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
31339 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
31344 Do not trim whitespace in links and quotes
31347 "modes": ["wt2html"],
31348 "preserveIEW": true
31351 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
31352 [[Foo| some text ]]
31354 <p>foo <i> italic </i> and <b> bold </b>
31355 <a href="/wiki/Foo" title="Foo"> some text </a>
31358 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
31359 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
31363 Remove p tags surrounding a single element in a figcaption
31367 [[File:Foobar.jpg|right|200x200px|Caption]]
31369 <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>
31373 Selser preserves lack of newline before list and allows newline after the list
31376 "modes": ["selser"],
31377 "scrubWikitext": true,
31379 [ "ul", "after", "<p>footer</p>" ]
31396 Selser does not introduce newlines between unedited paragraph preceding the list
31399 "modes": ["selser"],
31401 [ "table tbody tr td p:last-child", "empty" ]
31423 Selser does not introduce newlines between unedited paragraph following the list
31426 "modes": ["selser"],
31428 [ "table tbody tr td p:first-child", "empty" ]
31450 Remove a list item but do not insert newline above list
31453 "modes": ["selser"],
31455 [ "ul li:last-child", "remove" ]