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 ### Preformatted text
2286 And a [[Main Page|link]]
2292 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2297 Tabs don't trigger preformatted text
2301 This is preformatted text.
2307 <pre>This is preformatted text.
2312 preformatted text.</p>
2313 <pre>This is preformatted text.
2318 Space before tab needs nowiki pre protection
2324 <nowiki> </nowiki> a
2328 Ident preformatting with inline content
2339 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2356 Regression with preformatted in <center>
2370 T54763: Preformatted in <blockquote>
2376 indented cell (no pre-wrapping!)
2386 <p> indented cell (no pre-wrapping!)
2394 T53086: Double newlines in blockquotes should be turned into paragraphs
2411 T17491: <ins>/<del> in blockquote
2414 Foo <del>bar</del> <ins>baz</ins> quux
2418 <p>Foo <del>bar</del> <ins>baz</ins> quux
2425 T17491: <ins>/<del> in blockquote (2)
2427 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2430 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2434 <blockquote><p>Foo </p><del>bar</del> <ins>baz</ins><p> quux
2439 <pre> with attributes (T5202)
2441 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2443 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2448 <pre> with width attribute (T5202)
2450 <pre width="8">Narrow screen goodies</pre>
2452 <pre width="8">Narrow screen goodies</pre>
2457 <pre> with forbidden attribute (T5202)
2459 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2461 <pre width="8">Narrow screen goodies</pre>
2466 Entities inside <pre>
2475 <pre> with forbidden attribute values (T5202)
2477 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2479 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2484 <nowiki> inside <pre> (T15238)
2492 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2500 <pre><nowiki>Foo</nowiki></pre>
2505 <nowiki> inside of #tag:pre
2507 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2509 <pre>Foo →bar</pre>
2512 <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>
2515 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2516 ## aren't enclosed in nowikis.
2518 <nowiki> and <pre> preference (first one wins)
2549 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2554 <p><span typeof="mw:Nowiki">
2562 </pre> inside nowiki
2564 <nowiki></pre></nowiki>
2571 Empty pre; pre inside other HTML tags (T56946)
2588 <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
2590 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2594 HTML pre followed by indent-pre
2607 <p><pre>foo</pre></p>
2609 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2611 <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>
2615 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2623 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2633 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2645 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2666 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2670 {{echo| foo}}{{echo| bar}}
2675 {{echo|<!--cmt--> foo}}
2677 <!--cmt-->{{echo| foo}}
2679 {{echo|{{echo| }}bar}}
2697 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2733 ## Hmm, should Parsoid rt this?
2735 Pres with newline attributes
2737 parsoid=wt2html,html2html
2742 <pre class="one two">hi</pre>
2745 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2749 Things that look like <pre> tags aren't treated as such
2751 Barack Obama <President> of the United States
2752 <President></President>
2754 <p>Barack Obama <President> of the United States
2755 <President></President>
2760 Handle broken pre-like tags (T66025)
2764 {{echo|<pre <pre>x</pre>}}
2766 <table><pre </table>
2769 <table><pre </table>
2773 <pre <table></table>
2775 <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>
2777 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'><pre </span><table data-parsoid='{"stx":"html"}'></table>
2781 Parsoid: handle pre with space after attribute
2785 <pre style="width:50%;" >{{echo|foo}}</pre>
2787 <pre style="width:50%;">{{echo|foo}}</pre>
2790 <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>
2793 # TODO / maybe: fix wt2wt for this
2795 Parsoid: Don't paragraph-wrap fosterable content
2828 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2832 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2860 #--------------------------------------------------------------------
2861 # Transclusion parameter whitespace stripping tests
2862 # Behavior is different for positional and named parameters
2863 #--------------------------------------------------------------------
2865 Templates: Strip leading and trailing whitespace from named-param values
2869 {{echo|1= {{echo|b}} }}
2887 Templates: Don't strip whitespace from positional-param values
2891 {{echo|{{echo|b}} }}
2931 Templates: Don't recognize targets split by newlines
2947 Templates: Recognize targets when newlines and comments don't split the target
2952 <!--X--> ech<!--X-->o<!--X-->
2960 <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>
2964 Templates: Handle empty comment-and-ws-only lines correctly
2967 <!--should be ignored-->
2968 <!--should be ignored as well-->
2975 <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>
2979 Templates: Handle comments in the target
2982 <!-- should be ignored -->
2986 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2989 {{echo<!-- should be ignored -->
2992 {{echo<!-- should be ignored -->|foo}}
2994 {{<!-- should be ignored -->echo|foo}}
3003 <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>
3005 <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>
3007 <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>
3009 <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>
3011 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3015 Templates: Handle comments in parameter names (T69657)
3018 <!-- should be ignored -->
3022 <!-- should be ignored -->
3025 {{echo|1<!-- should be ignored -->=foo}}
3027 {{echo|<!-- should be ignored -->1=foo}}
3035 <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>
3037 <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>
3039 <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>
3041 <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>
3045 Templates: Other wikitext in parameter names (T69657)
3052 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3056 Templates: With colons
3060 <p>Template with colon
3063 <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>
3066 #--------------------------------------------------------------------
3067 # Transclusion parameter escaping tests
3068 #--------------------------------------------------------------------
3071 Templates: Parsoid parameter escaping test 1
3073 {{echo|[foo]|{{echo|[bar]}}}}
3078 <p about="#mwt1" typeof="mw:Transclusion"
3079 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3083 Parsoid: Pipes in external links in template parameter
3085 {{echo|[{{echo|http://example.com}} link]}}
3087 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3090 <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>
3094 Parsoid: pipe in transclusion parameter
3096 {{echo|http://foo.com/a|b}}
3098 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3101 <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>
3105 Parsoid: Pipe in external link target and content in template parameter
3107 parsoid=html2wt,wt2wt
3109 {{echo|[http://foo.com/a|b a|b]}}
3111 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3114 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3115 typeof="mw:Transclusion"
3116 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3117 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3121 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3125 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3127 <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>
3131 Templates: Don't escape already nowiki-escaped text in template parameters
3133 parsoid=html2wt,wt2wt
3135 {{echo|foo<nowiki>|</nowiki>bar}}
3136 {{echo|<nowiki><div></nowiki>}}
3137 {{echo|<nowiki></nowiki>}}
3144 <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>
3145 <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>
3146 <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>
3152 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3154 parsoid=html2wt,wt2wt
3156 {{echo|{{echo|1=bar}}}}
3161 <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>
3166 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3173 <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>
3178 Templates: Preserve blank parameter names
3185 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3189 Templates: Preserve blank parameter names in other positions
3191 {{blank_param|bar|=foo}}
3197 <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
3202 ### Parsoid-centric tests for testing RT edge cases for pre
3206 1a. Indent-Pre and Comments
3219 1b. Indent-Pre and Comments
3232 1c. Indent-Pre and Comments
3245 1d. Indent-Pre and Comments
3246 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3259 2a. Indent-Pre and tables
3280 2b. Indent-Pre and tables
3296 2c. Indent-Pre and tables (T44252)
3313 2d. Indent-Pre and tables
3330 <tbody><tr><td> b</td></tr>
3335 2e. Indent-Pre and table-line syntax
3348 2f. Indent-pre started by table-line syntax
3367 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3372 Text that should be rendered preformatted
3380 <pre>Text that should be rendered preformatted
3389 2h. Indent pre in tables
3391 parsoid=wt2html,html2html
3434 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3436 </td></tr></tbody></table>
3440 3a. Indent-Pre and block tags (single-line html)
3444 c <blockquote> foo </blockquote>
3449 c <blockquote> foo </blockquote>
3450 <pre><span> foo </span>
3453 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3454 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3455 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3456 <pre><span> foo </span>
3459 <p> a </p><p> foo </p><p>
3460 b </p><div> foo </div><p>
3461 c </p><blockquote><p> foo </p></blockquote>
3462 <pre><span> foo </span>
3467 3b. Indent-Pre and block tags (multi-line html)
3470 <!-- comment --> b <div> foo </div>
3472 <pre>a <span>foo</span>
3477 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3478 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3480 <pre>a <span>foo</span>
3482 b </p><div> foo </div>
3486 3c. Indent-Pre and block tags (pre-content on separate line)
3550 4. Indent-Pre and extension tags
3561 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3565 5. Indent-Pre and html pre
3567 <pre class="123">hi</pre>
3569 <pre class="123">hi</pre>
3572 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3576 Render paragraphs when indent-pre is suppressed in blocklevels
3593 4. Multiple spaces at start-of-line
3611 ## NOTE: the leading white-space chars on empty line are significant
3613 5a. White-space in indent-pre
3625 ## NOTE: the leading white-space chars on empty line are significant
3627 5b. White-space in indent-pre
3646 5c. White-space in indent-pre
3659 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3682 7a. Indent-pre and category links
3684 parsoid=wt2html,wt2wt
3686 [[Category:foo]] <!-- No pre-wrapping -->
3687 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3690 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3691 <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 -->
3694 ## We used to, but no longer wt2wt this test since the default serializer
3695 ## will normalize all categories to serialize on their own line.
3696 ## This wikitext usage is going to be fairly uncommon in production and
3697 ## selser will take care of preserving formatting in those scenarios.
3699 7b. Indent-pre and category links
3704 [[Category:foo]] {{echo|b}}
3706 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3707 <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>
3711 Indent-Pre: Newlines in comments shouldn't affect sol state
3726 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3730 HTML-pre: 1. embedded newlines
3762 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3764 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3767 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3772 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3780 HTML-pre: big spaces
3816 <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"}}'>
3835 HTML-pre: 2: indented text
3848 HTML-pre: 3: other wikitext
3867 <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
3876 ### Definition lists
3883 <dl><dt>name </dt>
3884 <dd>Definition</dd></dl>
3889 Definition list for indentation only
3893 <dl><dd>Indented text</dd></dl>
3898 Definition list with no space
3903 <dd>Definition</dd></dl>
3908 Definition list with URL link
3910 ;http://example.com/ :definition
3912 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3913 <dd>definition</dd></dl>
3918 Definition list with bracketed URL link
3920 ;[http://www.example.com/ Example]:Something about it
3922 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3923 <dd>Something about it</dd></dl>
3928 Definition list with wikilink containing colon
3930 ;[[Help:FAQ]]:The least-read page on Wikipedia
3932 <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>
3933 <dd>The least-read page on Wikipedia</dd></dl>
3937 # At Brion's and JeLuF's insistence... :)
3939 Definition list with news link containing colon
3941 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
3943 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> </dt>
3944 <dd>This isn't even a real newsgroup!</dd></dl>
3947 <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>
3951 Malformed definition list with colon
3953 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3955 <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>
3960 Definition lists: colon in external link text
3962 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
3964 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a> </dt>
3965 <dd>OK, I made that up</dd></dl>
3970 Definition lists: colon in HTML attribute
3972 ;<b style="display: inline">bold</b>
3974 <dl><dt><b style="display: inline">bold</b></dt></dl>
3979 Definition lists: self-closed tag
3981 ;one<br/>two :two-line fun
3983 <dl><dt>one<br />two </dt>
3984 <dd>two-line fun</dd></dl>
3989 Definition lists: ignore colons inside tags
3991 ;one <b>two : tag <i>fun:</i>:</b>:def
3993 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3999 Definition lists: excess closed tags
4001 ;one</b>two :bad tag fun
4003 <dl><dt>onetwo </dt>
4004 <dd>bad tag fun</dd></dl>
4008 <dd>bad tag fun</dd>
4013 T13748: Literal closing tags
4017 <dd>test test test test test</dd>
4019 <dd>test test test test test</dd>
4024 <dd>test test test test test</dd>
4026 <dd>test test test test test</dd>
4032 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4040 <dl><dt>term </dt>
4041 <dd>description</dd></dl>
4042 <ul><li>unordered</li></ul>
4048 Definition list with empty definition and following paragraph
4061 Nested definition lists using html syntax
4074 Definition Lists: No nesting: Multiple dd's
4087 Definition Lists: Indentation: Regular
4095 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4100 Definition Lists: Indentation: Missing 1st level
4106 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4111 Definition Lists: Indentation: Multi-level indent
4115 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4120 Definition Lists: Hacky use to indent tables
4127 should be left alone
4129 <dl><dd><dl><dd><table>
4134 </td></tr></table></dd></dl></dd></dl>
4136 should be left alone
4141 Definition Lists: Hacky use to indent tables (with content following table)
4146 |} <!--c1--> this text should be part of the dl
4153 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4160 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4164 Definition Lists: Hacky use to indent tables, with comments (T65979)
4172 should be left alone
4175 <dl><dd><dl><dd><table><tr>
4178 </tr></table><!-- bar --></dd></dl></dd></dl>
4180 should be left alone</p>
4184 Definition Lists: Hacky use to indent tables, with comment before table
4192 <dl><dd><dl><dd><!-- foo --><table><tr>
4194 </tr></table></dd></dl></dd></dl>
4197 # The trailing whitespace in this test is to catch a regression in
4198 # Parsoid after T54473.
4200 Definition Lists: Hacky use to indent tables (WS-insensitive)
4209 </td></tr></table></dd></dl>
4213 <tbody><tr><td>a</td></tr>
4214 </tbody></table></dd></dl>
4217 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4218 ## as an empty dt item. It also ignores all but the last ";" when followed
4219 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4220 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4223 ## Ex: ";;t2 ::d2" is transformed into:
4235 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4236 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4247 ## All Parsoid only definition list tests have this difference.
4249 ## See also: https://phabricator.wikimedia.org/T8569
4250 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4253 Table / list interaction: indented table with lists in table contents
4275 </td></tr></table></dd></dl>
4280 Table / list interaction: lists nested in tables nested in indented lists
4303 </td></tr></table></dd></dl>
4310 Definition Lists: Nesting: Multi-level (Parsoid only)
4338 Definition Lists: Nesting: Test 2
4345 <dl><dd>d2</dd></dl></dd></dl>
4350 Definition Lists: Nesting: Test 3
4355 <dl><dd><dl><dt>t1</dt>
4357 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4362 Definition Lists: Nesting: Test 4
4367 <dl><dd><dl><dd><dl><dt>t3</dt>
4368 <dd>d3</dd></dl></dd></dl></dd></dl>
4373 ## The Parsoid team believes the following three test exposes a
4374 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4375 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4376 ## It also exposes a "misfeature" in tidy, which doesn't like
4377 ## <dl> tags with a single <dt> child; it converts the <dt> into
4378 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4380 Definition Lists: Mixed Lists: Test 1
4386 <dl><dd><dl><dt><ul><li>foo</li>
4387 <li>bar</li></ul></dt></dl>
4388 <dl><dt>baz</dt></dl></dd></dl>
4391 <dl><dd><dl><dt><ul><li>foo</li>
4392 <li>bar</li></ul></dt></dl>
4393 <dl><dt>baz</dt></dl></dd></dl>
4411 Definition Lists: Mixed Lists: Test 2
4416 <ul><li><dl><dd>d1</dd>
4417 <dd>d2</dd></dl></li></ul>
4423 Definition Lists: Mixed Lists: Test 3
4428 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4429 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4435 Definition Lists: Mixed Lists: Test 4
4440 <ul><li><dl><dt>d1 </dt>
4443 <dd>d4</dd></dl></li></ul>
4449 Definition Lists: Mixed Lists: Test 5
4455 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4461 Definition Lists: Mixed Lists: Test 6
4466 <ol><li><ul><li><dl><dd>d1
4467 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4473 Definition Lists: Mixed Lists: Test 7
4478 <dl><dd><ul><li>d1</li>
4479 <li>d2</li></ul></dd></dl>
4485 Definition Lists: Mixed Lists: Test 8
4490 <dl><dd><ul><li>d1</li></ul>
4491 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4497 Definition Lists: Mixed Lists: Test 9
4501 <ul><li><dl><dt>foo </dt>
4502 <dd>bar</dd></dl></li></ul>
4508 Definition Lists: Mixed Lists: Test 10
4512 <ul><li><ol><li><dl><dt>foo </dt>
4513 <dd>bar</dd></dl></li></ol></li></ul>
4517 # The Parsoid team disagrees with the PHP parser's seemingly-random
4518 # rules regarding dd/dt on the next few tests. Parsoid is more
4519 # consistent, and recognizes the shared nesting and keeps the
4520 # still-open tags around until the nesting is complete.
4522 # This is a regression test for T175099
4524 Definition Lists: Mixed Lists: Test 11
4531 <ul><li>b</li></ul></dd></dl>
4535 <dd><ul><li>b</li></ul></dd></dl>
4538 # FIXME: Maybe get rid of this test?
4540 Definition Lists: Mixed Lists: Test 12
4545 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4546 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4547 <dl><dt>boo </dt>
4548 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4551 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4552 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4553 <dl><dt>boo </dt>
4554 <dd>baz</dd></dl></li></ol></li></ul>
4571 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4572 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4576 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4577 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4585 # FIXME: Maybe get rid of this test?
4587 # * The test is wrong, there are two colons where there should be :;
4588 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4590 Definition Lists: Weird Ones: Test 1
4592 *#;*::;;foo :bar (who uses this?)
4594 <ul><li><ol><li><dl><dt>foo </dt>
4595 <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>
4612 <dt>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4613 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4625 Definition Lists: colons occurring in tags
4642 <dt><span>a:b</span></dt>
4643 <dt><div>a:b</div></dt>
4644 <dt><div>a</div></dt>
4648 <dt><i>a:b</i></dt></dl>
4649 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4651 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4653 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4654 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4655 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4656 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4658 <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>
4659 <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>
4660 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4663 # Parsoid's output differs here again because it shares
4664 # nesting between the two lists unlike the PHP parser.
4665 # Unsure which is more desirable.
4667 Definition Lists: colons and tables 1
4679 </td></tr></table></dd></dl>
4683 </td></tr></table></dd></dl>
4689 </td></tr></table></dd>
4693 </td></tr></table></dd></dl>
4696 # FIXME: Does this need a html/php section?
4698 Definition Lists: template interaction
4700 ::{{definition_list}}
4703 ::{{definition_list}}
4708 <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">
4709 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4711 <dl><dd data-parsoid='{}'>one
4712 <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">
4713 </span><dd about="#mwt2">two
4715 <dd>three</dd></dl></dd>
4716 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4724 External links: non-bracketed
4726 Non-bracketed: http://example.com
4728 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4732 # parsoid doesn't explicitly mark autonumbered links, see T55505
4734 External links: numbered
4736 Numbered: [http://example.com]
4737 Numbered: [http://example.net]
4738 Numbered: [http://example.com]
4740 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4741 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4742 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4745 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4746 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4747 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4751 External links: specified text
4753 Specified text: [http://example.com link]
4755 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4760 External links: trail
4762 Linktrails should not work for external links: [http://example.com link]s
4764 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4769 External links: dollar sign in URL
4771 http://example.com/1$2345
4773 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4777 # parsoid doesn't explicitly mark autonumbered links, see T55505
4779 External links: dollar sign in URL (autonumber)
4781 [http://example.com/1$2345]
4783 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4786 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4790 External links: open square bracket forbidden in URL (T6377)
4792 parsoid=wt2html,wt2wt,html2html
4794 http://example.com/1[2345
4796 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4799 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4803 External links: open square bracket forbidden in URL (named) (T6377)
4805 parsoid=wt2html,html2html
4807 [http://example.com/1[2345]
4809 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4812 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4815 # parsoid adds a space before the link name
4817 External links: open square bracket forbidden in URL (named) (T6377)
4820 [http://example.com/1 [2345]
4822 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4827 External links: nowiki in URL link text (T8230)
4829 [http://example.com/ <nowiki>''example site''</nowiki>]
4831 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4836 External links: newline forbidden in text (T8230 regression check)
4838 [http://example.com/ first
4841 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4847 External links: Pipe char between url and text
4849 [http://example.com | link]
4851 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4856 External links: protocol-relative URL in brackets
4858 [//example.com/ Test]
4860 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4864 # parsoid doesn't explicitly mark autonumbered links, see T55505
4866 External links: protocol-relative URL in brackets without text
4870 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4873 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4877 External links: protocol-relative URL in free text is left alone
4881 <p>//example.com/Foo
4886 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4888 foo//example.com/Foo
4890 <p>foo//example.com/Foo
4894 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4896 External links: with no contents
4898 parsoid=wt2html,wt2wt
4900 [http://en.wikipedia.org/wiki/Foo]
4902 [[wikipedia:Foo|Bar]]
4904 [[wikipedia:Foo|<span>Bar</span>]]
4906 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4907 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4908 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4911 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4912 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4913 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4917 External links: Free with trailing punctuation
4927 http://example.com/url_with_(brackets)
4928 (http://example.com/url_without_brackets)
4929 http://example.com/url_with_entity&
4930 http://example.com/url_with_entity&
4931 http://example.com/url_with_entity&
4932 http://example.com/url_with_entity
4933 http://example.com/url_with_entity 
4934 http://example.com/url_with_entity 
4935 http://example.com/url_with_entity<
4936 http://example.com/url_with_entity<
4937 http://example.com/url_with_entity<
4939 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4940 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4941 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4942 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4943 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4944 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4945 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4946 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4947 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4948 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4949 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4950 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4951 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4952 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4953 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4954 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4955 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4956 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4957 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4960 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
4961 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
4962 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
4963 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
4964 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
4965 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
4966 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
4967 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
4968 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4969 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4970 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4971 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4972 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4973 <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>
4974 <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>
4975 <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>
4976 <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>
4977 <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>
4978 <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>
4982 External links: tricky Parsoid html2html case
4984 parsoid=wt2html,wt2wt,html2html
4986 http://example.com/url_with_entity&amp;
4988 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4991 <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>
4995 External links: Free with trailing quotes (T113666)
4997 '''News:''' Stuff here
5001 <p><b>News:</b> Stuff here
5002 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5005 <p><b>News:</b> Stuff here</p>
5006 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5010 External links: with entity
5012 [http:// www.librarieswithoutborders.org Libraries without borders]
5014 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5017 <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>
5021 External links: Lone protocols are never linked (T105697)
5040 External links: No preceding word characters allowed (T67278)
5042 NOPEhttp://example.com
5043 N0http://example.com
5044 ok:http://example.com
5045 ok-http://example.com
5047 <p>NOPEhttp://example.com
5048 N0http://example.com
5049 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5050 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5055 External links: nofollow domain exception
5057 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5059 <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>.
5066 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5068 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5073 External image from https
5075 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5077 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5082 External image (when not allowed)
5084 wgAllowExternalImages=0
5086 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5088 <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>
5093 Link to non-http image, no img tag
5095 Link to non-http image, no img tag: ftp://example.com/test.jpg
5097 <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>
5102 External links: terminating separator
5104 Terminating separator: http://example.com/thing,
5106 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5111 External links: intervening separator
5113 Intervening separator: http://example.com/1,2,3
5115 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5120 External links: old bug with URL in query
5122 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5124 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5129 External links: old URL-in-URL bug, mixed protocols
5131 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5133 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5137 # Since Parsoid is starting to emit canonical wikitext for links,
5138 # [http://example.com http://example.com] will not RT back to that
5141 External links: URL in text
5145 URL in text: [http://example.com http://example.com]
5147 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5150 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5154 External links: Clickable images
5156 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5158 <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>
5161 <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>
5165 External links: raw ampersand
5167 Old & use: http://x&y
5169 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5174 External links: encoded ampersand
5176 Old & use: http://x&y
5178 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5181 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5185 External links: encoded equals (T8102)
5187 http://example.com/?foo=bar
5189 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5192 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5196 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5197 ## does it number them. As discussed in T55505, we can identify
5198 ## autonumbered links via CSS.
5202 External links: [raw ampersand]
5204 Old & use: [http://x&y]
5206 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5209 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5212 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5213 # mode will return the [raw ampersand] wikitext
5215 External links: [encoded ampersand]
5217 parsoid=wt2html,wt2wt,html2html
5219 Old & use: [http://x&y]
5221 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5224 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5228 External links: [raw equals]
5230 [http://example.com/?foo=bar]
5232 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5235 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5238 # note that parsoid html is identical to [raw equals] case; so html2wt
5239 # mode will return the [raw equals] wikitext
5241 External links: [encoded equals] (T8102)
5243 parsoid=wt2html,wt2wt,html2html
5245 [http://example.com/?foo=bar]
5247 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5250 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5253 # xxx parsoid strips the IDN character, so the round-trip tests will
5254 # obviously fail and are disabled. --cscott
5256 External links: [IDN ignored character reference in hostname; strip it right off]
5258 parsoid=wt2html,wt2wt,html2html
5260 [http://e‌xample.com/]
5262 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5265 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5268 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5269 # Where an external link could easily circumvent the sanitization of the text of
5270 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5271 # test demands a higher standard. That's a bit strange.
5275 # http://example.com -> [http://example.com|http://example.com]
5276 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5278 # The first example is sanitized, but the second is not. Any security benefits
5279 # from this production are trivial to circumvent. Either remove this test and
5280 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5281 # the test accordingly.
5285 # xxx parsoid strips the IDN character, so the round-trip tests will
5286 # obviously fail and are disabled. --cscott
5288 External links: IDN ignored character reference in hostname; strip it right off
5290 parsoid=wt2html,html2html
5292 http://e‌xample.com/
5294 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5297 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5301 External links: www.jpeg.org (T2554)
5305 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5309 # parsoid doesn't explicitly mark autonumbered links, see T55505
5311 External links: URL within URL (T2002)
5313 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5315 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5318 <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>
5322 T2361: URL inside bracketed URL
5324 [http://www.example.com/foo http://www.example.com/bar]
5326 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5331 T2361: URL within URL, not bracketed
5333 http://www.example.com/foo?=http://www.example.com/bar
5335 <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>
5340 T2289: ">"-token in URL-tail
5342 http://www.example.com/<hello>
5344 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5349 T2289: literal ">"-token in URL-tail
5351 http://www.example.com/<b>html</b>
5353 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5356 <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>
5360 T2289: ">"-token in bracketed URL
5362 [http://www.example.com/<hello> stuff]
5364 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5369 T2289: literal ">"-token in bracketed URL
5371 [http://www.example.com/<b>html</b> stuff]
5373 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5378 T2289: literal double quote at end of URL
5380 http://www.example.com/"hello"
5382 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5387 T2289: literal double quote in bracketed URL
5389 [http://www.example.com/"hello" stuff]
5391 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5396 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5398 [http://www.example.com test]
5400 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5405 External links: link text with spaces
5407 [http://www.example.com a b c]
5408 [http://www.example.com ''a'' ''b'']
5410 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5411 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5415 # Note edge case difference between PHP and Parsoid here.
5417 External links: wiki links within external link (T5695)
5419 parsoid=wt2html,html2html
5421 [http://example.com [[wikilink]] embedded in ext link]
5423 [http://example.com test [[wikilink]] embedded in ext link]
5425 <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>
5426 </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>
5429 <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>
5430 <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>
5434 T2787: Links with one slash after the url protocol are invalid
5438 [http:/example.com title]
5440 <p>http:/example.com
5441 </p><p>[http:/example.com title]
5446 Bracketed external links with template-generated invalid target
5448 [{{echo|http:/example.com}} title]
5450 <p>[http:/example.com title]
5454 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5456 Broken wikilinks (but not external links) prevent templates from closing
5460 [http://example.com x
5462 {{echo|[http://example.com x}}
5468 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5469 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5471 </p><p>{{echo|[[Foo}}
5474 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5475 <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>
5477 <p>{{echo|[[Foo}}</p>
5481 Wikilinks with embedded newlines are not broken
5492 <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>
5504 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5508 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5509 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5513 T4702: Mismatched <i>, <b> and <a> tags are invalid
5515 ''[http://example.com text'']
5516 [http://example.com '''text]'''
5517 ''Something [http://example.com in italic'']
5518 ''Something [http://example.com mixed''''', even bold]'''
5519 '''''Now [http://example.com both''''']
5521 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5522 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5523 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5524 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5525 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5533 http://www.example.com/?title=AT%26T
5535 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5538 <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>
5541 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5542 # % is actually legal in HTML5. Any change in output would need testing though.
5544 T6781, T7267: %25 in URL
5546 http://www.example.com/?title=100%25_Bran
5548 <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>
5551 <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>
5555 T6781, T7267: %28, %29 in URL
5557 http://www.example.com/?title=Ben-Hur_%281959_film%29
5559 <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>
5562 <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>
5567 T6781: %26 in autonumber URL
5569 [http://www.example.com/?title=AT%26T]
5571 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5574 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5578 T6781, T7267: %26 in autonumber URL
5580 [http://www.example.com/?title=100%25_Bran]
5582 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5585 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5589 T6781, T7267: %28, %29 in autonumber URL
5591 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5593 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5596 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5601 T6781: %26 in bracketed URL
5603 [http://www.example.com/?title=AT%26T link]
5605 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5608 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5612 T6781, T7267: %25 in bracketed URL
5614 [http://www.example.com/?title=100%25_Bran link]
5616 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5621 T6781, T7267: %28, %29 in bracketed URL
5623 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5625 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5628 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5632 External link containing a period in the anchor. (T65947)
5634 [//foo.org/bar#baz. bang]
5636 [//foo.org/bar. bang]
5638 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5639 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5642 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5643 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5647 External link containing a single quote. (T65947)
5651 [//foo.org/bar'baz bang]
5653 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5654 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5657 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5658 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5662 External link containing double-single-quotes in text '' (T6598 sanity check)
5664 Some [http://example.com/ pretty ''italics'' and stuff]!
5666 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5671 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5673 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5675 <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>
5679 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5681 External link containing double-single-quotes with no space separating the url from text in italics
5683 [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]].]
5685 <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>.
5688 <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>
5692 External link with comments in link text
5694 [http://www.google.com Google <!-- comment -->]
5696 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5699 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5703 External link to bare IPv4 address
5705 [http://192.168.0.1 Link]
5707 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5710 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5714 URL-encoding in URL functions (single parameter)
5716 {{localurl:Some page|amp=&}}
5718 <p>/index.php?title=Some_page&amp=&
5723 URL-encoding in URL functions (multiple parameters)
5725 {{localurl:Some page|q=?&=&}}
5727 <p>/index.php?title=Some_page&q=?&amp=&
5734 http://example.com/index.php?foozoid%5B%5D=bar
5736 http://example.com/index.php?foozoid[]=bar
5738 <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>
5739 </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>
5742 <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>
5744 <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>
5748 IPv6 urls, autolink format (T23261)
5750 http://[2404:130:0:1000::187:2]/index.php
5752 Examples from RFC 2373, section 2.2:
5754 *http://[1080::8:800:200C:417A]/unicast
5755 *http://[FF01::101]/multicast
5756 *http://[::1]/loopback
5757 *http://[::]/unspecified
5758 *http://[::13.1.68.3]/ipv4compat
5759 *http://[::FFFF:129.144.52.38]/ipv4compat
5761 Examples from RFC 2732, section 2:
5763 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5764 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5765 *http://[3ffe:2a00:100:7031::1]
5766 *http://[1080::8:800:200C:417A]/foo
5767 *http://[::192.9.5.5]/ipng
5768 *http://[::FFFF:129.144.52.38]:80/index.html
5769 *http://[2010:836B:4179::836B:4179]
5771 <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>
5772 </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:
5774 <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>
5775 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5776 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5777 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5778 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5779 <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>
5780 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5782 <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>
5783 <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>
5784 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5785 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5786 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5787 <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>
5788 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5791 <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>
5793 <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>
5794 <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>
5795 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5796 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5797 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5798 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5799 <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>
5801 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5802 <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>
5803 <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>
5804 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5805 <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>
5806 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5807 <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>
5808 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5812 IPv6 urls, bracketed format (T23261)
5814 [http://[2404:130:0:1000::187:2]/index.php test]
5816 Examples from RFC 2373, section 2.2:
5818 *[http://[1080::8:800:200C:417A] unicast]
5819 *[http://[FF01::101] multicast]
5820 *[http://[::1]/ loopback]
5821 *[http://[::] unspecified]
5822 *[http://[::13.1.68.3] ipv4compat]
5823 *[http://[::FFFF:129.144.52.38] ipv4compat]
5825 Examples from RFC 2732, section 2:
5827 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5828 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5829 *[http://[3ffe:2a00:100:7031::1] 3]
5830 *[http://[1080::8:800:200C:417A]/foo 4]
5831 *[http://[::192.9.5.5]/ipng 5]
5832 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5833 *[http://[2010:836B:4179::836B:4179] 7]
5835 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5836 </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:
5838 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5839 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5840 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5841 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5842 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5843 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5844 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5846 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5847 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5848 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5849 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5850 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5851 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5852 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5855 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5857 <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>
5858 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5859 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5860 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5861 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5862 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5863 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5865 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5866 <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>
5867 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5868 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5869 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5870 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5871 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5872 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5876 Non-extlinks in brackets
5885 [{{echo|foo}} ''bar'']
5886 [{{echo|foo}}l's] errand
5887 [{{echo|foo}}l's errand]
5889 [url=http://example.com]
5890 [http:// bare protocols don't count]
5903 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5904 [http:// bare protocols don't count]
5912 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5913 [<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]
5914 [<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>]
5915 [<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
5916 [<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]
5917 [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>]
5918 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
5919 [http:// bare protocols don't count]</p>
5923 Percent encoding in external links
5925 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5927 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5930 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5934 Use url link syntax for links where the content is equal the link target
5938 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5941 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
5945 Parenthesis in external links, especially URL links
5949 http://example.com/test)
5951 http://example.com/(test)
5953 http://example.com/((test)
5955 (http://example.com/(test))
5957 (http://example.com/(test)))))
5959 http://example.com/a)b
5961 [http://example.com) foo]
5963 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5964 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5965 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5966 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5967 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5968 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5969 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5970 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5973 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
5974 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
5975 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
5976 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
5977 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
5978 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5979 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
5980 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
5984 Parenthesis in external links, w/ transclusion or comment
5986 (http://example.com/{{echo|hi}})
5988 (http://example.com<!-- hi -->)
5990 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5991 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5994 <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>
5996 <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>
6000 Serialize <a> tags with invalid link targets as plain text
6002 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6004 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6005 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6006 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6007 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6010 <nowiki>*</nowiki>text
6011 <nowiki>[[foo]]</nowiki>
6012 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6016 mw:ExtLink -vs- mw:WikiLink (T94723)
6020 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6021 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6022 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6023 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6025 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6026 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6034 [[:en:European_Robin|European Robin]]
6035 [[:en:European_Robin|European Robin]]
6039 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6043 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6045 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6056 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6058 Normal text. '''''Bold italic text.''''' Normal text.
6060 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6061 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6066 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6067 # parser strips. The wikitext contains just the first half of the bold
6070 Unclosed and unmatched quotes
6072 '''''Bold italic text '''with bold deactivated''' in between.'''''
6074 '''''Bold italic text ''with italic deactivated'' in between.'''''
6078 ..spanning two paragraphs (should not work).'''
6080 '''Bold tag left open
6082 ''Italic tag left open
6086 <!-- Unmatching number of opening, closing tags: -->
6087 '''This year''''s election ''should'' beat '''last year''''s.
6089 ''Tom'''s car is bigger than ''Susan'''s.
6091 Plain ''italic'''s plain
6093 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6094 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6095 </p><p><b>Bold text..</b>
6096 </p><p>..spanning two paragraphs (should not work).
6097 </p><p><b>Bold tag left open</b>
6098 </p><p><i>Italic tag left open</i>
6100 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6101 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6102 </p><p>Plain <i>italic'</i>s plain
6105 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6106 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6107 </p><p><b>Bold text..</b>
6108 </p><p>..spanning two paragraphs (should not work).<b></b>
6109 </p><p><b>Bold tag left open</b>
6110 </p><p><i>Italic tag left open</i>
6113 <!-- Unmatching number of opening, closing tags: -->
6114 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6115 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6116 </p><p>Plain <i>italic'</i>s plain
6123 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6126 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6127 # is the bare minimum required by the spec, see:
6128 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6129 # Parsoid team replies: empty table tags are legal in HTML5
6131 A table with no data.
6144 A table with stray table end tags on start tag line (wt2html)
6148 {|style="color: red;"|}
6150 {|style="color: red;" |}
6154 {|style="color: red;"|} id="foo"
6158 {|style="color: red;" |} id="foo"
6162 <table style="color: red;"></table>
6164 <table style="color: red;">
6170 <table style="color: red;" id="foo">
6176 <table style="color: red;" id="foo">
6185 A table with no data (take 2)
6193 # A table with nothing but a caption is invalid XHTML, we might want to render
6194 # this as <p>caption</p>
6195 # Parsoid team replies: table with only a caption is legal in HTML5
6197 A table with nothing but a caption
6205 </caption><tr><td></td></tr></table>
6208 <table><caption>caption</caption></table>
6212 A table with caption with default-spaced attributes and a table row
6215 |+ style="color: red;" |caption1
6221 <caption style="color: red;">caption1
6230 A table with captions with non-default spaced attributes and a table row
6233 |+style="color: red;"|caption2
6234 |+ style="color: red;"|caption3
6240 <caption style="color: red;">caption2
6242 <caption style="color: red;">caption3
6251 Table td-cell syntax variations
6256 |style='color:red;'|baz
6257 |style='color:red;'||baz
6264 <td>foo bar foo</td>
6267 <td style="color:red;">baz
6269 <td>style='color:red;'</td>
6297 Simple table but with multiple dashes for row wikitext
6316 Multiplication table
6318 {| border="1" cellpadding="2"
6319 |+Multiplication table
6339 <table border="1" cellpadding="2">
6340 <caption>Multiplication table
6387 Accept "||" in table headings
6402 Accept "!!" in table data
6416 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6421 Accept "||" in indented table headings
6431 </th></tr></table></dd></dl>
6436 Accept "!!" in templates
6450 <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>
6454 Accept "!!" in table headings after newline
6471 <p>b!!c</p></th></tr>
6476 Accept "!!" in table data of mixed wikitext / html syntax
6480 <tr><td>b!!c</td></tr>
6486 </th></tr><tr><td>b!!c</td></tr>
6490 <tbody><tr><th>a</th></tr>
6491 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6496 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6513 Accept "| !" at start of line in tables (ignore !-attribute)
6517 |!style="color:red"|bar
6529 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 +/-
6533 |style='color:red;'|+1
6534 |style='color:blue;'|-1
6546 <td style="color:red;">+1
6548 <td style="color:blue;">-1
6572 |rowspan=2|Cell 2, row 1 (and 2)
6583 <td rowspan="2">Cell 2, row 1 (and 2)
6601 {| bgcolor=#ABCDEF border=2
6606 |the original table again
6614 <table bgcolor="#ABCDEF" border="2">
6622 <td>the original table again
6628 Invalid attributes in table cell (T3830)
6642 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6646 |title="foo<nowiki>|</nowiki>" |bar
6647 |title="foo<nowiki>|</nowiki>" bar
6654 <td title="foo|">bar
6656 <td>title="foo|" bar
6661 <tbody><tr><td title="foo">bar</td>
6662 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6663 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6667 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6668 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6669 # *2wt modes will fail.
6671 Table security: embedded pipes
6673 parsoid=wt2html,html2html
6676 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6680 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6681 <td>]" onmouseover="alert(document.cookie)">test
6689 <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>
6693 Element attributes with double ! should not be broken up by <th>
6696 !hi <div class="!!">ha</div> ho
6701 <th>hi <div class="!!">ha</div> ho
6706 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6711 ! and || in element attributes should not be parsed as <th>/<td>
6714 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6719 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6724 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6728 # FIXME: The output seems broken. Filed as T110268.
6730 ! and || in td attributes should not be parsed as <th>/<td>
6735 |style="color: red !important;" data-contrived="put this here ||"|foo
6740 <td>style="color: red !important;" data-contrived="put this here</td>
6746 <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>
6751 Break on | in element attribute in template
6753 parsoid=wt2html,html2html
6755 {{echo|1=<div class="hi|ho">ha</div>}}
6757 <p>ho">ha</div>
6760 <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>
6764 Break on | in element attribute name in template
6766 {{echo|<div cla|ss="hiho">ha</div>}}
6768 <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>
6772 Don't break on | in extension attribute in template
6774 {{echo|<ref name="hi|ho">ha</ref>}}
6778 <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>
6780 <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>
6783 ## We don't support roundtripping of these attributes in Parsoid.
6784 ## Selective serialization takes care of preventing dirty diffs.
6785 ## But, on edits, we dirty-diff the invalid attribute text.
6787 Invalid text in table attributes should be discarded
6791 {| <span>boo</span> style='border:1px solid black'
6792 | <span>boo</span> style='color:blue' |1
6793 |<span>boo</span> style='color:blue'|2
6796 <table style="border:1px solid black">
6798 <td style="color:blue">1
6800 <td style="color:blue">2
6804 <table style="border:1px solid black">
6806 <td style="color:blue">1</td>
6807 <td style="color:blue">2</td>
6813 Invalid text in table attributes should be preserved by selective serializer
6816 "modes": ["selser"],
6818 ["td:first-child", "text", "abc"],
6819 ["td + td", "text", "xyz"]
6823 {| <span>boo</span> style='border:1px solid black'
6824 | <span>boo</span> style='color:blue' | 1
6825 |<span>boo</span> style='color:blue'| 2
6828 {| <span>boo</span> style='border:1px solid black'
6829 | <span>boo</span> style='color:blue' | abc
6830 |<span>boo</span> style='color:blue'| xyz
6835 1. Template-generated table cell attributes and cell content
6840 || {{table_attribs_5}}
6841 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6842 |align=center {{table_attribs}}
6843 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6848 <td style="color:red;">Foo
6850 <td style="color:red;">Foo
6852 <td>style="color:red;"</td>
6855 <td style="color:red;">Foo
6857 <td align="center" style="color:red;">Foo
6859 <td align="center" style="color:red;">Foo
6865 2. Template-generated table cell attributes and cell content
6868 |{{table_attribs_2}}
6873 <td style="color:red;">Foo
6881 <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>
6882 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6887 3. Template-generated table cell attributes and cell content
6890 !align=center {{table_header_cells}}
6892 |align=center {{table_cells}}
6897 <th align="center" style="color:red;">Foo</th>
6898 <th style="color:red;"><i>Bar</i></th>
6899 <th style="color:brown;"><i>Foo</i> and Baz
6902 <td align="center" style="color:red;">Foo</td>
6903 <td style="color:red;"><i>Bar</i></td>
6904 <td style="color:brown;"><i>Foo</i> and Baz
6909 <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>
6910 <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>
6915 4. Template-generated table cell attributes and cell content inside a templated table
6918 !align=center {{table_header_cells}}
6920 |align=center {{table_cells}}
6925 <th align="center" style="color:red;">Foo</th>
6926 <th style="color:red;"><i>Bar</i></th>
6927 <th style="color:brown;"><i>Foo</i> and Baz
6930 <td align="center" style="color:red;">Foo</td>
6931 <td style="color:red;"><i>Bar</i></td>
6932 <td style="color:brown;"><i>Foo</i> and Baz
6936 <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}}]}'>
6937 <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>
6939 <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>
6943 ## Edge case fix to prevent future regressions
6945 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6948 |{{table_attribs_7}}
6953 <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>
6955 <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>
6959 Table with row followed by newlines and table heading
6961 parsoid=wt2html,html2html
6979 Table with empty line following the start tag
6981 parsoid=wt2html,html2html
6999 Table attributes with empty value
7001 parsoid=wt2html,html2html
7014 <tbody><tr><td style="">hello</td></tr>
7019 Wikitext table with a lot of comments
7042 Wikitext table comments represented in parsoid dom
7044 {|<!--c1--><!--c2-->
7053 </td></tr></tbody></table>
7055 <table><!--c1--><!--c2-->
7056 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7057 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7062 Wikitext table with double-line table cell
7079 Table cell with a single comment
7096 Table-cell after a comment-only-empty-line
7113 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7115 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7121 Build table with {{!}}
7123 {{{!}} class="wikitable"
7126 {{!}}- style="color:red;"
7127 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7130 <table class="wikitable">
7136 <tr style="color:red;">
7138 <td style="color:red;">second data
7144 Build table with pipe as data
7146 {| class="wikitable"
7149 |- style="color:red;"
7150 |data|| style="color:red;" |second data
7152 | style="color:red;" |data with | || style="color:red;" | second data with |
7154 ||data with | |||second data with |
7157 <table class="wikitable">
7163 <tr style="color:red;">
7165 <td style="color:red;">second data
7168 <td style="color:red;">data with |</td>
7169 <td style="color:red;">second data with |
7172 <td>data with |</td>
7173 <td>second data with |
7179 Build table with wikilink
7181 {| class="wikitable"
7182 !header||second header
7183 |- style="color:red;"
7184 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7186 |data||second data [[Main Page|link|text with pipe]]
7189 <table class="wikitable">
7194 <tr style="color:red;">
7195 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7196 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7200 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7205 # The expected HTML structure in this test is debatable. The PHP parser does
7206 # not parse this kind of table at all. The main focus for Parsoid is on
7207 # round-tripping, so this output is ok for now. TODO: revisit!
7209 Wikitext table with html-syntax row
7219 <td>foo</td></tr></tbody></table>
7223 Fostered content in tables: Plain text
7225 parsoid=wt2html,html2html
7243 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7244 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7246 </tr></tbody></table>
7250 Fostered content in tables: Lists
7252 parsoid=wt2html,html2html
7265 <ul><li>a</li></ul><table>
7270 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7271 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7273 </tr></tbody></table>
7277 Template generated table cell with attributes
7281 {{table_attribs_4}} ||a||b
7287 <td style="background-color:#DC241f;" width="10px"></td>
7290 </td></tr></tbody></table>
7293 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7294 <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>
7298 Parsoid: Round-trip tables directly followed by content (T53219)
7300 parsoid=wt2html,wt2wt
7313 </td></tr></tbody></table><p> bar
7317 </td></tr></tbody></table><p><b>quux</b>
7322 Parsoid: Default to a newline after tables in new content (T53219)
7327 <tr><td>foo</td></tr></tbody></table> bar
7329 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7334 <nowiki> </nowiki>bar
7342 Parsoid: Row-syntax table headings followed by comment & table cells
7344 parsoid=wt2html,wt2wt
7348 <!-- foo --> ||baz||quux
7362 <tbody><tr><th>foo</th><th>bar
7363 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7368 Parsoid: Recover better from broken table attributes
7382 </td></tr></tbody></table>
7387 <p>foo</p></td></tr>
7392 Tables: Digest broken attributes on table and tr tag
7403 <tr class='mw-empty-elt'></tr>
7404 <tr class='mw-empty-elt'></tr>
7409 Table with missing opening <tr> tag
7411 parsoid=wt2html,wt2wt
7419 <tbody><tr><td>foo</td>
7424 # T137406: Whitespace in the HTML
7426 1. Generate correct wikitext for tables with thead/tbody/tfoot
7431 <caption>Test</caption>
7493 </td></tr></tbody></table>
7496 # T137406: No whitespace in the HTML
7498 2. Generate correct wikitext for tables with thead/tbody/tfoot
7502 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7512 Wikitext tables can be nested inside HTML tables
7516 <table data-parsoid='{"stx":"html"}'>
7519 <tr><td>foo</td></tr>
7537 Plain link, capitalized
7541 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7546 Plain link, uncapitalized
7550 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7557 [[Main Page|The Main Page]]
7559 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7564 Piped link with comment in link text
7566 [[Main Page|The Main<!--front--> Page]]
7568 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7573 Piped link with multiple pipe characters in link text
7575 [[Main Page||The|Main|Page|]]
7577 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7580 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7584 Piped link with no link text
7586 [[Thomas Bek (bishop of St David's)|]]
7588 <p>[[Thomas Bek (bishop of St David's)|]]
7591 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7595 Piped link with empty link text
7597 [[Main Page|<nowiki/>]] - empty nowiki
7598 [[Main Page| ]] - empty space
7599 [[Main Page| ]] - empty non breaking space
7601 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7602 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7603 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7606 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7607 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7608 <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>
7616 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7621 Broken link with fragment
7623 [[Zigzagzogzagzig#zug]]
7625 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7630 Special page link with fragment
7632 [[Special:Version#anchor]]
7634 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7639 Nonexistent special page link with fragment
7641 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7643 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7650 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7652 <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>
7659 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7661 <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>!!!
7672 T45661: Piped links with identical prefixes
7674 [[prefixed article|prefixed articles with spaces]]
7676 [[prefixed article|prefixed articlesaoeu]]
7678 [[Main Page|Main Page test]]
7680 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7681 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7682 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7688 Link with HTML entity in suffix / tail
7690 [[Main Page]]", [[Main Page]]a
7692 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7695 <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>
7699 Link with 3 brackets
7710 Link with 4 brackets
7714 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7719 Piped link with 3 brackets
7721 [[[main page|the main page]]]
7723 <p>[[[main page|the main page]]]
7728 Piped link with extlink-like text
7731 [[Main Page|This is a [bar]]]
7734 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7735 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7736 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7739 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7740 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7741 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7745 Link with multiple pipes
7747 [[Main Page|The|Main|Page]]
7749 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7754 Anchor containing a #. (T65430)
7756 wgFragmentMode=[ 'html5', 'legacy' ]
7758 [[Main Page#And#Link]]
7760 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7763 <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>
7769 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7771 <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>
7776 Link with space in namespace
7778 [[User talk:Foo bar]]
7780 <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>
7785 MemoryAlpha:AlphaTest
7787 This is an article in the MemoryAlpha namespace
7788 (which shadows the memoryalpha interwiki link).
7792 Namespace takes precedence over interwiki link (T53680)
7794 [[MemoryAlpha:AlphaTest]]
7796 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7800 # The previous test doesn't work correctly in html2*, due to not recognizing the
7801 # link as an internal one. This one checks for the correct behavior.
7803 Link to namespace preferred over interwiki with correct rel attribute
7805 parsoid=html2wt,html2html
7807 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7809 [[MemoryAlpha:AlphaTest]]
7813 Piped link to namespace
7815 [[Meta:Disclaimers|The disclaimers]]
7817 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7824 [[Usually caused by a typo (oops}]]
7826 <p>[[Usually caused by a typo (oops}]]
7833 Just a test of an article title containing a percent.
7837 Link containing % (not as a hex sequence)
7840 [[7% Solution|7%25 Solution]]
7842 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7843 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7846 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7847 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7850 # note that the parsoid HTML is identical to the previous test output,
7851 # so the previous test ensures that the html2wt mode will generate the
7852 # "not as a hex sequence" wikitext.
7854 Link containing % as a single hex sequence interpreted to char
7856 parsoid=wt2wt,wt2html,html2html
7859 [[7%25 Solution|7%25 Solution]]
7861 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7862 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7865 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7866 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7870 Link containing % as a double hex sequence interpreted to hex sequence
7874 <p>[[7%2525 Solution]]
7878 ## Example for such a section: == < ==
7880 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7882 wgFragmentMode=[ 'html5', 'legacy' ]
7884 [[%23%3c]][[%23%3e]]
7886 <p><a href="#<">#<</a><a href="#>">#></a>
7889 <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>
7892 ## Example for such a section: == < ==
7894 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7896 wgFragmentMode=[ 'legacy' ]
7898 [[%23%3c]][[%23%3e]]
7900 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7905 Link containing "<#" and ">#" as a hex sequences
7907 [[%3c%23]][[%3e%23]]
7909 <p>[[%3c%23]][[%3e%23]]
7914 Link containing an equals sign
7916 [[Special:BookSources/isbn=4-00-026157-6]]
7918 <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>
7921 <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>
7927 Just a test of an article title containing a tilde.
7930 # note that links containing signatures, like [[Foo~~~~]], are
7931 # massaged by the pre-save transform (PST) and so the tildes are never
7932 # seen by the parser.
7934 Link containing a tilde
7938 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7941 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7945 Link containing double-single-quotes '' (T6598)
7947 [[Lista d''e paise d''o munno]]
7949 <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>
7952 <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>
7956 Link containing double quotes and spaces
7960 <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>
7963 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
7967 File containing double quotes and spaces
7969 [[File:Cool "Gator".png]]
7971 <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>
7975 Redirect containing double quotes and spaces
7977 #REDIRECT [[Cool "Gator"]]
7979 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7983 Link containing double-single-quotes '' in text (T6598 sanity check)
7985 Some [[Link|pretty ''italics'' and stuff]]!
7987 <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>!
7990 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7994 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
7996 ''Some [[Link|pretty ''italics'' and stuff]]!''
7998 <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>
8003 Link with double quotes in title part (literal) and alternate part (interpreted)
8005 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8009 [[''Pentecoste''|Pentecoste]]
8011 [[''Pentecoste''|''Pentecoste'']]
8013 <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>
8014 </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>
8015 </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>
8016 </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>
8019 <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>
8020 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8021 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8022 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8026 Broken image links with HTML captions (T41700)
8028 [[File:Nonexistent|<script></script>]]
8029 [[File:Nonexistent|100x100px|<script></script>]]
8030 [[File:Nonexistent|<]]
8031 [[File:Nonexistent|a<i>b</i>c]]
8033 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8034 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8035 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8036 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8039 <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>
8040 <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>
8041 <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>
8042 <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>
8048 [[http://www.example.com]]
8050 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8053 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8057 Plain link to URL with link text
8059 [[http://www.example.com Link text]]
8061 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8066 Plain link to protocol-relative URL
8068 [[//www.example.com]]
8070 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8073 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8077 Plain link to protocol-relative URL with link text
8079 [[//www.example.com Link text]]
8081 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8086 Plain link to page with question mark in title
8092 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8093 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8097 # I'm fairly sure the expected result here is wrong.
8098 # We want these to be URL links, not pseudo-pages with URLs for titles....
8099 # However the current output is also pretty screwy.
8102 # I'm changing it to match the current output--it arguably makes more
8103 # sense in the light of the test above. Old expected result was:
8104 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8106 # But I think this test is bordering on "garbage in, garbage out" anyway.
8111 Piped link to URL: [[http://www.example.com|an example URL]]
8113 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8116 <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>
8120 Plain link in template argument
8124 {{echo|[http://www.example.com |123]}}
8126 {{echo|[[http://www.example.com |123]]}}
8128 {{echo|[[http://www.example.com |123]}}
8130 {{echo|[http://www.example.com |123]]}}
8132 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8133 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8134 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8135 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8138 <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>
8140 <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>
8142 <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>
8144 <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>
8148 T2002: [[page|http://url/]] should link to page, not http://url/
8150 [[Main Page|http://url/]]
8152 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8155 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8158 # Parsoid does not mark self-links, by design.
8160 T2337: Escaped self-links should be bold
8164 [[Bug462]] [[Bug462]]
8166 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8169 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8173 Self-link to section should not be bold
8177 [[Main Page#section]]
8179 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8190 Self-link to numeric title
8196 <p><a class="mw-selflink selflink">0</a>
8201 Link to numeric-equivalent title
8207 <p><a href="/wiki/00" title="00">00</a>
8212 <nowiki> inside a link
8214 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8216 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8221 Non-breaking spaces in title
8223 [[ Main Page ]]
8225 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8229 # Add new article for the test below so that it doesn't red-link
8237 Multiple spaces in titles should normalize to a single underscore
8239 parsoid=wt2html,wt2wt
8245 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8246 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8247 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8250 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8251 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8252 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8257 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8263 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8268 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8274 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8279 Internal link with en linktrail: no apostrophes (T29473)
8285 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8290 Internal link with ca linktrail with apostrophes (T29473)
8296 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8301 Internal link with kaa linktrail with apostrophes (T29473)
8307 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8312 Link with multiple ":" in a subpage-supporting namespace (T65636)
8314 [[User:Foo/Test/63636:Bar|Test]]
8316 <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>
8319 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8322 ## Mainly a sanity check for Parsoid
8324 Handle title parsing for subpages
8344 Link to a subpage from a namespace other than main
8351 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8354 <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>
8358 Ensure that transclusion titles are not url-decoded
8360 subpage title=[[Test]]
8363 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8365 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8368 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8372 Purely hash wikilink
8374 title=[[User:Test/123]]
8379 <p><a href="#a">b</a>
8382 <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>
8386 Serialization of purely hash wikilink
8388 title=[[User:Test/123]]
8392 <p><a href="#a">[[</a></p>
8394 [[#a|<nowiki>[[</nowiki>]]
8396 <p><a href="#a">[[</a>
8401 1. Interaction of linktrail and template encapsulation
8405 <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>
8409 2. Interaction of linktrail and template encapsulation
8413 {{echo|Some [[Fool]]}}s
8415 <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>
8419 3. Interaction of linktrail and template encapsulation
8423 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8425 <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>
8435 Internal link with is link prefix
8439 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8441 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8452 Internal link with is link trail and link prefix
8456 [[mótmælendatrú|xxx]]ar
8458 mótmælenda[[söfnuður]]
8459 mótmælenda[[söfnuður|söfnuðir]]
8460 mótmælenda[[söfnuður|söfnuðir]]xxx
8462 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8463 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8464 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8465 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8466 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8471 Parsoid link trail escaping
8473 parsoid=html2wt,html2html
8475 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8481 Parsoid link prefix escaping
8484 parsoid=html2wt,html2html
8486 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8488 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8492 Parsoid link bracket escaping
8494 parsoid=html2wt,html2html
8496 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8497 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8498 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8499 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8500 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8501 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8509 [[[<nowiki/>[[Test]]]]]
8513 [[[[[<nowiki/>[[Test]]]]]]]
8517 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8525 [http://wp.org ''foo'']
8527 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8528 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8529 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8530 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8535 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8537 [[Foo|{{echo|a}} b {{echo|c}}]]
8539 <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>
8543 Link with angle bracket after anchor
8545 wgFragmentMode=[ 'html5', 'legacy' ]
8549 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8552 <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>
8556 Link with angle bracket after anchor (legacy)
8558 wgFragmentMode=[ 'legacy' ]
8562 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8567 ### Interwiki links (see maintenance/interwiki.sql)
8571 Inline interwiki link
8573 parsoid=wt2html,wt2wt,html2html
8575 [[MeatBall:SoftSecurity]]
8577 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8580 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8584 Inline interwiki link with empty title (T4372)
8586 parsoid=wt2html,wt2wt,html2html
8590 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8593 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8596 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8598 Interwiki link encoding conversion (T3636)
8600 parsoid=wt2html,wt2wt
8602 *[[Wikipedia:ro:Olteniţa]]
8603 *[[Wikipedia:ro:Olteniţa]]
8605 <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>
8606 <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>
8610 <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>
8611 <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>
8615 <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>
8616 <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>
8621 Interwiki link with fragment (T4130)
8623 [[MeatBall:SoftSecurity#foo]]
8625 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8630 Link scenarios with escaped fragments
8632 wgFragmentMode=[ 'html5', 'legacy' ]
8635 [[Foo#Is this great?]]
8636 [[meatball:Foo#Is this great?]]
8638 <p><a href="#Is_this_great?">#Is this great?</a>
8639 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8640 <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>
8643 <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>
8644 <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>
8645 <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>
8649 Link scenarios with escaped fragments (legacy)
8651 wgFragmentMode=[ 'legacy' ]
8654 [[Foo#Is this great?]]
8655 [[meatball:Foo#Is this great?]]
8657 <p><a href="#Is_this_great.3F">#Is this great?</a>
8658 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8659 <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>
8663 # Ideally the wikipedia: prefix here should be proto-relative too
8664 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8665 # define the 'en' prefix, and originally the test used 'wikipedia',
8666 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8669 Different interwiki prefixes mapping to the same URL
8677 [[:wikipedia:Foo|Foo]]
8679 [[wikipedia:en:Foo]]
8681 [[:wikipedia:en:Foo]]
8685 <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>
8687 <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>
8689 <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>
8691 <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>
8693 <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>
8695 <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>
8697 <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>
8701 Interwiki links that cannot be represented in wiki syntax
8704 [[meatball:ok#foo|ok with fragment]]
8705 [[meatball:ok_as_well?|ok ending with ? mark]]
8706 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8707 [http://de.wikipedia.org/wiki/#foo is just fragment]
8710 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8711 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8712 <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>
8713 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8714 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8717 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8718 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8719 <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>
8720 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8721 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8725 Interwiki links: trail
8727 [[wikipedia:Foo|Ba]]r
8729 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8732 <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>
8736 Local interwiki link
8738 parsoid=wt2html,wt2wt,html2html
8740 [[local:Template:Foo]]
8742 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8745 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8748 # Parsoid does not mark self-links, by design.
8750 Local interwiki link: self-link to current page
8753 parsoid=wt2html,wt2wt,html2html
8757 <p><a class="mw-selflink selflink">local:Main Page</a>
8760 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8764 Local interwiki link: prefix only (T66167)
8766 parsoid=wt2html,wt2wt,html2html
8770 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8773 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8777 Local interwiki link: with additional interwiki prefix (T63357)
8779 parsoid=wt2html,wt2wt,html2html
8781 [[local:meatball:Hello]]
8783 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8786 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8790 Multiple local interwiki link prefixes
8792 [[local:local:local:local:mi:local:Foo]]
8794 parsoid=wt2html,wt2wt,html2html
8796 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8799 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8803 ### Interlanguage links
8804 ### Language links (so that searching for '### language' matches..)
8816 <p>Blah blah blah</p>
8817 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8820 ## parsoid html2wt will lose the space variations
8822 Interlanguage link with spacing
8824 parsoid=wt2html,wt2wt,html2html
8832 <p>Blah blah blah</p>
8833 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8837 Double interlanguage link
8846 <p>Blah blah blah</p>
8847 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8848 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8851 ## parsoid html2wt will lose the space variations
8853 Interlanguage link variations
8855 parsoid=wt2html,wt2wt,html2html
8865 <p>Blah blah blah</p>
8866 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8867 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8868 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8872 Escaping of interlanguage links (T129218, T156308)
8876 [[ : zh : Chinese ]]
8879 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8880 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8884 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8885 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8889 Multiple colons escaping interlanguage links
8897 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8902 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8904 [[:::es:Spanish]]</p>
8907 ## parsoid html2wt will normalize the space to _
8909 Space and question mark encoding in interlanguage links (T95473)
8911 parsoid=wt2html,wt2wt,html2html
8919 <p>Blah blah blah</p>
8920 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8924 Interlanguage link, with prefix links
8934 <p>Blah blah blah</p>
8935 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8939 Double interlanguage link, with prefix links (T10897)
8950 <p>Blah blah blah</p>
8951 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8952 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8956 "Extra" interlanguage links (T34189 / gerrit 111390)
8964 <p>Blah blah blah</p>
8965 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8968 ## PHP parser tests script needs an update
8969 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8971 Language links render as inline links if $wgInterwikiMagic=false
8973 wgInterwikiMagic=false
8974 parsoid=wt2html,wt2wt,html2html
8979 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8982 ## PHP parser tests script needs an update
8983 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8985 Language links render as inline links in the Talk namespace
8988 parsoid=wt2html,wt2wt,html2html
8993 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8997 Parsoid-specific test: Wikilinks with should RT properly
9003 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9008 Parsoid T55221: Wikilinks should be properly entity-escaped
9010 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9012 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9013 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9015 He&nbsp;llo [[Foo|He&nbsp;llo]]
9017 He&nbsp;llo He&nbsp;llo
9019 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9020 </p><p>He&nbsp;llo He&nbsp;llo
9024 # html2wt will fail because of title normalization without data-parsoid
9026 Parsoid: handle constructor well
9028 parsoid=wt2html,wt2wt
9034 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9035 </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>
9038 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9040 <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>
9044 Template parameter named "constructor"
9046 {{echo| constructor = |hi}}
9048 <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>
9057 # Note that `ko` isn't a known interlanguage prefix
9059 Parsoid: recognize interlanguage links without a target page
9069 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9071 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9074 # Note that `ko` isn't a known interwiki prefix
9076 Parsoid: recognize interwiki links without a target page
9078 parsoid=wt2html,wt2wt,html2html
9084 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9085 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9088 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9089 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9093 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9097 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9100 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9104 Interlanguage link with preceding local interwiki link (T70085)
9106 parsoid=wt2html,wt2wt,html2html
9109 [[local:es:Spanish]]
9112 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9116 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9120 Looks like an interlanguage link, but is actually a local interwiki
9122 parsoid=wt2html,wt2wt,html2html
9128 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9132 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9136 ### Redirects, Parsoid-only
9140 1. Simple redirect to page
9142 #REDIRECT [[Main Page]]
9144 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9148 2. Other redirect variants
9150 #REDIRECT [[Main_Page]]
9152 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9155 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9156 # This tests the Parsoid bail-out code.
9158 3. Other redirect variants
9162 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9164 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9168 4. Redirect to a templated destination
9170 #REDIRECT [[{{echo|Foo}}bar]]
9172 <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"}]]}'/>
9178 parsoid=wt2html,wt2wt
9183 <li>REDIRECT [[]]</li></ol>
9187 Optional colon in #REDIRECT
9189 # the colon is archaic syntax. we support it for wt2html, but we
9190 # don't care that it roundtrips back to the modern syntax.
9191 parsoid=wt2html,html2html
9193 #REDIRECT:[[Main Page]]
9195 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9199 Whitespace in #REDIRECT with optional colon
9201 # the colon and gratuitous whitespace is archaic syntax. we support
9202 # it for wt2html, but we don't care that it roundtrips back to the
9203 # modern syntax (without extra whitespace)
9204 parsoid=wt2html,html2html
9211 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9215 Piped link in #REDIRECT
9217 # content after piped link is ignored. we support this syntax,
9218 # but don't care that the piped link is lost when we roundtrip this.
9221 #REDIRECT [[Main Page|bar]]
9223 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9227 Redirect to category (T104502)
9229 parsoid=wt2html,wt2wt
9231 #REDIRECT [[Category:Foo]]
9233 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9237 Redirect to category with URL encoding (T104502)
9241 #REDIRECT [[Category%3AFoo]]
9243 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9247 Redirect to category page
9249 #REDIRECT [[:Category:Foo]]
9251 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9255 Redirect to image page (1)
9257 #REDIRECT [[File:Wiki.png]]
9259 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9263 Redirect to image page (2)
9265 #REDIRECT [[Image:Wiki.png]]
9267 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9270 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9271 # Next test confirms this.
9273 Redirect to language (1) (T104918)
9275 parsoid=wt2html,wt2wt,html2html
9277 #REDIRECT [[en:File:Wiki.png]]
9279 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9283 Redirect to language (2) (T104918)
9285 #REDIRECT [[:en:File:Wiki.png]]
9287 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9291 Redirect to interwiki (T104918)
9293 #REDIRECT [[meatball:File:Wiki.png]]
9295 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9299 Non-English #REDIRECT
9303 #TILVÍSUN [[Main Page]]
9305 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9309 Redirect syntax under text isn't considered a redirect
9313 #redirect [[Main Page]]
9316 <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>
9324 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9331 Redirect followed by block on the same line
9335 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9337 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9341 Redirect followed by a newline
9343 #REDIRECT [[Main Page]]
9346 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9351 Redirect followed by multiple newlines
9353 #REDIRECT [[Main Page]]
9358 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9365 Drop duplicate redirects
9369 <link rel="mw:PageProp/redirect" href="./Foo"/>
9370 <link rel="mw:PageProp/redirect" href="./Bar"/>
9371 <link rel="mw:PageProp/redirect" href="./Baz"/>
9390 Broken br tag sanitization
9398 # TODO: Fix html2html mode (T53055)!
9400 Parsoid: Broken br tag recognition
9414 Incorrecly removing closing slashes from correctly formed XHTML
9416 <br style="clear:both;" />
9418 <p><br style="clear:both;" />
9423 Failing to transform badly formed HTML into correct XHTML
9425 <br style="clear: left;">
9426 <br style="clear: right;">
9427 <br style="clear: both;">
9429 <p><br style="clear: left;" />
9430 <br style="clear: right;" />
9431 <br style="clear: both;" />
9435 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9436 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9438 Handling html with a div self-closing tag
9447 <p><div title />
9451 <p><div title=bar />
9452 <div title=bar/>
9454 <div title="bar/"></div>
9458 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9459 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9460 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9461 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9462 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9463 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9467 Handling html with a br self-closing tag
9494 Horizontal ruler (should it add that extra space?)
9503 foo </p><hr /><p> bar
9508 Horizontal ruler -- 4+ dashes render hr
9517 Horizontal ruler -- eats additional dashes on the same line
9526 Horizontal ruler -- does not collapse dashes on consecutive lines
9537 Horizontal ruler -- <4 dashes render as plain text
9546 Horizontal ruler -- Supports content following dashes on same line
9558 ### Block-level elements
9567 <ul><li>Common list</li>
9569 <li>item 3</li></ul>
9580 <ol><li>Numbered list</li>
9582 <li>item 3</li></ol>
9586 # the switch from level 3 to ordered should not introduce a newline between
9597 ***#Number on level 4
9599 **#Number on level 3
9600 **#Number on level 3
9604 #**Level 3, but ordered
9607 <ol><li>with numbers</li></ol>
9608 <ul><li>and bullets</li></ul>
9609 <ol><li>and numbers</li></ol></li>
9611 <ul><li>bullet level 2
9612 <ul><li>bullet level 3
9613 <ol><li>Number on level 4</li></ol></li></ul></li>
9615 <ol><li>Number on level 3</li>
9616 <li>Number on level 3</li></ol></li></ul>
9617 <ol><li>number level 2</li></ol></li>
9619 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9620 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9625 1. Nested mixed wikitext and html list
9628 *<ul><li>ho</li></ul>
9633 <li><ul><li>ho</li></ul></li>
9635 <ul><li>ho</li></ul></li></ul>
9639 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9641 <ul><li>ho</li></ul></li></ul>
9645 2. Nested mixed wikitext and html list (incompatible)
9648 :{{echo|<li>ho</li>}}
9651 <dd><li>ho</li></dd></dl>
9655 <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>
9665 <ul><li>bar</li></ul></li></ul>
9675 <ul><li><ul><li>foo</li></ul></li>
9681 Nested lists 3 (first element empty)
9687 <ul><li>bar</li></ul></li></ul>
9692 Nested lists 4 (first element empty)
9697 <ul><li><ul><li></li></ul></li>
9703 Nested lists 5 (both elements empty)
9708 <ul><li><ul><li></li></ul></li>
9714 Nested lists 6 (both elements empty)
9720 <ul><li></li></ul></li></ul>
9725 Nested lists 7 (skip initial nesting levels)
9729 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9734 Nested lists 8 (multiple nesting transitions)
9742 <ul><li><ul><li>bar</li></ul></li>
9743 <li>baz</li></ul></li>
9749 Nested lists 9 (extension interaction)
9755 <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>
9759 1. Lists with start-of-line-transparent tokens before bullets: Comments
9772 Nested lists 10 (list and span siblings: wt2wt regression)
9777 <ul><li>a <span>x</span>
9778 <ul><li>b <span>y</span></li></ul></li></ul>
9782 2. Lists with start-of-line-transparent tokens before bullets: Template close
9787 <ul><li>foo bar</li>
9793 List items are not parsed correctly following a <pre> block (T2785)
9799 <ul><li><pre>foo</pre></li>
9800 <li><pre>bar</pre></li>
9804 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9805 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9809 # FIXME: Might benefit from a html/parsoid since this has a template
9811 List items from template
9822 *notSOL{{inner list}}
9826 <li>item 2</li></ul>
9829 <li>item 2</li></ul>
9833 <li>item 2</li></ul>
9838 List interrupted by empty line or heading
9846 <ul><li>foo</li></ul>
9847 <ul><li><ul><li>bar</li></ul></li></ul>
9848 <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>
9849 <ul><li>Another list item</li></ul>
9854 Multiple list tags generated by templates
9872 <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
9873 </li><li about="#mwt1">b
9874 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9878 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9881 <!--This line will NOT split the list-->
9883 <!--This line will NOT split the list either-->
9885 <!--foo--> <!----> <!--This line NOT split the list either-->
9896 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9899 <!--This line will NOT split the list-->
9901 <!--This line will NOT split the list either-->
9903 <!--foo--> <!----> <!--This line NOT split the list
9914 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
9915 # That pass could possibly be removed.
9917 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
9919 parsoid=wt2html,wt2wt
9923 *{{echo|<li>templated li-hack}}
9924 *<!--foo--><li> unsupported li-hack with preceding comments
9927 <li><li>not a li-hack
9932 <li class="mw-empty-elt"></li><li>li-hack</li>
9933 <li class="mw-empty-elt"></li><li>templated li-hack</li>
9934 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
9936 <li class="mw-empty-elt"></li><li>not a li-hack
9941 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
9942 <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>
9943 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
9945 <ul data-parsoid='{"stx":"html"}'>
9946 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
9953 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9982 Parsoid: Test of whitespace serialization with Templated bullets
9989 <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>
9993 # ------------------------------------------------------------------------
9994 # The next set of tests are about Parsoid's ability to handle badly nested
9995 # tags (parse, minimize scope of fixup, and roundtrip back)
9996 # ------------------------------------------------------------------------
9998 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
9999 # Parsoid's list handling is more aware of block structure.
10001 Unbalanced closing block tags break a list
10008 <ul><li>a</li></ul></div><div>
10020 Unbalanced closing non-block tags don't break a list
10028 <ul><li>a<span></span></li>
10033 <li>a<span></span></li>
10039 # Parsoid does some post-dom-building cleanup
10040 # which is why its output differs from Remex.
10042 Unclosed formatting tags that straddle lists are closed and reopened
10044 parsoid=wt2html,wt2wt,html2html
10049 <ol><li><s> a</s></li><s>
10050 </s><li><s>b </s></li></ol>
10052 <ol><li><s> a</s></li>
10053 <li><s>b </s></li></ol>
10056 # Output is ugly because of all the misnested tag fixups.
10057 # Remex is wrapping p-tags around empty elements.
10058 # Parsoid has special-case handling of this pattern of
10059 # wrapping lists in formatting tags.
10060 # FIXME: Should we remove this code from Parsoid? Or add
10061 # special support in Remex? If the latter, maybe just wait
10062 # for Parsoid to become the default parser.
10065 1. List embedded in a formatting tag
10072 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10082 # Output is ugly because of all the misnested tag fixups
10083 # Remex is wrapping p-tags around empty elements.
10084 # Parsoid has code that strips useless p-tags.
10086 2. List embedded in a formatting tag in a misnested way
10093 </small></p><small></small><ul><small><li>a</li>
10094 </small><li><small>b</small></li></ul>
10100 <li><small>b</small></li>
10108 # Note that the current date is hard-coded as
10109 # 1970-01-01T00:02:03Z (a Thursday)
10110 # when running parser tests. The timezone is also fixed to GMT, so
10111 # local date will be identical to current date.
10114 Magic Word: {{CURRENTDAY}}
10123 Magic Word: {{CURRENTDAY2}}
10132 Magic Word: {{CURRENTDAYNAME}}
10141 Magic Word: {{CURRENTDOW}}
10150 Magic Word: {{CURRENTMONTH}}
10159 Magic Word: {{CURRENTMONTH1}}
10168 Magic Word: {{CURRENTMONTHABBREV}}
10170 {{CURRENTMONTHABBREV}}
10177 Magic Word: {{CURRENTMONTHNAME}}
10179 {{CURRENTMONTHNAME}}
10186 Magic Word: {{CURRENTMONTHNAMEGEN}}
10188 {{CURRENTMONTHNAMEGEN}}
10195 Magic Word: {{CURRENTTIME}}
10204 Magic Word: {{CURRENTHOUR}}
10213 Magic Word: {{CURRENTWEEK}} (T6594)
10222 Magic Word: {{CURRENTYEAR}}
10231 Magic Word: {{CURRENTTIMESTAMP}}
10233 {{CURRENTTIMESTAMP}}
10240 Magic Words LOCAL (UTC)
10244 *{{LOCALMONTHNAME}}
10245 *{{LOCALMONTHNAMEGEN}}
10246 *{{LOCALMONTHABBREV}}
10255 *{{LOCALTIMESTAMP}}
10270 <li>19700101000203</li></ul>
10275 Magic Word: {{FULLPAGENAME}}
10277 title=[[User:Ævar Arnfjörð Bjarmason]]
10278 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10282 <p>User:Ævar Arnfjörð Bjarmason
10287 Magic Word: {{FULLPAGENAMEE}}
10289 title=[[User:Ævar Arnfjörð Bjarmason]]
10290 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10294 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10299 Magic Word: {{TALKSPACE}}
10301 title=[[User:Ævar Arnfjörð Bjarmason]]
10302 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10311 Magic Word: {{TALKSPACE}}, same namespace
10313 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10314 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10323 Magic Word: {{TALKSPACE}}, main namespace
10325 title=[[Parser Test]]
10326 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10335 Magic Word: {{TALKSPACEE}}
10337 title=[[User:Ævar Arnfjörð Bjarmason]]
10338 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10347 Magic Word: {{SUBJECTSPACE}}
10349 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10350 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10359 Magic Word: {{SUBJECTSPACE}}, same namespace
10361 title=[[User:Ævar Arnfjörð Bjarmason]]
10362 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10371 Magic Word: {{SUBJECTSPACE}}, main namespace
10373 title=[[Parser Test]]
10374 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10382 Magic Word: {{SUBJECTSPACEE}}
10384 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10385 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10394 Magic Word: {{NAMESPACE}}
10396 title=[[User:Ævar Arnfjörð Bjarmason]]
10397 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10406 Magic Word: {{NAMESPACEE}}
10408 title=[[User:Ævar Arnfjörð Bjarmason]]
10409 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10418 Magic Word: {{NAMESPACENUMBER}}
10420 title=[[User:Ævar Arnfjörð Bjarmason]]
10421 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10423 {{NAMESPACENUMBER}}
10430 Magic Word: {{SUBPAGENAME}}
10432 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10433 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10442 Magic Word: {{SUBPAGENAMEE}}
10444 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10445 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10454 Magic Word: {{ROOTPAGENAME}}
10456 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10457 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10461 <p>Ævar Arnfjörð Bjarmason
10466 Magic Word: {{ROOTPAGENAMEE}}
10468 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10469 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10473 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10478 Magic Word: {{BASEPAGENAME}}
10480 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10481 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10485 <p>Ævar Arnfjörð Bjarmason
10490 Magic Word: {{BASEPAGENAMEE}}
10492 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10493 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10497 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10502 Magic Word: {{TALKPAGENAME}}
10504 title=[[User:Ævar Arnfjörð Bjarmason]]
10505 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10509 <p>User talk:Ævar Arnfjörð Bjarmason
10514 Magic Word: {{TALKPAGENAMEE}}
10516 title=[[User:Ævar Arnfjörð Bjarmason]]
10517 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10521 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10526 Magic Word: {{SUBJECTPAGENAME}}
10528 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10529 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10531 {{SUBJECTPAGENAME}}
10533 <p>User:Ævar Arnfjörð Bjarmason
10538 Magic Word: {{SUBJECTPAGENAMEE}}
10540 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10541 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10543 {{SUBJECTPAGENAMEE}}
10545 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10550 Magic Word: {{NUMBEROFFILES}}
10552 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10561 Magic Word: {{PAGENAME}}
10563 title=[[User:Ævar Arnfjörð Bjarmason]]
10564 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10568 <p>Ævar Arnfjörð Bjarmason
10573 Magic Word: {{PAGENAME}} with metacharacters
10575 title=[['foo & bar = baz']]
10576 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10580 <p><i>'foo & bar = baz'</i>
10585 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10587 title=[[*RFC 1234 http://example.com/]]
10588 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10592 <p>*RFC 1234 http://example.com/
10597 Magic Word: {{PAGENAMEE}}
10599 title=[[User:Ævar Arnfjörð Bjarmason]]
10600 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10604 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10609 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10611 title=[[*RFC 1234 http://example.com/]]
10612 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10616 <p>*RFC_1234_http://example.com/
10621 Magic Word: {{REVISIONID}}
10623 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10630 flags=vary-revision-id
10634 Magic Word: {{SCRIPTPATH}}
10636 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10644 Magic Word: {{STYLEPATH}}
10646 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10655 Magic Word: {{SERVER}}
10657 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10661 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10666 Magic Word: {{SERVERNAME}}
10668 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10677 Magic Word: {{SITENAME}}
10679 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10688 Magic Word: {{PAGELANGUAGE}}
10691 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10700 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10702 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10711 Case-sensitive magic words, when cased differently, should just be template transclusions
10718 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10719 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10720 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10721 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10726 Case-insensitive magic words should still work with weird casing.
10736 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10740 # From plwiki:PLOS_ONE
10742 Parsoid: Page property magic word with magic word contents
10744 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10746 <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>"}]]}'/>
10749 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10750 # But, this is a limitation of our representation and is documented in
10751 # TemplateHandler.js in processSpecialMagicWord
10753 Parsoid: Template-generated DISPLAYTITLE
10755 {{{{echo|DISPLAYTITLE}}:Foo}}
10759 wgAllowDisplayTitle=true
10760 wgRestrictDisplayTitle=false
10765 <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"}]]}'/>
10769 Namespace 1 {{ns:1}}
10778 Namespace 1 {{ns:01}}
10787 Namespace 0 {{ns:0}} (T6783)
10795 Namespace 0 {{ns:00}} (T6783)
10803 Namespace -1 {{ns:-1}}
10812 Namespace User {{ns:User}}
10821 Namespace User talk {{ns:User_talk}}
10830 Namespace User talk {{ns:uSeR tAlK}}
10839 Namespace File {{ns:File}}
10848 Namespace File {{ns:Image}}
10857 Namespace (lang=de) Benutzer {{ns:User}}
10868 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10874 <p>Benutzer Diskussion
10881 {{urlencode:hi world?!}}
10882 {{urlencode:hi world?!|WIKI}}
10883 {{urlencode:hi world?!|PATH}}
10884 {{urlencode:hi world?!|QUERY}}
10894 Magic Word: prioritize type info over data-parsoid
10898 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10904 Magic Word: serialize on separate line (parsoid)
10906 parsoid=wt2wt,html2wt
10912 foo<meta property="mw:PageProp/notoc"/>bar
10916 Magic Word: rt non-english wikis
10923 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10927 __proto__ is treated as normal wikitext (T105997)
10939 Magic links: internal link to RFC (T2479)
10943 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10946 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10950 Magic links: RFC (T2479)
10954 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10957 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
10961 Magic links: RFC (T67278)
10963 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10965 <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.
10968 <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>
10972 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10974 RFC      822
10978 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10983 <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>
10989 Magic links: ISBN (T3937)
10993 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10996 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11000 Magic links: ISBN (T67278)
11002 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11004 <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.
11007 <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>
11011 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11013 ISBN      978 0 316 09811 3
11019 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11026 <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>
11034 Magic links: PMID incorrectly converts space to underscore
11038 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11041 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11045 Magic links: PMID (T67278)
11047 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11049 <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.
11052 <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>
11056 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11058 PMID      1234
11062 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11067 <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>
11072 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11073 # since these are ExtLinkText, not MagicLinkText
11075 Magic links: use appropriate serialization for "almost" magic links.
11077 X[[Special:BookSources/0978739256|foo]]
11079 X[https://tools.ietf.org/html/rfc1234 foo]
11081 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11082 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11085 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11086 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11090 Magic links: All disabled (T47942)
11092 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11098 <p>ISBN 0-306-40615-2
11109 Nonexistent template
11111 {{thistemplatedoesnotexist}}
11113 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11118 Template with invalid target containing tags
11120 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11122 <p>{{a<b>b</b>|foo|a=b|a = b}}
11127 Template with invalid target containing unclosed tag
11129 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11131 <p>{{a<b>|foo|a=b|a = b}}</b>
11136 Template with invalid target containing wikilink
11140 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11143 <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>
11147 Template with just whitespace in it, T70421
11151 <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>
11157 This is a test template
11165 <p>This is a test template
11170 Template with explicit namespace
11174 <p>This is a test template
11182 This is a test template with parameter {{{param}}}
11188 {{paramtest|param=foo}}
11190 <p>This is a test template with parameter foo
11195 Template:paramtestnum
11197 [[{{{1}}}|{{{2}}}]]
11201 Template unnamed parameter
11203 {{paramtestnum|Main Page|the main page}}
11205 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11210 Template:templatesimple
11216 Template:templateredirect
11218 #redirect [[Template:templatesimple]]
11222 Template:templateasargtestnum
11228 Template:templateasargtest
11230 {{template{{{templ}}}}}
11234 Template:templateasargtest2
11240 Template with template name as unnamed argument
11242 {{templateasargtestnum|templatesimple}}
11249 Template with template name as argument
11251 {{templateasargtest|templ=simple}}
11258 Template with template name as argument (2)
11260 {{templateasargtest2|templ=templatesimple}}
11267 Template:templateasargtestdefault
11269 {{{{{templ|templatesimple}}}}}
11279 Template with default value
11281 {{templateasargtestdefault}}
11288 Template with default value (value set)
11290 {{templateasargtestdefault|templ=templa}}
11299 {{templateredirect}}
11304 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11308 Template with argument in separate line
11310 {{ templateasargtest |
11318 Template with complex template as argument
11321 param ={{ templateasargtest |
11322 templ = simple }}}}
11324 <p>This is a test template with parameter (test)
11329 Templates with templated name
11331 {{{{echo|echo}}|foo}}
11332 {{{{echo|inner list}} }}
11336 <ul><li>item 1</li></ul>
11339 <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>
11340 <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>
11343 ## Regression test; the output here isn't really that interesting.
11345 Templates with templated name and top level template args
11347 {{1{{2{{{3}}}|4=5}}}}
11349 <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>
11352 # Parsoid markup is deliberate "broken". This is an edge case.
11353 # See long comment in TemplateHandler.js:convertAttribsToString.
11355 Templates with invalid templated targets
11366 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11371 Template with thumb image (with link in description)
11373 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11375 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>
11378 <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>
11380 <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>
11384 Template:complextemplate
11386 {{{1}}} {{paramtest|
11387 param ={{{param}}}}}
11391 Template with complex arguments
11394 param ={{ templateasargtest |
11395 templ = simple }}|[[Template:complextemplate|link]]}}
11397 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11402 T2553: link with two variables in a piped link
11405 |[[{{{1}}}|{{{2}}}]]
11410 <td>[[{{{1}}}|{{{2}}}]]
11415 <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>
11421 Abort table cell attribute parsing on wikilink
11424 |testing [[one|two]] |three||four
11425 |testing one two |three||four
11426 |testing="[[one|two]]" |three||four
11431 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11437 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11443 <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>
11444 <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>
11445 <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>
11450 Don't abort table cell attribute parsing if wikilink is found in template arg
11453 |Test {{#tag:ref|One two "[[three]]" four}}
11457 <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>
11462 Magic variable as template parameter
11464 {{paramtest|param={{SITENAME}}}}
11466 <p>This is a test template with parameter MediaWiki
11473 [[{{{param}}}|link]]
11477 Template parameter as link source
11479 {{linktest|param=Main Page}}
11481 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11486 Template:paramtest2
11488 including another template, {{paramtest|param={{{arg}}}}}
11492 Template passing argument to another template
11494 {{paramtest2|arg='hmm'}}
11496 <p>including another template, This is a test template with parameter 'hmm'
11507 Template as link source
11511 [[{{linktest2}}|Main Page]]
11513 [[{{linktest2}}]]Page
11515 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11516 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11517 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11535 Template infinite loop
11539 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11544 Template from main namespace
11553 Template from non-includable namespace
11555 wgNonincludableNamespaces=10
11559 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11574 T2529: Template with table, not included at beginning of line
11593 T2523: Template shouldn't eat newline (or add an extra one before table)
11613 T2041: Template parameters shown as broken links
11622 Template with targets containing wikilinks
11628 {{[[{{echo|foo}}]]}}
11630 {{{{echo|[[foo}}]]}}
11632 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11633 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11637 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11638 <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>
11639 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11649 Templates: Double quotes as template target
11656 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11660 ## This test is about making sure Parsoid's data-mw is well formed in the
11661 ## face of multiple templates with intersecting and overlapping ranges. The
11662 ## wikitext itself is wretched.
11664 Templates with intersecting and overlapping ranges
11675 </table><p>ho</p><table>
11679 </td></tr></tbody></table>
11681 <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":""}]]}'>
11683 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11685 <tbody><tr><td>hi</td></tr>
11690 Template:MSGNW test
11692 ''None'' of '''this''' should be
11694 but rather passed unmodified
11702 # hmm, fix this or just deprecate msgnw and document its behavior?
11706 {{msgnw:MSGNW test}}
11708 <p>''None'' of '''this''' should be
11710  but rather passed unmodified
11711 {{test}}
11715 <!-- comment -->
11722 {{int:youhavenewmessages|lots of money|not!}}
11724 <p>You have lots of money (not!).
11729 int keyword - non-existing message
11740 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11744 <includeonly> and <noinclude> being included
11755 <onlyinclude>Foo</onlyinclude>bar
11759 <onlyinclude> being included
11771 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11775 <onlyinclude> and <includeonly> being included
11784 <includeonly> and <noinclude> on a page
11786 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11793 Un-closed <noinclude>
11800 <onlyinclude> on a page
11802 <onlyinclude>Foo</onlyinclude>bar
11809 Un-closed <onlyinclude>
11816 Self-closed noinclude, includeonly, onlyinclude tags
11827 Unbalanced includeonly and noinclude tags
11831 |b</noinclude></noinclude>
11832 |c</noinclude></includeonly>
11833 |d</includeonly></includeonly>
11842 <td>c</includeonly>
11844 <td>d</includeonly></includeonly>
11850 Template:Includeonly section
11853 ==Includeonly section==
11859 T8563: Edit link generation for section shown by <includeonly>
11861 {{includeonly section}}
11863 <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>
11864 <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>
11868 # Uses same input as the contents of [[Template:Includeonly section]]
11870 T8563: Section extraction for section shown by <includeonly>
11875 ==Includeonly section==
11883 T8563: Edit link generation for section suppressed by <includeonly>
11886 ==Includeonly section==
11890 <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>
11895 T8563: Section extraction for section suppressed by <includeonly>
11900 ==Includeonly section==
11908 Un-closed <includeonly>
11913 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11916 ## We used to, but no longer wt2wt this test since the default serializer
11917 ## will normalize the include directives to serialize on their own line.
11918 ## Selser will take care of preserving formatting in scenarios where they
11919 ## intermingled with other wikitext.
11921 Includes and comments at SOL
11923 parsoid=wt2html,html2html
11925 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
11932 <includeonly>can have stuff</includeonly>===here===
11935 <h2><span class="mw-headline" id="hu">hu</span></h2>
11940 <h3><span class="mw-headline" id="here">here</span></h3>
11943 <!-- 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>
11945 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11947 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
11950 <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>
11954 # TODO: test with DOM fragment reuse!
11956 Parsoid: DOM fragment reuse
11958 parsoid=wt2wt,wt2html
11960 a{{echo|b<table></table>c}}d
11972 <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>
11974 <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">
11975 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11976 </span><p about="#mwt2">cd</p>
11978 <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">
11980 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11982 </span><p about="#mwt3">b</p>
11986 Parsoid: Merge double tds (T52603)
11991 |{{echo|{{!}} foo}}
11995 <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>
12000 Parsoid: Merge double tds in nested transclusion content (T52603)
12006 |{{echo|{{!}} foo}}
12010 <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}}]}'>
12012 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12018 ### <includeonly> and <noinclude> in attributes
12021 0. includeonly around the entire attribute
12023 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12025 <p><span id="v2">bar</span>
12030 1. includeonly in html attr key
12032 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12034 <p><span id="foo">bar</span>
12039 2. includeonly in html attr value
12041 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12042 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12044 <p><span id="v1">bar</span>
12045 <span id="v1">bar</span>
12050 3. includeonly in part of an attr value
12052 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12054 <p><span style="color:red;">bar</span>
12059 4. includeonly in table attributes
12083 ### Preprocessor precedence tests
12084 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12086 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12088 Preprocessor precedence 1: link is rightmost opening
12094 But close-brace is not a valid character in a link title:
12097 However, we can still tell this was handled as a link in the preprocessor:
12098 {{echo|[[Foo}}|bar]]|bat}}
12100 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12101 </p><p>But close-brace is not a valid character in a link title:
12103 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12107 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12108 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12109 <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>
12113 Preprocessor precedence 2: template is rightmost opening
12122 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12126 Preprocessor precedence 3: language converter is rightmost opening
12142 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12143 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12144 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12148 Preprocessor precedence 4: left-most angle bracket
12159 Template:Precedence5
12165 Preprocessor precedence 5: tplarg takes precedence over template
12167 {{Precedence5|Bullet}}
12169 <ul><li>Bar</li></ul>
12172 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12176 Preprocessor precedence 6: broken link is rightmost opening
12182 {{echo|[[Foo|bar|bat=baz}}
12185 </p><p>{{echo|[[Foo|bar|bat=baz}}
12188 <p>{{echo|[[Foo}}</p>
12189 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12192 # This next test exposes a difference between PHP and Parsoid:
12193 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12194 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12195 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12196 # outer `[[Foo` extends until the `y]]`
12197 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12198 # intermediate result (after template expansion), and link processing
12199 # happens on this intermediate result, which moves the wikilink
12200 # boundary leftward to `[[Foo|Bar]]`
12201 # 2b) Parsoid works in a single step, so it's going to keep the
12202 # wikilink as extending to the `y]]`
12203 # 3a) Then PHP does linktrail processing which slurps up the trailing
12204 # `xy` inside the link.
12205 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12206 # `z` inside the link.
12207 # This is "correct" behavior. Parsoid's basic worldview is that the
12208 # `]]` inside the template shouldn't be allowed to leak out to affect
12209 # the surrounding wikilink. PHP may match Parsoid (in the future)
12210 # if you use {{#balance}} (T114445).
12213 Preprocessor precedence 7: broken template is rightmost opening
12219 [[Foo|{{echo|Bar]]-x}}-y]]-z
12221 Careful: linktrails can move the end of the wikilink:
12222 [[Foo|{{echo|y']]a}}l]]l
12224 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12225 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12226 </p><p>Careful: linktrails can move the end of the wikilink:
12227 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12230 <p>[[Foo|{{echo|Bar]]</p>
12231 <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>
12232 <p>Careful: linktrails can move the end of the wikilink:
12233 <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>
12237 Preprocessor precedence 8: broken language converter is rightmost opening
12248 Template:Preprocessor_precedence_9
12253 ;7: {{{{{{{4}}}}}}}
12257 Preprocessor precedence 9: groups of braces
12259 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12265 <ul><li>Bar</li></ul>
12269 <dd>{Bullet}</dd></dl>
12272 <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}}]}'>
12277 </dl><ul about="#mwt1">
12279 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12288 Template:Preprocessor_precedence_10
12295 ;6: -{{{{{{4}}}}}}-
12296 ;7: -{{{{{{{5}}}}}}}-
12300 Preprocessor precedence 10: groups of braces with leading dash
12304 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12310 <ul><li>Bar-</li></ul>
12317 <ul><li>Bar-</li></ul>
12324 <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}}]}'>
12326 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12329 </dl><ul about="#mwt1">
12331 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12335 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12338 </dl><ul about="#mwt1">
12340 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12344 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12349 Preprocessor precedence 11: found during visual diff testing
12351 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12353 {{echo|-{{echo|-{{echo|x}}}}}}
12355 {{echo|-{{echo|x}}}}
12357 <p><span>-<span>-x</span></span>
12362 <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>
12364 <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>
12366 <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>
12370 Preprocessor precedence 12: broken language converter closed by brace.
12374 This form breaks the template, which is unfortunate:
12375 *{{echo|foo-{bar}bat}}
12377 But if the broken language converter markup is inside an extension
12378 tag, nothing bad happens:
12379 *<nowiki>foo-{bar}bat</nowiki>
12380 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12381 *<pre>foo-{bar}bat</pre>
12382 *{{echo|<pre>foo-{bar}bat</pre>}}
12384 <tag>foo-{bar}bat</tag>
12385 {{echo|<tag>foo-{bar}bat</tag>}}
12388 <p>This form breaks the template, which is unfortunate:
12390 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12391 <p>But if the broken language converter markup is inside an extension
12392 tag, nothing bad happens:
12394 <ul><li>foo-{bar}bat</li>
12395 <li>foo-{bar}bat</li>
12396 <li><pre>foo-{bar}bat</pre></li>
12397 <li><pre>foo-{bar}bat</pre></li></ul>
12398 <pre>'foo-{bar}bat'
12402 <pre>'foo-{bar}bat'
12407 <p>This form breaks the template, which is unfortunate:</p>
12409 <li>{{echo|foo-{bar}bat}}</li>
12411 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12413 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12414 <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>
12415 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12416 <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>
12418 <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>
12422 Preprocessor precedence 13: broken language converter in external link
12426 *[http://example.com/-{foo Example in URL]
12427 *[http://example.com Example in -{link} description]
12428 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12430 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12431 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12432 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12435 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12436 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12437 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12442 Preprocessor precedence 14: broken language converter in comment
12444 *<!--{{foo}}-->...should be ok
12445 *<!---{{foo}}-->...extra dashes
12446 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12448 <ul><li>...should be ok</li>
12449 <li>...extra dashes</li>
12450 <li>foobat...should be ok</li></ul>
12453 <li><!--{{foo}}-->...should be ok</li>
12454 <li><!---{{foo}}-->...extra dashes</li>
12455 <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>
12460 Preprocessor precedence 15: broken brace markup in headings
12462 wgFragmentMode=[ 'html5', 'legacy' ]
12466 __NOTOC__ __NOEDITSECTION__
12475 ===5 foo{{{bar 5===
12480 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12483 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12486 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12489 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12492 <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>
12495 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12499 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12500 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12502 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12504 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12506 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12508 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12510 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12515 Preprocessor precedence 16: matching closing braces to opening braces
12520 -{{{echo|foo}}bar}-
12525 <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>
12529 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12538 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12542 Preprocessor precedence 18: another rightmost wins scenario
12546 {{ -{{{{1|tplarg}}} }} }-
12548 <p>{{ -{tplarg }} }-
12551 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12555 Preprocessor precedence 19: break syntax
12568 ### Token Stream Patcher tests
12570 ### These tests won't always pass wt2wt and other modes because
12571 ### on serialization, the table will be output on a new line.
12572 ### For now, we are blacklisting them, and using this to test selser.
12576 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12578 parsoid=wt2html,wt2wt
12580 {{echo|}}{| width = '100%'
12584 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12585 <tbody><tr><td>foo</td></tr>
12589 ## We used to, but no longer wt2wt this test since the default serializer
12590 ## will normalize the include directives to serialize on their own line.
12591 ## Selser will take care of preserving formatting in scenarios where they
12592 ## intermingled with other wikitext.
12594 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12598 <includeonly>a</includeonly>{| {{{b}}}
12602 <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":""}]]}'>
12603 <tbody><tr><td>c</td></tr>
12608 Table wikitext syntax outside wiki-tables
12612 ! not a table heading
12615 | class="foo bar" | baz
12623 ! not a table heading
12626 | class="foo bar" | baz
12635 ### Testing parsing of templates where a template arg
12636 ### has the same name as the template itself.
12642 {{{quote|{{{1}}}}}}
12646 Templates: Template Name/Arg clash: 1. Use of positional param
12655 Templates: Template Name/Arg clash: 2. Use of named param
12657 {{quote|quote=foo}}
12664 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12673 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12677 Templates: 1. Simple use
12686 Templates: 2. Inside a block tag
12688 <div>{{echo|Foo}}</div>
12689 <blockquote>{{echo|Foo}}</blockquote>
12692 <blockquote>Foo</blockquote>
12696 <blockquote><p>Foo</p></blockquote>
12700 Templates: P-wrapping: 1a. Templates on consecutive lines
12711 Templates: P-wrapping: 1b. Templates on consecutive lines
12725 Templates: P-wrapping: 1c. Templates on consecutive lines
12728 {{echo|bar}} <div>baz</div>
12737 bar </p><div>baz</div>
12741 Templates: P-wrapping: 1d. Template preceded by comment-only line
12750 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12754 Templates: Inline Text: 1. Multiple template uses
12756 {{echo|Foo}}bar{{echo|baz}}
12763 Templates: Inline Text: 2. Back-to-back template uses
12765 {{echo|Foo}}{{echo|bar}}
12772 Templates: Block Tags: 1. Multiple template uses
12774 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12776 <div>Foo</div><div>bar</div><div>baz</div>
12781 Templates: Block Tags: 2. Back-to-back template uses
12783 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12785 <div>Foo</div><div>bar</div>
12789 # This is an edge case relating to paragraph wrapping.
12791 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12796 <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
12801 Templates: Links: 1. Simple example
12803 {{echo|[[Foo|bar]]}}
12805 <p><a href="/wiki/Foo" title="Foo">bar</a>
12810 Templates: Links: 2. Generation of link href
12812 [[{{echo|Foo}}|bar]]
12814 <p><a href="/wiki/Foo" title="Foo">bar</a>
12819 Templates: Links: 3. Generation of part of a link href
12821 [[Fo{{echo|o}}|bar]]
12823 [[Foo{{echo|bar}}]]
12825 [[Foo{{echo|bar}}baz]]
12827 [[Foo{{echo|bar}}|bar]]
12829 [[:Foo{{echo|bar}}]]
12831 [[:Foo{{echo|bar}}|bar]]
12833 <p><a href="/wiki/Foo" title="Foo">bar</a>
12834 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12835 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12836 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12837 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12838 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12843 Templates: Links: 4. Multiple templates generating link href
12845 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12847 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12852 Templates: Links: 5. Generation of link text
12854 [[Foo|{{echo|bar}}]]
12856 <p><a href="/wiki/Foo" title="Foo">bar</a>
12861 Templates: Links: 5. Nested templates (only outermost template should be marked)
12863 {{echo|[[{{echo|Foo}}|bar]]}}
12865 <p><a href="/wiki/Foo" title="Foo">bar</a>
12870 Templates: HTML Tag: 1. Generation of HTML attr. key
12872 <div {{echo|style}}="color:red;">foo</div>
12874 <div style="color:red;">foo</div>
12879 Templates: HTML Tag: 2. Generation of HTML attr. value
12881 <div style={{echo|'color:red;'}}>foo</div>
12883 <div style="color:red;">foo</div>
12888 Templates: HTML Tag: 3. Generation of HTML attr key and value
12890 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12892 <div style="color:red;">foo</div>
12897 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12899 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12901 <div title="This is a long title with just one piece templated">foo</div>
12906 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12908 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12910 <div title="This is a long title with just one piece templated">foo</div>
12915 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12917 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12919 <div title="This is a long title with just one piece templated">foo</div>
12923 # SSS FIXME: While it is great we added support for all this,
12924 # do we want to make this part of the spec? Maybe we want to
12925 # deprecate this kind of usage in the future?
12927 Templates: HTML Tag: 7. Generation of partial attribute key string
12929 <div st{{echo|yle}}="color:red;">foo</div>
12931 <div style="color:red;">foo</div>
12936 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12938 <div {{echo|1=id="v1"}}>bar</div>
12940 <div id="v1">bar</div>
12945 Templates: HTML Tag: 9. Multiple template-generated attributes
12947 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12949 <div id="v1" title="foo">bar</div>
12954 Templates: Support for templates generating attributes and content
12956 {| {{mixed_attr_content_template}}
12961 <table style="color:red;" title="T48811">
12971 <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|}"]}'>
12980 Template:attribute_from_template
12986 Table cell with attribute before expanded attribute
12989 | align="center" {{attribute_from_template}} |456
12993 <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>
12998 1. Entities and nowikis inside templated attributes should be handled correctly
13000 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13002 <div style="background:#f9f9f9;">foo</div>
13005 <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>
13009 2. Entities and nowikis inside templated attributes should be handled correctly
13012 |{{table_attribs_3}}
13017 <td style="background:#f9f9f9;">Foo
13022 <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>
13027 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13030 |{{table_attribs_3}}
13035 <td style="background:#f9f9f9;">Foo
13039 <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}}]}'>
13040 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13046 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13049 |{{table_attribs_6}} hi
13054 <td style="background: red;">hi
13059 <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>
13064 Templates: HTML Tables: 1. Generating start of a HTML table
13066 {{echo|<table><tr><td>foo</td>}}</tr></table>
13068 <table><tr><td>foo</td></tr></table>
13073 Templates: HTML Tables: 2a. Generating middle of a HTML table
13075 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13077 <table><tr><td>foo</td></tr></table>
13082 Templates: HTML Tables: 2b. Generating middle of a HTML table
13084 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13086 <table><tr><td>foo</td></tr></table>
13091 Templates: HTML Tables: 3. Generating end of a HTML table
13093 <table><tr>{{echo|<td>foo</td></tr></table>}}
13095 <table><tr><td>foo</td></tr></table>
13100 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13102 {{echo|<table>}}<tr><td>foo</td></tr></table>
13104 <table><tr><td>foo</td></tr></table>
13109 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13111 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13113 <table><tr><td>foo</td></tr></table>
13118 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13120 <table><tr>{{echo|<td>}}foo</td></tr></table>
13122 <table><tr><td>foo</td></tr></table>
13127 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13129 <table><tr><td>foo{{echo|</td>}}</tr></table>
13131 <table><tr><td>foo</td></tr></table>
13136 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13138 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13140 <table><tr><td>foo</td></tr></table>
13145 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13147 <table><tr><td>foo</td></tr>{{echo|</table>}}
13149 <table><tr><td>foo</td></tr></table>
13154 Templates: HTML Tables: 5. Proper fostering of categories from inside
13156 parsoid=wt2html,wt2wt
13158 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13159 <!--Two categories (T52330)-->
13160 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13162 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13163 <!--Two categories (T52330)-->
13164 <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>
13168 Templates: Wiki Tables: 1a. Fostering of entire template content
13176 <tr><td></td></tr></table>
13181 <table><tbody><tr><td></td></tr></tbody></table>
13183 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}},"\n|}"]}'>a</p><table about="#mwt2">
13189 Templates: Wiki Tables: 1b. Fostering of entire template content
13202 <tr><td></td></tr></table>
13210 <tbody><tr><td></td></tr></tbody></table>
13212 <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|}"]}'>
13214 </div><table about="#mwt3">
13220 Templates: Wiki Tables: 2. Fostering of partial template content
13230 <tr><td></td></tr></table>
13235 <div>b</div><table>
13236 <tbody><tr><td></td></tr></tbody></table>
13238 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n<div>b</div>"}},"i":0}},"\n|}"]}'>a</p><div about="#mwt2">b</div><table about="#mwt2">
13245 Templates: Wiki Tables: 3. td-content via multiple templates
13248 {{echo|{{pipe}}a}}{{echo|b}}
13259 Templates: Wiki Tables: 4. Templated tags, no content
13265 <tr><td></td></tr></table>
13270 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13284 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13297 ## This test case is very specific to Parsoid's internals
13298 ## and is hence only tested for Parsoid's code. Parsoid uses
13299 ## a <meta> marker tag for <ref> tags and they are expanded
13300 ## much later. We are verifying that this <meta> tag usage
13301 ## doesn't prevent foster parenting.
13303 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13305 {{PartialTable}}<ref>foo</ref>
13310 <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">
13314 <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>
13318 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13328 <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{{!}}}"]}'>
13329 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13333 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13338 Templates: Lists: Multi-line list-items via templates
13340 *{{echo|a {{nonexistent|
13342 *{{echo|b {{nonexistent|
13345 <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>
13346 <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>
13351 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13353 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13355 <p><i>ab</i>c<i>d</i>e
13360 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13361 (PHP parser generates misnested html)
13363 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13365 <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>
13369 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13370 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13372 parsoid=wt2html,wt2wt
13374 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13376 <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>
13377 <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>
13378 <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>
13382 Templates: Ugly nesting: 4. Divs opened/closed across templates
13384 a<div>b{{echo|c</div>d}}e
13389 <p>a</p><div>bc</div><p>de
13394 Templates: Ugly templates: 3. newline-only template parameter
13403 # This looks like a bug: a single newline triggers p/br for some reason.
13405 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13414 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13415 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13417 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13423 <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
13424 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13428 # T66017 -- ugly wikitext with fostered content generates two template ranges
13429 # that are "identical" and generate nesting cycles in the algorithm
13431 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13433 {{echo|<table><tr><td><table>}}
13437 <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"}'>
13438 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13439 </table></td></tr></tbody></table>
13443 Templates: Parameters substituted at the top-level
13445 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13449 <p><i>who</i> me? <b>never!</b>
13453 <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>
13455 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13459 Templates: Param with empty arg in the final position
13463 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13467 Parser Functions: 1. Simple example
13476 Parser Functions: 2. Nested use (only outermost should be marked up)
13484 ## Note that the templates inside the references are not wrapped
13486 Template nested in extension tag in template
13488 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13489 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13492 <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>
13493 <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>
13494 <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>
13498 ### Pre-save transform tests
13501 pre-save transform: subst:
13507 This is a test template
13511 pre-save transform: normal template
13521 pre-save transform: nonexistent template
13525 {{thistemplatedoesnotexist}}
13527 {{thistemplatedoesnotexist}}
13531 pre-save transform: subst magic variables
13540 # This is T2089, which I fixed. -- wtm
13542 pre-save transform: subst: templates with parameters
13546 {{subst:paramtest|param="something else"}}
13548 This is a test template with parameter "something else"
13552 Template:nowikitest
13554 <nowiki>'''not wiki'''</nowiki>
13558 pre-save transform: nowiki in subst (T3188)
13562 {{subst:nowikitest}}
13564 <nowiki>'''not wiki'''</nowiki>
13568 Template:commenttest
13570 This template has <!-- a comment --> in it.
13574 pre-save transform: comment in subst (T3936)
13578 {{subst:commenttest}}
13580 This template has <!-- a comment --> in it.
13584 pre-save transform: unclosed tag
13588 <nowiki>'''not wiki'''
13590 <nowiki>'''not wiki'''
13594 pre-save transform: mixed tag case
13598 <NOwiki>'''not wiki'''</noWIKI>
13600 <NOwiki>'''not wiki'''</noWIKI>
13604 pre-save transform: unclosed comment in <nowiki>
13608 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13610 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13613 # Leading @ in this template definition works around a limitation
13614 # in parsoid's parserTests which otherwise strips the <span> from the
13615 # result (confusing it for a template wrapper)
13619 @<span onmouseover="alert('crap')">Oh no</span>
13623 (confirming safety of fix for subst T3936)
13625 {{Template:dangerous}}
13627 <p>@<span>Oh no</span>
13632 pre-save transform: comment containing gallery (T7024)
13636 <!-- <gallery>data</gallery> -->
13638 <!-- <gallery>data</gallery> -->
13642 pre-save transform: comment containing extension
13646 <!-- <tag>data</tag> -->
13648 <!-- <tag>data</tag> -->
13652 pre-save transform: comment containing nowiki
13656 <!-- <nowiki>data</nowiki> -->
13658 <!-- <nowiki>data</nowiki> -->
13662 pre-save transform: <noinclude> in subst (T5298)
13672 pre-save transform: <onlyinclude> in subst (T5298)
13676 {{subst:Includes2}}
13684 {{<includeonly>subst:</includeonly>Includes}}
13688 Template:SafeSubstTest
13690 {{<includeonly>safesubst:</includeonly>Includes}}
13694 T24297: safesubst: works during PST
13698 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13704 T24297: safesubst: works during normal parse
13713 subst: does not work during normal parse
13717 <p>{{subst:Includes}}
13722 pre-save transform: context links ("pipe trick")
13726 [[Article (context)|]]
13729 [[Bar:Article (context)|]]
13730 [[:Bar:Article (context)|]]
13732 [[|Article (context)]]
13736 [[Article (context)|Article]]
13737 [[Bar:Article|Article]]
13738 [[:Bar:Article|Article]]
13739 [[Bar:Article (context)|Article]]
13740 [[:Bar:Article (context)|Article]]
13742 [[Article (context)]]
13743 [[Bar:X (Y) Z|X (Y) Z]]
13744 [[:Bar:X (Y) Z|X (Y) Z]]
13748 pre-save transform: context links ("pipe trick") with interwiki prefix
13752 [[interwiki:Article|]]
13753 [[:interwiki:Article|]]
13754 [[interwiki:Bar:Article|]]
13755 [[:interwiki:Bar:Article|]]
13757 [[interwiki:Article|Article]]
13758 [[:interwiki:Article|Article]]
13759 [[interwiki:Bar:Article|Bar:Article]]
13760 [[:interwiki:Bar:Article|Bar:Article]]
13764 pre-save transform: context links ("pipe trick") with parens in title
13766 pst title=[[Somearticle (context)]]
13770 [[Article (context)|Article]]
13774 pre-save transform: context links ("pipe trick") with comma in title
13776 pst title=[[Someplace, Somewhere]]
13779 [[Otherplace, Elsewhere|]]
13780 [[Otherplace, Elsewhere, Anywhere|]]
13782 [[Otherplace, Somewhere|Otherplace]]
13783 [[Otherplace, Elsewhere|Otherplace]]
13784 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13788 pre-save transform: context links ("pipe trick") with parens and comma
13790 pst title=[[Someplace (IGNORED), Somewhere]]
13793 [[Otherplace (place), Elsewhere|]]
13795 [[Otherplace, Somewhere|Otherplace]]
13796 [[Otherplace (place), Elsewhere|Otherplace]]
13800 pre-save transform: context links ("pipe trick") with comma and parens
13802 pst title=[[Who, me? (context)]]
13805 [[Me, Myself, and I (1937 song)|]]
13807 [[Yes, you. (context)|Yes, you.]]
13808 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13812 pre-save transform: context links ("pipe trick") with namespace
13814 pst title=[[Ns:Somearticle]]
13818 [[Ns:Article|Article]]
13822 pre-save transform: context links ("pipe trick") with namespace and parens
13824 pst title=[[Ns:Somearticle (context)]]
13828 [[Ns:Article (context)|Article]]
13832 pre-save transform: context links ("pipe trick") with namespace and comma
13834 pst title=[[Ns:Somearticle, Context, Whatever]]
13838 [[Ns:Article, Context, Whatever|Article]]
13842 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13844 pst title=[[Ns:Somearticle, Context (context)]]
13848 [[Ns:Article (context)|Article]]
13852 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13854 pst title=[[Ns:Somearticle (IGNORED), Context]]
13858 [[Ns:Article, Context|Article]]
13862 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13866 [[Article(context)|]]
13867 [[Bar:Article(context)|]]
13868 [[:Bar:Article(context)|]]
13869 [[|Article(context)]]
13873 [[Article(context)|Article]]
13874 [[Bar:Article(context)|Article]]
13875 [[:Bar:Article(context)|Article]]
13876 [[Article(context)]]
13877 [[Bar:X(Y)Z|X(Y)Z]]
13878 [[:Bar:X(Y)Z|X(Y)Z]]
13882 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13886 [[Article (context)|]]
13887 [[Bar:Article (context)|]]
13888 [[:Bar:Article (context)|]]
13889 [[|Article (context)]]
13893 [[Article (context)|Article]]
13894 [[Bar:Article (context)|Article]]
13895 [[:Bar:Article (context)|Article]]
13896 [[Article (context)]]
13897 [[Bar:X (Y) Z|X (Y) Z]]
13898 [[:Bar:X (Y) Z|X (Y) Z]]
13902 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13906 [[Article(context)|]]
13907 [[Bar:Article(context)|]]
13908 [[:Bar:Article(context)|]]
13909 [[|Article(context)]]
13913 [[Article(context)|Article]]
13914 [[Bar:Article(context)|Article]]
13915 [[:Bar:Article(context)|Article]]
13916 [[Article(context)]]
13917 [[Bar:X(Y)Z|X(Y)Z]]
13918 [[:Bar:X(Y)Z|X(Y)Z]]
13922 pre-save transform: context links ("pipe trick") with commas (T23660)
13926 [[Article (context), context|]]
13927 [[Article (context),context|]]
13928 [[Bar:Article (context), context|]]
13929 [[Bar:Article (context),context|]]
13930 [[:Bar:Article (context), context|]]
13931 [[:Bar:Article (context),context|]]
13933 [[Article (context), context|Article]]
13934 [[Article (context),context|Article]]
13935 [[Bar:Article (context), context|Article]]
13936 [[Bar:Article (context),context|Article]]
13937 [[:Bar:Article (context), context|Article]]
13938 [[:Bar:Article (context),context|Article]]
13942 Parsoid: backwards pipe trick
13949 <p>[[|<b>bar</b>]]</p>
13953 pre-save transform: trim trailing empty lines
13957 Empty lines are trimmed
13963 Empty lines are trimmed
13967 pre-save transform: Signature expansion
13974 * <noinclude>~~~</noinclude>
13975 * <includeonly>~~~</includeonly>
13976 * <onlyinclude>~~~</onlyinclude>
13978 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13979 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13980 * 00:02, 1 January 1970 (UTC)
13981 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13982 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13983 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13988 ParserOutput flags from signature expansion (T84843)
13995 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13996 flags=user-signature
14001 pre-save transform: Signature expansion in nowiki tags (T2093)
14007 <nowiki>~~~~</nowiki>
14009 <includeonly><nowiki>~~~~</nowiki></includeonly>
14011 <noinclude><nowiki>~~~~</nowiki></noinclude>
14013 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14015 {{subst:Foo}} shall be converted to FOO
14017 As well as inside noinclude/onlyinclude
14018 <noinclude>{{subst:Foo}}</noinclude>
14019 <onlyinclude>{{subst:Foo}}</onlyinclude>
14021 But not inside includeonly
14022 <includeonly>{{subst:Foo}}</includeonly>
14026 <nowiki>~~~~</nowiki>
14028 <includeonly><nowiki>~~~~</nowiki></includeonly>
14030 <noinclude><nowiki>~~~~</nowiki></noinclude>
14032 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14034 FOO shall be converted to FOO
14036 As well as inside noinclude/onlyinclude
14037 <noinclude>FOO</noinclude>
14038 <onlyinclude>FOO</onlyinclude>
14040 But not inside includeonly
14041 <includeonly>{{subst:Foo}}</includeonly>
14045 Parsoid: Recognize nowiki with trailing space in tags
14049 <nowiki ><div>[[foo]]</nowiki >
14057 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14064 Parsoid: Recognize nowiki with odd capitalization
14068 <noWikI ><div>[[foo]]</Nowiki >
14070 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14075 Parsoid: Escape nowiki with trailing space in tags
14079 <p><nowiki > foo </nowiki ></p>
14080 <p>a<nowiki />b</p>
14081 <p>c<nowiki/ >d</p>
14083 <nowiki > foo </nowiki >
14091 Parsoid: Escape weird noWikI capitalizations
14095 <p><noWikI > foo </NoWikI ></p>
14097 <noWikI > foo </NoWikI >
14101 ### Message transform tests
14104 message transform: magic variables
14114 message transform: should not transform wiki markup
14124 message transform: <noinclude> in transcluded template (T6926)
14134 message transform: <onlyinclude> in transcluded template (T6926)
14144 {{#special:}} page name, known
14148 {{#special:Recentchanges}}
14150 Special:RecentChanges
14154 {{#special:}} page name with subpage, known
14158 {{#special:Recentchanges/param}}
14160 Special:RecentChanges/param
14164 {{#special:}} page name, unknown
14168 {{#special:foobar nonexistent}}
14170 Special:Foobar nonexistent
14174 {{#speciale:}} page name, known
14178 {{#speciale:Recentchanges}}
14180 Special:RecentChanges
14184 {{#speciale:}} page name with subpage, known
14188 {{#speciale:Recentchanges/param}}
14190 Special:RecentChanges/param
14194 {{#speciale:}} page name, unknown
14198 {{#speciale:foobar nonexistent}}
14200 Special:Foobar_nonexistent
14206 ### For Parsoid-specific tests, see
14207 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14212 parsoid=wt2html,wt2wt,html2html
14214 [[Image:foobar.jpg]]
14216 <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>
14219 <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>
14223 Serialize simple image with span wrapper
14227 <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>
14229 [[File:Foobar.jpg]]
14233 Simple image (using File: namespace, now canonical)
14235 [[File:Foobar.jpg]]
14237 <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>
14240 <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>
14244 Right-aligned image
14246 [[File:Foobar.jpg|right]]
14248 <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>
14251 <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>
14257 [[File:Foobar.jpg|right|Caption text]]
14259 <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>
14262 <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>
14266 Image with caption, T55312 #1
14268 [[File:Foobar.jpg|right|Caption page stuff]]
14270 <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>
14273 <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>
14277 Image with caption, T55312 #2
14279 [[File:Foobar.jpg|right|Caption page=]]
14281 <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>
14284 <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>
14288 Image with caption, T55312 #3
14290 [[File:Foobar.jpg|right|Caption page=stuff]]
14292 <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>
14295 <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>
14299 Image caption with pipe entity
14301 [[File:Foobar.jpg|thumb|one | two]]
14302 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14304 <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>
14305 <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>
14308 <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>
14309 <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>
14313 Allow empty links in image captions (T62753)
14317 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14322 <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>
14325 <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>
14327 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14328 </figcaption></figure>
14332 Titles in unlinked images (T23454)
14334 [[File:Foobar.jpg|link=|stuff]]
14336 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14339 <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>
14343 Link with empty target
14352 Image with link trail
14354 Linktrails should not work for images: [[File:Foobar.jpg]]s
14356 <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
14359 <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>
14363 Image with empty attribute
14365 parsoid=wt2html,wt2wt,html2html
14367 [[File:Foobar.jpg|right||Caption text]]
14369 <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>
14372 <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>
14376 1. Block image with individual attributes from templates
14378 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14380 <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>
14383 <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>
14387 2. Block Image with individual attributes from templates
14389 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14391 <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>
14394 <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>
14398 3. Inline image with individual attributes from templates
14400 [[File:Foobar.jpg|{{echo|50px}}]]
14402 <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>
14405 <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>
14408 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14409 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14411 Image with multiple attributes from the same template
14413 [[File:Foobar.jpg|{{image_attribs}}]]
14415 <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>
14418 <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>
14422 Image with link tails
14426 123[[File:Foobar.jpg]]456
14427 123[[File:Foobar.jpg|right]]456
14428 123[[File:Foobar.jpg|thumb]]456
14430 <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
14432 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
14433 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
14436 <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
14438 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
14439 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
14442 <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>
14443 <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>
14444 <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>
14448 Image with multiple captions -- only last one is accepted
14450 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14452 <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>
14455 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption3 - accepted</figcaption></figure>
14459 Image with multiple widths -- use last
14461 [[File:Foobar.jpg|200px|300px|caption]]
14463 <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>
14466 <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>
14470 Image with multiple alignments -- use first (T50664)
14474 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14476 [[File:Foobar.jpg|middle|text-top|caption]]
14478 <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>
14479 <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>
14482 <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>
14483 <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>
14487 Image with width attribute at different positions
14489 [[File:Foobar.jpg|200px|right|Caption]]
14490 [[File:Foobar.jpg|right|200px|Caption]]
14491 [[File:Foobar.jpg|right|Caption|200px]]
14493 <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>
14494 <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>
14495 <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>
14498 <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>
14499 <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>
14500 <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>
14503 # a sad bit of backward-compatibility
14505 Image with size specified with pxpx (T15500, T53628)
14507 parsoid=wt2html,wt2wt,html2html
14509 [[File:Foobar.jpg|20pxpx]]
14510 [[File:Foobar.jpg|200x20pxpx]]
14512 <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>
14513 <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>
14516 <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>
14520 Image with link parameter, wiki target
14522 [[File:Foobar.jpg|link=Main Page]]
14524 <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>
14527 <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>
14530 # parsoid T51293 (part 1)
14532 Image with link parameter, URL target
14534 [[File:Foobar.jpg|link=http://example.com/]]
14536 <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>
14539 <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>
14542 # parsoid T51293 (part 2)
14544 Image with link parameter, protocol-less URL target
14546 [[File:Foobar.jpg|link=//example.com/]]
14548 <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>
14551 <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>
14555 Escaping non-block captions (T107435)
14558 "modes": ["wt2wt"],
14560 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14564 [[Image:Foobar.jpg|caption]]
14566 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14569 # wgExternalLinkTarget not supported by Parsoid
14571 Image with link parameter, wgExternalLinkTarget
14573 [[Image:foobar.jpg|link=http://example.com/]]
14575 wgExternalLinkTarget='foobar'
14577 <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>
14582 Image with link parameter, wgNoFollowLinks set to false
14584 [[Image:foobar.jpg|link=http://example.com/]]
14586 wgNoFollowLinks=false
14588 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14593 Image with link parameter, wgNoFollowDomainExceptions
14595 [[Image:foobar.jpg|link=http://example.com/]]
14597 wgNoFollowDomainExceptions='example.com'
14599 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14603 # wgExternalLinkTarget not supported by Parsoid
14605 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14607 [[Image:foobar.jpg|link=http://example.com/|Title]]
14609 wgExternalLinkTarget='foobar'
14611 <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>
14616 Image with empty link parameter
14618 [[File:Foobar.jpg|link=]]
14620 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14623 <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>
14627 Image with link parameter (wiki target) and unnamed parameter
14629 [[File:Foobar.jpg|link=Main_Page|Title]]
14631 <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>
14634 <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>
14638 Image with link parameter (URL target) and unnamed parameter
14640 [[File:Foobar.jpg|link=http://example.com/|Title]]
14642 <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>
14645 <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>
14649 Thumbnail image with link parameter
14652 parsoid=wt2html,wt2wt,html2html
14654 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14656 <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>
14659 <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>
14663 Manually-specified thumbnail image
14667 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14669 <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>
14672 <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>
14676 Manually-specified thumbnail image with explicit link to wiki page
14679 parsoid=wt2html,wt2wt,html2html
14681 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14683 <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>
14686 <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>
14690 Manually-specified thumbnail image with explicit link to url
14693 parsoid=wt2html,wt2wt,html2html
14695 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14697 <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>
14700 <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>
14704 Manually-specified thumbnail image with explicit no link
14707 parsoid=wt2html,wt2wt,html2html
14709 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14711 <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>
14714 <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>
14718 Manually-specified thumbnail image with explicit link and alt text
14721 parsoid=wt2html,wt2wt,html2html
14723 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14725 <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>
14728 <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>
14732 Image with frame and link
14734 parsoid=wt2html,wt2wt,html2html
14736 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14738 <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>
14741 <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>
14745 Image with frame and link and explicit alt
14747 parsoid=wt2html,wt2wt,html2html
14749 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14751 <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>
14754 <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>
14758 Image with wiki markup in implicit alt
14760 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14762 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14764 <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>
14765 </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>
14768 <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>
14770 <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>
14774 Alt image option should handle most kinds of wikitext without barfing
14776 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14778 <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>
14781 <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>
14785 Image with table with attributes in caption
14787 parsoid=wt2html,html2html
14789 [[File:Foobar.jpg|thumb|
14796 <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>
14797 <table class="123">
14798 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14801 </figcaption></figure>
14805 Image with table with rows from templates in caption
14807 [[File:Foobar.jpg|thumb|
14813 <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>
14815 <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>
14817 </figcaption></figure>
14821 Image with nested tables in caption
14823 [[File:Foobar.jpg|thumb|Foo<br />
14832 <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}'/>
14836 <tbody><tr><td>z</td></tr>
14837 </tbody></table></td></tr>
14839 </figcaption></figure>
14843 Image with heading and horizontal rule in caption
14845 [[File:Foobar.jpg|thumb|
14851 <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>
14854 <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>
14855 <h3 id="Testing">Testing</h3>
14857 <hr data-parsoid='{"extra_dashes":10}'/>
14858 </figcaption></figure>
14861 ###################
14862 # Conflicting image format options.
14863 # First option specified should 'win'.
14864 # All three cases in each test should be identical.
14867 Image with 'frameless' first.
14869 parsoid=wt2html,wt2wt,html2html
14871 [[File:Foobar.jpg|frameless|caption]]
14873 [[File:Foobar.jpg|frameless|frame|caption]]
14875 [[File:Foobar.jpg|frameless|thumb|caption]]
14877 <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>
14878 </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>
14879 </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>
14882 <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>
14883 <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>
14884 <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>
14888 Image with 'frame' first.
14890 parsoid=wt2html,wt2wt,html2html
14892 [[File:Foobar.jpg|frame|caption]]
14893 [[File:Foobar.jpg|frame|frameless|caption]]
14894 [[File:Foobar.jpg|frame|thumb|caption]]
14896 <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>
14897 <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>
14898 <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>
14901 <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>
14902 <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>
14903 <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>
14907 Image with 'thumb' first.
14909 parsoid=wt2html,wt2wt,html2html
14911 [[File:Foobar.jpg|thumb|caption]]
14912 [[File:Foobar.jpg|thumb|frameless|caption]]
14913 [[File:Foobar.jpg|thumb|frame|caption]]
14915 <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>
14916 <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>
14917 <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>
14920 <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>
14921 <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>
14922 <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>
14925 ###################
14927 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14928 # and https://phabricator.wikimedia.org/T64258
14929 # Foobar has actual size of 1941x220
14930 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14931 # a scalable format.
14932 # 2. Framed images always ignore size options; always render at default size.
14933 # 3. "Unspecified format" and border are the only types which can be
14937 Image: unspecified format and border enlarge
14939 parsoid=wt2html,wt2wt,html2html
14941 [[File:Foobar.jpg|2000px]]
14943 [[File:Foobar.jpg|border|2000px]]
14945 <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>
14946 </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>
14949 <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>
14950 <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>
14954 Image: "unspecified format" and border reduce
14956 parsoid=wt2html,wt2wt,html2html
14958 [[File:Foobar.jpg|1000px]]
14960 [[File:Foobar.jpg|border|1000px]]
14962 <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>
14963 </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>
14966 <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>
14967 <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>
14971 Image: thumbs reduce
14973 parsoid=wt2html,wt2wt,html2html
14975 [[File:Foobar.jpg|thumb|50px]]
14977 <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>
14980 <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>
14984 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14986 parsoid=wt2html,wt2wt,html2html
14988 [[File:Foobar.jpg|thumb|2000px]]
14990 [[File:Foobar.svg|thumb|2000px]]
14992 <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>
14993 <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>
14996 <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>
14997 <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>
15001 Image: frameless can reduce in size
15003 parsoid=wt2html,wt2wt,html2html
15005 [[File:Foobar.jpg|frameless|50px]]
15007 <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>
15010 <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>
15014 Image: bitmap frameless can't be enlarged past original size, but vector can
15016 parsoid=wt2html,wt2wt,html2html
15018 [[File:Foobar.jpg|frameless|2000px]]
15020 [[File:Foobar.svg|frameless|2000px]]
15022 <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>
15023 </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>
15026 <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>
15027 <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>
15031 Image: framed images are always unscaled.
15033 parsoid=wt2html,wt2wt,html2html
15035 [[File:Foobar.jpg|frame]]
15037 [[File:Foobar.jpg|frame|50px]]
15039 [[File:Foobar.jpg|frame|50x50px]]
15041 [[File:Foobar.jpg|frame|2000px]]
15043 <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>
15044 <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>
15045 <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>
15046 <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>
15049 <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>
15050 <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>
15051 <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>
15052 <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>
15055 ###################
15058 Link to image page- image page normally doesn't exists, hence edit link
15059 Add test with existing image page
15060 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15064 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15069 T20784 Link to non-existent image page with caption should use caption as link text
15071 [[:Image:test|caption]]
15073 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15078 Frameless image caption with a free URL
15080 [[File:Foobar.jpg|http://example.com]]
15082 <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>
15085 <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>
15089 Thumbnail image caption with a free URL
15093 [[File:Foobar.jpg|thumb|http://example.com]]
15095 <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>
15098 <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>
15102 Thumbnail image caption with a free URL and explicit alt
15105 parsoid=wt2html,wt2wt,html2html
15107 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15109 <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>
15112 <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>
15116 SVG thumbnails with no language set
15119 [[File:Foobar.svg|thumb|caption]]
15121 <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>
15124 <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>
15128 SVG thumbnails with language de
15130 parsoid=wt2html,wt2wt,html2html
15132 [[File:Foobar.svg|thumb|caption|lang=de]]
15134 <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>
15137 <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>
15141 SVG thumbnails with invalid language code
15143 parsoid=wt2html,wt2wt,html2html
15145 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15147 <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>
15150 <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>
15154 T3887: A ISBN with a thumbnail
15156 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15158 <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>
15161 <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>
15165 T3887: A RFC with a thumbnail
15167 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15169 <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>
15172 <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>
15176 T3887: A mailto link with a thumbnail
15178 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15180 <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>
15183 <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>
15186 # Pending resolution to T2368
15188 T2648: Frameless image caption with a link
15190 [[File:Foobar.jpg|text with a [[link]] in it]]
15192 <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>
15195 <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>
15199 T2648: Frameless image caption with a link (suffix)
15201 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15203 <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>
15206 <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>
15210 T2648: Frameless image caption with an interwiki link
15212 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15214 <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>
15217 <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>
15221 T2648: Frameless image caption with a piped interwiki link
15223 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15225 <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>
15228 <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>
15232 T107474: Frameless image caption with <nowiki>
15234 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15236 <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>
15240 Escape HTML special chars in image alt text
15242 [[File:Foobar.jpg|& < > "]]
15244 <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>
15247 <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>
15251 Escape HTML special chars in image alt text with LanguageConverter
15255 [[File:Foobar.jpg|& < > "]]
15257 <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>
15260 <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>
15264 Entities in file name and attributes
15266 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15268 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15271 <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>
15275 T2499: Alt text should have Ӓ, not &1234;
15277 [[File:Foobar.jpg|♀]]
15279 <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>
15282 <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>
15286 Broken image caption with link
15288 parsoid=wt2html,wt2wt,html2html
15290 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15292 <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.
15295 <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>
15299 Image caption containing another image
15301 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15303 <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>
15306 <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>
15310 Image: caption containing a newline
15312 [[File:Foobar.jpg|This
15315 <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>
15318 <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>
15322 Image: caption containing leading space
15323 (The leading space should not trigger nowiki escaping in wt2wt mode)
15325 [[File:Foobar.jpg|thumb| bar]]
15327 <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>
15330 <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>
15333 # html/php output not have newlines after table, td, th, etc. because
15334 # Linker::makeThumbLink2() replaces the newlines with spaces since
15335 # the table is inside a caption.
15336 # FIXME: Verify if that circa 2004 fix is still required.
15338 Image: caption containing a table
15340 parsoid=wt2html,wt2wt,html2html
15342 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15348 and some more text.]]
15350 <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>
15353 <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
15356 <tr><th>Foo</th><th>Bar</th></tr>
15359 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15363 T5090: External links other than http: in image captions
15365 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15367 <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>
15370 <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>
15376 parsoid=wt2html,wt2wt,html2html
15378 [[Image:foobar.jpg|a|class=b]]
15380 <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>
15383 <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>
15387 Localized image handling (1).
15389 parsoid=wt2html,wt2wt,html2html
15392 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15394 <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>
15397 <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>
15401 Localized image handling (2).
15404 parsoid=wt2html,wt2wt,html2html
15407 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15409 <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>
15412 <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>
15416 Localized image handling (3).
15421 <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>
15423 [[File:Foobar.jpg|بندانگشتی]]
15427 "border", "frameless" and "class" attributes on an image.
15430 parsoid=wt2html,wt2wt,html2html
15432 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15434 <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>
15437 <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>
15440 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15442 Invalid image attributes (T64500)
15445 parsoid=wt2html,wt2wt,html2html
15447 [[File:Foobar.jpg|thumb|float|left|caption]]
15449 [[File:Foobar.jpg|thumb|righ|caption]]
15451 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15453 <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>
15454 <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>
15455 <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>
15458 <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>
15459 <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>
15460 <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>
15466 #REDIRECT [[File:Barfoo.jpg]]
15469 # FIXME: Parsoid should run this test -- but we'd need to teach the
15470 # mockAPI about the redirected Barfoo.jpg image.
15474 [[Image:Barfoo.jpg]]
15476 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15481 Missing image with uploads disabled
15485 [[File:Foobaz.jpg]]
15487 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15490 <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>
15493 # Parsoid-specific testing for images
15494 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15495 # Currently imperfect due to a flaw in the Parsoid testrunner
15497 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15501 Parsoid-specific image handling - simple image with size and middle alignment
15503 [[File:Foobar.jpg|middle|50px]]
15505 <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>
15509 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
15511 parsoid=wt2wt,wt2html,html2html
15513 [[Image:Foobar.jpg|middle|50px]]
15515 <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>
15519 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
15521 [[File:Foobar.jpg|50px|middle]]
15523 <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>
15527 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
15529 parsoid=wt2html,wt2wt,html2html
15531 [[Image:Foobar.jpg|50px|middle]]
15533 <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>
15537 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15539 [[File:Foobar.jpg|500x10px|baseline|caption]]
15541 <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>
15545 Parsoid-specific image handling - simple image with border and size spec
15547 [[File:Foobar.jpg|50px|border|caption]]
15549 <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>
15553 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15555 parsoid=wt2html,html2html
15557 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15559 <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>
15563 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
15565 parsoid=wt2html,html2html
15567 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15569 <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>
15573 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15575 parsoid=wt2html,html2html
15577 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15579 <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>
15583 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
15585 parsoid=wt2html,html2html
15587 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15589 <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>
15593 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
15595 parsoid=wt2html,wt2wt,html2html
15597 [[File:Foobar.jpg|frame|500x50px|caption]]
15599 <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>
15603 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
15605 parsoid=wt2html,html2html
15607 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15609 <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>
15613 Parsoid-specific image handling - frameless image with specific size, border, and caption
15615 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15617 <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>
15621 Parsoid-specific image handling - simple image with a formatted caption
15623 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15625 <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>
15629 Parsoid-specific image handling - caption with a template in it
15631 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15633 <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>
15637 Parsoid-specific image handling - caption with unbalanced tags in it
15639 parsoid=wt2html,wt2wt,html2html
15642 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15646 <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>
15651 Parsoid-specific image handling - empty caption (1)
15653 parsoid=wt2html,wt2wt
15655 [[File:Foobar.jpg|thumb|]]
15657 <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>
15660 # empty captions don't get serialized unless we're in the "round trip" case
15662 Parsoid-specific image handling - empty caption (2)
15666 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15667 <a href="./File:Foobar.jpg">
15668 <img resource="./File:Foobar.jpg"
15669 src="//example.com/images/3/3a/Foobar.jpg"
15670 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15671 height="25" width="220"/>
15673 <figcaption></figcaption>
15676 [[File:Foobar.jpg|thumb]]
15680 Parsoid-specific image handling - whitespace caption
15682 [[File:Foobar.jpg|thumb| ]]
15684 <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>
15688 Parsoid-specific image handling - lang option
15691 [[File:Foobar.svg|lang=de|caption]]
15695 <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>
15699 ## Edge case bugs in Parsoid from T93580
15701 T93580: 1. Templated <ref> inside block images
15703 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15707 <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>
15709 <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>
15713 T93580: 2. <ref> inside inline images
15715 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15719 <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>
15721 <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>
15725 T93580: 3. Templated <ref> inside inline images
15727 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15731 <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>
15733 <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>
15740 Subpage test/subpage
15748 subpage title=[[Subpage test]]
15752 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15757 Subpage noslash link
15759 subpage title=[[Subpage test]]
15763 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15768 Subpage test/1/2/subpage
15774 Relative subpage noslash link
15776 parsoid=wt2wt,wt2html,html2html
15777 subpage title=[[Subpage test/1/2/3/4]]
15783 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15784 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15787 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15788 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15792 Parsoid: dot-slash prefixed wikilinks
15802 </p><p>[[././baz/]]
15807 </p><p>[[././baz/]]
15812 Render invalid page names as plain text (T53090)
15824 [[foo[http://example.com]xyz]]
15826 [[{{echo|./../foo}}|bar]]
15827 [[{{echo|foo/.}}|bar]]
15828 [[{{echo|foo/..}}|bar]]
15829 [[{{echo|foo~~~~bar}}]]
15830 [[{{echo|foo>bar}}]]
15831 [[{{echo|foo././bar}}]]
15832 [[{{echo|foo{bar}}]]
15833 [[{{echo|foo}bar}}]]
15834 [[{{echo|foo[bar}}]]
15835 [[{{echo|foo]bar}}]]
15836 [[{{echo|foo<bar}}]]
15838 <p>[[./../foo|bar]]
15848 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15849 </p><p>[[./../foo|bar]]
15862 <p>[[./../foo|bar]]
15872 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
15874 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15875 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15876 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15877 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15878 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15879 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15880 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15881 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15882 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15883 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15884 [[<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>
15892 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15897 T2561: {{/Subpage}}
15899 subpage title=[[Page]]
15903 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15911 Category:MediaWiki User's Guide
15919 [[:Category:MediaWiki User's Guide]]
15921 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15930 [[Category:MediaWiki User's Guide]]
15932 cat=MediaWiki_User's_Guide sort=
15934 <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"}}'/>
15938 PAGESINCATEGORY invalid title fatal (r33546 fix)
15940 {{PAGESINCATEGORY:<bogus>}}
15947 Category with different sort key
15951 [[Category:MediaWiki User's Guide|Foo]]
15953 cat=MediaWiki_User's_Guide sort=Foo
15955 <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"}}'/>
15959 Category with identical sort key
15963 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15965 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15967 <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"}}'/>
15971 Category with empty sort key
15976 [[Category:MediaWiki User's Guide|]]
15978 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15982 Category with empty sort key and parentheses
15987 [[Category:Foo (bar)|]]
15989 [[Category:Foo (bar)|Foo]]
15993 Category with link tail
15998 123[[Category:Foo]]456
16000 123[[Category:Foo]]456
16004 Category with template
16009 [[Category:{{echo|Foo}}]]
16011 [[Category:{{echo|Foo}}]]
16015 Category with template in sort key
16020 [[Category:Foo|{{echo|Bar}}]]
16022 [[Category:Foo|{{echo|Bar}}]]
16026 Category with template in sort key and title
16031 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16033 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16036 ## We used to, but no longer wt2wt this test since the default serializer
16037 ## will normalize all categories to serialize on their own line.
16038 ## This wikitext usage is going to be fairly uncommon in production and
16039 ## selser will take care of preserving formatting in those scenarios.
16041 Category / paragraph interactions
16045 Foo [[Category:Baz]] Bar
16047 Foo [[Category:Baz]]
16055 [[Category:Baz]] Bar
16068 {{echo|[[Category:Baz]]}}
16081 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16082 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16083 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16084 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16085 <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>
16086 <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}}]}'/>
16087 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16090 ## We used to, but no longer wt2wt this test since the default serializer
16091 ## will normalize all categories to serialize on their own line.
16092 ## This wikitext usage is going to be fairly uncommon in production and
16093 ## selser will take care of preserving formatting in those scenarios.
16095 ## The whitespace on the empty line is part of the test. Please do not delete
16097 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16103 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16105 {{echo|[[Category:Foo]] and so should this!}}
16107 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16112 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16114 <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>
16117 ## Parsoid will not try to wt2wt this while preserving newlines because
16118 ## it suppresses excess newlines within list items -- and we don't want to
16119 ## introduce a special case just for categories, which is, in reality somewhat
16120 ## odd behavior -- categories are unlikely to be used in list items like this
16121 ## in top-level pages and are only likely to show up in template-generated
16122 ## list items where this RT-ing is a non-issue.
16124 ## The whitespace on the empty line is part of the test. Please do not delete
16126 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16132 [[Category:Foo]] and this should be part of the same list item
16135 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16137 <ul><li>This and this should be part of the same list item</li>
16138 <li>So should this and this should be part of the same list item</li></ul>
16141 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16142 <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>
16146 ## Newlines and categories that follow the last item of a list
16147 ## are treated differently because this (list followed by categories)
16148 ## is an extremely common pattern on wikis.
16150 3. Categories and newlines: newline suppression for last list item should RT properly
16171 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16173 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16174 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16176 <dl><dd>c</dd></dl>
16178 <link rel="mw:PageProp/Category" href="./Category:C"/>
16180 <dl><dt>d</dt></dl>
16182 <link rel="mw:PageProp/Category" href="./Category:D"/>
16186 4. Categories and newlines: newline suppression for last list item should RT properly
16194 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16196 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16199 ## only wt2html for this to make sure the algo only applies to the rightmost path
16201 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16214 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16216 <ul><li>d</li></ul></li></ul>
16217 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16220 ## We used to, but no longer wt2wt this test since the default serializer
16221 ## will normalize all categories to serialize on their own line.
16222 ## This wikitext usage is going to be fairly uncommon in production and
16223 ## selser will take care of preserving formatting in those scenarios.
16225 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16229 *a [[Category:Foo]]
16231 <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>
16234 # This test also demonstrates because of newline+category tunneling
16235 # through the list hander, template wrapping doesn't expand to the
16236 # containing list when the list item swallows the category.
16238 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16243 <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
16244 </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>
16248 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16252 {{echo|[[Category:Foo]]
16256 <ul><li>a</li></ul>
16258 <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">
16259 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16260 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16264 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16268 [[Category:Bar]]<!--boo1--> <!--boo2-->
16269 [[Category:Baz]]<!--boo3--> <!--boo4-->
16271 <ul><li>a</li></ul>
16273 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16274 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16278 Categories and newlines: should behave properly with linkprefix (T87753)
16293 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16294 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16298 No regressions on internal links following category (T174639)
16300 parsoid=wt2html,html2html
16302 [[Category:Foo]]<div>a
16307 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16310 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16312 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16315 # Note that Parsoid differs slightly from PHP due to T175421
16317 11. Special case where only newlines separate links (T175416)
16319 parsoid=wt2html,html2html
16323 [[Foo]][[es:Alimento]]
16328 <a href="/wiki/Foo" title="Foo">Foo</a>
16329 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16332 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16334 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16336 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16340 Category links with multiple namespaces
16342 [[Category:Project:Foo]]
16344 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16348 Parsoid: Serialize link to category page with colon escape
16354 [[:Category:Foo|Bar]]
16357 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16358 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16362 # We used to, but no longer wt2wt this test since the default serializer
16363 # will normalize all categories to serialize on their own line.
16364 # This wikitext usage is going to be fairly uncommon in production and
16365 # selser will take care of preventing whitespace insertion if this
16366 # occurs in an article.
16368 # html2html disabled for the same reason (whitespace insertion between
16371 # html2wt disabled because it localizes the "Category" namespace.
16373 Link prefix/suffixes aren't applied to category links
16383 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16387 Link prefix/suffixes aren't applied to language links
16397 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16401 Parsoid: Serialize link to file page with colon escape
16407 [[:File:Foo.png|Bar]]
16410 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16411 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16416 Parsoid: Serialize a genuine category link without colon escape
16421 [[Category:Foo|Bar]]
16423 <link rel="mw:PageProp/Category" href="./Category:Foo">
16424 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16428 Normalize hrefs properly before testing for invalid link targets (T72894)
16432 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16434 [[Category:Toxine bactérienne]]
16438 Parsoid: Defaultsort
16440 {{DEFAULTSORT:Foo}}
16442 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16445 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16446 # But, this is a limitation of our representation and is documented in
16447 # TemplateHandler.js in processSpecialMagicWord
16449 Parsoid: Defaultsort (template-generated)
16451 {{{{echo|DEFAULTSORT}}:Foo}}
16453 <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"}]]}'/>
16457 ### Inter-language links
16460 Interlanguage links
16468 es:Alimento fr:Nourriture zh:食品
16470 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16471 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16472 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16476 Duplicate interlanguage links (T26502)
16487 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16488 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16489 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16490 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16497 Basic section headings
16504 ===Smaller headline===
16507 <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>
16510 <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>
16513 <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>
16519 Section headings with TOC
16522 ===Subheadline 1===
16523 =====Skipping a level=====
16524 ======Skipping a level======
16528 ===Another headline===
16530 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16532 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16534 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16536 <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>
16538 <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>
16545 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16547 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16553 <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>
16554 <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>
16555 <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>
16556 <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>
16557 <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>
16560 <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>
16565 TOC anchors don't collide
16573 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16575 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16576 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16577 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16578 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16582 <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>
16583 <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>
16584 <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>
16585 <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>
16589 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16590 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16592 Handling of sections up to level 6 and beyond
16597 ==Level 2 Heading==
16598 ===Level 3 Heading===
16599 ====Level 4 Heading====
16600 =====Level 5 Heading=====
16601 ======Level 6 Heading======
16602 =======Level 7 Heading=======
16603 ========Level 8 Heading========
16604 =========Level 9 Heading=========
16605 ==========Level 10 Heading==========
16607 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16609 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16611 <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>
16613 <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>
16615 <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>
16617 <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>
16619 <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>
16620 <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>
16621 <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>
16622 <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>
16623 <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>
16637 <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>
16638 <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>
16639 <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>
16640 <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>
16641 <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>
16642 <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>
16643 <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>
16644 <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>
16645 <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>
16646 <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>
16649 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16650 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16651 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16652 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16653 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16654 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16655 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16656 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16657 <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>
16658 <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>
16662 TOC regression (T11764)
16666 ====title 1.1.1====
16671 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16673 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16675 <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>
16677 <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>
16680 <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>
16683 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16685 <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>
16691 <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>
16692 <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>
16693 <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>
16694 <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>
16695 <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>
16696 <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>
16701 TOC for heading containing <span id="..."></span> (T96153)
16704 ==<span id="old-anchor"></span>New title==
16706 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16708 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16712 <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>
16717 TOC with wgMaxTocLevel=3 (T8204)
16723 ====title 1.1.1====
16728 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16730 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16732 <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>
16733 <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>
16736 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16738 <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>
16744 <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>
16745 <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>
16746 <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>
16747 <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>
16748 <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>
16749 <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>
16754 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16760 ====Section 1.1.1====
16761 ====Section 1.1.1.1====
16764 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16766 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16768 <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>
16771 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16775 <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>
16776 <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>
16777 <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>
16778 <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>
16779 <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>
16785 Resolving duplicate section names
16790 <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>
16791 <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>
16796 Resolving duplicate section names with differing case (T12721)
16801 <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>
16802 <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>
16814 Template with sections, __NOTOC__
16821 <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>
16822 <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>
16823 <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>
16824 <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>
16829 __NOEDITSECTION__ keyword
16835 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16836 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16841 Link inside a section heading
16843 ==Section with a [[Main Page|link]] in it==
16845 <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>
16850 TOC regression (T14077)
16857 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16859 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16861 <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>
16864 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16868 <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>
16869 <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>
16870 <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>
16875 T3219 URL next to image (good)
16877 http://example.com [[File:Foobar.jpg]]
16879 <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>
16882 <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>
16885 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16887 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16889 parsoid=wt2html,html2html
16892 The line above must have a trailing space!
16895 But just in case it doesn't...
16897 <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>
16898 <p>The line above must have a trailing space!
16900 <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>
16901 <p>But just in case it doesn't...
16904 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16905 <p>The line above must have a trailing space!</p>
16906 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16908 <p>But just in case it doesn't...</p>
16912 Header with special characters (T27462)
16914 The tooltips shall not show entities to the user (ie. be double escaped)
16931 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16933 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16935 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16936 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16937 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16938 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16939 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16943 <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>
16946 <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>
16949 <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>
16952 <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>
16955 <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>
16959 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
16961 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
16964 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
16967 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
16970 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
16973 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
16978 Header with space, plus and underscore as entity
16980 Id should not contain + for spaces
16982 ==Space between Text==
16985 ==Space-Entity between Text==
16988 ==Plus+between+Text==
16991 ==Plus-Entity+between+Text==
16994 ==Underscore_between_Text==
16997 ==Underscore-Entity_between_Text==
17000 [[#Space between Text]]
17001 [[#Space-Entity between Text]]
17002 [[#Plus+between+Text]]
17003 [[#Plus-Entity+between+Text]]
17004 [[#Underscore_between_Text]]
17005 [[#Underscore-Entity_between_Text]]
17007 <p>Id should not contain + for spaces
17009 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17011 <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>
17012 <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>
17013 <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>
17014 <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>
17015 <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>
17016 <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>
17020 <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>
17023 <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>
17026 <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>
17029 <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>
17032 <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>
17035 <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>
17037 </p><p><a href="#Space_between_Text">#Space between Text</a>
17038 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17039 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17040 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17041 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17042 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17045 <p>Id should not contain + for spaces</p>
17047 <h2 id="Space_between_Text">Space between Text</h2>
17050 <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>
17053 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17056 <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>
17059 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17062 <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>
17065 <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>
17066 <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>
17067 <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>
17068 <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>
17069 <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>
17070 <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>
17073 # Parsoid html2wt disabled because it adds padding spaces around =
17075 Headers with excess '=' characters
17076 (Are similar tests necessary beyond the 1st level?)
17078 parsoid=wt2html,wt2wt,html2html
17082 =''italic'' heading==
17083 ==''italic'' heading=
17085 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17087 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17088 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17089 <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>
17090 <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>
17094 <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>
17095 <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>
17096 <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>
17097 <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>
17100 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17101 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17102 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17103 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17107 HTML headers vs TOC (T25393)
17108 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17120 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17122 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17124 <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>
17125 <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>
17128 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17130 <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>
17131 <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>
17137 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17138 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17139 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17140 <h1><span class="mw-headline" id="Header_2">Header 2
17142 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17143 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17146 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17147 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17148 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17150 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17152 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17153 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17154 <meta property="mw:PageProp/noeditsection"/>
17158 Single-line or multiline-comments can follow headings
17160 parsoid=wt2html,wt2wt
17168 <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>
17169 <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>
17170 <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>
17173 <h2 id="foo">foo</h2><!---->
17174 <h2 id="bar">bar</h2><!--c1-->
17175 <h2 id="baz">baz</h2><!--
17181 T3219 URL next to image (broken)
17183 http://example.com[[File:Foobar.jpg]]
17185 <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>
17188 <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>
17192 T3186 news: in the middle of text
17194 http://en.wikinews.org/wiki/Wikinews:Workplace
17196 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17202 Namespaced link must have a title
17211 Namespaced link must have a title (bad fragment version)
17213 [[Project:#fragment]]
17215 <p>[[Project:#fragment]]
17221 ### HTML tags and HTML attributes
17225 div with no attributes
17227 <div>HTML rocks</div>
17229 <div>HTML rocks</div>
17234 div with double-quoted attribute
17236 <div id="rock">HTML rocks</div>
17238 <div id="rock">HTML rocks</div>
17243 div with single-quoted attribute
17245 <div id='rock'>HTML rocks</div>
17247 <div id="rock">HTML rocks</div>
17252 div with unquoted attribute
17254 <div id=rock>HTML rocks</div>
17256 <div id="rock">HTML rocks</div>
17261 div with illegal double attributes
17263 <div id="a" id="b">HTML rocks</div>
17265 <div id="b">HTML rocks</div>
17270 div with empty attribute value, space before equals
17272 parsoid=wt2html,html2html
17274 <div class =>HTML rocks</div>
17276 <div class="">HTML rocks</div>
17279 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17283 div with multiple empty attribute values
17285 wgFragmentMode=[ 'html5', 'legacy' ]
17287 parsoid=wt2html,html2html
17289 <div id= title=>HTML rocks</div>
17291 <div id="title=">HTML rocks</div>
17294 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17297 # FIXME Parsoid doesn't actually match PHP here.
17298 # Probably we should use the synthetic <foo /> or <indicator>
17299 # extensions for this test, which are enabled when running parser tests.
17301 Extension tag in attribute value
17303 <span title="<translate>123</translate>">ok</span>
17304 !! html/php+disabled
17305 <p><span title="<translate>123</translate>">ok</span>
17308 <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>
17312 table with multiple empty attribute values
17314 parsoid=wt2html,html2html
17320 <table title="id=">
17326 <table title="id=">
17327 <tbody><tr><td>hi</td></tr>
17332 div with braces in attribute value
17334 <div title="{}">Foo</div>
17336 <div title="{}">Foo</div>
17339 <div title="{}">Foo</div>
17343 div with empty attribute value, no space before equals
17345 parsoid=wt2html,html2html
17347 <div class=>HTML rocks</div>
17349 <div class="">HTML rocks</div>
17352 <div class="">HTML rocks</div>
17356 HTML multiple attributes correction
17358 <p class="error" class="awesome">Awesome!</p>
17360 <p class="awesome">Awesome!</p>
17365 Table multiple attributes correction
17368 !+ class="error" class="awesome"|status
17373 <th class="awesome">status
17381 <DIV ID="x">HTML ROCKS</DIV>
17383 <div id="x">HTML ROCKS</div>
17388 Non-ASCII pseudo-tags are rendered as text
17397 Pseudo-tag with URL 'name' renders as url link
17399 <http://example.com/>
17401 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17406 text with amp in the middle of nowhere
17410 <p>Remember AT&T?
17415 text with character entity: eacute
17417 I always thought é was a cute letter.
17419 <p>I always thought é was a cute letter.
17424 text with entity-escaped character entity-like string: eacute
17426 I always thought &eacute; was a cute letter.
17428 <p>I always thought &eacute; was a cute letter.
17433 text with undefined character entity: xacute
17435 I always thought &xacute; was a cute letter.
17437 <p>I always thought &xacute; was a cute letter.
17444 <data value="5">five</data>
17445 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17446 <mark>This highlighted text</mark>
17448 <p><data value="5">five</data>
17449 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17450 <mark>This highlighted text</mark>
17455 HTML tag with leading space is parsed as text
17459 <p>< div>foo< /div>
17463 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17464 ## the HTML5 parsing spec.
17466 Element with broken attribute syntax
17470 <div style=" style="123">hi</div>
17473 <div style="123">hi</div>
17477 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17478 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17482 ### Nesting tests (see T43545, T52604, T53081)
17485 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17486 # Note that html2wt is considerably more difficult if we use <b> in
17487 # the test case, instead of <small>
17489 Ensure that HTML adoption agency algorithm is properly implemented.
17491 <small>X<small>Y</small>Z</small>
17493 <p><small>X<small>Y</small>Z</small>
17497 # This was T43545 in the PHP parser.
17501 <kbd>X<kbd>Y</kbd>Z</kbd>
17503 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17507 # The following cases were T53081 in the PHP parser.
17508 # Note that there are some other nestable tags (b, i, etc) which are
17509 # not covered; see T53081 for discussion.
17514 <em>X<em>Y</em>Z</em>
17516 <p><em>X<em>Y</em>Z</em>
17521 Nesting of <strong>
17523 <strong>X<strong>Y</strong>Z</strong>
17525 <p><strong>X<strong>Y</strong>Z</strong>
17534 <p><q>X<q>Y</q>Z</q>
17541 <ruby>X<ruby>Y</ruby>Z</ruby>
17543 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17550 <bdo>X<bdo>Y</bdo>Z</bdo>
17552 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17564 [[Media:Foobar.jpg]]
17565 [[Media:Video.ogv]]
17566 [[:Media:Video.ogv]]
17568 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17569 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17570 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17573 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17574 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17575 <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>
17579 Media link with text
17581 [[Media:Foobar.jpg|A neat file to look at]]
17583 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17586 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17589 # FIXME: this is still bad HTML tag nesting
17590 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17591 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17593 Media link with nasty text
17595 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17597 <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>
17600 <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>
17602 <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>
17607 Media link to nonexistent file (T3702)
17609 [[Media:No such.jpg]]
17610 [[Media:No_such file.jpg]]
17612 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17613 <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>
17616 <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>
17617 <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>
17621 Image link to nonexistent file (T3850 - good)
17623 [[File:No_such.jpg]]
17625 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17628 <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>
17632 :Image link to nonexistent file (T3850 - bad)
17634 [[:Image:No such.jpg]]
17636 <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>
17639 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17643 Character reference normalization in link text (T3938)
17645 [[Main Page|this&that]]
17647 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17654 Test for unicode normalization
17656 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17660 (T21451) Links should refer to the normalized form.
17668 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17669 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17670 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17671 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17672 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17677 Empty attribute crash test (T4067)
17679 <font color="">foo</font>
17681 <p><font color="">foo</font>
17686 Empty attribute crash test single-quotes (T4067)
17688 <font color=''>foo</font>
17690 <p><font color="">foo</font>
17695 Attribute test: equals, then nothing
17697 parsoid=wt2html,html2html
17699 <font color=>foo</font>
17701 <p><font color="">foo</font>
17704 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17708 Attribute test: unquoted value
17710 parsoid=wt2html,html2html
17712 <font color=x>foo</font>
17714 <p><font color="x">foo</font>
17717 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17721 Attribute test: unquoted but illegal value (hash)
17723 <font color=#x>foo</font>
17725 <p><font color="#x">foo</font>
17729 # Parsoid does not serialize to empty attribute syntax,
17730 # so wt2wt and html2wt cases are skipped
17732 Attribute test: no value (T54330)
17734 parsoid=wt2html,html2html
17736 <font color>foo</font>
17738 <p><font color="">foo</font>
17741 <p><font color="">foo</font></p>
17745 T4095: link with three closing brackets
17749 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17752 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17756 T4095: link with pipe and three closing brackets
17758 [[Main Page|link]]]
17760 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17763 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17767 T4095: link with pipe and three closing brackets, version 2
17769 [[Main Page|[http://example.com/]]]
17771 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17774 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17783 Template:Dangerous attribute
17785 " onmouseover="alert(document.cookie)
17789 Template:Dangerous style attribute
17791 border-size: expression(alert(document.cookie))
17797 <div style="float: right; {{{1}}}">Magic div</div>
17801 T4304: HTML attribute safety (safe template; regression T4309)
17803 <div title="{{test}}"></div>
17805 <div title="This is a test template"></div>
17808 <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>
17811 # Parsoid has enough context to handle this case
17813 T4304: HTML attribute safety (dangerous template; 2309)
17815 <div title="{{dangerous attribute}}"></div>
17817 <div title=""></div>
17820 <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>
17824 T4304: HTML attribute safety (dangerous style template; 2309)
17826 <div style="{{dangerous style attribute}}"></div>
17828 <div style="/* insecure input */"></div>
17831 <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>
17835 T4304: HTML attribute safety (safe parameter; 2309)
17837 {{div style|width: 200px}}
17839 <div style="float: right; width: 200px">Magic div</div>
17842 <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>
17846 T4304: HTML attribute safety (unsafe parameter; 2309)
17848 {{div style|width: expression(alert(document.cookie))}}
17850 <div style="/* insecure input */">Magic div</div>
17853 <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>
17856 ## Parsoid output here differs; needs investigation.
17858 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17860 {{div style|"><script>alert(document.cookie)</script>}}
17862 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17866 ## Parsoid output here differs; needs investigation.
17868 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17870 {{div style|" ><script>alert(document.cookie)</script>}}
17872 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17877 T4304: HTML attribute safety (link)
17879 <div title="[[Main Page]]"></div>
17881 <div title="[[Main Page]]"></div>
17884 <div title="[[Main Page]]"></div>
17888 T4304: HTML attribute safety (italics)
17890 <div title="''foobar''"></div>
17892 <div title="''foobar''"></div>
17897 T4304: HTML attribute safety (bold)
17899 <div title="'''foobar'''"></div>
17901 <div title="'''foobar'''"></div>
17906 T4304: HTML attribute safety (ISBN)
17908 <div title="ISBN 1234567890"></div>
17910 <div title="ISBN 1234567890"></div>
17915 T4304: HTML attribute safety (RFC)
17917 <div title="RFC 1234"></div>
17919 <div title="RFC 1234"></div>
17924 T4304: HTML attribute safety (PMID)
17926 <div title="PMID 1234567890"></div>
17928 <div title="PMID 1234567890"></div>
17933 T4304: HTML attribute safety (web link)
17935 <div title="http://example.com/"></div>
17937 <div title="http://example.com/"></div>
17942 T4304: HTML attribute safety (named web link)
17944 <div title="[http://example.com/ link]"></div>
17946 <div title="[http://example.com/ link]"></div>
17949 <div title="[http://example.com/ link]"></div>
17953 T5244: HTML attribute safety (extension; safe)
17955 <div style="<nowiki>background:blue</nowiki>"></div>
17957 <div style="background:blue"></div>
17960 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17964 T5244: HTML attribute safety (extension; unsafe)
17966 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17968 <div style="/* insecure input */"></div>
17971 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17974 # More MSIE fun discovered by Tom Gilder
17977 MSIE CSS safety test: spurious slash
17979 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17981 <div style="/* insecure input */">evil</div>
17984 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
17988 MSIE CSS safety test: hex code
17990 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
17992 <div style="/* insecure input */">evil</div>
17995 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
17999 MSIE CSS safety test: comment in url
18001 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18003 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18006 <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>
18010 MSIE CSS safety test: comment in expression
18012 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18014 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18017 <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>
18021 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18023 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18025 <p style="/* invalid control char */">A</p>
18028 <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>
18032 MSIE 6 CSS safety test: Fullwidth (T57332)
18034 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18035 <div style="top:EXPRESSION(alert())">B</div>
18037 <p style="/* insecure input */">A</p>
18038 <div style="/* insecure input */">B</div>
18041 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18042 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18046 MSIE 6 CSS safety test: IPA extensions (T57332)
18048 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18049 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18051 <div style="/* insecure input */">A</div>
18052 <p style="/* insecure input */">B</p>
18055 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18056 <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>
18060 MSIE 6 CSS safety test: sup/sub script (T57332)
18062 <div style="background-image:url⁽javascript:alert())">A</div>
18063 <div style="background-image:url₍javascript:alert())">B</div>
18064 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18066 <div style="/* insecure input */">A</div>
18067 <div style="/* insecure input */">B</div>
18068 <p style="/* insecure input */">C</p>
18071 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18072 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18073 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18079 parsoid=wt2html,html2html
18082 title="data:text/html,<img src=1 onerror=alert(1)>"
18083 style="-o-link:attr(title);-o-link-source:current">X</div>
18085 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18088 <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>
18092 MSIE 6 CSS safety test: Repetition markers (T57332)
18094 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18095 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18096 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18097 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18098 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18099 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18100 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18102 <p style="/* insecure input */">A</p>
18103 <p style="/* insecure input */">B</p>
18104 <p style="/* insecure input */">C</p>
18105 <p style="/* insecure input */">D</p>
18106 <p style="/* insecure input */">E</p>
18107 <p style="/* insecure input */">F</p>
18108 <p style="/* insecure input */">G</p>
18111 <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>
18112 <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>
18113 <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>
18114 <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>
18115 <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>
18116 <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>
18117 <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>
18121 Table attribute legitimate extension
18124 !+ style="<nowiki>color:blue</nowiki>"|status
18129 <th style="color:blue">status
18135 Table attribute safety
18138 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18143 <th style="/* insecure input */">status
18149 CSS line continuation 1
18151 <div style="background-image: u\ rl(test.jpg);"></div>
18153 <div style="/* insecure input */"></div>
18158 CSS line continuation 2
18160 <div style="background-image: u\ rl(test.jpg); "></div>
18162 <div style="/* invalid control char */"></div>
18173 Expansion of multi-line templates in attribute values (T8255)
18175 <div style="background: {{identity|#00FF00}}">-</div>
18177 <div style="background: #00FF00">-</div>
18182 Expansion of multi-line templates in attribute values (T8255 sanity check)
18184 <div style="background:
18187 <div style="background: #00FF00">-</div>
18190 <div style="background:
18195 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18197 <div style="background: #00FF00">-</div>
18199 <div style="background: #00FF00">-</div>
18204 Tags which are hidden from tidiers cannot pass through the Sanitizer
18206 <mw:toc><script>alert();</script></mw:toc>
18208 <p><mw:toc><script>alert();</script></mw:toc>
18213 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18217 Parser hook: empty input
18228 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18231 ## Don't expect parsoid to rt this form.
18233 Parser hook: empty input using terminated empty elements
18235 parsoid=wt2html,html2html
18246 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18250 Parser hook: empty input using terminated empty elements (space before)
18261 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18265 Parser hook: basic input
18276 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18279 ## Don't expect parsoid to rt this form.
18281 Parser hook: case insensitive
18283 parsoid=wt2html,html2html
18294 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18297 ## Don't expect parsoid to rt this form.
18299 Parser hook: case insensitive, redux
18301 parsoid=wt2html,html2html
18312 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18316 Parser hook: nested tags
18318 <tag><tag></tag></tag>
18327 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18331 Parser hook: basic arguments
18333 <tag width="200" height="100" depth="50" square=""></tag>
18346 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18349 ## Don't expect parsoid to rt this form.
18351 Parser hook: basic arguments, variations
18353 parsoid=wt2html,html2html
18355 <tag width=200 height = "100" depth = '50' square></tag>
18368 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18372 Parser hook: argument containing a forward slash (T7344)
18374 <tag filename="/tmp/bla"></tag>
18379 'filename' => '/tmp/bla',
18384 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18387 ## Don't expect parsoid to rt this form.
18389 Parser hook: empty input using terminated empty elements (T4374)
18391 parsoid=wt2html,html2html
18403 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18406 ## </tag> should be output literally since there is no matching tag that begins it
18407 ## Don't expect parsoid to rt this form.
18409 Parser hook: basic arguments using terminated empty elements (T4374)
18413 <tag width=200 height = "100" depth = '50' square/>
18430 <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
18434 ## Don't expect parsoid to rt this form.
18436 Parser hook: Don't allow unclosed extension tags
18442 this is a '''test'''
18444 <p>test <tag>123
18445 </p><p>this is a <b>test</b>
18448 <p>test <tag>123</p>
18450 <p>this is a <b>test</b></p>
18454 Parser hook: horizontal rule inside extension tag that outputs <pre>
18475 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18479 Parser hook: static parser hook not inside a comment
18481 <statictag>hello, world</statictag>
18483 <statictag action="flush" />
18489 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18490 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18494 Parser hook: static parser hook inside a comment
18496 <!-- <statictag>hello, world</statictag> -->
18497 <statictag action="flush" />
18502 <!-- <statictag>hello, world</statictag> -->
18503 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18506 # Nested template calls; this case was broken by Parser.php rev 1.506,
18510 Template:One-parameter
18512 (My parameter is: {{{1}}})
18516 Template:Map-one-parameter
18518 {{{{{1}}}|{{{2}}}}}
18522 Nested template calls
18524 {{Map-one-parameter|One-parameter|param}}
18526 <p>(My parameter is: param)
18535 # Remex wraps empty tag runs with p-tags.
18536 # Parsoid strips them out during p-wrapping.
18538 Sanitizer: Closing of open tags
18540 <s></s><table></table>
18542 <p><s></s></p><table></table>
18544 <s></s><table></table>
18548 Sanitizer: Closing of open but not closed tags
18557 Sanitizer: Closing of closed but not open tags
18563 <p class="mw-empty-elt">
18569 Sanitizer: Closing of closed but not open table tags
18573 Table not started</td></tr></table>
18575 <p>Table not started
18580 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18582 wgFragmentMode=[ 'html5', 'legacy' ]
18584 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18586 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18589 <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>
18593 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18595 wgFragmentMode=[ 'legacy' ]
18597 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18599 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18603 # In HTML5, the restrictions are that id must contain at least one character,
18604 # and must not contain any space characters.
18606 Sanitizer: Validating the contents of the id attribute (T6515)
18610 <br id="" /><br id="a space" />
18615 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18617 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18621 <br id="foo" /><br id="foo" />
18623 Something need to be done. foo-2 ?
18627 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18630 <meta itemprop="hello" content="world">
18631 <meta http-equiv="refresh" content="5">
18632 <meta itemprop="hello" http-equiv="refresh" content="5">
18633 <link itemprop="hello" href="{{SERVER}}">
18634 <link rel="stylesheet" href="{{SERVER}}">
18635 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18639 <p> <meta itemprop="hello" content="world" />
18640 <meta http-equiv="refresh" content="5">
18641 <meta itemprop="hello" content="5" />
18642 <link itemprop="hello" href="http://example.org" />
18643 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18644 <link itemprop="hello" href="http://example.org" />
18651 Sanitizer: Strip comments from CSS attributes
18653 parsoid=wt2html,wt2wt
18655 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18657 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18660 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18664 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18666 [[meatball:Soft"Security]]
18668 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18671 <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>
18675 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18677 [[meatball:Foo<Bar]]
18678 [[meatball:Foo>Bar]]
18679 [[meatball:Foo<bar]]
18680 [[meatball:Foo>bar]]
18682 <p>[[meatball:Foo<Bar]]
18683 [[meatball:Foo>Bar]]
18684 [[meatball:Foo<bar]]
18685 [[meatball:Foo>bar]]
18688 <p>[[meatball:Foo<Bar]]
18689 [[meatball:Foo>Bar]]
18690 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18691 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18695 Language converter: output gets cut off unexpectedly (T7757)
18699 this bit is safe: }-
18701 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18703 then we get cut off here: }-
18705 all additional text is vanished
18707 <p>this bit is safe: }-
18708 </p><p>but if we add a conversion instance: xxx
18709 </p><p>then we get cut off here: }-
18710 </p><p>all additional text is vanished
18713 <p>this bit is safe: }-</p>
18714 <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>
18715 <p>then we get cut off here: }-</p>
18716 <p>all additional text is vanished</p>
18720 Language converter glossary rules inside attributes (T119158)
18722 language=sr variant=sr-el
18724 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18726 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18729 </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>
18732 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18734 <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>
18738 Self closed html pairs (T7487)
18740 <center><font id="bug" />Centered text</center>
18741 <div><font id="bug2" />In div text</div>
18743 <center><font id="bug"></font>Centered text</center>
18744 <div><font id="bug2"></font>In div text</div>
18748 Punctuation: nbsp before exclamation
18752 <p>C'est grave !
18757 Punctuation: CSS !important (T13874)
18759 <div style="width:50% !important">important</div>
18761 <div style="width:50% !important">important</div>
18766 Punctuation: CSS ! important (T13874; with space after)
18768 <div style="width:50% ! important">important</div>
18770 <div style="width:50% ! important">important</div>
18775 HTML bullet list, closed tags (T7497)
18788 <ul data-parsoid='{"stx":"html"}'>
18789 <li data-parsoid='{"stx":"html"}'>One</li>
18790 <li data-parsoid='{"stx":"html"}'>Two</li>
18796 HTML bullet list, unclosed tags (T7497)
18808 <ul data-parsoid='{"stx":"html"}'>
18809 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18810 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18816 HTML ordered list, closed tags (T7497)
18829 <ol data-parsoid='{"stx":"html"}'>
18830 <li data-parsoid='{"stx":"html"}'>One</li>
18831 <li data-parsoid='{"stx":"html"}'>Two</li>
18837 HTML ordered list, unclosed tags (T7497)
18850 <ol data-parsoid='{"stx":"html"}'>
18851 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18852 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18858 HTML nested bullet list, closed tags (T7497)
18881 <ul data-parsoid='{"stx":"html"}'>
18882 <li data-parsoid='{"stx":"html"}'>One</li>
18883 <li data-parsoid='{"stx":"html"}'>Two:
18884 <ul data-parsoid='{"stx":"html"}'>
18885 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18886 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18893 HTML nested bullet list, open tags (T7497)
18915 HTML nested ordered list, closed tags (T7497)
18940 HTML nested ordered list, open tags (T7497)
18977 HTML ordered list item with parameters oddity
18979 <ol><li id="fragment">One</li>
18982 <ol><li id="fragment">One</li>
18987 # parsoid doesn't explicitly mark autonumbered links, see T55505
18989 T7918: autonumbering
18991 [http://first/] [http://second] [ftp://ftp]
18995 [mailto:enclosed@mail.tld With target]
18997 [mailto:enclosed@mail.tld]
18999 mailto:inline@mail.tld
19001 <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>
19002 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19003 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19004 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19005 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19008 <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>
19009 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19010 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19011 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19012 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19017 # Security and HTML correctness
19018 # From Nick Jenkins' fuzz testing
19022 Fuzz testing: Parser13
19036 # Note that Parsoid output differs from the PHP parser here: the PHP
19037 # parser breaks the URL for the magic word, while in Parsoid the URL
19038 # production takes precedence.
19040 Fuzz testing: Parser14
19045 <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>
19046 http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
19048 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19054 <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>
19055 http://</p><div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
19057 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19061 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19062 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19066 Fuzz testing: Parser14-table
19068 parsoid=wt2html,html2html
19073 <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>
19074 <table style="__TOC__">
19079 <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>
19080 <table style="__TOC__">
19087 <table style="__TOC__"></table>
19090 # Known to produce bogus xml (extra </td>)
19091 # Don't add the html/php section since it generates broken HTML
19093 Fuzz testing: Parser16
19110 Fuzz testing: Parser21
19113 !irc://{{ftp://a" onmouseover="alert('hello world');"
19118 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19128 Fuzz testing: Parser22
19130 http://===r:::https://b
19134 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19142 # Known to produce bad XML for now
19144 Fuzz testing: Parser24
19151 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19152 <br style="onmouseover='alert(document.cookie);' " />
19154 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19159 <u class="|">}}}} >
19160 <br style="onmouseover='alert(document.cookie);'" />
19162 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19170 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19171 <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>"}'/>}}}} >
19172 <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}'>
19176 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19179 # Note: the current result listed for this is not what the original one was,
19180 # but the original bug was JavaScript injection, which is fixed in any case.
19181 # It's not clear that the original result listed was any more correct than the
19182 # current one. Original result:
19185 # <li class="||">
19186 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19188 Fuzz testing: Parser25 (T8055)
19194 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19196 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19199 <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"]}'>
19200 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19204 Fuzz testing: URL adjacent extension (with space, clean)
19206 http://example.com <nowiki>junk</nowiki>
19208 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19211 <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>
19215 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19217 http://example.com<nowiki>junk</nowiki>
19219 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19222 <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>
19226 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19228 http://example.com<pre>junk</pre>
19230 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19233 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19235 <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>
19239 Fuzz testing: image with bogus manual thumbnail
19241 [[Image:foobar.jpg|thumbnail= ]]
19243 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19246 <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>
19249 # Parsoid will emit the newline literally in wt2wt; see next test case.
19251 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19255 <pre dir=" "></pre>
19257 <pre dir=" "></pre>
19260 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19261 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19265 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19269 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19270 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19280 Templates in extension attributes are not expanded
19282 <pre dir="{{echo|ltr}}"></pre>
19284 <pre dir="{{echo|ltr}}"></pre>
19287 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19291 Parsing optional HTML elements (T8171)
19296 <td> Some tabular data</td>
19297 <td> More tabular data ...
19298 <td> And yet som tabular data</td>
19304 <td> Some tabular data</td>
19305 <td> More tabular data ...
19306 </td><td> And yet som tabular data</td>
19313 Correct handling of <td>, <tr> (T8171)
19318 <td> Some tabular data</td>
19319 <td> More tabular data ...</td>
19320 <td> And yet som tabular data</td>
19326 <td> Some tabular data</td>
19327 <td> More tabular data ...</td>
19328 <td> And yet som tabular data</td>
19336 Parsing crashing regression (fr:JavaScript)
19340 <p></body></x>
19345 Inline wiki vs wiki block nesting
19351 <p><b>Bold paragraph</b>
19352 </p><p>New wiki paragraph
19356 # FIXME: The current php output is documented
19357 # and desired output is the parsoid target.
19359 Inline HTML vs wiki block nesting
19365 <p><b>Bold paragraph
19366 </p><p>New wiki paragraph</b>
19369 <p><b>Bold paragraph</b>
19370 </p><p>New wiki paragraph
19374 # Original result was this:
19375 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19377 # While that might be marginally more intuitive, maybe, the six-apostrophe
19378 # construct is clearly pathological and the result stated here (which is what
19379 # the parser actually does) is about as reasonable as anything.
19381 Mixing markup for italics and bold
19384 '''bold''''''bold''bolditalics'''''
19386 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19394 Article for special page transclusion test
19398 Special page transclusion
19401 {{Special:Prefixindex/Xyzzyx}}
19403 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19409 Special page transclusion twice (T7021)
19412 {{Special:Prefixindex/Xyzzyx}}
19413 {{Special:Prefixindex/Xyzzyx}}
19415 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19417 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19423 Transclusion of default MediaWiki message
19425 {{MediaWiki:Mainpage}}
19432 Transclusion of nonexistent MediaWiki message
19434 {{MediaWiki:Mainpagexxx}}
19436 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19441 Transclusion of MediaWiki message with underscore
19443 {{MediaWiki:history_short}}
19450 Transclusion of MediaWiki message with space
19452 {{MediaWiki:history short}}
19459 Invalid header with following text
19469 Section extraction test (section 0)
19489 Section extraction test (section 1)
19511 Section extraction test (section 2)
19532 Section extraction test (section 3)
19552 Section extraction test (section 4)
19576 Section extraction test (section 5)
19596 Section extraction test (section 6)
19617 Section extraction test (section 7)
19637 Section extraction test (section 8)
19657 Section extraction test (section 9)
19678 Section extraction test (section 10)
19698 Section extraction test (nonexistent section 11)
19717 Section extraction test with bogus heading (section 1)
19722 ==bogus== not a legal section
19726 ==bogus== not a legal section
19730 Section extraction test with bogus heading (section 2)
19735 ==bogus== not a legal section
19742 Section extraction test with comment after heading (section 1)
19754 Section extraction test with comment after heading (section 2)
19766 Section extraction test with bogus <nowiki> heading (section 1)
19771 ==bogus== <nowiki>not a legal section</nowiki>
19775 ==bogus== <nowiki>not a legal section</nowiki>
19779 Section extraction test with bogus <nowiki> heading (section 2)
19784 ==bogus== <nowiki>not a legal section</nowiki>
19790 # Formerly testing for T4587, now resolved by the use of unmarked sections
19791 # instead of respecting commented sections
19793 Section extraction prefixed by comment (section 1)
19804 Section extraction prefixed by comment (section 2)
19814 # Formerly testing for T4607, now resolved by the use of unmarked sections
19815 # instead of respecting HTML-style headings
19817 Section extraction, mixed wiki and html (section 1)
19833 Section extraction, mixed wiki and html (section 2)
19849 # Formerly testing for T5342
19851 Section extraction, heading surrounded by <noinclude>
19855 <noinclude>==unmarked==</noinclude>
19861 # Test behavior of T21910
19863 Sectiion with all-equals
19868 The line above must have a trailing space
19871 But just in case it doesn't...
19875 But just in case it doesn't...
19879 Section replacement test (section 0)
19910 Section replacement test (section 1)
19939 Section replacement test (section 2)
19969 Section replacement test (section 3)
20000 Section replacement test (section 4)
20027 Section replacement test (section 5)
20058 Section replacement test (section 6)
20088 Section replacement test (section 7)
20119 Section replacement test (section 8)
20150 Section replacement test (section 9)
20179 Section replacement test (section 10)
20209 Section replacement test with initial whitespace (T15728)
20213 Preformatted initial line
20217 Preformatted initial line
20224 Section extraction, heading followed by pre with 20 spaces (T8398)
20236 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20249 Section extraction, <pre> around bogus header (T12309)
20266 Section replacement, <pre> around bogus header (T12309)
20287 Handling of 
 in URLs
20291 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20294 <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>
20298 Handling of %0A in URLs
20302 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20305 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20308 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20310 5 quotes, code coverage +1 line
20320 # same html as previous, but wikitext adjusted to match parsoid html2wt
20321 # note that wt2html and html2html will put the <i> before the <b>
20323 5 quotes, code coverage +1 line w/ nowiki (1)
20325 parsoid=wt2wt,html2wt
20327 '''''<nowiki/>'''''
20332 <p><b><i></i></b></p>
20335 # same as previous, just swapping the <i> and <b>
20337 5 quotes, code coverage +1 line w/ nowiki (2)
20339 '''''<nowiki/>'''''
20344 <p><i><b></b></i></p>
20348 Special:Search page linking.
20352 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20357 {{!}} is a magic word
20359 {{!}} is a magic word there and {{!}} is still a magic word here
20360 | is not a magic word here but {{!}} is still a magic word here
20362 <p>| is a magic word there and | is still a magic word here
20363 | is not a magic word here but | is still a magic word here
20366 <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
20367 | 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>
20373 title=[[Parser test]]
20387 *{{SUBJECTPAGENAME}}
20388 *{{SUBJECTPAGENAMEE}}
20391 *{{NAMESPACENUMBER}}
20396 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20398 <ul><li>Parser test</li>
20399 <li>Parser_test</li>
20400 <li>Parser test</li>
20401 <li>Parser_test</li>
20402 <li>Parser test</li>
20403 <li>Parser_test</li>
20404 <li>Parser test</li>
20405 <li>Parser_test</li>
20406 <li>Parser test</li>
20407 <li>Parser_test</li>
20408 <li>Talk:Parser test</li>
20409 <li>Talk:Parser_test</li>
20410 <li>Parser test</li>
20411 <li>Parser_test</li>
20419 <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>
20422 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20425 Gallery with valid attributes
20427 <gallery type="123" summary="345">
20428 File:File:Foobar.jpg
20431 <ul class="gallery mw-gallery-traditional" type="123">
20432 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20433 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20434 <div class="gallerytext">
20440 <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"}}'>
20441 <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>
20445 ## Parsoid thinks the "centre" here is a property, not a caption.
20450 "modes": ["wt2html"],
20451 "nativeGallery": true
20459 image4 |300px| centre
20460 image5.svg| http://///////
20465 <ul class="gallery mw-gallery-traditional">
20466 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20467 <div class="thumb" style="height: 150px;">Image1.png</div>
20468 <div class="gallerytext">
20471 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20472 <div class="thumb" style="height: 150px;">Image2.gif</div>
20473 <div class="gallerytext">
20476 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20477 <div class="thumb" style="height: 150px;">Image3</div>
20478 <div class="gallerytext">
20481 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20482 <div class="thumb" style="height: 150px;">Image4</div>
20483 <div class="gallerytext">
20488 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20489 <div class="thumb" style="height: 150px;">Image5.svg</div>
20490 <div class="gallerytext">
20491 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20495 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20496 <div class="thumb" style="height: 150px;">* image6</div>
20497 <div class="gallerytext">
20503 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20504 <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>
20505 <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>
20506 <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>
20507 <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>
20508 <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>
20509 <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>
20514 Gallery (with options, html)
20517 "modes": ["wt2html", "html2html"],
20518 "nativeGallery": true
20521 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20522 File:Nonexistent.jpg|caption
20523 File:Nonexistent.jpg
20524 image:foobar.jpg|some '''caption''' [[Main Page]]
20526 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20529 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20530 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20531 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20532 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20533 <div class="gallerytext">
20538 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20539 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20540 <div class="gallerytext">
20543 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20544 <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>
20545 <div class="gallerytext">
20546 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20550 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20551 <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>
20552 <div class="gallerytext">
20555 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20556 <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>
20557 <div class="gallerytext">
20565 <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":{}}'>
20566 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20567 <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>
20568 <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>
20569 <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>
20570 <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>
20571 <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>
20576 Gallery (with options, extsrc)
20579 "nativeGallery": false
20582 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20583 File:Nonexistent.jpg|caption
20584 File:Nonexistent.jpg
20585 image:foobar.jpg|some '''caption''' [[Main Page]]
20587 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20590 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20591 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20592 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20593 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20594 <div class="gallerytext">
20599 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20600 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20601 <div class="gallerytext">
20604 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20605 <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>
20606 <div class="gallerytext">
20607 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20611 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20612 <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>
20613 <div class="gallerytext">
20616 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20617 <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>
20618 <div class="gallerytext">
20626 <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"}}'>
20627 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20628 <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>
20629 <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>
20630 <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>
20631 <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>
20632 <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>
20637 Gallery (without px units)
20639 <gallery widths="70" heights="40">
20643 <ul class="gallery mw-gallery-traditional">
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="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>
20646 <div class="gallerytext">
20652 <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"}}'>
20653 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
20658 Gallery (with invalid units)
20660 <gallery widths="70em" heights="40em">
20664 <ul class="gallery mw-gallery-traditional">
20665 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20666 <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>
20667 <div class="gallerytext">
20673 <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"}}'>
20674 <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>
20679 Gallery with link that has fragment
20682 "modes": ["wt2html", "html2html"],
20683 "nativeGallery": true
20687 image:foobar.jpg|link=Main_Page
20688 image:foobar.jpg|link=Main_Page#section
20689 image:foobar.jpg|link=Main Page#section|caption
20692 <ul class="gallery mw-gallery-traditional">
20693 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20694 <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>
20695 <div class="gallerytext">
20698 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20699 <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>
20700 <div class="gallerytext">
20703 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20704 <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>
20705 <div class="gallerytext">
20713 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20714 <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>
20715 <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>
20716 <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>
20720 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20722 Gallery with template inside caption
20725 "nativeGallery": true
20728 <gallery caption="{{echo|hi}}">
20729 File:Foobar.jpg|{{echo|ho}}
20732 <ul class="gallery mw-gallery-traditional">
20733 <li class='gallerycaption'>{{echo|hi}}</li>
20734 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20735 <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>
20736 <div class="gallerytext">
20744 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20745 <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>
20746 <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>
20751 Gallery with wikitext inside caption
20754 "nativeGallery": true
20758 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20759 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20762 <ul class="gallery mw-gallery-traditional">
20763 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20764 <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>
20765 <div class="gallerytext">
20766 <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>
20770 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20771 <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>
20772 <div class="gallerytext">
20773 <p>This is a test template
20780 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20781 <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>
20782 <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>
20787 Gallery (with showfilename option)
20790 "nativeGallery": true
20793 <gallery showfilename="">
20794 File:Nonexistent.jpg|caption
20795 File:Nonexistent.jpg
20796 File:Foobar.jpg|some '''caption''' [[Main Page]]
20800 <ul class="gallery mw-gallery-traditional">
20801 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20802 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20803 <div class="gallerytext">
20804 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20809 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20810 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20811 <div class="gallerytext">
20812 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20816 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20817 <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>
20818 <div class="gallerytext">
20819 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20820 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20824 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20825 <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>
20826 <div class="gallerytext">
20827 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20834 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20835 <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>
20836 <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>
20837 <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>
20838 <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>
20842 ## Should Parsoid be preserving these variations? See T151367
20844 Gallery (with namespace-less filenames)
20847 "modes": ["wt2html", "html2html"],
20848 "nativeGallery": true
20852 File:Nonexistent.jpg
20858 <ul class="gallery mw-gallery-traditional">
20859 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20860 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20861 <div class="gallerytext">
20864 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20865 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20866 <div class="gallerytext">
20869 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20870 <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>
20871 <div class="gallerytext">
20874 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20875 <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>
20876 <div class="gallerytext">
20882 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20883 <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>
20884 <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>
20885 <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>
20886 <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>
20891 Gallery override link with wikilink (T36852)
20894 "nativeGallery": true
20898 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20901 <ul class="gallery mw-gallery-traditional">
20902 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20903 <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>
20904 <div class="gallerytext">
20910 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20911 <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>
20916 Gallery override link with absolute external link (T36852)
20919 "nativeGallery": true
20923 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20926 <ul class="gallery mw-gallery-traditional">
20927 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20928 <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>
20929 <div class="gallerytext">
20935 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20936 <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>
20941 Gallery override link with absolute external link with LanguageConverter
20946 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20949 <ul class="gallery mw-gallery-traditional">
20950 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20951 <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>
20952 <div class="gallerytext">
20960 <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"}}'>
20961 <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>
20966 Gallery override link with malicious javascript (T36852)
20969 "modes": ["wt2html", "html2html"],
20970 "nativeGallery": true
20974 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20977 <ul class="gallery mw-gallery-traditional">
20978 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20979 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%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>
20980 <div class="gallerytext">
20986 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20987 <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>
20991 # Note that parsoid uses the invalid link as a caption, PHP does not.
20993 Gallery with invalid title as link (T45964)
20996 "modes": ["wt2html", "html2html"],
20997 "nativeGallery": true
21001 File:Foobar.jpg|link=<
21004 <ul class="gallery mw-gallery-traditional">
21005 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21006 <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>
21007 <div class="gallerytext">
21013 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21014 <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>
21019 Serialize gallery without attrs in data-mw
21022 "modes": ["html2wt"],
21023 "nativeGallery": true
21026 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21027 <li class="gallerycaption">123</li>
21028 <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>
21031 <gallery caption="123">
21037 Gallery with class and style attributes
21040 "nativeGallery": true
21043 <gallery class="center" style="text-align: center;">
21047 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21048 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21049 <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>
21050 <div class="gallerytext">
21056 <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":{}}'>
21057 <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>
21062 Gallery in slideshow mode
21065 "nativeGallery": true
21068 <gallery mode="slideshow" showthumbnails="">
21072 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21073 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21074 <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>
21075 <div class="gallerytext">
21081 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21082 <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>
21087 Serialize gallery image captions on a line
21090 "modes": ["html2wt"],
21091 "nativeGallery": true
21094 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21095 <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>
21096 <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>
21100 File:Foobar.jpg| hi ho
21101 File:Foobar.jpg|hi<br />ho
21106 HTML Hex character encoding (spells the word "JavaScript")
21108 parsoid=wt2html,wt2wt,html2html
21110 JavaScript
21112 <p>JavaScript
21115 <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>
21119 HTML Hex character encoding bogus encoding (T28437 regression check)
21123 <p>&#xsee;&#XSEE;
21128 HTML Hex character encoding mixed case
21130 parsoid=wt2html,wt2wt,html2html
21137 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21140 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21141 # Note that U+000C (form feed) is not a valid XML character, so
21142 # it is banned even though allowed in HTML5.
21144 Illegal character references (T106578)
21149 ; Control (low): 
21150 ; Control (high):  Ÿ
21151 ; Surrogate: ��
21152 ; This is an okay astral character: 💩
21160 <dt>Control (low)</dt>
21162 <dt>Control (high)</dt>
21163 <dd>&#x7F; &#x9F;</dd>
21165 <dd>&#xD83D;&#xDCA9;</dd>
21166 <dt>This is an okay astral character</dt>
21167 <dd>💩</dd></dl>
21171 __FORCETOC__ override
21183 ISBN 978-0-1234-56 789
21185 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21188 <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>
21192 ISBN followed by 5 spaces
21203 ISBN ISBN 1234567890
21205 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21208 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21211 # Uppercase X and lowercase x as well
21222 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21223 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21224 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21225 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21226 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21227 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21230 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21231 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21232 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21233 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21234 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21235 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21239 ISBN with empty prefix (parsoid test)
21243 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21246 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21250 T24905: <abbr> followed by ISBN followed by </a>
21252 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21254 <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>
21257 <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>
21265 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21268 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21272 Double RFC with a wiki link
21276 <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>
21279 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21287 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21290 <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>
21294 Centre-aligned image
21296 [[Image:foobar.jpg|centre]]
21298 <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>
21301 <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>
21307 [[Image:foobar.jpg|none]]
21309 <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>
21312 <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>
21316 Width + Height sized image (using px) (height is ignored)
21318 [[Image:foobar.jpg|640x480px]]
21320 <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>
21323 <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>
21327 Width-sized image (using px, no following whitespace)
21329 [[Image:foobar.jpg|640px]]
21331 <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>
21334 <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>
21338 Width-sized image (using px, with following whitespace - test regression from r39467)
21340 [[Image:foobar.jpg|640px ]]
21342 <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>
21345 <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>
21349 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21351 [[Image:foobar.jpg| 640px]]
21353 <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>
21356 <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>
21360 Image with page parameter
21364 [[File:LoremIpsum.djvu|page=2]]
21366 <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>
21369 <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>
21373 Another italics / bold test
21381 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21387 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21390 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21394 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21396 Images with the "|" character in the comment
21398 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21400 <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>
21403 <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>
21407 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21409 <html><script>alert(1);</script></html>
21411 <p><html><script>alert(1);</script></html>
21416 HTML with raw HTML ($wgRawHtml==true)
21420 <html><script>alert(1);</script></html>
21422 <p><script>alert(1);</script>
21427 Parents of subpages, one level up
21429 subpage title=[[Subpage test/L1/L2/L3]]
21433 <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>
21439 Parents of subpages, one level up, not named
21441 subpage title=[[Subpage test/L1/L2/L3]]
21445 <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>
21452 Parents of subpages, two levels up
21454 subpage title=[[Subpage test/L1/L2/L3]]
21460 <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
21461 </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>
21466 Parents of subpages, two levels up, without trailing slash or name.
21468 subpage title=[[Subpage test/L1/L2/L3]]
21477 Parents of subpages, two levels up, with lots of extra trailing slashes.
21479 subpage title=[[Subpage test/L1/L2/L3]]
21483 <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>
21488 Subpage test/L1/L2/L3Sibling
21494 Transclusion of a sibling page (one level up)
21496 subpage title=[[Subpage test/L1/L2/L3]]
21505 Transclusion of a child page
21507 subpage title=[[Subpage test/L1/L2]]
21515 # This is wt2html only in Parsoid because we add <nowiki>
21516 # because of {{..}} and we don't expect to fix that to
21517 # eliminate the nowikis selective for {{..}} markup.
21519 Non-transclusion because of too many up levels
21521 subpage title=[[Subpage test/L1/L2/L3]]
21524 {{../../../../More than parent}}
21526 <p>{{../../../../More than parent}}
21529 <p>{{../../../../More than parent}}</p>
21533 Definition list code coverage
21539 <dl><dt>title  </dt>
21541 <dt>title </dt>
21547 <dl><dt>title <span typeof="mw:Placeholder"> </span></dt><dd>def</dd>
21548 <dt>title<span typeof="mw:Placeholder"> </span></dt><dd>def</dd>
21549 <dt>title</dt><dd>def</dd></dl>
21553 Don't fall for the self-closing div
21555 <div>hello world</div/>
21557 <div>hello world</div>
21566 <p>[[:Template:Msg]]
21575 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21579 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21581 Always escape literal '>' in output, not just after '<'
21595 <p>This is a test template
21596 This is a test template
21608 Inclusion of !userCanEdit() content
21612 <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>
21618 Out-of-order TOC heading levels
21627 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
21629 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21631 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21632 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21635 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21637 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21638 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21644 <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>
21645 <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>
21646 <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>
21647 <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>
21648 <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>
21649 <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>
21655 ISBN with a dummy number
21665 ISBN with space-delimited number
21669 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21672 <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>
21677 ISBN with multiple spaces, no number
21696 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21697 </p><p>ISBN 12345678901
21700 <p>ISBN 123456789</p>
21702 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21704 <p>ISBN 12345678901</p>
21709 ISBN with trailing year (T9110)
21711 ISBN 1-234-56789-0 - 2006
21713 ISBN 1 234 56789 0 - 2006
21715 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21716 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21719 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21721 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21728 wgFragmentMode=[ 'html5', 'legacy' ]
21730 {{anchorencode:foo bar©#%n}}
21735 <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>
21739 anchorencode (legacy)
21741 wgFragmentMode=[ 'legacy' ]
21743 {{anchorencode:foo bar©#%n}}
21745 <p>foo_bar.C2.A9.23.25n
21750 anchorencode trims spaces
21752 wgFragmentMode=[ 'html5', 'legacy' ]
21754 {{anchorencode: __pretty__please__}}
21759 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21763 anchorencode deals with links
21765 wgFragmentMode=[ 'html5', 'legacy' ]
21767 {{anchorencode: [[hello|world]] [[hi]]}}
21772 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21776 anchorencode deals with templates
21778 wgFragmentMode=[ 'html5', 'legacy' ]
21780 {{anchorencode: {{Foo}} x}}
21785 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21789 anchorencode encodes like the TOC generator: (T20431)
21791 wgFragmentMode=[ 'html5', 'legacy' ]
21793 ===_ +:.3A%3A _ &&]] x===
21794 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21797 <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>
21798 <p>+:.3A%3A_&&]]_x
21801 <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>
21802 <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>
21803 <meta property="mw:PageProp/noeditsection"/>
21807 anchorencode encodes like the TOC generator: (T20431) (legacy)
21809 wgFragmentMode=[ 'legacy' ]
21811 ===_ +:.3A%3A&&]]===
21812 {{anchorencode: _ +:.3A%3A&&]] }}
21815 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21816 <p>.2B:.3A.253A.26.26.5D.5D
21821 T8200: blockquotes and paragraph formatting
21842 T10293: Use of center tag ruins paragraph formatting
21863 Parsing of overlapping (improperly nested) inline html tags
21865 <span><s>x</span></s>
21867 <p><span><s>x</span></s></span>
21870 <p><span><s>x</s></span>
21875 ### Language variants related tests
21878 # Parsoid does not mark self-links.
21879 # Parsoid does not convert links; PHP will do any necessary redirects.
21882 Self-link in language variants
21884 title=[[Dunav]] language=sr
21886 Both [[Dunav]] and [[Дунав]] are names for this river.
21888 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21891 <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>
21901 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21903 title=[[Duna]] language=sr
21905 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21907 <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.
21910 <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>
21914 Link to a section of a variant of this title shouldn't be parsed as self-link
21916 title=[[Duna]] language=sr
21918 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21920 <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.
21923 <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>
21927 Link to pages in language variants
21931 Main Page can be written as [[Маин Паге]]
21933 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21936 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21941 Multiple links to pages in language variants
21945 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21947 <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>.
21950 <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>
21955 Simple template in language variants
21961 <p>This is a test template
21967 Template with explicit namespace in language variants
21973 <p>This is a test template
21979 Basic test for template parameter in language variants
21983 {{парамтест|param=foo}}
21985 <p>This is a test template with parameter foo
21990 Simple category in language variants
21994 [[Category:МедиаWики Усер'с Гуиде]]
21996 cat=МедиаWики_Усер'с_Гуиде sort=
21998 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22013 ## We used to, but no longer wt2wt this test since the default serializer
22014 ## will normalize all categories to serialize on their own line.
22015 ## This wikitext usage is going to be fairly uncommon in production and
22016 ## selser will take care of preserving formatting in those scenarios.
22018 Don't convert blue categorylinks to another variant (T35210)
22024 [[A]][[Category:分类]]
22028 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22029 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22033 Stripping -{}- tags (language variants)
22037 Latin proverb: -{Ne nuntium necare}-
22039 <p>Latin proverb: Ne nuntium necare
22042 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22047 Prevent conversion with -{}- tags (language variants)
22049 language=sr variant=sr-ec
22051 Latinski: -{Ne nuntium necare}-
22053 <p>Латински: Ne nuntium necare
22056 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22061 Prevent conversion of text with -{}- tags (language variants)
22063 language=sr variant=sr-ec
22065 Latinski: -{Ne nuntium necare}-
22067 <p>Латински: Ne nuntium necare
22070 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22075 Prevent conversion of links with -{}- tags (language variants)
22077 language=sr variant=sr-ec
22081 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22084 <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>
22089 -{}- tags within headlines (within html for parserConvert())
22091 wgFragmentMode=[ 'html5', 'legacy' ]
22093 language=sr variant=sr-ec
22097 Note that even an unprotected headline ID is not affected by language
22102 <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>
22103 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22106 <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>
22109 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22111 <p>Note that even an unprotected headline ID is not affected by language
22114 <h2 id="Latinski">Latinski</h2>
22118 Explicit definition of language variant alternatives
22120 language=zh variant=zh-tw
22122 -{zh:China;zh-tw:Taiwan}-, not China
22124 <p>Taiwan, not China
22127 <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>
22131 Filter syntax for language variants
22133 language=zh variant=zh-tw
22135 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22137 <p>fooblog, WEBJOURNAL, WEBLOGquux
22140 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22143 # Note that Parsoid post-processing for language variants needs to
22144 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22146 Conversion around HTML tags
22148 language=sr variant=sr-ec
22150 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22151 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22154 <span title="ЛаCтин">ски</span>
22157 <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"}]}'/>
22158 <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>
22162 Explicit session-wise two-way language variant mapping (A flag and - flag)
22164 language=zh variant=zh-tw
22166 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22168 Taiwan is not China.
22170 But -{A|zh:China; zh-tw:Taiwan}- is China,
22172 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22174 and -{China}- is China.
22176 <p>This is Taiwan, but we'll forget that now.
22177 </p><p>Taiwan is not China.
22178 </p><p>But Taiwan is Taiwan,
22179 </p><p>(This should be stripped!)
22180 </p><p>and China is China.
22183 <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>
22184 <p>Taiwan is not China.</p>
22185 <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>
22186 <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>
22187 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22191 Explicit session-wise one-way language variant mapping (A flag and - flag)
22193 language=zh variant=zh-tw
22195 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22197 COUNTRY is China or Taiwan.
22199 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22201 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22203 and -{COUNTRY}- is COUNTRY.
22205 <p>This is Taiwan, but we'll forget that now.
22206 </p><p>COUNTRY is China or Taiwan.
22207 </p><p>But Taiwan is Taiwan,
22208 </p><p>(This should be stripped!)
22209 </p><p>and COUNTRY is COUNTRY.
22212 <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>
22213 <p>COUNTRY is China or Taiwan.</p>
22214 <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>
22215 <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>
22216 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22220 Explicit session-wise two-way language variant mapping (H flag for hide)
22222 language=zh variant=zh-tw
22224 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22228 <p>(This should be stripped!)
22229 </p><p>Taiwan is Taiwan.
22232 <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>
22233 <p>Taiwan is China.</p>
22237 Explicit session-wise one-way language variant mapping (H flag for hide)
22239 language=zh variant=zh-tw
22241 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22243 COUNTRY is Taiwan or China.
22245 <p>(This should be stripped!)
22246 </p><p>Taiwan is Taiwan or China.
22249 <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>
22250 <p>COUNTRY is Taiwan or China.</p>
22253 ## Note that parsoid test runner does not support 'showtitle' option.
22255 Adding explicit conversion rule for title (T flag)
22257 language=zh variant=zh-tw showtitle
22259 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22264 <p>Should be stripped!
22265 </p><p>Taiwan is China.
22268 <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>
22269 <p>Taiwan is China.</p>
22273 Code coverage: T combined with H flag
22275 language=zh variant=zh-tw showtitle
22277 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22282 <p>Should be stripped!
22283 </p><p>Taiwan is Taiwan.
22286 <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>
22287 <p>Taiwan is China.</p>
22291 Code coverage: T with no variants
22293 language=zh variant=zh-tw showtitle
22295 -{H|zh:China; zh-tw:Taiwan}-
22296 Taiwan is China.-{T|Taiwan is China}-
22303 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22304 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22308 Code coverage: rules with no variants
22310 language=zh variant=zh-tw
22312 -{H|zh:China; zh-tw:Taiwan}-
22323 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22325 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22326 Taiwan is China.</p>
22331 Code coverage: D flag for conversion rule
22333 language=zh variant=zh-tw
22335 -{D|zh-cn:XA; zh-tw:YA}-
22336 -{A;D|zh-cn:XB; zh-tw:YB}-
22337 -{D;H|zh-cn:XC; zh-tw:YC}-
22339 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22345 XA XB XC YA YB YC FOO BAR BAT 012345
22350 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22354 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22357 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22358 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22359 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22360 <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>
22361 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22362 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22363 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22364 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22368 Code coverage: N flag for conversion rule
22370 language=zh variant=zh-cn
22380 </p><p>српски (ћирилица)
22383 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22384 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22385 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22388 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22390 Code coverage: N flag for conversion rule (wt2html only)
22392 language=zh variant=zh-cn
22393 parsoid=wt2html,html2html
22400 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22404 Testing that changing the language variant here in the tests actually works
22406 language=zh variant=zh showtitle
22408 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22411 <p>Should be stripped!
22414 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22418 Recursive conversion of alt and title attrs shouldn't clear converter state
22420 language=zh variant=zh-cn
22423 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22424 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22428 Should be stripped<span title="Exclamation">!</span>
22431 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22432 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>
22436 T26072: more test on conversion rule for title
22438 language=zh variant=zh-tw showtitle
22440 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22442 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22445 <p>This should be stripped!
22446 </p><p>This won't take interferes with the title rule.
22449 <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>
22450 <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>
22454 Partly disable title conversion if variant == main language code
22456 language=zh variant=zh title=[[ZH]] showtitle
22458 -{T|zh-cn:CN;zh-tw:TW}-
22464 <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>
22468 Partly disable title conversion if variant == main language code, more
22470 language=zh variant=zh title=[[ZH]] showtitle
22478 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22482 Raw output of variant escape tags (R flag)
22484 language=zh variant=zh-tw
22486 Raw: -{R|zh:China;zh-tw:Taiwan}-
22488 <p>Raw: zh:China;zh-tw:Taiwan
22491 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22494 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22496 Raw output of variant escape tags (R flag) (wt2html only)
22498 language=zh variant=zh-tw
22499 parsoid=wt2html,html2html
22501 -{Variant}- -{D|syntax}- -{D;R|options}-
22503 <p>Variant syntax options
22506 <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>
22510 Nested markup inside raw output of variant escape tags (R flag)
22512 language=zh variant=zh-tw
22514 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22516 <p>Nested raw: nested Taiwan nested
22519 <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>
22523 Nested markup and spaces inside raw output of variant escape tags (R flag)
22525 language=zh variant=zh-tw
22527 X-{ outer -{ inner }- outer }-X
22529 <p>X outer inner outer X
22532 <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>
22536 Templates inside raw output of variant escape tags (R flag)
22538 language=zh variant=zh-tw
22540 Nested raw: -{R|nested {{echo|hi}} templates}-
22542 <p>Nested raw: nested hi templates
22545 <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>
22549 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22551 language=zh variant=zh-cn
22553 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22558 <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>
22562 Conversion rules from [numeric-only string] to [something else] (T48634)
22564 language=zh variant=zh-cn
22566 -{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
22571 <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>
22575 Two-way converter rule entries with an empty value should be ignored (T53551)
22577 language=zh variant=zh-cn
22579 -{H|zh-cn:foo;zh-tw:;}-foobar
22584 <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>
22588 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22590 language=zh variant=zh-cn
22592 -{H|=>zh-cn:foo;}-foobar
22597 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22601 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22603 language=zh variant=zh-cn
22610 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22614 Nested using of manual convert syntax
22616 language=zh variant=zh-hk
22618 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22620 <p>Nested: Hello Hong Kong!
22623 <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>
22627 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22629 language=zh variant=zh-cn
22631 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22633 <p><span title="X">A</span>
22636 <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>
22640 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22642 language=zh variant=zh-cn
22644 -{<span title="-{X}-">A</span>}-
22645 !! html/php+disabled
22646 <p><span title="X">A</span>
22649 <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>
22652 # Parsoid and PHP disagree on how to parse this example: Parsoid
22653 # insists that the content of a language converter element be a valid
22654 # DOM fragment or attribute string
22656 Language converter markup with block content
22658 language=zh variant=zh-cn
22660 <span>a-{b<div>c}-d
22662 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22664 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22669 </span></div></span></div></span>
22671 <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>
22673 <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>
22675 <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>
22679 LanguageConverter selser (1)
22681 language=zh variant=zh-cn
22683 "modes": ["wt2wt", "selser"],
22685 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22695 LanguageConverter selser (2)
22697 language=zh variant=zh-cn
22699 "modes": ["wt2wt", "selser"],
22701 ["span[class='x']", "contents", "text", "-{foo}-"],
22702 ["a", "contents", "text", "-{"],
22703 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22707 <span class="x">TEXT1</span>
22708 [http://example.com TEXT2]
22712 <span class="x"><nowiki>-{foo}-</nowiki></span>
22713 [http://example.com -{]
22714 [[Foo|<nowiki>-{</nowiki>]]
22715 {{1x|<nowiki>-{</nowiki>}}
22718 # Tests LanguageVariantText in ConstrainedText
22720 LanguageConverter selser (3)
22722 language=zh variant=zh-cn
22724 "modes": ["wt2wt", "selser"],
22726 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22727 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22738 |<nowiki/>-{edited}-
22742 # Tests LanguageVariantText._fromSelSer
22744 LanguageConverter selser (4)
22746 language=zh variant=zh-cn
22748 "modes": ["wt2wt", "selser"],
22750 ["td > span.x", "remove"]
22756 |<span class="x">Foo</span>-{Bar}-
22757 ||<span class="x">Foo</span>-{Bar}-
22767 # Since Parsoid is starting to emit canonical wikitext for links,
22768 # [http://example.com http://example.com] will not RT back to that
22770 # Parsoid does not language-convert links (it is done in a
22771 # post-processing step)
22773 Proper conversion of text in external links
22775 language=sr variant=sr-ec
22778 http://www.google.com
22779 gopher://www.google.com
22780 [http://www.google.com http://www.google.com]
22781 [gopher://www.google.com gopher://www.google.com]
22782 [https://www.google.com irc://www.google.com]
22783 [ftp://www.google.com www.google.com/ftp://dir]
22784 [//www.google.com www.google.com]
22786 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22787 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22788 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22789 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22790 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22791 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22792 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22795 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22796 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22797 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
22798 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22799 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22800 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22801 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22805 Do not convert roman numbers to language variants
22807 language=sr variant=sr-ec
22811 <p>Фридрих IV је цар.
22814 <p>Fridrih IV je car.</p>
22818 Unclosed language converter markup "-{"
22829 Don't convert raw rule "-{R|=>}-" to "=>"
22838 <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>
22842 Don't break link parsing if language converter markup is in the caption.
22844 language=sr variant=sr-ec
22846 [[Main Page|-{R|main page}-]]
22848 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22851 <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>
22855 T146304: Don't break template parsing if language converter markup is in the parameter.
22857 language=sr variant=sr-ec
22864 <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>
22868 T146305: Don't break image parsing if language converter markup is in the caption.
22872 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22874 <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>
22877 <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>
22881 T146305: Don't break image parsing if nested language converter markup is in the caption.
22883 language=zh variant=zh-cn
22885 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22887 <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>
22890 <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>
22893 # XXX html2wt disabled because rich markup in alt is not preserved.
22895 Don't break gallery if language converter markup is inside.
22900 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22901 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22904 <ul class="gallery mw-gallery-traditional">
22905 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22906 <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>
22907 <div class="gallerytext">
22908 <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>
22912 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22913 <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>
22914 <div class="gallerytext">
22915 <p>This is a test template
22922 <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"}}'>
22923 <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>
22924 <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>
22929 T153135: Don't break list handling if language converter markup is in the item.
22931 language=zh variant=zh-cn
22933 ;-{zh-cn:AAA;zh-tw:BBB}-
22937 <dt>foo:bar</dt></dl>
22940 <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>
22941 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22945 // Note that parsoid does not protect colons unless language converter
22946 // markup is properly nested, because it is a backtracking parser.
22948 T153135: Unclosed markup in definition list (code coverage)
22950 language=zh variant=zh-cn
22955 <dl><dt><b>foo:bar</b></dt><b>
22956 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
22959 <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}'>
22960 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22961 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22966 T153135: Nested language converter markup in definition list (code coverage)
22968 language=zh variant=zh-cn
22970 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22972 <dl><dt>AAA foo:bar bat:baz</dt>
22976 <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>
22977 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22981 # html2wt mode disabled due to <nowiki> insertion.
22983 T153140: Don't break table handling if language converter markup is in the cell.
22985 language=sr variant=sr-ec
22986 parsoid=wt2html,wt2wt,html2html
23003 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23010 Language converter tricky html2wt cases (1)
23013 parsoid=html2wt,wt2wt
23015 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23017 -{<nowiki>}-</nowiki>}-
23024 Language converter tricky html2wt cases (2)
23027 parsoid=html2wt,wt2wt
23031 <nowiki>-{foo}-</nowiki>
23033 <p>-{foo}-
23038 Language converter tricky html2wt cases (3)
23041 parsoid=html2wt,wt2wt
23043 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23044 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23045 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23051 -{<nowiki>-{foo}-</nowiki>}-
23055 </p><p>-{foo}-
23060 Language converter tricky html2wt cases (4)
23063 parsoid=html2wt,wt2wt
23065 <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>
23073 # Note that the <nowiki> escaping added by parsoid for source text,
23074 # destination text, and language names only works on the PHP side
23075 # for *destination text*. (HTML entity escaping wouldn't work
23076 # any better.) This is probably a bug, at least for source texts.
23077 # (For language names PHP uses a precise regexp based on the languages
23078 # it currently knows have variants, which is fragile since this set
23079 # can grow/shrink over time.)
23081 Language converter tricky html2wt cases (5)
23083 language=zh variant=zh-cn
23085 <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>
23086 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23087 <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>
23088 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23091 -{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
23093 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23095 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23097 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23100 !! html/php+disabled
23101 <p>foobat;xyz=>zh-cn:abc
23105 </p><p>a:b=>c 0;zh-tw:bar
23110 T179579: Nowiki and lc interaction
23117 -{123<nowiki>|</nowiki>456}-
23119 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23121 <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>
23125 T2529: Uncovered bullet
23135 T2529: Uncovered bullet in a deeply nested list
23137 *******Foo {{bullet}}
23139 <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>
23145 T2529: Uncovered table already at line-start
23168 T2529: Uncovered bullet in parser function result
23170 *Foo {{lc:{{bullet}} }}
23178 T7678: Double-parsed template argument
23180 {{lc:{{{1}}}|hello}}
23187 T7678: Double-parsed template invocation
23189 {{lc:{{paramtest {{!}} param = hello }} }}
23191 <p>{{paramtest | param = hello }}
23196 Case insensitivity of parser functions for non-ASCII characters (T10143)
23199 title=[[Main Page]]
23201 {{PRVNÍVELKÉ:ěščř}}
23202 {{prvnívelké:ěščř}}
23222 Morwen/13: Unclosed link followed by heading
23229 <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>
23234 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23241 <h1><span class="mw-headline" id="heading">heading</span></h1>
23246 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23253 <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>
23268 Paragraphs inside divs (no extra line breaks)
23280 Paragraphs inside divs (extra line break on open)
23295 Paragraphs inside divs (extra line break on close)
23310 Paragraphs inside divs (extra line break on open and close)
23326 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23327 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23329 Nesting tags, paragraphs on lines which begin with <div>
23331 <div></div><strong>A
23334 <div></div><p><strong>A
23335 </strong></p><strong></strong><p><strong>B</strong>
23344 # T8200: <blockquote> should behave like <div> with respect to line breaks
23346 T8200: paragraphs inside blockquotes (no extra line breaks)
23348 <blockquote>Line one
23350 Line two</blockquote>
23352 <blockquote>Line one
23353 Line two</blockquote>
23356 <blockquote><p>Line one
23357 Line two</p></blockquote>
23361 T8200: paragraphs inside blockquotes (extra line break on open)
23366 Line two</blockquote>
23371 Line two</blockquote>
23377 Line two</p></blockquote>
23380 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23382 T8200: paragraphs inside blockquotes (extra line break on close)
23384 <blockquote>Line one
23389 <blockquote>Line one
23395 <blockquote><p>Line one
23402 T8200: paragraphs inside blockquotes (extra line break on open and close)
23418 # FIXME: Why does/should the blockquote+div combo suppress p-wrapping here?
23420 Paragraphs inside blockquotes/divs (no extra line breaks)
23422 <blockquote><div>Line one
23424 Line two</div></blockquote>
23426 <blockquote><div>Line one
23427 Line two</div></blockquote>
23432 Paragraphs inside blockquotes/divs (extra line break on open)
23437 Line two</div></blockquote>
23442 Line two</div></blockquote>
23447 Paragraphs inside blockquotes/divs (extra line break on close)
23449 <blockquote><div>Line one
23452 </div></blockquote>
23454 <blockquote><div>Line one
23457 </div></blockquote>
23462 Paragraphs inside blockquotes/divs (extra line break on open and close)
23468 </div></blockquote>
23474 </div></blockquote>
23479 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23481 wgLinkHolderBatchSize=0
23487 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23488 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23489 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23494 Free external link invading image caption
23496 [[Image:Foobar.jpg|thumb|http://x|hello]]
23498 <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>
23501 <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>
23505 T17196: localised external link numbers
23509 [http://en.wikipedia.org/]
23511 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23514 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23518 Multibyte character in padleft
23520 {{padleft:-Hello|7|Æ}}
23525 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23529 Multibyte character in padright
23531 {{padright:Hello-|7|Æ}}
23536 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23540 formatdate parser function
23542 {{#formatdate:2009-03-24}}
23544 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23549 formatdate parser function, with default format
23551 {{#formatdate:2009-03-24|mdy}}
23553 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23558 Spacing of numbers in formatted dates
23560 {{#formatdate:January 15}}
23562 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23567 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
23569 language=nl title=[[MediaWiki:Common.css]]
23571 {{#formatdate:2009-03-24|dmy}}
23573 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23586 Edit comment with link
23590 I like the [[Main Page]] a lot
23592 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23596 Edit comment with link and link text
23600 I like the [[Main Page|best pages]] a lot
23602 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23606 Edit comment with link and link text with suffix
23610 I like the [[Main Page|best page]]s a lot
23612 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23616 Edit comment with section link (non-local, eg in history list)
23618 comment title=[[Main Page]]
23620 /* External links */ removed bogus entries
23622 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23626 Edit comment with section link and text before it (non-local, eg in history list)
23628 comment title=[[Main Page]]
23630 pre-comment text /* External links */ removed bogus entries
23632 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>
23636 Edit comment with section link (local, eg in diff view)
23638 comment local title=[[Main Page]]
23640 /* External links */ removed bogus entries
23642 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23646 Edit comment with subpage link (T16080)
23650 title=[[Subpage test]]
23652 Poked at a [[/subpage]] here...
23654 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23658 Edit comment with subpage link and link text (T16080)
23662 title=[[Subpage test]]
23664 Poked at a [[/subpage|neat little page]] here...
23666 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23670 Edit comment with bogus subpage link in non-subpage NS (T16080)
23673 title=[[Subpage test]]
23675 Poked at a [[/subpage]] here...
23677 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23681 Edit comment with bare anchor link (local, as on diff)
23685 title=[[Main Page]]
23689 <a href="#section">#section</a>
23693 Edit comment with bare anchor link (non-local, as on history)
23696 title=[[Main Page]]
23700 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23704 Anchor starting with underscore
23710 <p><a href="#_ref">One</a>
23713 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23717 Id starting with underscore
23719 <div id="_ref"></div>
23721 <div id="_ref"></div>
23726 Edit comment with link with more than one pipe (T99346)
23730 [[Main Page|Many|pipes]]
23732 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23736 Complex edit comment with link with more than one pipe (T99346)
23740 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23742 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..."
23746 Space normalisation on autocomment (T24784)
23749 title=[[Main Page]]
23751 /* __hello__world__ */
23753 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23757 percent-encoding and + signs in comments (T28410)
23761 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23763 <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>
23766 # Parsoid doesn't support this yet: see T75581
23767 # but it *should* omit the 'src' attribute if the image is bad.
23768 # PHP side of tests was disabled in
23769 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23770 # because of issues in the PHP parserTests infrastructure
23771 # (but the output below is indeed what the PHP side emits)
23773 Bad images - basic functionality
23776 !! html/php+disabled
23778 <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>
23782 Bad images - T18039: text after bad image disappears
23787 !! html/php+disabled
23793 <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>
23798 Verify that displaytitle works (T24501) no displaytitle
23802 wgAllowDisplayTitle=true
23803 wgRestrictDisplayTitle=false
23805 this is not the the title
23808 <p>this is not the the title
23813 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23818 wgAllowDisplayTitle=true
23819 wgRestrictDisplayTitle=false
23821 this is not the the title
23822 {{DISPLAYTITLE:whatever}}
23825 <p>this is not the the title
23830 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23835 wgAllowDisplayTitle=true
23836 wgRestrictDisplayTitle=true
23838 this is not the the title
23839 {{DISPLAYTITLE:whatever}}
23842 <p>this is not the the title
23847 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23852 wgAllowDisplayTitle=true
23853 wgRestrictDisplayTitle=true
23855 this is not the the title
23856 {{DISPLAYTITLE:screen}}
23859 <p>this is not the the title
23864 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23869 wgAllowDisplayTitle=false
23871 this is not the the title
23872 {{DISPLAYTITLE:screen}}
23875 <p>this is not the the title
23876 <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>
23881 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23886 wgAllowDisplayTitle=false
23888 this is not the the title
23891 <p>this is not the the title
23896 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23901 wgAllowDisplayTitle=true
23902 wgRestrictDisplayTitle=true
23904 this is not the the title
23905 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23907 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23908 <p>this is not the the title
23913 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23918 wgAllowDisplayTitle=true
23919 wgRestrictDisplayTitle=true
23921 this is not the the title
23922 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23924 <span style="color: red;">s</span>creen
23925 <p>this is not the the title
23930 Page status indicators: Empty name is invalid
23934 <indicator name=" "></indicator>
23935 <indicator></indicator>
23937 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23938 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23943 Page status indicators: Weird syntaxes that are okay
23947 <indicator name="empty" />
23948 <indicator name="name"></indicator>
23957 Page status indicators: Torture test
23961 <indicator name="01">hello world</indicator>
23962 <indicator name="02">[[Main Page]]</indicator>
23963 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23964 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23965 <indicator name="05">*foo
23967 <indicator name="06"><nowiki>foo</nowiki></indicator>
23968 <indicator name="07"> Preformatted</indicator>
23969 <indicator name="08"><div>Broken tag</indicator>
23970 <indicator name="09">{| class=wikitable
23973 <indicator name="10">Two
23975 paragraphs</indicator>
23978 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23979 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" />
23980 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>
23981 05=<ul><li>foo</li>
23985 07=<pre>Preformatted
23987 08=<div>Broken tag</div>
23989 09=<table class="wikitable">
24006 preload: check <noinclude> and <includeonly>
24010 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24016 preload: check <onlyinclude>
24020 Goodbye <onlyinclude>Hello world</onlyinclude>
24026 preload: can pass tags through if we want to
24030 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24032 <includeonly>Hello world</includeonly>
24036 preload: check that it doesn't try to do tricks
24040 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24042 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24046 Play a bit with r67090 and T5158
24048 <div style="width:50% !important"> </div>
24049 <div style="width:50% !important"> </div>
24050 <div style="width:50% !important"> </div>
24051 <div style="border : solid;"> </div>
24053 <div style="width:50% !important"> </div>
24054 <div style="width:50% !important"> </div>
24055 <div style="width:50% !important"> </div>
24056 <div style="border : solid;"> </div>
24059 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24060 <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>
24061 <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>
24062 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24067 T5158: Test for French spaces in attributes
24069 <br style=" clear : both ; " />
24071 <p><br style="clear : both ;" />
24076 HTML5 data attributes
24078 <span data-foo="bar">Baz</span>
24079 <p data-abc-def_hij="">Quuz</p>
24081 <p><span data-foo="bar">Baz</span>
24083 <p data-abc-def_hij="">Quuz</p>
24086 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24087 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24091 Strip reserved data attributes
24093 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24095 <div data-ok="fred">d</div>
24098 <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>
24102 percent-encoding and + signs in internal links (T28410)
24104 [[User:+%]] [[Page+title%]]
24105 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24106 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24107 [[%33%45]] [[%33%45+]]
24109 <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>
24110 <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>
24111 <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>
24112 <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>
24115 <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>
24116 <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>
24117 <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>
24118 <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>
24122 Special characters in embedded file links (T29679)
24124 [[File:Contains & ampersand.jpg]]
24125 [[File:Does not exist.jpg|Title with & ampersand]]
24127 <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>
24128 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24131 <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>
24132 <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>
24136 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24138 Text's been normalized?
24140 <p>Text's been normalized?
24145 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24147 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24149 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24154 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24156 [http://www.example.org/ ideograms]
24158 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24163 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24165 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24167 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24191 T33098 Template which includes system messages which includes the template
24195 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24196 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24201 T33490 Turkish: ucfirst 'blah'
24212 T33490 Turkish: ucfirst 'ix'
24223 T33490 Turkish: lcfirst 'BLAH'
24234 T33490 Turkish: ucfırst (with a dotless i)
24240 <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>
24245 T33490 ucfırst (with a dotless i) with English language
24251 <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>
24255 # Note that Parsoid doesn't emit an explicit TOC.
24256 # Note also that the html2wt direction tends to emit an extra newline
24257 # between the __TOC__ magicword and the first heading unless *both*
24258 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24262 T28375: TOC with italics
24264 title=[[Main Page]]
24267 ==''Lost'' episodes==
24269 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24271 <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>
24275 <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>
24278 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24279 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24283 T28375: TOC with bold
24285 title=[[Main Page]]
24288 =='''should be bold''' then normal text==
24290 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24292 <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>
24296 <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>
24299 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24300 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24304 T35845: Headings become cursive in TOC when they contain an image
24306 title=[[Main Page]]
24309 ==Image [[Image:foobar.jpg]]==
24311 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24313 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24317 <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>
24320 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24321 <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>
24325 T35845 (2): Headings become bold in TOC when they contain a blockquote
24327 title=[[Main Page]]
24330 ==<blockquote>Quote</blockquote>==
24332 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24334 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24338 <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>
24341 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24343 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24347 <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>
24349 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24350 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24354 Unclosed tags in TOC
24356 wgFragmentMode=[ 'html5', 'legacy' ]
24358 title=[[Main Page]]
24362 <small>Hanc marginis exiguitas non caperet.</small>
24365 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24367 <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>
24371 <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>
24372 <p><small>Hanc marginis exiguitas non caperet.</small>
24376 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24377 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24378 <p><small>Hanc marginis exiguitas non caperet.</small>
24383 Multiple tags in TOC
24386 ==<i>Foo</i> <b>Bar</b>==
24388 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24390 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24392 <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>
24393 <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>
24397 <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>
24398 <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>
24401 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24403 <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>
24404 <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>
24408 <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>
24409 <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>
24411 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24412 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24414 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24417 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24418 # html5 tag parsing.
24420 Tags with parameters in TOC
24425 ==<sup class="in-h2">Hello</sup>==
24427 ==<sup class="a > b">Evilbye</sup>==
24429 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24431 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24432 <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>
24436 <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>
24437 <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>
24440 <meta property="mw:PageProp/toc" />
24441 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24443 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24447 span tags with directionality in TOC
24450 ==<span dir="ltr">C++</span>==
24452 ==<span dir="rtl">זבנג!</span>==
24454 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24456 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24458 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24460 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24462 <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>
24463 <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>
24464 <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>
24465 <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>
24466 <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>
24470 <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>
24471 <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>
24472 <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>
24473 <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>
24474 <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>
24477 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24478 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24479 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24480 <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>
24481 <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>
24482 <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>
24486 T74884: bdi element in ToC
24489 ==<bdi>test</bdi>==
24491 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24493 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24497 <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>
24500 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24501 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24505 T35715: s/strike element in ToC
24508 ==<s>test</s> test <strike>test</strike>==
24510 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24512 <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>
24516 <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>
24519 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24520 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24524 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24529 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24531 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24535 <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>
24538 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24539 <h2 id="x" data-parsoid='{}'>x</h2>
24545 == {{int:headline_sample}} ==
24549 T34057: Title needed when expanding <h> nodes.
24551 title=[[Main Page]]
24555 <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>
24560 Strip marker in urlencode
24562 {{urlencode:x<nowiki/>y}}
24563 {{urlencode:x<nowiki/>y|wiki}}
24564 {{urlencode:x<nowiki/>y|path}}
24565 {{urlencode:x<pre id="one">two</pre>y}}
24593 Strip marker in formatNum
24595 {{formatnum:1<nowiki/>2}}
24596 {{formatnum:1<nowiki/>2|R}}
24604 Check noCommafy in formatNum
24608 {{formatnum:123456.78}}
24609 {{formatnum:123456.78|NOSEP}}
24617 Wrong option for formatNum (T58199)
24619 {{formatnum:1,234.56|Random}}
24620 {{formatnum:1,234.56|EVERYTHING}}
24621 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24630 Strip marker in grammar
24634 {{grammar:elative|foo<nowiki/>bar}}
24641 Strip marker in padleft
24643 {{padleft:|2|x<nowiki/>y}}
24650 Strip marker in padright
24652 {{padright:|2|x<nowiki/>y}}
24659 Strip marker in anchorencode
24661 {{anchorencode:x<nowiki/>y}}
24666 <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>
24670 nowiki inside link inside heading (T20295)
24672 ==[[foo|x<nowiki>y</nowiki>z]]==
24674 <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>
24679 new support for bdi element (T33817)
24681 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24683 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24688 Ignore pipe between table row attributes
24692 |- id=foo | style='color: red'
24700 <tr id="foo" style="color: red">
24707 Language parser function
24716 Padleft and padright (default 0-padding)
24725 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24726 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24730 Padleft and padright (partial fill)
24732 {{padleft:xyz|6|ab}}
24733 {{padright:xyz|6|ab}}
24739 <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>
24740 <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>
24744 Padleft and padright as substr
24746 {{padleft:|3|abcde}}
24747 {{padright:|3|abcde}}
24753 <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>
24754 <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>
24758 Padleft and padright with non-numerical length (T180403)
24760 {{padleft:abcdef|junk}}
24761 {{padright:abcdef|junk}}
24769 Special parser function
24771 {{#special:RandomPage}}
24772 {{#special:BaDtItLe}}
24773 {{#special:Foobar}}
24782 T36939 - Case insensitive link parsing ([HttP://])
24784 [HttP://MediaWiki.Org/]
24786 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24789 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24793 T36939 - Case insensitive link parsing ([HttP:// title])
24795 [HttP://MediaWiki.Org/ MediaWiki]
24797 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24802 T36939 - Case insensitive link parsing (HttP://)
24804 HttP://MediaWiki.Org/
24806 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24809 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24827 <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>
24828 <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>
24829 <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>
24830 <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>
24831 <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>
24837 ### Parsoid-specific tests
24838 ### Parsoid-PHP parser incompatibilities
24841 1. SOL-sensitive wikitext tokens as template-args
24843 parsoid=wt2html,wt2wt
24849 <span about="#mwt1" typeof="mw:Transclusion">
24850 </span><ul about="#mwt1"><li>a</li>
24852 <span about="#mwt2" typeof="mw:Transclusion">
24853 </span><ol about="#mwt2"><li>a</li>
24855 <span about="#mwt3" typeof="mw:Transclusion">
24856 </span><dl about="#mwt3"><dd>a</dd>
24860 #### -----------------------------------------------------------------
24861 #### Parsoid-specific functionality tests
24862 #### -----------------------------------------------------------------
24864 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24865 # We know wt2wt will fail, but we expect selser to pass.
24866 # Due to the nature of our testing, wt2wt and selser tests will enter the
24867 # blacklist and we'll catch selser regressions based on changes to the
24868 # blacklist entries for selser tests.
24870 1. Bad treebuilder fixup of formatting elt is cleaned up
24872 parsoid=wt2html,wt2wt
24877 [[Image:Foobar.jpg|right|Test]]
24884 <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>
24891 2. Bad treebuilder fixup of formatting elt is cleaned up
24893 parsoid=wt2html,wt2wt
24895 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24897 <small>[[Image:Foobar.jpg|right|300px]]</small>
24901 <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>
24903 <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>
24907 3. Bad treebuilder fixup of formatting elt is cleaned up
24909 parsoid=wt2html,wt2wt
24911 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24913 <p><small><b>foo</b></small></p>
24914 <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>
24915 <p><small><b>bar</b></small></p>
24919 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24921 parsoid=wt2html,wt2wt
24923 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24925 <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>
24928 #### ----------------------------------------------------------------
24929 #### Parsoid-only testing of Parsoid's impl of LST
24930 #### Not implemented yet, see
24931 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24932 #### ----------------------------------------------------------------
24934 ## We still need to support serializing the older format while content is stored.
24936 LST Sections: Backwards compatibility
24939 "suppressErrors": true,
24940 "modes": ["html2wt"]
24943 <section begin="2011-05-16" />
24944 <section end="2014-04-10 (MW 1.23wmf22)" />
24946 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24947 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24951 LST Sections: Newfangled approach
24953 <section begin="2011-05-16" />
24954 <section end="2014-04-10 (MW 1.23wmf22)" />
24956 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24958 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24962 #--------- Test stripping of empty nodes in template content ----------
24965 Empty LI and TR nodes should be stripped from template content
24970 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24974 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24987 Empty LI and TR nodes should not be stripped from top-level content
25001 <li class='mw-empty-elt'></li>
25006 <tr class='mw-empty-elt'></tr>
25015 Empty TR nodes should not be stripped if they have any attributes set
25017 {{EmptyTRWithHTMLAttrTest}}
25019 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25020 <tr align='center'></tr>
25021 <tr><td>foo</td></tr>
25022 <tr align='center'></tr>
25023 <tr><td>bar</td></tr>
25027 #### ----------------------------------------------------------------
25028 #### The following section of tests are primarily to test
25029 #### wikitext escaping capabilities of Parsoid. Given that
25030 #### escaping can be done any number of ways, the wikitext (input)
25031 #### is always adjusted to reflect how Parsoid adds nowiki
25034 #### We are marking several tests as parsoid-only since the
25035 #### HTML in the result section is different from what the
25036 #### PHP parser generates for it.
25037 #### ----------------------------------------------------------------
25040 #### --------------- Headings ---------------
25042 #### 1. Nested inside html <h1>=foo=</h1>
25043 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25044 #### 3. Nested inside html with wikitext split by html tags
25045 #### 4. No escape needed
25046 #### 5. Empty headings <h1></h1>
25047 #### 6. Heading chars in SOL context
25048 #### ----------------------------------------
25050 Headings: 0. Unnested
25060 <p>=foo<i>a</i>=</p>
25062 <nowiki>=foo=</nowiki>
25064 <nowiki> </nowiki>=foo=
25066 <nowiki>=foo=</nowiki>
25068 =foo''a''<nowiki>=</nowiki>
25071 # New headings and existing headings are handled differently
25073 Headings: 1. Nested inside html
25081 <h1 data-parsoid=''>=foo=</h1>
25082 <h2 data-parsoid=''>=foo=</h2>
25083 <h3 data-parsoid=''>=foo=</h3>
25084 <h4 data-parsoid=''>=foo=</h4>
25085 <h5 data-parsoid=''>=foo=</h5>
25086 <h6 data-parsoid=''>=foo=</h6>
25094 =<nowiki>=foo=</nowiki>=
25095 ==<nowiki>=foo=</nowiki>==
25096 ===<nowiki>=foo=</nowiki>===
25097 ====<nowiki>=foo=</nowiki>====
25098 =====<nowiki>=foo=</nowiki>=====
25099 ======<nowiki>=foo=</nowiki>======
25104 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25113 <nowiki>*</nowiki>bar
25119 <nowiki>=bar=</nowiki>
25123 Headings: 3. Nested inside html with wikitext split by html tags
25127 <h1>=<b>bold</b>foo=</h1>
25129 = ='''bold'''foo= =
25133 Headings: 4a. No escaping needed (testing just h1 and h2)
25144 <h1><i>=</i>foo=</h1>
25164 Headings: 4b. No escaping needed (inside p-tags)
25181 Headings: 4c. Short headings (1)
25188 <nowiki>===</nowiki>
25194 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25196 Headings: 4d. Short headings (2)
25198 parsoid=wt2html,html2html
25209 <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>
25210 <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>
25211 <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>
25216 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25217 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25218 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25222 Headings: 5. Empty headings
25226 <h1 data-parsoid='{}'></h1>
25228 <h2 data-parsoid='{}'></h2>
25230 <h3 data-parsoid='{}'></h3>
25232 <h4 data-parsoid='{}'></h4>
25234 <h5 data-parsoid='{}'></h5>
25236 <h6 data-parsoid='{}'></h6>
25246 =====<nowiki/>=====
25248 ======<nowiki/>======
25252 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25262 <nowiki>=a=</nowiki>
25264 <nowiki>=a=</nowiki>
25266 <nowiki>=a=</nowiki>
25270 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25283 <nowiki>=a=</nowiki>
25286 <nowiki>=a=</nowiki>
25289 <nowiki>=a=</nowiki>
25294 Headings: 6c. Heading chars in SOL context (leading newline break)
25302 <nowiki>=b=</nowiki>
25306 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25310 <!--c0--><p>=a=</p>
25312 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25314 <!--c0--><nowiki>=a=</nowiki>
25316 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25320 Headings: 6d. Heading chars in SOL context (No escaping needed)
25330 Headings: 7. Insert a newline between new content and headings
25336 <h2 data-parsoid='{}'>A</h2>
25337 <p data-parsoid='{}'>a</p>
25348 Headings: Used as horizontal rule
25350 wgFragmentMode=[ 'html5', 'legacy' ]
25356 <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>
25359 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25362 #### --------------- Lists ---------------
25363 #### 0. Outside nests (*foo, etc.)
25364 #### 1. Nested inside html <ul><li>*foo</li></ul>
25365 #### 2. Inside definition lists
25366 #### 3. Only bullets at start should be escaped
25367 #### 4. No escapes needed
25368 #### 5. No unnecessary escapes
25369 #### 6. Escape bullets in SOL position
25370 #### 7. Escape bullets in a multi-line context
25371 #### ----------------------------------------
25374 Lists: 0. Outside nests
25384 <nowiki>*</nowiki>foo
25386 <nowiki>#</nowiki>foo
25388 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25391 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25392 ## to test wikitext escaping, and insignificant whitespace diffs
25393 ## cause PHP parser tests to barf
25395 Lists: 1. Nested inside html (No unnecessary escapes)
25404 <li data-parsoid='{}'>*foo</li>
25405 <li data-parsoid='{}'>#foo</li>
25406 <li data-parsoid='{}'>:foo</li>
25407 <li data-parsoid='{}'>;foo</li>
25415 <li data-parsoid='{}'>*foo</li>
25416 <li data-parsoid='{}'>#foo</li>
25417 <li data-parsoid='{}'>:foo</li>
25418 <li data-parsoid='{}'>;foo</li>
25425 *<nowiki>*foo</nowiki>
25426 *<nowiki>#foo</nowiki>
25427 *<nowiki>:foo</nowiki>
25428 *<nowiki>;foo</nowiki>
25434 #<nowiki>*foo</nowiki>
25435 #<nowiki>#foo</nowiki>
25436 #<nowiki>:foo</nowiki>
25437 #<nowiki>;foo</nowiki>
25441 Lists: 2. Inside definition lists
25445 <dl><dt>;foo</dt></dl>
25446 <dl><dt>:foo</dt></dl>
25449 <dl><dd>:foo</dd></dl>
25453 ; <nowiki>:foo</nowiki>
25455 ; <nowiki>:foo</nowiki>
25462 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25468 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25472 *<nowiki>*foo</nowiki>''it''*bar
25476 Lists: 4. No escapes needed
25489 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25493 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25507 Lists: 5. No unnecessary escapes
25511 <ul><li> bar <span>[[foo]]</span></li></ul>
25512 <ul><li> =bar <span>[[foo]]</span></li></ul>
25513 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25514 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25515 <ul><li> =bar <span>foo]]</span>=</li></ul>
25516 <ul><li> <s></s>: a</li></ul>
25517 <ul><li> <i>* foo</i></li></ul>
25520 * bar <span><nowiki>[[foo]]</nowiki></span>
25522 * =bar <span><nowiki>[[foo]]</nowiki></span>
25524 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25526 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25528 * =bar <span>foo]]</span>=
25536 Lists: 6. Escape bullets in SOL position
25540 <p><!--cmt-->*foo</p>
25542 <!--cmt--><nowiki>*</nowiki>foo
25546 Lists: 7. Escape bullets in a multi-line context
25555 <nowiki>*</nowiki>b
25559 Lists: 8. Escape colons only if not present in tags
25563 <dl><dt>a:b<i>c:d</i></dt></dl>
25565 ; <nowiki>a:b</nowiki>''c:d''
25568 #### --------------- HRs ---------------
25569 #### 1. Single line
25570 #### -----------------------------------
25573 HRs: 1. Single line
25581 ----<nowiki>----</nowiki>
25586 #### --------------- Tables ---------------
25587 #### 1a. Simple example
25588 #### 1b. No escaping needed (!foo)
25589 #### 1c. No escaping needed (|foo)
25590 #### 1d. No escaping needed (|}foo)
25592 #### 2a. Nested in td (<td>foo|bar</td>)
25593 #### 2b. Nested in td (<td>foo||bar</td>)
25594 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25596 #### 3a. Nested in th (<th>foo!bar</th>)
25597 #### 3b. Nested in th (<th>foo!!bar</th>)
25598 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25602 #### 4c. No escaping needed
25603 #### --------------------------------------
25606 Tables: 1a. Simple example
25614 <nowiki>{|</nowiki>
25619 Tables: 1b. No escaping needed
25630 Tables: 1c. No escaping needed
25641 Tables: 1d. No escaping needed
25652 Tables: 2a. Nested in td
25657 <td>foo|bar</td></tr>
25658 <tr><td>x<div>a|b</div></td>
25662 |<nowiki>foo|bar</nowiki>
25664 |x<div><nowiki>a|b</nowiki></div>
25672 <td>x<div>a|b</div>
25673 </td></tr></tbody></table>
25677 Tables: 2b. Nested in td
25683 <td>a<i>b||c</i></td>
25684 <td>a<i><div>b||c</div></i></td>
25685 </tr></tbody></table>
25688 |<nowiki>foo||bar</nowiki>
25689 |a''<nowiki>b||c</nowiki>''
25690 |a''<div><nowiki>b||c</nowiki></div>''
25699 <td>a<i><div>b||c</div></i>
25705 Tables: 2c. Nested in td -- no escaping needed
25721 Tables: 3a. Nested in th
25737 Tables: 3b. Nested in th
25742 <tr><th>foo!!bar</th>
25743 <th><i>foo|bar</i></th>
25744 <th><i>foo!!bar</i></th>
25745 <th><i><span>foo!!bar</span></i></th>
25746 </tr></tbody></table>
25749 !<nowiki>foo!!bar</nowiki>
25750 !''<nowiki>foo|bar</nowiki>''
25751 !''<nowiki>foo!!bar</nowiki>''
25752 !''<span><nowiki>foo!!bar</nowiki></span>''
25761 <th><i>foo!!bar</i>
25763 <th><i><span>foo!!bar</span></i>
25769 Tables: 3c. Nested in th
25774 <tr><th>foo||bar</th>
25775 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25776 </tr></tbody></table>
25779 !<nowiki>foo||bar</nowiki>
25780 !<nowiki>foo||bar</nowiki>
25793 Tables: 4a. Escape -
25809 |<nowiki>-bar</nowiki>
25814 Tables: 4b. Escape +
25830 |<nowiki>+bar</nowiki>
25835 Tables: 4c. No escaping needed
25840 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25841 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25847 <div>a|b</div></td>
25892 Tables: 4d. No escaping needed
25897 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25898 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25899 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25910 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25920 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
25924 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
25926 <table><tr><td></td><td align="center"></td><td></td></tr></table>
25928 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
25930 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
25933 | || align="center" | ||
25943 | {{!}}{{!}} align="center" | ||
25947 ! !! align="center" | !!
25953 <td align="center"></td>
25955 </td></tr></tbody></table>
25960 <td align="center">
25963 </td></tr></tbody></table>
25967 <td align="center"></td>
25969 </td></tr></tbody></table>
25973 <th align="center"></th>
25975 </th></tr></tbody></table>
25979 T97430: Don't emit empty nowiki pairs around marker meta tags
25983 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25984 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25986 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25987 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25991 Unclosed xmlish element in table line shouldn't eat end delimiters
25996 <tbody><tr><td> <foo</td>
25997 <td> bar></td></tr>
26014 #### --------------- Links ----------------
26015 #### 1. Quote marks in link text
26016 #### 2. Wikilinks: Escapes needed
26017 #### 3. Wikilinks: No escapes needed
26018 #### 4. Extlinks: Escapes needed
26019 #### 5. Extlinks: No escapes needed
26020 #### --------------------------------------
26022 Links 1. WikiLinks: No escapes needed
26026 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26027 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26028 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26032 [[Foo|x [Foobar] x]]
26034 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26035 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26036 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26041 Links 2. WikiLinks: Escapes needed
26045 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26046 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26047 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26048 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26049 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26050 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26051 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26052 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26053 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26054 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26056 [[Foo|<nowiki>Foobar]</nowiki>]]
26057 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26058 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26059 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26060 [[Foo|<nowiki>|Bar</nowiki>]]
26061 [[Foo|<nowiki>]]bar</nowiki>]]
26062 [[Foo|<nowiki>[[bar</nowiki>]]
26063 [[Foo|<nowiki>x [[ y</nowiki>]]
26064 [[Foo|<nowiki>x ]] y</nowiki>]]
26065 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26067 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26068 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26069 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26070 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26071 <a href="/wiki/Foo" title="Foo">|Bar</a>
26072 <a href="/wiki/Foo" title="Foo">]]bar</a>
26073 <a href="/wiki/Foo" title="Foo">[[bar</a>
26074 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26075 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26076 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26081 Links 3. WikiLinks: No escapes needed
26085 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26086 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26091 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26092 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26097 Links 4. ExtLinks: Escapes needed
26101 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26102 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26103 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26104 <p>[http://google.com]</p>
26105 <p>[http://google.com google]</p>
26106 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26107 <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>
26109 [http://google.com <nowiki>[google]</nowiki>]
26110 [http://google.com <nowiki>google]</nowiki>]
26111 [http://google.com <nowiki>goog] le</nowiki>]
26113 <nowiki>[http://google.com]</nowiki>
26115 <nowiki>[http://google.com google]</nowiki>
26117 [http://google.com<nowiki>]</nowiki>
26119 [{{echo|http://google.com}}<nowiki>]</nowiki>
26121 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26122 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26123 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26124 </p><p>[http://google.com]
26125 </p><p>[http://google.com google]
26126 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26127 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26132 Links 5. ExtLinks: No escapes needed
26136 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26137 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26139 [http://google.com [google]
26141 [[http://google.com]]
26143 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26144 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26149 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26153 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26154 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26155 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26156 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26157 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26158 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26159 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26160 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26161 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26162 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26163 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26164 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26165 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26168 x<nowiki/>http://example.com<nowiki/>y
26169 http://example.com<nowiki/>?x
26170 http://example.com<nowiki/>&x
26171 http://example.com<nowiki/>'x
26172 http://example.com<nowiki/>,x
26173 http://example.com<nowiki/>.x
26174 http://example.com<nowiki/>;x
26175 http://example.com<nowiki/>:x
26176 http://example.com<nowiki/>;x
26177 http://example.com<nowiki/>!x
26178 http://example.com<nowiki/>=x
26179 http://example.com<nowiki/>(x)
26180 http://example.com(x<nowiki/>)
26184 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26189 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26191 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26192 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26193 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26194 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26195 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26201 "http://example.com"
26202 (http://example.com)
26203 (http://example.com) foo
26204 http://example.com,
26205 http://example.com, foo
26208 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26210 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26211 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26212 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26213 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26214 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26219 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26223 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26224 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26226 http://example.com.,;:!?\
26227 -http://example.com:
26229 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26230 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26235 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26239 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26240 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26241 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26245 X<nowiki/>RFC 123<nowiki/>y
26249 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26253 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26254 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26255 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26262 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26263 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26264 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26269 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26273 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26274 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26275 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26279 X<nowiki/>PMID 123<nowiki/>y
26283 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26287 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26288 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26289 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26296 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26297 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26298 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26303 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26307 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26308 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26309 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26312 ISBN 1234567890<nowiki/>1
26313 ISBN 1234567890<nowiki/>x
26314 a<nowiki/>ISBN 1234567890<nowiki/>b
26318 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26322 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26326 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26331 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26335 <p>this is not a link: http://example.com
26338 this is not a link: <nowiki>http://example.com</nowiki>
26342 Links 15. Link trails can't become link prefixes.
26347 <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>
26349 [[Söfnuður]]-[[00]]
26351 <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>
26355 #### --------------- Quotes ---------------
26356 #### 1. Quotes inside <b> and <i>
26357 #### 2. Link fragments separated by <i> and <b> tags
26358 #### 3. Link fragments inside <i> and <b>
26359 #### 4. No escaping needed
26360 #### --------------------------------------
26362 1a. Quotes inside <b> and <i>
26373 <b>foo'<i>bar'</i>baz</b>
26382 <i>fools'<span> errand</span></i>
26383 <i><span>fool</span>'s errand</i>
26384 '<i>foo</i> bar '<i>baz</i>
26385 a|!*#-:;+-~[]{}b'<i>x</i>
26389 ''<nowiki>''foo''</nowiki>''
26390 ''<nowiki>'''foo'''</nowiki>''
26392 '''<nowiki/>'foo''''
26393 '''<nowiki>''foo''</nowiki>'''
26394 '''<nowiki>'''foo'''</nowiki>'''
26395 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26396 '''foo'''<nowiki/>'s
26402 '''foo'''<nowiki/>'
26403 ''''foo'''<nowiki/>'
26404 ''fools'<span> errand</span>''
26405 ''<span>fool</span>'s errand''
26406 '<nowiki/>''foo'' bar '''baz''
26407 a|!*#-:;+-~[]{}b'''x''
26411 1b. Quotes inside <b> and <i> with other tags on same line
26415 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26416 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26417 <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>
26418 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26419 '<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>
26420 '<i>foo</i> <div title="name">test</div>
26421 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26422 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26423 <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>
26426 '''a'' foo ''[[bar]]''
26427 ''a''' foo ''[[bar]]''
26428 ''a''' foo '''{{echo|[[bar]]}}'''
26429 [[foo]] x'''[[bar]]''
26430 '''foo'' <ref>test</ref>
26431 '''foo'' <div title="name">test</div>
26432 '''foo'' and <br> bar
26437 2. Link fragments separated by <i> and <b> tags
26441 <p>[[<i>foo</i>hello]]</p>
26442 <p>[[<b>foo</b>hello]]</p>
26444 [[''foo''<nowiki>hello]]</nowiki>
26446 [['''foo'''<nowiki>hello]]</nowiki>
26449 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26450 # this is one of the shortcomings of this format
26452 3. Link fragments inside <i> and <b>
26456 <p><i>[[foo</i>]]</p>
26457 <p><b>[[foo</b>]]</p>
26459 ''[[foo''<nowiki>]]</nowiki>
26461 '''[[foo'''<nowiki>]]</nowiki>
26465 4. No escaping needed
26469 <p>'<span><i>bar</i></span>'
26470 '<span><b>bar</b></span>'
26474 '<span>''bar''</span>'
26475 '<span>'''bar'''</span>'
26479 #### ----------- Paragraphs ---------------
26480 #### 1. No unnecessary escapes
26481 #### --------------------------------------
26484 1. No unnecessary escapes
26488 <p>bar <span>[[foo]]</span>
26489 </p><p>=bar <span>[[foo]]</span>
26490 </p><p>[[bar <span>[[foo]]</span>
26491 </p><p>]]bar <span>[[foo]]</span>
26492 </p><p>=bar <span>foo]]</span>=
26495 bar <span><nowiki>[[foo]]</nowiki></span>
26497 =bar <span><nowiki>[[foo]]</nowiki></span>
26499 [[bar <span><nowiki>[[foo]]</nowiki></span>
26501 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26503 =bar <span>foo]]</span><nowiki>=</nowiki>
26506 #### ----------------------- PRE --------------------------
26508 1. Leading whitespace in SOL context should be escaped
26531 <nowiki> </nowiki>a
26533 <nowiki> </nowiki> a
26537 <nowiki> </nowiki> a
26539 <nowiki> </nowiki>a
26542 <nowiki> </nowiki>b
26565 2. Leading whitespace in non-indent-pre contexts should not be escaped
26569 <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>
26570 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26571 <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>
26581 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26600 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26604 <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>
26606 [[File:Foobar.jpg|thumb|caption]]
26610 5. Nowiki escaping should account for indent-pres
26620 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26634 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
26637 "modes": ["html2wt"],
26638 "scrubWikitext": true
26646 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
26647 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
26648 <p> <!--boo-->*foo</p>
26649 <p><!--boo--> *foo</p>
26650 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
26651 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
26667 <nowiki>*</nowiki>foo
26669 <nowiki/><!--boo-->*foo
26671 <!--boo--><nowiki/>*foo
26673 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
26675 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
26678 #### --------------- Behavior Switches --------------------
26681 1. Valid behavior switches should be escaped
26688 <nowiki>__TOC__</nowiki>
26689 ''<nowiki>__TOC__</nowiki>''
26693 2. Invalid behavior switches should not be escaped
26704 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26706 Behavior switches should be SOL-transparent
26710 <meta property="mw:PageProp/toc" />
26712 <!-- this one's bogus -->
26715 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26717 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26721 <!-- this one's bogus -->
26730 #### --------------- HTML tags ---------------
26733 #### 3. multi-line html tag
26734 #### 4. extension tags
26735 #### -----------------------------------------
26741 <a href="http://google.com">google</a>
26743 <a href="http://google.com">google</a>
26751 <ul><li> <div>foo</div></li>
26752 <li> <div style="color:red">foo</div></li>
26753 <li> <td></li></ul>
26756 * <nowiki><div>foo</div></nowiki>
26757 * <nowiki><div style="color:red">foo</div></nowiki>
26758 * <nowiki><td></nowiki>
26762 3. multi-line html tag
26781 <p><ref>foo</ref>
26782 </p><p><ref>bar
26783 </p><p>baz</ref>
26786 <nowiki><ref>foo</ref></nowiki>
26788 <nowiki><ref>bar</nowiki>
26790 baz<nowiki></ref></nowiki>
26794 Parsoid: newline inducing block nodes don't suppress <nowiki>
26800 <nowiki> </nowiki>a
26805 #### --------------- Others ---------------
26811 <p><nowiki>foo</nowiki>
26814 <nowiki>foo</nowiki>
26817 ## The quote-char in the input is necessary for triggering the bug
26819 (T54035) Nowiki-escaping should not get tripped by " :" in text
26828 #----------- End of wikitext escaping tests --------------
26832 Tag-like HTML structures are passed through as text
26854 </p><p>1<d e>f
26859 HTML tag with necessary entities in attributes
26861 <span title="&amp;">foo</span>
26863 <p><span title="&amp;">foo</span>
26868 HTML tag with 'unnecessary' entity encoding in attributes
26870 <span title="&">foo</span>
26872 <p><span title="&">foo</span>
26877 HTML tag with broken attribute value quoting
26879 parsoid=wt2html,html2html
26881 <span title="Hello world>Foo</span>
26883 <p><span title="Hello world">Foo</span>
26886 <p><span title="Hello world">Foo</span></p>
26890 Self-closed tag with broken attribute value quoting
26892 parsoid=wt2html,html2html
26894 <div title="Hello world />Foo
26896 <div title="Hello world"></div><p>Foo
26899 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26903 Table with broken attribute value quoting
26905 parsoid=wt2html,html2html
26908 | title="Hello world|Foo
26913 <td title="Hello world">Foo
26919 <td title="Hello world">Foo
26925 Table with broken attribute value quoting on consecutive lines
26927 parsoid=wt2html,html2html
26930 | title="Hello world|Foo
26931 | style="color:red|Bar
26936 <td title="Hello world">Foo
26938 <td style="color:red">Bar
26944 <td title="Hello world">Foo
26945 </td><td style="color: red">Bar
26946 </td></tr></tbody></table>
26951 Accept empty td cell attribute
26954 | align="center" |foo|| |
26959 <td align="center">foo</td>
26966 Non-empty attributes in th-cells
26969 !Foo!! style="color: red" |Bar
26975 <th style="color: red">Bar
26981 Accept empty attributes in th-cells
26996 Empty table rows go away
27017 ### Parsoid-centric tests for testing RTing of inter-element separators
27018 ### Edge cases not tested by existing parser tests and specific to
27019 ### Parsoid-specific serialization strategies.
27023 RT-ed inter-element separators should be valid separators
27035 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27039 # Parsoid-only test of a DOM pass
27041 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27053 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27054 <p>bar</p></small></td></tr>
27058 <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>
27062 # Note that the "style" attribute is really a template parameter here.
27063 # The = would have to be {{=}} if you wanted the literal.
27065 Empty TD followed by TD with tpl-generated attribute
27070 |{{echo|style='color:red'}}|foo
27084 Indented table with an empty td
27102 ## We have some newline diffs RT-ing this edge case
27103 ## and it is not important enough -- we seem to be emitting
27104 ## at most 2 newlines after a </tr> and this is unrelated to
27105 ## the issue from T85627 that this is testing.
27107 Indented table with blank lines in between (T85627)
27126 Indented block & table
27140 <div data-parsoid='{"stx":"html"}'>foo</div>
27142 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27147 Indent and comment before table row
27162 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27163 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27167 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27169 Empty TR followed by a template-generated TR
27175 {{echo|<tr><td>foo</td></tr>}}
27180 <tr class='mw-empty-elt'></tr>
27181 <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}}]}'>
27186 ## PHP and parsoid output differ for this, and since this is primarily
27187 ## for testing Parsoid's serializer, marking this Parsoid only
27189 Empty TR followed by mixed-ws-comment line should RT correctly
27202 <tr class='mw-empty-elt'></tr>
27205 <!--c--> </tr><!--d-->
27211 Multi-line image caption generated by templates with/without trailing newlines
27213 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27214 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27216 <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>
27217 <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>
27221 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27225 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27227 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27229 <includeonly>foo</includeonly>
27237 ## PHP emits broken html for this, and since this is primarily
27238 ## a Parsoid serializer test, marking this Parsoid only
27240 Improperly nested inline or quotes tags with whitespace in between
27242 <span> <s>x</span> </s>
27245 <p><span> <s>x</s></span><s> </s>
27246 <b> <i>x</i></b><i> </i>
27251 Encapsulate protected attributes from wt
27253 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27255 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27259 <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>
27261 <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">
27262 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
27266 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27267 ## Having nested or stray pre tags results in the attempt to add duplicates,
27268 ## causing an assertion fail. This test tries to prevent that situation.
27270 Ensure ParagraphWrapper can deal with stray closing pre tags
27280 1. Ensure fostered text content is wrapped in element nodes
27284 <table>hi</table><table>ho</table>
27286 hi<table></table>ho<table></table>
27288 <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>
27292 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27294 parsoid=wt2html,wt2wt
27304 </td></tr></tbody></table>
27306 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||
27307 </span><table data-parsoid='{"stx":"html"}'>
27308 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
27309 </td></tr></tbody></table>
27313 Encapsulation properly handles null DSR information from foster box
27315 parsoid=wt2html,wt2wt
27317 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27319 <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>
27323 1. Encapsulate foster-parented transclusion content
27325 parsoid=wt2wt,wt2html
27327 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27329 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
27331 <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>
27335 2. Encapsulate foster-parented transclusion content
27337 parsoid=wt2wt,wt2html
27339 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27341 <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>
27352 3. Encapsulate foster-parented transclusion content
27354 parsoid=wt2wt,wt2html
27356 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27358 <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>"]}">
27371 4. Encapsulate foster-parented transclusion content
27373 parsoid=wt2wt,wt2html
27375 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27377 <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>"]}">
27390 5. Encapsulate foster-parented transclusion content
27392 parsoid=wt2wt,wt2html
27394 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27396 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27398 <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>
27402 6. Encapsulate foster-parented transclusion content
27404 parsoid=wt2wt,wt2html
27406 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27408 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
27410 <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>
27414 7. Encapsulate foster-parented transclusion content
27416 parsoid=wt2wt,wt2html
27418 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27420 <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>
27430 # Note that the wt is broken on purpose: the = should be {{=}} if you
27431 # don't want it to be a template parameter key.
27433 8. Encapsulate foster-parented transclusion content
27435 parsoid=wt2wt,wt2html
27438 }}{|{{echo|style='color:red'}}
27449 </td></tr></tbody></table>
27451 <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">
27452 </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">
27455 </td></tr></tbody></table>
27459 9. Encapsulate foster-parented transclusion content
27461 parsoid=wt2wt,wt2html
27463 <table>{{echo|hi</table>hello}}
27465 hi<table></table><p>hello
27468 <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>
27472 Table in fosterable position
27483 <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">
27485 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27491 # Parsoid only for T66747
27493 Properly encapsulate empty-content transclusions in fosterable positions
27501 <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"}]]}'>
27507 Always encapsulate foster box when template range is expanded to table
27520 T115289: Unclosed table
27522 {{echo|<table>}}<!--c-->[[Category:Two]]
27524 <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>
27528 T115289: Don't migrate newlines out of tables with fostered content
27530 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27532 <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>
27536 T73074: More fostering fun
27538 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27540 <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>
27544 Support <object> element with .data attribute
27548 <object data="test.swf"></object>
27550 <object data="test.swf"></object>
27554 Don't block XML namespace declaration
27556 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27558 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27561 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27564 # -----------------------------------------------------------------
27565 # The following section of tests are primarily to spec requirements
27566 # around Parsoid's serialization (old, new, edited content)
27568 # All these tests are marked Parsoid html2wt and html2html only
27569 # ----------------------------------------------------------------
27572 Ignore rel attribute in a-tags during serialization to url-links
27576 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27577 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27578 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27580 http://en.wikipedia.org/wiki/Foobar
27581 http://en.wikipedia.org/wiki/Foobar
27582 http://en.wikipedia.org/wiki/Foobar
27585 # 'mi' is a localinterwiki prefix as well as a language
27587 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27591 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27597 Parsoid should accept interwiki shortcuts
27601 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27602 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27603 <a href='./fr:Foo'>Foo</a></p>
27604 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27605 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27606 <a href='fr%3AFoo'>Foo</a></p>
27607 <p><a href='FR%3AFoo'>Foo</a>
27608 <a href='./FR:Foo'>Foo</a></p>
27623 Parsoid should not accept invalid interwiki shortcuts
27627 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27628 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27629 <a href='news:Foo'>Foo</a></p>
27638 New wikilinks should be serialized properly
27642 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27643 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27644 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27645 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27646 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27650 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27651 http://en.wikipedia.org/wiki/Foo
27652 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27656 New wiki links (href variations)
27660 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27661 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27662 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27663 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27668 [[Toxine bactérienne]]
27672 New wiki links (content string variations)
27676 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27677 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27678 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27682 [[Foo_bar|./Foo_bar]]
27686 New category links (href variations)
27690 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27691 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27692 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27694 [[Category:Toxine bactérienne]]
27695 [[Category:Toxine bactérienne]]
27696 [[Category:Toxine bactérienne]]
27700 New sol transparent links don't need indent-pre nowiki protection
27705 <link rel="mw:PageProp/redirect" href="./Main_Page">
27706 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27707 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27709 #WEITERLEITUNG [[Main Page]]
27710 <!-- this is good --> [[Category:Good]]
27711 <!-- this is great --> [[Kategorie:Great]]
27715 New interlanguage links (href variations)
27719 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27720 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27721 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27723 [[es:Toxine bactérienne]]
27724 [[es:Toxine_bactérienne]]
27725 [[es:Toxine_bactérienne]]
27729 Image: Modifying size of an image (1)
27732 "modes": ["wt2wt"],
27734 ["img[height]", "attr", "height", "22"],
27735 ["img[width]", "attr", "width", "200"]
27739 [[Image:Foobar.jpg|230x230px]]
27741 [[Image:Foobar.jpg|200x200px]]
27745 Image: Modifying size of an image (2)
27748 "modes": ["wt2wt"],
27750 ["img[height]", "attr", "height", "100"],
27751 ["img[width]", "attr", "width", "500"]
27755 [[Image:Foobar.jpg|230x230px]]
27757 [[Image:Foobar.jpg|500x500px]]
27760 # Change in size is ignored so long as class='mw-default-size'
27762 Image: Modifying size of an image (3)
27765 "modes": ["wt2wt"],
27767 ["figure[class]", "removeClass", "mw-default-size"],
27768 ["figure img", "attr", "height", "19"],
27769 ["figure img", "attr", "width", "170"]
27773 [[Image:Foobar.jpg|thumb]]
27775 [[Image:Foobar.jpg|thumb|170x170px]]
27779 Image: Modifying alignment of an image (T50665)
27782 "modes": ["wt2wt"],
27784 ["figure[class]", "removeClass", "mw-halign-right"],
27785 ["figure[class]", "addClass", "mw-halign-left"]
27789 [[Image:Foobar.jpg|thumb|caption|right]]
27791 [[Image:Foobar.jpg|thumb|caption|left]]
27795 Image: Modifying mw-default-size of an frameless image (T64805)
27798 "modes": ["wt2wt"],
27800 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27804 [[Image:Foobar.jpg|frameless|right]]
27806 [[Image:Foobar.jpg|frameless|right|220x220px]]
27810 Image: Modifying valign of an image (T51221)
27813 "modes": ["wt2wt"],
27815 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27816 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27820 [[File:Foobar.jpg|20px|middle]]
27822 [[File:Foobar.jpg|20px|text-top]]
27826 Image: Modifying alt attribute of an image (T58400)
27829 "modes": ["wt2wt"],
27831 ["img[alt]", "attr", "alt", "some alternate edited text"]
27835 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27837 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27841 Image: Modifying caption of an image
27844 "modes": ["wt2wt"],
27846 ["figcaption", "text", "new caption"]
27850 [[Image:Foobar.jpg|thumb|original caption]]
27852 [[Image:Foobar.jpg|thumb|new caption]]
27856 Image: empty alt attribute (T50924)
27860 [[File:Foobar.jpg|thumb|alt=|bar]]
27862 <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>
27866 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27872 <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>
27874 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27878 Image: Block level image should have \n before and after
27881 [[File:Foobar.jpg|right|thumb|150x150px]]
27885 <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>
27890 Image: New block level image should have \n before and after (existing content)
27893 [[File:Foobar.jpg|right|thumb|150x150px]]
27897 <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>
27902 Image: upright option (parsoid)
27904 [[File:Foobar.jpg|thumb|upright|caption]]
27905 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27906 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27908 <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>
27909 <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>
27910 <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>
27914 Image: upright option is ignored on inline and frame images (parsoid)
27916 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27918 <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>
27922 Image: in template parameter with empty parameter
27924 {{echo|[[File:Foobar.jpg|link=]]}}
27926 <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>
27930 Image: from basic HTML (1)
27934 <span typeof="mw:Image">
27935 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27938 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27942 Image: from basic HTML (2)
27946 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27948 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27952 Image: from basic HTML (3)
27956 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27958 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27962 Image: from basic HTML (4)
27966 <img src="./File:Foobar.jpg">
27968 [[File:Foobar.jpg|link=]]
27972 Image: Invalid title as link
27974 [[File:Foobar.jpg|link=<]]
27976 <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>
27979 <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>
27983 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27988 <li><p>foo</p></li>
27995 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27999 <ul> <li>foo</li></ul>
28005 Don't strip leading whitespace when handling indent-pre suppressing tags
28010 <tr><td> indented row</td></tr>
28013 <b>This is very bold of you!</b>
28016 indented cell (no pre-wrapping!)
28026 '''This is very bold of you!'''
28030 indented cell (no pre-wrapping!)
28038 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28060 <nowiki> </nowiki></span>bar2
28063 <nowiki> </nowiki><span>bar</span>
28066 <nowiki> </nowiki><span>foo</span>
28071 Lists: Dont insert newlines in a serialized list item.
28075 <ul><li>a<br>b</li><li>c</li></ul>
28082 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28085 "modes": ["html2wt"],
28086 "scrubWikitext": false
28089 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28090 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28092 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28093 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28095 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28097 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28099 == hello there [[Category:A1]] ==
28101 == [[Category:A2]] hi pal ==
28103 == <!--foo--> [[Category:A3]] how goes it ==
28105 == it goes well [[Category:A4]] <!--bar--> ==
28107 ==howdy [[Category:A5]]==
28113 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28116 "modes": ["html2wt"],
28117 "scrubWikitext": true
28120 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28121 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28123 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28124 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28126 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28134 <!--foo-->[[Category:A3]]
28139 [[Category:A4]] <!--bar-->
28147 Headings: Don't hoist metas that come from templates
28150 "modes": ["html2wt"],
28151 "scrubWikitext": true
28154 <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>
28156 == {{echo|foo [[Category:Foo]]}} ==
28160 Headings: Category in ref isn't hoisted
28163 "modes": ["html2wt"],
28164 "scrubWikitext": true
28167 <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>
28169 <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>
28172 [[Category:Baz]] </ref> ==
28178 Parsoid: Serialize positional parameters with = in them as named parameter
28182 <p about="#mwt1" typeof="mw:Transclusion"
28183 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28185 <p about="#mwt1" typeof="mw:Transclusion"
28186 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28188 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28189 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28190 <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>
28194 {{echo|1=f=oo|2=bar}}
28196 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28197 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28198 {{echo|<nowiki>f=oo</nowiki>|bar}}
28202 Parsoid: Serialize positional parameters with = in extlink as named parameter
28206 <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>
28208 {{echo|1=http://stuff?is=ok}}
28212 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28216 <div>a<p>b</p></div>
28237 Substrings resembling wikitext in hrefs should not get nowiki escapes
28241 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28247 Enforce single-line context in the serializer
28254 <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">
28255 </span><span about="#mwt1">you</span> </h2>
28257 <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>
28259 <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
28260 there</span></li></ol>
28272 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28279 </tbody></table></dd></dl>
28283 == hi {{bogus|there
28294 * foo '''bar''' baz
28306 Serialize new placeholder space without spans
28310 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28312 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28314 <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>
28320 <ref>foo : bar</ref>ok
28324 #-----------------------
28325 # Tag minimization tests
28326 #-----------------------
28329 1. I/B quote minimization: wikitext-only tags should be combined
28333 <p><i>A</i><i>B</i></p>
28334 <p><b>A</b><b>B</b></p>
28335 <p><i>A</i><b><i>B</i></b></p>
28336 <p><b>A</b><i><b>B</b></i></p>
28337 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28338 <p><i><b>A</b></i><i><b>B</b></i></p>
28339 <p><i><b>A</b></i><b><i>B</i></b></p>
28340 <p><b><i>A</i></b><i><b>B</b></i></p>
28360 2. I/B quote minimization: wikitext and html tags should not be combined
28364 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28365 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28369 ''A''<nowiki/>'''<i>B</i>'''
28373 3. I/B quote minimization: templated content stops minimization
28377 <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>
28378 <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>
28380 ''A''{{echo|''B''}}
28382 ''A''{{echo|'''''B'''''}}
28386 4. I/B quote minimization: new content should be mimimized with adjacent old content
28390 <p><i>A</i><i>B</i></p>
28391 <p><b>A</b><b>B</b></p>
28392 <p><i>A</i><b><i>B</i></b></p>
28402 5a. Merge adjacent quote nodes if they've been edited
28405 "modes": ["wt2wt", "selser"],
28407 ["p", "contents", "remove", ":contains('b')"]
28417 5b. Merge adjacent quote nodes if they've been edited
28420 "modes": ["wt2wt", "selser"],
28426 ''a''<span id="x">b</span>''c''
28432 1. Merge adjacent link nodes as long as at least one element is new
28435 "modes": ["html2wt"],
28436 "scrubWikitext": true
28439 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28440 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28441 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28445 [[Football|Foot]][[Football|ball]]
28449 2. Merge adjacent link nodes and enable additional normalizations
28452 "modes": ["html2wt"],
28453 "scrubWikitext": true
28456 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28462 3. Don't merge adjacent link nodes if scrubWikitext is false
28465 "modes": ["html2wt"],
28466 "scrubWikitext": false
28469 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28471 [[Football|Foot]][[Football|ball]]
28475 1. Move format tags outside of WikiLink
28478 "modes": ["html2wt"],
28479 "scrubWikitext": true
28482 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
28483 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
28484 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
28487 '''''[[Football]]'''''
28488 <u>'''''[[Football]]'''''</u>
28492 2. Move format tags outside of WikiLink with mergable A tags
28495 "modes": ["html2wt"],
28496 "scrubWikitext": true
28499 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
28501 '''''[[Football]]'''''
28505 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
28508 "modes": ["html2wt"],
28509 "scrubWikitext": true
28512 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
28514 <font color="red"><u>'''[[Foo]]'''</u></font>
28518 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
28521 "modes": ["html2wt"],
28522 "scrubWikitext": true
28525 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
28526 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
28527 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
28529 [[Foo|<font color="red">Foo</font>]]
28530 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
28531 [[Foo|<span class="Bar">Foo</span>]]
28535 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
28538 "modes": ["selser"],
28539 "scrubWikitext": true,
28541 ["a", "html", "<i>Foo</i>"]
28551 6. Regression test: Manual edit test to ensure diff markers are not lost
28554 "modes": ["selser"],
28555 "scrubWikitext": true,
28557 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
28566 #------------------------------
28567 # End of tag minimization tests
28568 #------------------------------
28571 T56262: New entities
28575 <span typeof="mw:Entity"> </span>
28580 ## Note that there is no wikitext output for 'unknownproperty' ##
28581 ## Unknown magic words are silently dropped ##
28588 <meta property='mw:PageProp/toc' />
28589 <meta property='mw:PageProp/notoc' />
28590 <meta property='mw:PageProp/forcetoc' />
28591 <meta property='mw:PageProp/index' />
28592 <meta property='mw:PageProp/noindex' />
28593 <meta property='mw:PageProp/nogallery' />
28594 <meta property='mw:PageProp/noeditsection' />
28595 <meta property='mw:PageProp/notitleconvert' />
28596 <meta property='mw:PageProp/nocontentconvert' />
28597 <meta property='mw:PageProp/unknownproperty' />
28607 __NOCONTENTCONVERT__
28611 Consecutive <pre>s should not get merged
28613 parsoid=html2wt,html2html
28615 <pre>a</pre><pre>b</pre>
28643 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28647 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28649 [[Special:BookSources/1234567890|ISBN 1234567895]]
28653 Edited RFC links not serializable as RFC links should serialize as extlinks
28657 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28659 [https://tools.ietf.org/html/rfc123 New RFC]
28663 Edited PMID links not serializable as PMID links should serialize as extlinks
28667 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28669 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28673 WTS of autolinks with trailing/surrounding context
28677 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28678 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28679 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28680 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28681 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28682 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28684 http://cscott.net'''foo'''
28686 http://cscott.net<b>foo</b>
28688 '''http://cscott.net'''
28690 '''http://cscott.net '''
28692 '''http://cscott.net<nowiki/>x'''
28694 http://cscott.net<nowiki/>x
28698 WTS of autolinks with nowikis (round-trip)
28700 x<nowiki/>http://cscott.net<nowiki/>x
28702 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28705 # this is the "easy" test because it leaves in place all the
28706 # data-parsoid information indicating this is an autolink
28708 WTS of autolinks with escapes (editing)
28711 "modes": ["wt2wt"],
28713 [ "span", "remove" ]
28717 x<nowiki/>http://cscott.net<nowiki/>x
28719 x<nowiki/>http://cscott.net<nowiki/>x
28723 WTS of edited autolink-like text (T103364)
28726 "modes": ["wt2wt"],
28728 [ "span[typeof]", "removeAttr", "typeof" ]
28732 Not a link: <nowiki>http://example.com</nowiki>.
28734 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28738 WTS of newly-authored autolink-like text (T103364)
28742 <p>http://example.com is not a link.</p>
28744 <nowiki>http://example.com</nowiki> is not a link.
28748 WTS of autolink-like text after an autolink (T108563)
28752 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28754 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28758 Magic links inside links (not autolinked)
28760 [[Foo|http://example.com]]
28763 [[Foo|ISBN 123456789x]]
28765 [http://foo.com http://example.com]
28766 [http://foo.com RFC 1234]
28767 [http://foo.com PMID 1234]
28768 [http://foo.com ISBN 123456789x]
28770 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28771 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28772 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28773 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28774 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28775 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28776 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28777 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28780 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28781 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28782 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28783 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28785 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28786 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28787 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28788 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28792 Magic links inside image captions (autolinked)
28794 [[File:Foobar.jpg|thumb|http://example.com]]
28795 [[File:Foobar.jpg|thumb|RFC 1234]]
28796 [[File:Foobar.jpg|thumb|PMID 1234]]
28797 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28799 <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>
28800 <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>
28801 <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>
28802 <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>
28804 <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>
28805 <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>
28806 <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>
28807 <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>
28811 WTS of magic word text (T109371)
28816 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28817 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28819 <nowiki>RFC 1234</nowiki>
28821 [http://foo.com RFC 1234]
28827 Edited Redirect link should emit a non-piped wikitext link
28831 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28837 T75121: Infer extension name from typeOf if data-mw is not present
28839 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28841 <div typeOf="mw:Extension/foo"></div>
28846 # Note that the <p> wrapping isn't present in PHP parser output
28847 # The important thing for this test is that P-wrapping doesn't
28848 # interfere with the <nowiki> protection for leading - in <td>
28849 # (which isn't necessary for <th>).
28851 T88318: p-wrapped dash in table.
28853 parsoid=html2wt,wt2wt
28856 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28857 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28858 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28865 |<nowiki>-</nowiki>
28866 |<nowiki>- </nowiki>
28886 <td><small>-</small>
28893 </td></tr></tbody></table>
28897 T149209: WTS: Handle newlines in table cells properly
28905 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28907 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28913 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
28915 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
28937 T149209: Selser: Handle newlines in table cells properly
28940 "modes": ["selser"],
28942 [ "#h1", "html", "a\nb\n" ],
28943 [ "#h2", "html", "a\nb\n" ],
28944 [ "#c1", "html", "a\nb\n" ],
28945 [ "#c2", "html", "<p>a</p>" ],
28946 [ "#c3", "html", "<p>a</p>" ],
28947 [ "#c4", "html", "edit-me<p>a</p>" ]
28952 ! id="h1" |edit-me!!1
28954 ! id="h2" |edit-me||2
28956 | id="c1" |edit-me||3
28958 | id="c2" |edit-me||4
28960 | id="c3" |edit-me||p||q||r
28962 | id="c4" |edit-me||p||q||r
28991 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28996 <td id='mwAc'>foo</td>
28997 <td id='serialize-this'>bar</td>
29002 | id="serialize-this" |bar
29007 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29011 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29013 <div id="hello">ok</div>
29017 Testing serialization after deletion in references
29020 "modes": ["wt2wt"],
29026 hi <ref><div id="x">ho</div></ref>
29036 Testing serialization after deletion of table cells
29039 "modes": ["wt2wt", "selser"],
29047 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29057 Testing selser after addition of new row before first row (T125419)
29060 "modes": ["wt2wt", "selser"],
29062 [ "tr", "before", "<tr><td>X</td></tr>" ]
29078 Serialize new table rows in a HTML table using HTML tags
29081 "modes": ["wt2wt", "selser"],
29083 [ "tr", "before", "<tr><td>X</td></tr>" ]
29087 <table><tr><td>a</td></tr></table>
29089 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29093 Serialize new table cells in a HTML row using HTML tags
29096 "modes": ["wt2wt", "selser"],
29098 [ "td", "before", "<td>X</td>" ]
29102 <table><tr><td>a</td></tr></table>
29104 <table><tr><td>X</td><td>a</td></tr></table>
29108 Serialize wikitext list items as HTML list items when embedded in a HTML list
29112 <ul data-parsoid='{"stx": "html"}'>
29113 <li data-parsoid='{}'>a</li>
29123 # SSS FIXME: Is this actually a good thing given the
29124 # odd nested list output that is generated by MW?
29125 # <ul><li>foo<ul>..</ul></li></ul> instead of
29126 # <ul><li>foo</li><ul>..</ul></ul>
29128 Wikitext lists can be nested inside HTML lists
29132 <ul data-parsoid='{"stx": "html"}'>
29133 <li data-parsoid='{"stx": "html"}'>a
29134 <ul><li>b</li></ul>
29138 <ul data-parsoid='{"stx": "html"}'>
29140 <ul><li>y</li></ul>
29161 "modes": ["wt2wt"],
29163 [ "#xyz", "before", "<b>before</b> stuff " ],
29164 [ "#xyz", "after", " stuff <i>after</i>" ],
29165 [ "#xyz", "html", "x <b>y</b> z" ]
29169 <span id="xyz">hello</span>
29171 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29175 Never serialize a-tag as html, regardless of what data-parsoid has to say
29177 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29179 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29184 ## SSS FIXME: This is broken output nevertheless.
29185 ## What might be a reasonable non-broken output for this?
29186 ## This is an edge case unlikely to be seen in production
29187 ## that I am not wasting more time on this right now.
29189 Never serialize a-tag as html, no matter what attributes it has
29191 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29193 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29195 [http://boo.org http://boohoo.org]
29198 # Misnested is an indication that selser can reuse the source but these have
29199 # shown to sneak through on occasion. See T101768.
29200 # The original wikitext here is: [http://test.com [[one]] two three]
29202 Strip span tags added to mark misnested links
29206 <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>
29208 [http://test.com][[one]] two three
29212 Catch regression when unpacking misnested links
29216 {{echo|hi}}[http://example.com [[ho]]]
29218 <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>
29222 Catch regression when unpacking with trailing content
29224 {{echo|Foo <references/> bar}}
29226 <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>
29230 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29234 <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|}"]}'>
29246 ## This test verifies the presence and computation of this attribute indirectly
29247 ## by making an edit and ensuring that the serialization is correct (which it would be
29248 ## only if firstWikitextNode is properly set).
29250 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
29253 "modes": ["wt2wt"],
29255 [ "div#x", "remove" ],
29256 [ "div", "before", "<div>new</div>" ]
29260 <div id="x">foo</div>
29262 {{echo|<div>boo</div>
29270 {{echo|<div>boo</div>
29276 # --------------------------------------------
29277 # Tests spec'ing wikitext serialization norms |
29278 # --------------------------------------------
29281 Serialize multi-line indent-pre starting with wikitext syntax
29295 1. Categories should always be serialized on their own line
29299 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
29307 2. Categories that are part of templates should not introduce a line break
29309 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
29311 <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>
29314 # Careful while editing these next 2 tests. There are \u200f characters
29315 # before and after the <link> tags in the HTML and following some
29316 # of the categories in wikitext
29317 # Do not remove these characters in edits.
29319 # As part of the serialization, these bidi characters will get stripped.
29321 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
29324 "modes": ["html2wt"],
29325 "scrubWikitext": true
29328 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
29329 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
29332 [[קטגוריה: שיטות משפט]]
29336 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
29339 "modes": ["html2wt"],
29340 "scrubWikitext": true
29343 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
29350 Lists: Add space after bullets
29357 <li><span> baz</span></li>
29362 * <span> baz</span>
29366 1. Headings: Add space before/after == (T53744)
29373 <h2><span> baz</span></h2>
29381 == <span> baz</span> ==
29385 2. Headings: Add space before/after == even after hoisted content
29388 "modes": ["html2wt"],
29389 "scrubWikitext": true
29392 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29400 1. Headings: suppress newly created empty headings
29403 "modes": ["html2wt"],
29404 "scrubWikitext": true
29412 2. Headings: don't suppress empty headings if scrubWikitext is false
29422 3. Headings: suppress empty headings on edits
29425 "modes": ["selser"],
29426 "scrubWikitext": true,
29432 ==<span id="x">foo</span>==
29437 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29440 "modes": ["html2wt"],
29441 "scrubWikitext": true
29444 <h2>foo<br/>bar</h2>
29445 <h2>foo <span><br/>bar</span> baz</h2>
29449 == foo <span> bar</span> baz ==
29453 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29456 "modes": ["html2wt"],
29457 "scrubWikitext": false
29460 <h2>foo<br/>bar</h2>
29466 1. WT Quote Tags: suppress newly created empty style tags
29469 "modes": ["html2wt"],
29470 "scrubWikitext": true
29478 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29484 ''<nowiki/>'''''<nowiki/>'''
29488 3. WT Quote Tags: suppress empty style tags on edits
29491 "modes": ["selser"],
29492 "scrubWikitext": true,
29498 '''<span id="x">foo</span>'''
29503 1. Anchors: suppress newly created empty anchors
29506 "modes": ["html2wt"],
29507 "scrubWikitext": true
29510 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29515 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29518 "modes": ["html2wt"],
29519 "scrubWikitext": false
29522 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29528 3. Anchors: suppress empty anchors on edits
29531 "modes": ["selser"],
29532 "scrubWikitext": true,
29538 [[Test|<span id="x">foo</span>]]
29543 3a. Anchors: do not suppress numbered extlinks
29546 "modes": ["wt2wt"],
29547 "scrubWikitext": true
29552 <a rel="mw:ExtLink" href="http://foo.com"></a>
29556 3b. Anchors: do not suppress numbered extlinks
29559 "modes": ["wt2wt"],
29560 "scrubWikitext": true,
29566 [http://foo.com <span id="x">foo</span>]
29572 Normalizations should be restricted to edited content
29575 "modes": ["selser"],
29576 "scrubWikitext": true,
29578 [ "h1", "before", "<i></i>"]
29592 1. Multiple normalizations (html2wt)
29595 "modes": ["html2wt"],
29596 "scrubWikitext": true
29600 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29601 </a><b><i></i></b>x</p>
29610 2. Multiple normalizations (selser)
29613 "modes": ["selser"],
29614 "scrubWikitext": true,
29616 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29620 <span id="x">foo</span>
29622 <span id="x">foo</span>
29628 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29631 "modes": ["html2wt"],
29632 "scrubWikitext": true
29644 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29651 <nowiki> </nowiki>hi
29653 <nowiki> </nowiki> hello
29657 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29660 "modes": ["html2wt"],
29661 "scrubWikitext": true
29670 baz bang</td></tr></table>
29676 bar<span>boo</span></p>
29692 bar<span>boo</span>
29696 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29699 "modes": ["selser"],
29700 "scrubWikitext": true,
29702 [ "p", "html", " a\n b" ]
29713 1. New links that end in spaces
29716 "modes": ["html2wt"],
29717 "scrubWikitext": false
29720 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29721 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29722 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29724 [[Berlin ]]<nowiki/>is the capital of Germany.
29728 [[Boston ]] is a city.
29732 2. New links that end in spaces
29735 "modes": ["html2wt"],
29736 "scrubWikitext": true
29739 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29740 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29741 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29743 [[Berlin]] is the capital of Germany.
29747 [[Boston]] is a city.
29751 1. Table cells with escapable prefixes
29754 "modes": ["html2wt"],
29755 "scrubWikitext": false
29759 <tr><td>a</td></tr>
29760 <tr><td>-</td></tr>
29761 <tr><td>+</td></tr>
29767 |<nowiki>-</nowiki>
29769 |<nowiki>+</nowiki>
29774 2. Table cells with escapable prefixes
29777 "modes": ["html2wt"],
29778 "scrubWikitext": true
29782 <tr><td>a</td></tr>
29783 <tr><td>-</td></tr>
29784 <tr><td>+</td></tr>
29797 3a. Table cells with escapable prefixes after edits
29800 "modes": ["selser"],
29801 "scrubWikitext": true,
29803 [ "table tbody tr:first-child td:first-child", "remove"]
29817 3b. Table cells with escapable prefixes after edits
29820 "modes": ["selser"],
29821 "scrubWikitext": true,
29823 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29830 |<span id="x">foo</span>+
29839 # FIXME: This test will fail because
29840 # normalization doesn't realize that the id attribute
29841 # will eliminate the escapable scenario
29843 4a. Table cells without escapable prefixes after edits
29846 "modes": ["selser"],
29847 "scrubWikitext": true,
29849 [ "#x", "html", "-" ]
29862 ## This tests normalizer's ability to discriminate between
29863 ## cells having identical content.
29865 4b. Table cells without escapable prefixes after edits
29868 "modes": ["selser"],
29869 "scrubWikitext": true,
29871 [ "td", "html", "-" ]
29884 ## This tests normalizer's ability to not be tripped by
29885 ## comments (and whitespace)
29887 4c. Table cells without escapable prefixes after edits
29890 "modes": ["selser"],
29891 "scrubWikitext": true,
29893 [ "table tbody tr td:first-child", "remove" ]
29908 ## This tests normalizer's ability to handle HTML cells
29910 4d. Table cells without escapable prefixes after edits
29913 "modes": ["selser"],
29914 "scrubWikitext": true,
29916 [ "td", "html", "-" ]
29921 <tr><td>a</td></tr>
29925 <tr><td>-</td></tr>
29929 ## T111151 Remove font elements without attributes
29931 5a. font tags without attributes should be dropped in scrubWikitext mode
29934 "modes": ["html2wt"],
29935 "scrubWikitext": true
29939 <font><font>bar</font></font>
29940 <font class="x">boo</font>
29944 <font class="x">boo</font>
29948 5b. font tags should not be dropped without scrubWikitext being enabled
29951 "modes": ["html2wt"],
29952 "scrubWikitext": false
29961 Escape nowiki DOM elements
29965 <nowiki><i>foo</i></nowiki>
29967 <nowiki>''foo''</nowiki>
29970 # This is meant to be an interim fix while we go about figuring out
29971 # how to not introduce these trailing <nowiki/>s in the first place.
29973 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29977 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29979 <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>
29980 <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>
29994 New list is serialized on newlines
29998 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30002 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30004 The quick brown fox jumps over the lazy dog.
30010 The quick onyx goblin jumps over the lazy dwarf.
30014 New lists in formatting elements serialized w/o newlines
30026 <small><ul><li>hi</li></ul></small>
30038 New list in table doesn't need newlines
30042 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30051 # ---------------------------------------------------
30052 # End of tests spec'ing wikitext serialization norms |
30053 # ---------------------------------------------------
30057 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30065 <td><b>c</b><p>d</p></td>
30084 Anchor without href scenarios
30086 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30089 <a class="no">dice</a>
30094 <span name="foo"></span>
30098 New transclusion added after a list should be serialized after the list
30102 <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>
30108 # -----------------------------------------------------------------
30109 # End of section for Parsoid-only html2wt tests for serialization
30111 # -----------------------------------------------------------------
30113 # -----------------------------------------------------------------
30114 # The following section of tests are primarily to spec behavior of
30115 # the selective serializer. All these tests have manual selser
30116 # changes. The automated selser changes for all tests handle the
30117 # wide variation of changes, but these tests here capture specs
30118 # deterministically.
30119 # ----------------------------------------------------------------
30123 Selser: New comments should not be lost
30126 "modes": ["selser"],
30128 [ "#a", "after", "<!--c1-->" ],
30129 [ "#b", "before", "<!--c2-->" ]
30133 <span id="a">a</span>
30135 <span id="b">b</span>
30137 <span id="a">a</span><!--c1-->
30139 <!--c2--><span id="b">b</span>
30144 Selser: Check for validity of DSR before using it
30147 "modes": ["selser"],
30149 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30153 <span id="a">a</span>
30155 {{DISPLAYTITLE:foo}}
30156 <span id="a">a</span>
30160 1. DOMDiff: Changes to <ref> content should be looked up using id
30163 "modes": ["selser"],
30165 ["#X", "after", "bar"],
30166 ["#Y", "after", "baz"]
30170 X <ref><span id="X">foo</span></ref>
30173 <ref name="a"><span id="Y">foo</span></ref>
30176 X <ref><span id="X">foo</span>bar</ref>
30179 <ref name="a"><span id="Y">foo</span>baz</ref>
30184 2. DOMDiff: Changes to <ref> content should be looked up using id
30187 "modes": ["selser"],
30189 ["#Z", "after", "bar"]
30193 A <ref>foo bar for a</ref>
30194 B <ref group="X" name="b" />
30198 <references group="X">
30199 <ref name="b"><span id="Z">foo</span></ref>
30202 A <ref>foo bar for a</ref>
30203 B <ref group="X" name="b" />
30207 <references group="X">
30208 <ref name="b"><span id="Z">foo</span>bar</ref>
30213 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30216 "modes": ["selser"],
30218 [ "div:first-child", "text", "bar" ]
30222 <div style="{{1x|color:red;}}%">foo</div>
30224 <div style="{{1x|color:red;}}%">bar</div>
30236 <li class="mw-empty-elt"></li>
30237 <li class="mw-empty-elt"></li>
30244 [[File:Thumb.png|thumb]]
30246 <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>
30248 <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>
30252 unclosed internal link XSS (T137264)
30254 [[#%3Cscript%3Ealert(1)%3C/script%3E|
30256 <p>[[#<script>alert(1)</script>|
30259 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
30263 Validating that <style> isn't eaten by tidy (T167349)
30268 <style>.foo::before { content: "<foo>"; }</style>
30269 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30273 <style>.foo::before { content: "<foo>"; }</style>
30274 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30279 Validating that <style> isn't wrapped in a paragraph (T186965)
30283 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30285 <style>.foo::before { content: "<foo>"; }</style>
30287 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30289 But if it's on a line with other content, let it be wrapped.
30291 <style>.foo::before { content: "<foo>"; }</style> bar
30293 foo <style>.foo::before { content: "<foo>"; }</style>
30295 foo <style>.foo::before { content: "<foo>"; }</style> bar
30297 And the same if we have non-paragraph-breaking whitespace
30300 <style>.foo::before { content: "<foo>"; }</style>
30303 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30305 <style>.foo::before { content: "<foo>"; }</style>
30306 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30307 <p>But if it's on a line with other content, let it be wrapped.
30308 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
30309 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
30310 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
30311 </p><p>And the same if we have non-paragraph-breaking whitespace
30313 <style>.foo::before { content: "<foo>"; }</style>
30319 Validating that <link> isn't wrapped in a paragraph (T186965)
30323 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30325 <link rel="foo" href="bar"/>
30327 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30329 But if it's on a line with other content, let it be wrapped.
30331 <link rel="foo" href="bar"/> bar
30333 foo <link rel="foo" href="bar"/>
30335 foo <link rel="foo" href="bar"/> bar
30337 And the same if we have non-paragraph-breaking whitespace
30340 <link rel="foo" href="bar"/>
30343 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30345 <link rel="foo" href="bar"/>
30346 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30347 <p>But if it's on a line with other content, let it be wrapped.
30348 </p><p><link rel="foo" href="bar"/> bar
30349 </p><p>foo <link rel="foo" href="bar"/>
30350 </p><p>foo <link rel="foo" href="bar"/> bar
30351 </p><p>And the same if we have non-paragraph-breaking whitespace
30353 <link rel="foo" href="bar"/>
30359 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
30361 wgFragmentMode=[ 'html5', 'legacy' ]
30363 ==A&B&C&amp;D&amp;amp;E==
30364 [[#A&B&C&amp;D&amp;amp;E]]
30366 <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>
30367 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
30370 <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>
30371 <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>
30375 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
30377 wgFragmentMode=[ 'legacy' ]
30379 ==A&B&C&amp;D&amp;amp;E==
30380 [[#A&B&C&amp;D&amp;amp;E]]
30382 <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>
30383 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
30388 Decoding of HTML entities in embedded HTML tags
30390 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30392 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30395 <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>
30399 Decoding of HTML entities in indicator names for IDs (T104196)
30401 parsoid=wt2html,html2html
30404 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30406 1&2&3&4&amp;5=Indicator
30409 <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>
30412 # this version of the test strips out the ambiguity so Parsoid rts cleanly
30414 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
30418 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30420 1&2&3&4&amp;5=Indicator
30423 <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>
30426 # This fragment mode is what Parsoid supports.
30428 HTML5 ids: fallback to legacy
30430 wgFragmentMode=[ 'html5', 'legacy' ]
30442 ==Hey < # " > % : '==
30443 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30445 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30447 <!-- These two links should produce identical HTML -->
30448 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30451 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30453 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30454 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30455 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30456 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30457 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30458 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30462 <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>
30463 <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>
30464 <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>
30465 <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>
30466 <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>
30467 <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>
30468 <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>
30469 </p><p>💩 <span id="💩"></span>
30470 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30473 <h2 id="Foo_bar">Foo bar</h2>
30475 <h2 id="foo_Bar_2">foo Bar</h2>
30477 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30479 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30481 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30483 <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>
30484 <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>
30486 <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>
30488 <!-- These two links should produce identical HTML -->
30489 <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>
30492 # Parsoid doesn't support this mode
30494 HTML5 ids: legacy with a fallback to modern
30496 wgFragmentMode=[ 'legacy', 'html5' ]
30508 ==Hey < # " > % : '==
30509 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30511 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30513 <!-- These two links should produce identical HTML -->
30514 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30517 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30519 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30520 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30521 <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>
30522 <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>
30523 <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>
30524 <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>
30528 <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>
30529 <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>
30530 <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>
30531 <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>
30532 <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>
30533 <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>
30534 <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>
30535 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30536 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30540 # Parsoid doesn't support this mode.
30542 HTML5 ids: no legacy
30544 wgFragmentMode=[ 'html5' ]
30556 ==Hey < # " > % : '==
30557 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30559 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30561 <!-- These two links should produce identical HTML -->
30562 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30565 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30567 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30568 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30569 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30570 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30571 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30572 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30576 <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>
30577 <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>
30578 <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>
30579 <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>
30580 <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>
30581 <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>
30582 <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>
30583 </p><p>💩 <span id="💩"></span>
30584 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30589 T90902: Normalize weird characters in section IDs
30591 wgFragmentMode=[ 'html5', 'legacy' ]
30597 <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>
30598 <p><a href="#Foo_bar">#Foo bar</a>
30601 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30602 <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>
30606 T51672: Test for brackets in attributes of elements in external link texts
30608 [http://example.com/ link <span title="title with [brackets]">span</span>]
30609 [http://example.com/ link <span title="title with [brackets]">span</span>]
30612 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30613 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30616 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30617 <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>
30621 T72875: Test for brackets in attributes of elements in internal link texts
30623 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30624 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30627 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30628 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30631 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30632 <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>
30636 T179544: {{anchorencode:}} output should be always usable in links
30638 wgFragmentMode=[ 'html5' ]
30640 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30642 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30645 <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>
30648 ## ------------------------------
30649 ## Parsoid section-wrapping tests
30650 ## ------------------------------
30652 Section wrapping for well-nested sections (no leading content)
30655 "wrapSections": true
30676 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30679 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30682 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30685 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30688 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30691 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30698 Section wrapping for well-nested sections (with leading content)
30701 "wrapSections": true
30706 Para 2 with a <div>nested in it</div>
30719 <section data-mw-section-id="0"><p>Para 1.</p>
30721 <p>Para 2 with a </p><div>nested in it</div>
30725 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30728 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30731 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30734 </section></section>
30738 Section wrapping with template-generated sections (good nesting 1)
30741 "wrapSections": true
30758 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30761 <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">
30762 </span><p about="#mwt1">b</p>
30763 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30766 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30770 # In this example, the template scope is mildly expanded to incorporate the
30771 # trailing newline after the transclusion since that is part of section 1.1.1
30773 Section wrapping with template-generated sections (good nesting 2)
30776 "wrapSections": true,
30777 "modes": ["wt2html", "wt2wt"]
30792 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30795 <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">
30796 </span><p about="#mwt1">b</p><span about="#mwt1">
30797 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30798 </span><p about="#mwt1">d</p><span about="#mwt1">
30799 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30803 # In this example, the template scope is mildly expanded to incorporate the
30804 # trailing newline after the transclusion since that is part of section 1.2.1
30806 Section wrapping with template-generated sections (good nesting 3)
30809 "wrapSections": true,
30810 "modes": ["wt2html", "wt2wt"]
30828 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30831 <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">
30832 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
30833 </span><p about="#mwt1">b</p><span about="#mwt1">
30834 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30835 </span><p about="#mwt1">c</p><span about="#mwt1">
30836 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30837 </span><p about="#mwt1">d</p><span about="#mwt1">
30838 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
30842 # Because of section-wrapping and template-wrapping interactions,
30843 # the scope of the template is expanded so that the template markup
30844 # is valid in the presence of <section> tags.
30845 # This exercises the s1 is null scenario in the wrapSections code
30847 Section wrapping with template-generated sections (bad nesting 1)
30850 "wrapSections": true
30864 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30867 <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"]}'>
30868 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
30869 </span><p about="#mwt1">b
30870 </p><span about="#mwt1">
30872 </span><p about="#mwt1">c</p><span about="#mwt1">
30873 </span></section></div></section>
30876 # Because of section-wrapping and template-wrapping interactions,
30877 # the scope of the template is expanded so that the template markup
30878 # is valid in the presence of <section> tags.
30879 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30881 Section wrapping with template-generated sections (bad nesting 2)
30884 "wrapSections": true
30902 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30905 </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">
30906 </span><p about="#mwt1">b</p><span about="#mwt1">
30907 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
30908 </span><p about="#mwt1">c</p><span about="#mwt1">
30910 </span><p about="#mwt1">d</p><span about="#mwt1">
30912 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
30916 # Because of section-wrapping and template-wrapping interactions,
30917 # additional template wrappers are added to <section> tags
30918 # so that template wrapping semantics are valid whether section
30919 # tags are retained or stripped. But, the template scope can expand
30920 # greatly when accounting for section tags.
30921 # This exercises the s1 and s2 are in different subtrees scenario
30923 Section wrapping with template-generated sections (bad nesting 3)
30926 "wrapSections": true,
30927 "modes": ["wt2html", "wt2wt"]
30945 <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>
30948 <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">
30949 </span><p about="#mwt1">b</p><span about="#mwt1">
30950 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
30951 </span><p about="#mwt1">c</p>
30954 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
30959 Section wrapping with uneditable lead section + div wrapping multiple sections
30962 "wrapSections": true
30967 <div style="border:1px solid red;">
30984 <section data-mw-section-id="-1"><p>foo</p>
30986 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30987 <section data-mw-section-id="1"><h1 id="1">1</h1>
30990 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30993 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30997 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31000 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31002 </section></section>
31006 Section wrapping with editable lead section + div overlapping multiple sections
31009 "wrapSections": true
31016 <div style="border:1px solid red;">
31033 <section data-mw-section-id="0"><p>foo</p>
31035 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31037 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31040 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31043 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31048 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31051 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31053 </section></section>
31057 HTML header tags should not be wrapped in section tags
31060 "wrapSections": true
31073 <section data-mw-section-id="0"><p>foo</p>
31075 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31077 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31079 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31081 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31085 Lead section containing only whitespace and comments.
31088 "wrapSections": true
31092 <!-- this is a comment, presumably significant to editors -->
31099 <section data-mw-section-id="0" data-parsoid="{}">
31100 <!-- this is a comment, presumably significant to editors -->
31101 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31104 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31109 Pseudo-sections emitted by templates should have id -2
31112 "wrapSections": true
31122 <section data-mw-section-id="-1"><p>foo</p>
31123 </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}}]}'>
31124 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31125 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31126 </section></div><span about="#mwt1">
31130 ##########################################################################
31131 Tests demonstrating white-space insensitivity in input wikitext
31132 for wikitext headings, wikitext list items, and wikitext table captions,
31133 headings, and cells. HTML versions of the same should preserve whitespace.
31134 ##########################################################################
31136 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31139 "modes": ["wt2html"],
31140 "preserveIEW": true
31144 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31145 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31146 == <!--Headings with fallback ids--> Личная жизнь ==
31147 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31148 ; <!--term to define--> term : <!--term's definition--> definition
31150 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31152 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31154 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31156 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
31158 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
31161 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31164 <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>
31165 <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>
31166 <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>
31167 <ul><li>List item</li></ul>
31168 <dl><dt>term </dt>
31169 <dd>definition</dd></dl>
31171 <caption>Table Caption
31174 <th>Table Heading 1</th>
31175 <th>Table Heading 2
31178 <td>Table Cell 1</td>
31182 <td>class="foo"</td>
31186 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
31187 </td></tr></tbody></table>
31190 <td>Table Cell 1</td>
31192 </td></tr></tbody></table> foo</dd></dl>
31194 <meta property="mw:PageProp/notoc">
31195 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
31196 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
31197 <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>
31198 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
31199 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
31201 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
31203 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
31205 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31207 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
31209 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
31212 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31213 </tbody></table><p> foo </p><!--c1--></dd></dl>
31216 # Looks like <caption> is not accepted in HTML
31218 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
31221 "modes": ["wt2html"],
31222 "preserveIEW": true
31226 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31227 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31229 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
31230 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
31233 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
31234 <ul><li> List item </li></ul>
31236 <tbody><tr><th> Table Heading </th><th></th></tr>
31237 <tr><td> Table Cell </td><th></th></tr>
31240 <meta property="mw:PageProp/notoc"/>
31241 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31242 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31244 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
31245 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
31250 Do not trim whitespace in links and quotes
31253 "modes": ["wt2html"],
31254 "preserveIEW": true
31257 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
31258 [[Foo| some text ]]
31260 <p>foo <i> italic </i> and <b> bold </b>
31261 <a href="/wiki/Foo" title="Foo"> some text </a>
31264 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
31265 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
31269 Remove p tags surrounding a single element in a figcaption
31273 [[File:Foobar.jpg|right|200x200px|Caption]]
31275 <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>
31279 Selser preserves lack of newline before list and allows newline after the list
31282 "modes": ["selser"],
31283 "scrubWikitext": true,
31285 [ "ul", "after", "<p>footer</p>" ]
31302 Selser does not introduce newlines between unedited paragraph preceding the list
31305 "modes": ["selser"],
31307 [ "table tbody tr td p:last-child", "empty" ]
31329 Selser does not introduce newlines between unedited paragraph following the list
31332 "modes": ["selser"],
31334 [ "table tbody tr td p:first-child", "empty" ]
31356 Remove a list item but do not insert newline above list
31359 "modes": ["selser"],
31361 [ "ul li:last-child", "remove" ]