1 # MediaWiki Parser test cases
2 # Some taken from https://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
66 Template:redirect to foo
68 #REDIRECT [[Template:Foo]]
89 MediaWiki:bad image list
91 * [[File:Bad.jpg]] except [[Nasty page]]
126 // For Serbian; localize Template namespace
134 Template:echo_with_span
140 Template:echo_with_div
146 Template:echo with depth
159 Template:table_attribs
162 |</noinclude>style="color:red;"|Foo
166 Template:table_attribs_2
169 |</noinclude>style="color:red;"|Foo
174 Template:table_attribs_3
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
181 Template:table_attribs_4
183 | style="background-color:#DC241f;" width="10px" |
187 Template:table_attribs_5
190 |</noinclude>style="color:red;"||Bar
194 Template:table_attribs_6
196 style="background: <nowiki>
203 Template:table_attribs_7
206 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
210 Template:table_header_cells
212 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
218 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
222 Template:PartialTable
229 Template:image_attribs
232 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
235 ## See T48811 for details
237 Template:mixed_attr_content_template
239 style="color:red;" title="T48811"
245 Template:definition_list
292 Template:EmptyTRWithHTMLAttrTest
295 <tr align="center"></tr>
296 <tr><td>foo</td></tr>
297 <tr align="center"></tr>
298 <tr><td>bar</td></tr>
321 This is a simple paragraph.
323 <p>This is a simple paragraph.
328 Paragraphs with extra newline spacing
359 Paragraphs with newline spacing with comment lines in between
367 <!--foo--><!--More than 1 comment, still stripped-->
371 <!--foo--> <!----> <!-- bar -->
432 Paragraphs with newline spacing with non-empty white-space lines in between
459 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
467 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
506 Extra newlines: More paragraphs with indented comment
521 Extra newlines followed by heading
535 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
536 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
539 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
544 Extra newlines between heading and content are swallowed (Parsoid does not)
552 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
553 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
560 <p><a rel="mw:WikiLink" href="./A" title="A">a</a></p>
564 Extra new lines before and after lists are preserved
591 # Parsoid regression test
593 Multiple newlines after tables are converted to p-br-p tags
595 parsoid=wt2html,wt2wt
609 </td></tr></tbody></table>
613 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
628 Heading with line break in nowiki
632 wgFragmentMode=[ 'html5', 'legacy' ]
637 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
639 C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
643 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
650 http://fr.wikipedia.org/wiki/🍺
651 <!-- EasterEgg we love beer, better be able be able to link to it -->
653 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
672 *plain''italic''plain
673 *plain''italic''plain''italic''plain
674 *plain'''bold'''plain
675 *plain'''bold'''plain'''bold'''plain
676 *plain''italic''plain'''bold'''plain
677 *plain'''bold'''plain''italic''plain
678 *plain''italic'''bold-italic'''italic''plain
679 *plain'''bold''bold-italic''bold'''plain
680 *plain'''''bold-italic'''italic''plain
681 *plain'''''bold-italic''bold'''plain
682 *plain''italic'''bold-italic'''''plain
683 *plain'''bold''bold-italic'''''plain
684 *plain l'''italic''plain
685 *plain l''''bold''' plain
688 <li>plain<i>italic</i>plain</li>
689 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
690 <li>plain<b>bold</b>plain</li>
691 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
692 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
693 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
694 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
695 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
696 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
697 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
698 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
699 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
700 <li>plain l'<i>italic</i>plain</li>
701 <li>plain l'<b>bold</b> plain</li></ul>
705 # this example taken from the [[simple:Moon]] article (T49326)
707 Italics and possessives (1)
709 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
711 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
715 # this example taken from [[en:Flaming Pie]] (T51926)
717 Italics and possessives (2)
719 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
721 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
725 # this example taken from [[en:Dictionary]] (T51926)
727 Italics and possessives (3)
729 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
731 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
737 ### 2-quote opening sequence tests
740 Italics and bold: 2-quote opening sequence: (2,2)
749 Italics and bold: 2-quote opening sequence: (2,3)
758 Italics and bold: 2-quote opening sequence: (2,4)
768 # same html as previous, but wikitext adjusted to match parsoid html2wt
770 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
772 ''foo<nowiki>''</nowiki>''
778 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
780 Italics and bold: 2-quote opening sequence: (2,5)
793 # same html as previous, but wikitext adjusted to match parsoid html2wt
795 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
797 ''foo'''''<nowiki/>'''
808 ### 3-quote opening sequence tests
812 Italics and bold: 3-quote opening sequence: (3,2)
821 Italics and bold: 3-quote opening sequence: (3,3)
830 Italics and bold: 3-quote opening sequence: (3,4)
838 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
840 Italics and bold: 3-quote opening sequence: (3,5)
853 # same html as previous, but wikitext adjusted to match parsoid html2wt
855 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
857 '''foo'''''<nowiki/>''
868 ### 4-quote opening sequence tests
872 Italics and bold: 4-quote opening sequence: (4,2)
882 # same html as previous, but wikitext adjusted to match parsoid html2wt
884 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
886 <nowiki>''</nowiki>''foo''
893 Italics and bold: 4-quote opening sequence: (4,3)
902 Italics and bold: 4-quote opening sequence: (4,4)
912 # same html as previous, but wikitext adjusted to match parsoid html2wt
914 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
922 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
924 Italics and bold: 4-quote opening sequence: (4,5)
933 <p>'<b>foo</b><i></i>
937 # same html as previous, but wikitext adjusted to match parsoid html2wt
939 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
941 '<nowiki/>'''foo'''''<nowiki/>''
946 <p>'<b>foo</b><i></i>
952 ### 5-quote opening sequence tests
956 Italics and bold: 5-quote opening sequence: (5,2)
966 # same html as previous, but wikitext adjusted to match parsoid html2wt
968 Italics and bold: 5-quote opening sequence: (5,2+3)
977 Italics and bold: 5-quote opening sequence: (5,3)
987 # same html as previous, but wikitext adjusted to match parsoid html2wt
989 Italics and bold: 5-quote opening sequence: (5,3+2)
998 Italics and bold: 5-quote opening sequence: (5,4)
1004 <p><i><b>foo'</b></i>
1009 Italics and bold: 5-quote opening sequence: (5,5)
1013 <p><i><b>foo</b></i>
1018 Italics and bold: 5-quote opening sequence: (5,6)
1022 <p><i><b>foo'</b></i>
1027 ### multiple quote sequences in a line
1031 Italics and bold: multiple quote sequences: (2,4,2)
1037 <p><i>foo'<b>bar</b></i>
1041 # same html as previous, but wikitext adjusted to match parsoid html2wt
1043 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
1045 ''foo'<nowiki/>'''bar'''''
1047 <p><i>foo'<b>bar</b></i>
1052 Italics and bold: multiple quote sequences: (2,4,3)
1058 <p><i>foo'<b>bar</b></i>
1062 # same html as previous, but wikitext adjusted to match parsoid html2wt
1064 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
1066 ''foo'<nowiki/>'''bar'''''
1068 <p><i>foo'<b>bar</b></i>
1073 Italics and bold: multiple quote sequences: (2,4,4)
1079 <p><i>foo'<b>bar'</b></i>
1083 # same html as previous, but wikitext adjusted to match parsoid html2wt
1085 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1087 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1089 <p><i>foo'<b>bar'</b></i>
1093 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1095 Italics and bold: multiple quote sequences: (3,4,2)
1104 <p><b>foo'</b>bar<i></i>
1108 # same html as previous, but wikitext adjusted to match parsoid html2wt
1110 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1112 '''foo''''bar''<nowiki/>''
1117 <p><b>foo'</b>bar<i></i>
1121 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1123 Italics and bold: multiple quote sequences: (3,4,3)
1132 <p><b>foo'</b>bar<b></b>
1136 # same html as previous, but wikitext adjusted to match parsoid html2wt
1138 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1140 '''foo''''bar'''<nowiki/>'''
1145 <p><b>foo'</b>bar<b></b>
1150 ### other quote tests
1153 Italics and bold: other quote tests: (2,3,5)
1155 ''this is about '''foo's family'''''
1157 <p><i>this is about <b>foo's family</b></i>
1163 Italics and bold: other quote tests: (2,(3,3),2)
1165 ''this is about '''foo's''' family''
1167 <p><i>this is about <b>foo's</b> family</i>
1173 Italics and bold: other quote tests: (3,2,3,2)
1177 '''this is about ''foo'''s family''
1179 <p><b>this is about <i>foo</i></b><i>s family</i>
1184 # same html as previous, but wikitext adjusted to match parsoid html2wt
1186 Italics and bold: other quote tests: (3,2,3+2+2,2)
1188 '''this is about ''foo'''''<nowiki/>''s family''
1190 <p><b>this is about <i>foo</i></b><i>s family</i>
1196 Italics and bold: other quote tests: (3,2,3,3)
1198 '''this is about ''foo'''s family'''
1200 <p>'<i>this is about </i>foo<b>s family</b>
1206 Italics and bold: other quote tests: (3,(2,2),3)
1208 '''this is about ''foo's'' family'''
1210 <p><b>this is about <i>foo's</i> family</b>
1216 Italicized possessive
1218 The ''[[Main Page]]'''s talk page.
1220 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1223 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1227 Quote balancing context should be restricted to td/th cells on the same wikitext line
1229 parsoid=wt2html,wt2wt
1243 </td></tr></tbody></table>
1251 Non-html5 tags should be accepted
1253 <center>''foo''</center>
1255 <font>''foo''</font>
1256 <strike>''foo''</strike>
1259 <center><i>foo</i></center>
1260 <p><big><i>foo</i></big>
1261 <font><i>foo</i></font>
1262 <strike><i>foo</i></strike>
1268 <wbr> is valid wikitext (T54468)
1276 # <strike> is HTML4, <s> is HTML4/5.
1278 <s> or <strike> for strikethrough
1280 <strike>strike</strike>
1284 <p><strike>strike</strike>
1292 Text-level semantic html elements in wikitext
1295 <strong>text</strong>
1311 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1318 <strong>text</strong>
1334 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1342 # test cases taken from
1343 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1345 Ruby markup (W3C-style)
1347 ;Mono-ruby for individual base characters
1348 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1350 :<ruby>今日<rt>きょう</rt></ruby>
1352 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1354 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1356 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1359 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1360 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1361 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1364 <dl><dt>Mono-ruby for individual base characters</dt>
1365 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1367 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1368 <dt>Jukugo ruby</dt>
1369 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1370 <dt>Inline ruby</dt>
1371 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1372 <dt>Double-sided ruby</dt>
1373 <dd><ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1375 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1376 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1377 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1382 # The next two test different paths in the sanitizer.
1384 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1386 <blockquote|>a</blockquote>
1388 <b→> doesn't terminate </b→>
1390 <bä> doesn't terminate </bä>
1392 <boo> doesn't terminate </boo>
1394 <s.foo> doesn't terminate </s.foo>
1398 <p><blockquote|>a</blockquote>
1399 </p><p><b→> doesn't terminate </b→>
1400 </p><p><bä> doesn't terminate </bä>
1401 </p><p><boo> doesn't terminate </boo>
1402 </p><p><s.foo> doesn't terminate </s.foo>
1403 </p><p><sub-ID#1>
1408 Non-word characters don't terminate tag names
1410 <blockquote|>a</blockquote>
1412 <b→> doesn't terminate </b→>
1414 <bä> doesn't terminate </bä>
1416 <boo> doesn't terminate </boo>
1418 <s.foo> doesn't terminate </s.foo>
1422 <p><blockquote|>a
1423 </p><p><b→> doesn't terminate </b→>
1424 </p><p><bä> doesn't terminate </bä>
1425 </p><p><boo> doesn't terminate </boo>
1426 </p><p><s.foo> doesn't terminate </s.foo>
1427 </p><p><sub-ID#1>
1432 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1433 ### This checks that HTML5 tags (with non-word characters in the tag
1434 ### name) make it safely through the parser -- the Sanitizer will
1435 ### munge them later, as it should.
1438 Non-word characters are valid in extension tags (T19663)
1449 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1453 Isolated close tags should be treated as literal text (T54760)
1461 <p class="mw-empty-elt">
1462 </p><p><s.foo>s
1467 ### Special characters
1471 Bare pipe character (T54363)
1480 Bare pipe character from a template (T54363)
1489 ### <nowiki> test cases
1493 <nowiki> unordered list
1495 <nowiki>* This is not an unordered list item.</nowiki>
1497 <p>* This is not an unordered list item.
1500 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1506 <nowiki>Lorem ipsum dolor
1514 <p>Lorem ipsum dolor
1523 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1533 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1535 <nowiki><span class="error"></nowiki>
1537 <p><span class="error">
1540 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1546 :There is not nowiki.
1547 :There is <nowiki>nowiki</nowiki>.
1549 #There is not nowiki.
1550 #There is <nowiki>nowiki</nowiki>.
1552 *There is not nowiki.
1553 *There is <nowiki>nowiki</nowiki>.
1555 <dl><dd>There is not nowiki.</dd>
1556 <dd>There is nowiki.</dd></dl>
1557 <ol><li>There is not nowiki.</li>
1558 <li>There is nowiki.</li></ol>
1559 <ul><li>There is not nowiki.</li>
1560 <li>There is nowiki.</li></ul>
1563 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1564 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1566 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1567 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1569 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1570 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1574 Entities inside <nowiki>
1576 <nowiki><</nowiki>
1581 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1585 Entities inside template parameters
1592 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1596 Properly escape nowiki when combined with other wiki markup
1600 <p>* </nowiki> tag</p>
1602 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1606 T93824: Put escaped HTML tags inside nowiki
1610 <p><h2>foo</h2></p>
1612 <nowiki><h2>foo</h2></nowiki>
1616 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1620 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1621 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1622 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1624 This text: L'[[Foo]]
1625 This text: L<nowiki>''</nowiki>[[Foo]]
1626 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1629 # This test fails because wikitext whitespace is not normalized before comparing.
1631 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1635 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1638 This text : L<nowiki>''</nowiki>[[Foo]]
1641 # This test and the next one are html2wt only as they test that incorrect wikitext
1642 # passed in template arguments gets escaped or wrapped in nowikis where required.
1644 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1648 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1649 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1651 {{echo|foo{{!}}bar}}
1652 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1656 T53961: Output correct nowikis in template arguments
1660 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1661 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1662 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1663 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1664 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1667 {{echo|<nowiki>a }} b</nowiki>}}
1668 {{echo|<nowiki>a [[ b</nowiki>}}
1669 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1670 {{echo|a <nowiki>}</nowiki>}}
1674 Cases where "!!" needs nowiki protection
1679 <tr><th>this needs protection !! here</th></tr>
1683 <tr><th>this does not need
1684 protection !! here</th></tr>
1688 !<nowiki>this needs protection !! here</nowiki>
1701 Comments and Indent-Pre
1703 <!-- comment 1 --> asdf
1705 <!-- comment 1 --> asdf
1708 <!-- comment 1 --> asdf
1709 <!-- comment 2 -->xyz
1711 <!-- comment 1 --> asdf
1712 <!-- comment 2 --> xyz
1768 asdf<!-- comment 1 -->jkl
1778 <!-- foo --> b <!-- bar -->
1792 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1798 Comment semantics and delimiters
1800 <!-- --><!----><!-----><!------>
1804 <!-- --><!----><!-----><!------>
1808 Comment semantics and delimiters, redux
1810 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1811 -- foo -- funky huh? ... -->
1815 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1816 -- foo -- funky huh? ... -->
1820 Comment semantics and delimiters: directors cut
1822 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1823 everything starting with < followed by !-- until the first -- and > we see,
1824 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1830 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1831 everything starting with < followed by !-- until the first -- and > we see,
1832 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1837 Comment semantics: nesting
1839 <!--<!-- no, we're not going to do anything fancy here -->-->
1844 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1847 # Parsoid closes the unclosed comment, even if it means a slight
1850 Comment semantics: unclosed comment at end
1852 parsoid=wt2html,html2html
1854 <!--This comment will run out to the end of the document
1858 <!--This comment will run out to the end of the document-->
1862 Comment semantics: normalize comments to play nice with XML and browsers
1864 <!-- Browsers --!> think this is closed -->
1865 <!--> This would normally be text -->
1866 <!---> As would this -->
1867 <!-- XML doesn't like trailing dashes -------->
1868 <!-- Nor doubled hyphens -- anywhere in the data -->
1869 But this is not a comment.
1871 <p>But this is not a comment.
1874 <!-- Browsers --!> think this is closed -->
1875 <!--> This would normally be text -->
1876 <!---> As would this -->
1877 <!-- XML doesn't like trailing dashes -------->
1878 <!-- Nor doubled hyphens -- anywhere in the data -->
1879 <p>But this is not a comment.</p>
1883 Comment semantics: round-trip even text which contains encoded -->
1885 <!-- hello & goodbye - > --> --&gt; --&xx -->
1887 <!-- hello & goodbye - > --> --&gt; --&xx -->
1891 Comment in template title
1900 Comment on its own line post-expand
1912 Comment on its own line post-expand with non-significant whitespace
1924 post-expand include size being exceeded
1928 {{echo3|1234567890}}
1930 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1935 max template depth being reached
1939 {{echo with depth|too deep!}}
1941 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1946 multiple templates that are redirects
1957 Multiple comments should still parse as SOL-transparent
1959 parsoid=wt2html,wt2wt
1962 <!--c2--><!--c3--><!--c4-->*b
1971 <!--c2--><!--c3--><!--c4-->
1977 ## Make sure ">" gets escaped in comments to avoid XSS
1979 IE conditional comments
1982 <script>alert('hi');</script>
1985 <!--[if lt IE 9]>
1986 <script>alert('hi');</script>
1991 ### paragraph wrapping tests
2007 Block tag on one line (<div>)
2017 <p>a </p><div>foo</div>
2023 No p-wrappable content
2025 parsoid=wt2html,html2html
2027 <span><div>x</div></span>
2028 <span><s><div>x</div></s></span>
2029 <small><em></em></small><span><s><div>x</div></s></span>
2031 <span><div>x</div></span>
2032 <span><s><div>x</div></s></span>
2033 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2036 # T177612: Parsoid-only test
2038 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2040 {{echo|<span><div>x</div></span>}}
2043 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
2048 Block tag on one line (<blockquote>)
2050 a <blockquote>foo</blockquote>
2054 a <blockquote>foo</blockquote>
2058 <p>a </p><blockquote><p>foo</p></blockquote>
2064 Block tag on both lines (<div>)
2074 <p>a </p><div>foo</div><p>
2075 b </p><div>foo</div>
2079 Block tag on both lines (<blockquote>)
2081 a <blockquote>foo</blockquote>
2083 b <blockquote>foo</blockquote>
2085 a <blockquote>foo</blockquote>
2086 b <blockquote>foo</blockquote>
2089 <p>a </p><blockquote><p>foo</p></blockquote><p>
2090 b </p><blockquote><p>foo</p></blockquote>
2094 Multiple lines without block tags
2115 x </p><div>foo</div><p> z
2120 Empty lines between lines with block tags
2155 </p><div>b</div><p>d
2160 <div data-parsoid='{"stx":"html"}'></div>
2163 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2166 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2168 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2171 <div data-parsoid='{"stx":"html"}'>e</div>
2175 Unclosed HTML p-tags should be handled properly
2182 <div><p>foo</p></div>
2187 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2192 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2193 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2196 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2200 a [[Category:A1]] [[Category:A2]]
2205 <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"/>
2209 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2215 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2219 No paragraph necessary for SOL transparent template
2221 <span><div>foo</div></span>
2224 <span><div>foo</div></span>
2225 {{echo|[[Category:Foo]]}}
2227 <span><div>foo</div></span>
2228 <span><div>foo</div></span>
2231 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2232 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2234 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2235 <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}}]}'/>
2239 Avoid expanding multiline sol transparent template ranges unnecessarily
2257 <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">
2260 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2264 Paragraph wrapping following unclosed table
2266 parsoid=wt2html,html2html
2287 </td></tr></tbody></table>
2293 <table data-parsoid='{"autoInsertedEnd":true}'>
2294 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr>
2296 </tbody></table><table>
2297 <tbody><tr data-parsoid='{"autoInsertedStart":true}'><td>x</td></tr>
2308 Paragraph wrapping suppressed in html p
2310 parsoid=wt2html,html2html
2330 <p data-parsoid='{"stx":"html"}'>
2341 Dangling table row doesn't prevent p-wrapping
2343 parsoid=wt2html,html2html
2351 <tbody><tr><td>hi</td></tr>
2352 <tr class="mw-empty-elt"></tr>
2353 </tbody></table><p> ho</p>
2357 ### Preformatted text
2367 And a [[Main Page|link]]
2373 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2378 Tabs don't trigger preformatted text
2382 This is preformatted text.
2388 <pre>This is preformatted text.
2393 preformatted text.</p>
2394 <pre>This is preformatted text.
2399 Space before tab needs nowiki pre protection
2405 <nowiki> </nowiki> a
2409 Ident preformatting with inline content
2420 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2437 Regression with preformatted in <center>
2451 T54763: Preformatted in <blockquote>
2457 indented cell (no pre-wrapping!)
2467 <p> indented cell (no pre-wrapping!)
2475 T53086: Double newlines in blockquotes should be turned into paragraphs
2492 T17491: <ins>/<del> in blockquote
2495 Foo <del>bar</del> <ins>baz</ins> quux
2499 <p>Foo <del>bar</del> <ins>baz</ins> quux
2505 <p>Foo <del>bar</del> <ins>baz</ins> quux
2511 T17491: <ins>/<del> in blockquote (2)
2513 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2516 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2520 <blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
2525 <pre> with attributes (T5202)
2527 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2529 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2534 <pre> with width attribute (T5202)
2536 <pre width="8">Narrow screen goodies</pre>
2538 <pre width="8">Narrow screen goodies</pre>
2543 <pre> with forbidden attribute (T5202)
2545 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2547 <pre width="8">Narrow screen goodies</pre>
2552 Entities inside <pre>
2561 <pre> with forbidden attribute values (T5202)
2563 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2565 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2570 <nowiki> inside <pre> (T15238)
2578 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2586 <pre><nowiki>Foo</nowiki></pre>
2591 <nowiki> inside of #tag:pre
2593 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2595 <pre>Foo →bar</pre>
2598 <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>
2601 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2602 ## aren't enclosed in nowikis.
2604 <nowiki> and <pre> preference (first one wins)
2635 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2640 <p><span typeof="mw:Nowiki">
2648 </pre> inside nowiki
2650 <nowiki></pre></nowiki>
2657 Empty pre; pre inside other HTML tags (T56946)
2674 <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
2676 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2680 HTML pre followed by indent-pre
2693 <p><pre>foo</pre></p>
2695 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2697 <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>
2701 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2709 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2719 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2731 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2752 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2756 {{echo| foo}}{{echo| bar}}
2761 {{echo|<!--cmt--> foo}}
2763 <!--cmt-->{{echo| foo}}
2765 {{echo|{{echo| }}bar}}
2783 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2819 ## Hmm, should Parsoid rt this?
2821 Pres with newline attributes
2823 parsoid=wt2html,html2html
2828 <pre class="one two">hi</pre>
2831 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2835 Things that look like <pre> tags aren't treated as such
2837 Barack Obama <President> of the United States
2838 <President></President>
2840 <p>Barack Obama <President> of the United States
2841 <President></President>
2845 ## Remex doesn't account for fostered content.
2846 ## The difference between Parsoid and the PHP parser can be attributed to core
2847 ## commit 674e8388cba and 710618f89af in Parsoid's repo. Parsoid doesn't
2848 ## tokenize unmatched extension tags that shadow html tags as strings to ease
2849 ## an escaping mechanism. See the comment in `maybeExtensionTag`.
2851 Handle broken pre-like tags (T66025)
2855 {{echo|<pre <pre>x</pre>}}
2857 <table><pre </table>
2860 <table><pre </table>
2864 <pre <table></table>
2866 <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>
2868 <pre data-parsoid='{"stx":"html","src":"<pre </table>","tagWidths":[13,0],"a":{"<":null,"table":null},"sa":{"<":"","table":""},"fostered":true,"autoInsertedEnd":true}'></pre><table data-parsoid='{"stx":"html","autoInsertedEnd":true}'></table>
2871 ## Similar to the above, but shows the difference between extension and html tags
2873 Less than in attribute position
2880 <div </p><div>123</div>
2882 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"<pre":""},"body":{"extsrc":"123"}}'>123</pre><p>
2884 <div </p><div>123</div>
2888 Parsoid: handle pre with space after attribute
2892 <pre style="width:50%;" >{{echo|foo}}</pre>
2894 <pre style="width:50%;">{{echo|foo}}</pre>
2897 <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>
2908 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{}}'></pre>
2912 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2940 #--------------------------------------------------------------------
2941 # Transclusion parameter whitespace stripping tests
2942 # Behavior is different for positional and named parameters
2943 #--------------------------------------------------------------------
2945 Templates: Strip leading and trailing whitespace from named-param values
2949 {{echo|1= {{echo|b}} }}
2967 Templates: Don't strip whitespace from positional-param values
2971 {{echo|{{echo|b}} }}
3011 Templates: Don't recognize targets split by newlines
3027 Templates: Recognize targets when newlines and comments don't split the target
3032 <!--X--> ech<!--X-->o<!--X-->
3040 <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>
3044 Templates: Handle empty comment-and-ws-only lines correctly
3047 <!--should be ignored-->
3048 <!--should be ignored as well-->
3055 <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>
3059 Templates: Handle comments in the target
3062 <!-- should be ignored -->
3066 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
3069 {{echo<!-- should be ignored -->
3072 {{echo<!-- should be ignored -->|foo}}
3074 {{<!-- should be ignored -->echo|foo}}
3083 <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>
3085 <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>
3087 <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>
3089 <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>
3091 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3095 Templates: Handle comments in parameter names (T69657)
3098 <!-- should be ignored -->
3102 <!-- should be ignored -->
3105 {{echo|1<!-- should be ignored -->=foo}}
3107 {{echo|<!-- should be ignored -->1=foo}}
3115 <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>
3117 <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>
3119 <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>
3121 <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>
3125 Templates: Other wikitext in parameter names (T69657)
3132 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3136 Templates: With colons
3140 <p>Template with colon
3143 <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>
3146 #--------------------------------------------------------------------
3147 # Transclusion parameter escaping tests
3148 #--------------------------------------------------------------------
3151 Templates: Parsoid parameter escaping test 1
3153 {{echo|[foo]|{{echo|[bar]}}}}
3158 <p about="#mwt1" typeof="mw:Transclusion"
3159 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3163 Parsoid: Pipes in external links in template parameter
3165 {{echo|[{{echo|http://example.com}} link]}}
3167 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3170 <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>
3174 Parsoid: pipe in transclusion parameter
3176 {{echo|http://foo.com/a|b}}
3178 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3181 <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>
3185 Parsoid: Pipe in external link target and content in template parameter
3187 parsoid=html2wt,wt2wt
3189 {{echo|[http://foo.com/a|b a|b]}}
3191 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3194 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3195 typeof="mw:Transclusion"
3196 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3197 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3201 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3205 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3207 <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>
3211 Templates: Don't escape already nowiki-escaped text in template parameters
3213 parsoid=html2wt,wt2wt
3215 {{echo|foo<nowiki>|</nowiki>bar}}
3216 {{echo|<nowiki><div></nowiki>}}
3217 {{echo|<nowiki></nowiki>}}
3224 <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>
3225 <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>
3226 <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>
3232 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3234 parsoid=html2wt,wt2wt
3236 {{echo|{{echo|1=bar}}}}
3241 <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>
3246 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3253 <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>
3258 Templates: Preserve blank parameter names
3265 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3269 Templates: Preserve blank parameter names in other positions
3271 {{blank_param|bar|=foo}}
3277 <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
3282 ### Parsoid-centric tests for testing RT edge cases for pre
3286 1a. Indent-Pre and Comments
3299 1b. Indent-Pre and Comments
3312 1c. Indent-Pre and Comments
3325 1d. Indent-Pre and Comments
3326 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3339 2a. Indent-Pre and tables
3360 2b. Indent-Pre and tables
3376 2c. Indent-Pre and tables (T44252)
3393 2d. Indent-Pre and tables
3410 <tbody><tr><td> b</td></tr>
3415 2e. Indent-Pre and table-line syntax
3428 2f. Indent-pre started by table-line syntax
3447 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3452 Text that should be rendered preformatted
3460 <pre>Text that should be rendered preformatted
3469 2h. Indent pre in tables
3471 parsoid=wt2html,html2html
3514 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3516 </td></tr></tbody></table>
3520 3a. Indent-Pre and block tags (single-line html)
3524 c <blockquote> foo </blockquote>
3529 c <blockquote> foo </blockquote>
3530 <pre><span> foo </span>
3533 <p> a </p><p> foo </p><p>
3534 b </p><div> foo </div><p>
3535 c </p><blockquote><p> foo </p></blockquote>
3536 <pre><span> foo </span>
3539 <p> a </p><p data-parsoid='{"stx":"html"}'> foo </p><p>
3540 b </p><div data-parsoid='{"stx":"html"}'> foo </div><p>
3541 c </p><blockquote data-parsoid='{"stx":"html"}'><p> foo </p></blockquote>
3542 <pre><span data-parsoid='{"stx":"html"}'> foo </span></pre>
3546 3b. Indent-Pre and block tags (multi-line html)
3549 <!-- comment --> b <div> foo </div>
3551 <pre>a <span>foo</span>
3556 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3557 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3559 <pre>a <span>foo</span>
3561 b </p><div> foo </div>
3565 3c. Indent-Pre and block tags (pre-content on separate line)
3629 4. Indent-Pre and extension tags
3631 parsoid=wt2html,html2html
3640 <p> a </p><pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{}}'></pre>
3644 5. Indent-Pre and html pre
3646 <pre class="123">hi</pre>
3648 <pre class="123">hi</pre>
3651 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3655 Render paragraphs when indent-pre is suppressed in blocklevels
3672 4. Multiple spaces at start-of-line
3690 ## NOTE: the leading white-space chars on empty line are significant
3692 5a. White-space in indent-pre
3704 ## NOTE: the leading white-space chars on empty line are significant
3706 5b. White-space in indent-pre
3725 5c. White-space in indent-pre
3738 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3761 7a. Indent-pre and category links
3763 parsoid=wt2html,wt2wt
3765 [[Category:foo]] <!-- No pre-wrapping -->
3766 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3769 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3770 <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 -->
3773 ## We used to, but no longer wt2wt this test since the default serializer
3774 ## will normalize all categories to serialize on their own line.
3775 ## This wikitext usage is going to be fairly uncommon in production and
3776 ## selser will take care of preserving formatting in those scenarios.
3778 7b. Indent-pre and category links
3783 [[Category:foo]] {{echo|b}}
3785 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3786 <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>
3790 Indent-Pre: Newlines in comments shouldn't affect sol state
3805 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3809 HTML-pre: 1. embedded newlines
3841 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3843 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3846 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3851 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3859 HTML-pre: big spaces
3895 <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"}}'>
3914 HTML-pre: 2: indented text
3927 HTML-pre: 3: other wikitext
3946 <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
3955 ### Definition lists
3963 <dd>Definition</dd></dl>
3968 Definition list for indentation only
3972 <dl><dd>Indented text</dd></dl>
3977 Definition list with no space
3982 <dd>Definition</dd></dl>
3987 Definition list with URL link
3989 ;http://example.com/ :definition
3991 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
3992 <dd>definition</dd></dl>
3997 Definition list with bracketed URL link
3999 ;[http://www.example.com/ Example]:Something about it
4001 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
4002 <dd>Something about it</dd></dl>
4007 Definition list with wikilink containing colon
4009 ;[[Help:FAQ]]:The least-read page on Wikipedia
4011 <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>
4012 <dd>The least-read page on Wikipedia</dd></dl>
4016 # At Brion's and JeLuF's insistence... :)
4018 Definition list with news link containing colon
4020 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
4022 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
4023 <dd>This isn't even a real newsgroup!</dd></dl>
4026 <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>
4030 Malformed definition list with colon
4032 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
4034 <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>
4039 Definition lists: colon in external link text
4041 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
4043 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
4044 <dd>OK, I made that up</dd></dl>
4049 Definition lists: colon in HTML attribute
4051 ;<b style="display: inline">bold</b>
4053 <dl><dt><b style="display: inline">bold</b></dt></dl>
4058 Definition lists: self-closed tag
4060 ;one<br/>two :two-line fun
4062 <dl><dt>one<br />two</dt>
4063 <dd>two-line fun</dd></dl>
4068 Definition lists: ignore colons inside tags
4070 ;one <b>two : tag <i>fun:</i>:</b>:def
4072 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
4078 Definition lists: excess closed tags
4080 ;one</b>two :bad tag fun
4083 <dd>bad tag fun</dd></dl>
4087 <dd>bad tag fun</dd>
4092 T13748: Literal closing tags
4096 <dd>test test test test test</dd>
4098 <dd>test test test test test</dd>
4103 <dd>test test test test test</dd>
4105 <dd>test test test test test</dd>
4111 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4120 <dd>description</dd></dl>
4121 <ul><li>unordered</li></ul>
4127 Definition list with empty definition and following paragraph
4140 Nested definition lists using html syntax
4153 Definition Lists: No nesting: Multiple dd's
4166 Definition Lists: Indentation: Regular
4174 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4179 Definition Lists: Indentation: Missing 1st level
4185 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4190 Definition Lists: Indentation: Multi-level indent
4194 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4199 Definition Lists: Hacky use to indent tables
4206 should be left alone
4208 <dl><dd><dl><dd><table>
4213 </td></tr></table></dd></dl></dd></dl>
4215 should be left alone
4220 Definition Lists: Hacky use to indent tables (with content following table)
4225 |} <!--c1--> this text should be part of the dl
4232 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4239 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4243 Definition Lists: Hacky use to indent tables, with comments (T65979)
4251 should be left alone
4254 <dl><dd><dl><dd><table><tr>
4257 </tr></table><!-- bar --></dd></dl></dd></dl>
4259 should be left alone</p>
4263 Definition Lists: Hacky use to indent tables, with comment before table
4271 <dl><dd><dl><dd><!-- foo --><table><tr>
4273 </tr></table></dd></dl></dd></dl>
4276 # The trailing whitespace in this test is to catch a regression in
4277 # Parsoid after T54473.
4279 Definition Lists: Hacky use to indent tables (WS-insensitive)
4288 </td></tr></table></dd></dl>
4292 <tbody><tr><td>a</td></tr>
4293 </tbody></table></dd></dl>
4296 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4297 ## as an empty dt item. It also ignores all but the last ";" when followed
4298 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4299 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4302 ## Ex: ";;t2 ::d2" is transformed into:
4314 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4315 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4326 ## All Parsoid only definition list tests have this difference.
4328 ## See also: https://phabricator.wikimedia.org/T8569
4329 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4332 Table / list interaction: indented table with lists in table contents
4354 </td></tr></table></dd></dl>
4359 Table / list interaction: lists nested in tables nested in indented lists
4382 </td></tr></table></dd></dl>
4389 Definition Lists: Nesting: Multi-level (Parsoid only)
4417 Definition Lists: Nesting: Test 2
4424 <dl><dd>d2</dd></dl></dd></dl>
4429 Definition Lists: Nesting: Test 3
4434 <dl><dd><dl><dt>t1</dt>
4436 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4441 Definition Lists: Nesting: Test 4
4446 <dl><dd><dl><dd><dl><dt>t3</dt>
4447 <dd>d3</dd></dl></dd></dl></dd></dl>
4452 ## The Parsoid team believes the following three test exposes a
4453 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4454 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4455 ## It also exposes a "misfeature" in tidy, which doesn't like
4456 ## <dl> tags with a single <dt> child; it converts the <dt> into
4457 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4459 Definition Lists: Mixed Lists: Test 1
4465 <dl><dd><dl><dt><ul><li>foo</li>
4466 <li>bar</li></ul></dt></dl>
4467 <dl><dt>baz</dt></dl></dd></dl>
4470 <dl><dd><dl><dt><ul><li>foo</li>
4471 <li>bar</li></ul></dt></dl>
4472 <dl><dt>baz</dt></dl></dd></dl>
4490 Definition Lists: Mixed Lists: Test 2
4495 <ul><li><dl><dd>d1</dd>
4496 <dd>d2</dd></dl></li></ul>
4502 Definition Lists: Mixed Lists: Test 3
4507 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4508 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4514 Definition Lists: Mixed Lists: Test 4
4519 <ul><li><dl><dt>d1</dt>
4522 <dd>d4</dd></dl></li></ul>
4528 Definition Lists: Mixed Lists: Test 5
4534 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4540 Definition Lists: Mixed Lists: Test 6
4545 <ol><li><ul><li><dl><dd>d1
4546 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4552 Definition Lists: Mixed Lists: Test 7
4557 <dl><dd><ul><li>d1</li>
4558 <li>d2</li></ul></dd></dl>
4564 Definition Lists: Mixed Lists: Test 8
4569 <dl><dd><ul><li>d1</li></ul>
4570 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4576 Definition Lists: Mixed Lists: Test 9
4580 <ul><li><dl><dt>foo</dt>
4581 <dd>bar</dd></dl></li></ul>
4587 Definition Lists: Mixed Lists: Test 10
4591 <ul><li><ol><li><dl><dt>foo</dt>
4592 <dd>bar</dd></dl></li></ol></li></ul>
4596 # The Parsoid team disagrees with the PHP parser's seemingly-random
4597 # rules regarding dd/dt on the next few tests. Parsoid is more
4598 # consistent, and recognizes the shared nesting and keeps the
4599 # still-open tags around until the nesting is complete.
4601 # This is a regression test for T175099
4603 Definition Lists: Mixed Lists: Test 11
4610 <ul><li>b</li></ul></dd></dl>
4614 <dd><ul><li>b</li></ul></dd></dl>
4617 # FIXME: Maybe get rid of this test?
4619 Definition Lists: Mixed Lists: Test 12
4624 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4625 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4627 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4630 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4631 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4633 <dd>baz</dd></dl></li></ol></li></ul>
4651 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4656 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4665 Definition Lists: Mixed Lists: Test 13
4670 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4671 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4672 <dl><dt>boo </dt>
4673 <dd>baz</dd></dl></li></ol></li></ul>
4676 # FIXME: Maybe get rid of this test?
4678 # * The test is wrong, there are two colons where there should be :;
4679 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4681 Definition Lists: Weird Ones: Test 1
4683 *#;*::;;foo :bar (who uses this?)
4685 <ul><li><ol><li><dl><dt>foo</dt>
4686 <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>
4704 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4716 Definition Lists: colons occurring in tags
4733 <dt><span>a:b</span></dt>
4734 <dt><div>a:b</div></dt>
4735 <dt><div>a</div></dt>
4739 <dt><i>a:b</i></dt></dl>
4740 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4742 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4744 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4745 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4746 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4747 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4749 <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>
4750 <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>
4751 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4754 # Parsoid's output differs here again because it shares
4755 # nesting between the two lists unlike the PHP parser.
4756 # Unsure which is more desirable.
4758 Definition Lists: colons and tables 1
4770 </td></tr></table></dd></dl>
4774 </td></tr></table></dd></dl>
4780 </td></tr></table></dd>
4784 </td></tr></table></dd></dl>
4787 # FIXME: Does this need a html/php section?
4789 Definition Lists: template interaction
4791 ::{{definition_list}}
4794 ::{{definition_list}}
4799 <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">
4800 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4802 <dl><dd data-parsoid='{}'>one
4803 <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">
4804 </span><dd about="#mwt2">two
4806 <dd>three</dd></dl></dd>
4807 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4815 External links: non-bracketed
4817 Non-bracketed: http://example.com
4819 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4823 # parsoid doesn't explicitly mark autonumbered links, see T55505
4825 External links: numbered
4827 Numbered: [http://example.com]
4828 Numbered: [http://example.net]
4829 Numbered: [http://example.com]
4831 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4832 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4833 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4836 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4837 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4838 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4842 External links: specified text
4844 Specified text: [http://example.com link]
4846 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4851 External links: trail
4853 Linktrails should not work for external links: [http://example.com link]s
4855 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4860 External links: dollar sign in URL
4862 http://example.com/1$2345
4864 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4868 # parsoid doesn't explicitly mark autonumbered links, see T55505
4870 External links: dollar sign in URL (autonumber)
4872 [http://example.com/1$2345]
4874 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4877 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4881 External links: open square bracket forbidden in URL (T6377)
4883 parsoid=wt2html,wt2wt,html2html
4885 http://example.com/1[2345
4887 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4890 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4894 External links: open square bracket forbidden in URL (named) (T6377)
4896 parsoid=wt2html,html2html
4898 [http://example.com/1[2345]
4900 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4903 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4906 # parsoid adds a space before the link name
4908 External links: open square bracket forbidden in URL (named) (T6377)
4911 [http://example.com/1 [2345]
4913 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4918 External links: nowiki in URL link text (T8230)
4920 [http://example.com/ <nowiki>''example site''</nowiki>]
4922 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4927 External links: newline forbidden in text (T8230 regression check)
4929 [http://example.com/ first
4932 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4938 External links: Pipe char between url and text
4940 [http://example.com | link]
4942 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4947 External links: protocol-relative URL in brackets
4949 [//example.com/ Test]
4951 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4955 # parsoid doesn't explicitly mark autonumbered links, see T55505
4957 External links: protocol-relative URL in brackets without text
4961 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4964 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4968 External links: protocol-relative URL in free text is left alone
4972 <p>//example.com/Foo
4977 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4979 foo//example.com/Foo
4981 <p>foo//example.com/Foo
4985 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4987 External links: with no contents
4989 parsoid=wt2html,wt2wt
4991 [http://en.wikipedia.org/wiki/Foo]
4993 [[wikipedia:Foo|Bar]]
4995 [[wikipedia:Foo|<span>Bar</span>]]
4997 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4998 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4999 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
5002 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
5003 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
5004 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
5008 External links: Free with trailing punctuation
5018 http://example.com/url_with_(brackets)
5019 (http://example.com/url_without_brackets)
5020 http://example.com/url_with_entity&
5021 http://example.com/url_with_entity&
5022 http://example.com/url_with_entity&
5023 http://example.com/url_with_entity
5024 http://example.com/url_with_entity 
5025 http://example.com/url_with_entity 
5026 http://example.com/url_with_entity<
5027 http://example.com/url_with_entity<
5028 http://example.com/url_with_entity<
5030 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
5031 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
5032 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
5033 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
5034 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
5035 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
5036 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
5037 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5038 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5039 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5040 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5041 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5042 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5043 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5044 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5045 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
5046 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5047 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5048 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
5051 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
5052 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
5053 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
5054 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
5055 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
5056 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
5057 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
5058 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
5059 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
5060 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
5061 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5062 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5063 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
5064 <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>
5065 <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>
5066 <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>
5067 <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>
5068 <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>
5069 <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>
5073 External links: tricky Parsoid html2html case
5075 parsoid=wt2html,wt2wt,html2html
5077 http://example.com/url_with_entity&amp;
5079 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5082 <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>
5086 External links: Free with trailing quotes (T113666)
5088 '''News:''' Stuff here
5092 <p><b>News:</b> Stuff here
5093 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5096 <p><b>News:</b> Stuff here</p>
5097 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5101 External links: with entity
5103 [http:// www.librarieswithoutborders.org Libraries without borders]
5105 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5108 <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>
5112 External links: Lone protocols are never linked (T105697)
5131 External links: No preceding word characters allowed (T67278)
5133 NOPEhttp://example.com
5134 N0http://example.com
5135 ok:http://example.com
5136 ok-http://example.com
5138 <p>NOPEhttp://example.com
5139 N0http://example.com
5140 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5141 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5146 External links: nofollow domain exception
5148 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5150 <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>.
5157 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5159 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5164 External image from https
5166 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5168 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5173 External image (when not allowed)
5175 wgAllowExternalImages=0
5177 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5179 <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>
5184 Link to non-http image, no img tag
5186 Link to non-http image, no img tag: ftp://example.com/test.jpg
5188 <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>
5193 External links: terminating separator
5195 Terminating separator: http://example.com/thing,
5197 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5202 External links: intervening separator
5204 Intervening separator: http://example.com/1,2,3
5206 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5211 External links: old bug with URL in query
5213 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5215 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5220 External links: old URL-in-URL bug, mixed protocols
5222 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5224 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5228 # Since Parsoid is starting to emit canonical wikitext for links,
5229 # [http://example.com http://example.com] will not RT back to that
5232 External links: URL in text
5236 URL in text: [http://example.com http://example.com]
5238 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5241 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5245 External links: Clickable images
5247 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5249 <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>
5252 <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>
5256 External links: raw ampersand
5258 Old & use: http://x&y
5260 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5265 External links: encoded ampersand
5267 Old & use: http://x&y
5269 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5272 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5276 External links: encoded equals (T8102)
5278 http://example.com/?foo=bar
5280 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5283 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5287 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5288 ## does it number them. As discussed in T55505, we can identify
5289 ## autonumbered links via CSS.
5293 External links: [raw ampersand]
5295 Old & use: [http://x&y]
5297 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5300 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5303 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5304 # mode will return the [raw ampersand] wikitext
5306 External links: [encoded ampersand]
5308 parsoid=wt2html,wt2wt,html2html
5310 Old & use: [http://x&y]
5312 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5315 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5319 External links: [raw equals]
5321 [http://example.com/?foo=bar]
5323 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5326 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5329 # note that parsoid html is identical to [raw equals] case; so html2wt
5330 # mode will return the [raw equals] wikitext
5332 External links: [encoded equals] (T8102)
5334 parsoid=wt2html,wt2wt,html2html
5336 [http://example.com/?foo=bar]
5338 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5341 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5344 # xxx parsoid strips the IDN character, so the round-trip tests will
5345 # obviously fail and are disabled. --cscott
5347 External links: [IDN ignored character reference in hostname; strip it right off]
5349 parsoid=wt2html,wt2wt,html2html
5351 [http://e‌xample.com/]
5353 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5356 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5359 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5360 # Where an external link could easily circumvent the sanitization of the text of
5361 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5362 # test demands a higher standard. That's a bit strange.
5366 # http://example.com -> [http://example.com|http://example.com]
5367 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5369 # The first example is sanitized, but the second is not. Any security benefits
5370 # from this production are trivial to circumvent. Either remove this test and
5371 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5372 # the test accordingly.
5376 # xxx parsoid strips the IDN character, so the round-trip tests will
5377 # obviously fail and are disabled. --cscott
5379 External links: IDN ignored character reference in hostname; strip it right off
5381 parsoid=wt2html,html2html
5383 http://e‌xample.com/
5385 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5388 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5392 External links: www.jpeg.org (T2554)
5396 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5400 # parsoid doesn't explicitly mark autonumbered links, see T55505
5402 External links: URL within URL (T2002)
5404 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5406 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5409 <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>
5413 T2361: URL inside bracketed URL
5415 [http://www.example.com/foo http://www.example.com/bar]
5417 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5422 T2361: URL within URL, not bracketed
5424 http://www.example.com/foo?=http://www.example.com/bar
5426 <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>
5431 T2289: ">"-token in URL-tail
5433 http://www.example.com/<hello>
5435 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5440 T2289: literal ">"-token in URL-tail
5442 http://www.example.com/<b>html</b>
5444 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5447 <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>
5451 T2289: ">"-token in bracketed URL
5453 [http://www.example.com/<hello> stuff]
5455 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5460 T2289: literal ">"-token in bracketed URL
5462 [http://www.example.com/<b>html</b> stuff]
5464 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5469 T2289: literal double quote at end of URL
5471 http://www.example.com/"hello"
5473 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5478 T2289: literal double quote in bracketed URL
5480 [http://www.example.com/"hello" stuff]
5482 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5487 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5489 [http://www.example.com test]
5491 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5496 External links: link text with spaces
5498 [http://www.example.com a b c]
5499 [http://www.example.com ''a'' ''b'']
5501 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5502 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5506 # Note edge case difference between PHP and Parsoid here.
5508 External links: wiki links within external link (T5695)
5510 parsoid=wt2html,html2html
5512 [http://example.com [[wikilink]] embedded in ext link]
5514 [http://example.com test [[wikilink]] embedded in ext link]
5516 <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>
5517 </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>
5520 <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>
5521 <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>
5525 T2787: Links with one slash after the url protocol are invalid
5529 [http:/example.com title]
5531 <p>http:/example.com
5532 </p><p>[http:/example.com title]
5537 Bracketed external links with template-generated invalid target
5539 [{{echo|http:/example.com}} title]
5541 <p>[http:/example.com title]
5545 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5547 Broken wikilinks (but not external links) prevent templates from closing
5551 [http://example.com x
5553 {{echo|[http://example.com x}}
5559 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5560 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5562 </p><p>{{echo|[[Foo}}
5565 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5566 <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>
5568 <p>{{echo|[[Foo}}</p>
5572 Wikilinks with embedded newlines are not broken
5583 <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>
5595 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5599 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5600 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5604 T4702: Mismatched <i>, <b> and <a> tags are invalid
5606 ''[http://example.com text'']
5607 [http://example.com '''text]'''
5608 ''Something [http://example.com in italic'']
5609 ''Something [http://example.com mixed''''', even bold]'''
5610 '''''Now [http://example.com both''''']
5612 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5613 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5614 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5615 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5616 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5624 http://www.example.com/?title=AT%26T
5626 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5629 <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>
5632 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5633 # % is actually legal in HTML5. Any change in output would need testing though.
5635 T6781, T7267: %25 in URL
5637 http://www.example.com/?title=100%25_Bran
5639 <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>
5642 <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>
5646 T6781, T7267: %28, %29 in URL
5648 http://www.example.com/?title=Ben-Hur_%281959_film%29
5650 <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>
5653 <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>
5658 T6781: %26 in autonumber URL
5660 [http://www.example.com/?title=AT%26T]
5662 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5665 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5669 T6781, T7267: %26 in autonumber URL
5671 [http://www.example.com/?title=100%25_Bran]
5673 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5676 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5680 T6781, T7267: %28, %29 in autonumber URL
5682 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5684 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5687 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5692 T6781: %26 in bracketed URL
5694 [http://www.example.com/?title=AT%26T link]
5696 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5699 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5703 T6781, T7267: %25 in bracketed URL
5705 [http://www.example.com/?title=100%25_Bran link]
5707 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5712 T6781, T7267: %28, %29 in bracketed URL
5714 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5716 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5719 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5723 External link containing a period in the anchor. (T65947)
5725 [//foo.org/bar#baz. bang]
5727 [//foo.org/bar. bang]
5729 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5730 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5733 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5734 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5738 External link containing a single quote. (T65947)
5742 [//foo.org/bar'baz bang]
5744 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5745 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5748 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5749 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5753 External link containing double-single-quotes in text '' (T6598 sanity check)
5755 Some [http://example.com/ pretty ''italics'' and stuff]!
5757 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5762 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5764 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5766 <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>
5770 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5772 External link containing double-single-quotes with no space separating the url from text in italics
5774 [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]].]
5776 <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>.
5779 <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>
5783 External link with comments in link text
5785 [http://www.google.com Google <!-- comment -->]
5787 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5790 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5794 External link to bare IPv4 address
5796 [http://192.168.0.1 Link]
5798 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5801 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5805 URL-encoding in URL functions (single parameter)
5807 {{localurl:Some page|amp=&}}
5809 <p>/index.php?title=Some_page&amp=&
5814 URL-encoding in URL functions (multiple parameters)
5816 {{localurl:Some page|q=?&=&}}
5818 <p>/index.php?title=Some_page&q=?&amp=&
5825 http://example.com/index.php?foozoid%5B%5D=bar
5827 http://example.com/index.php?foozoid[]=bar
5829 <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>
5830 </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>
5833 <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>
5835 <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>
5839 IPv6 urls, autolink format (T23261)
5841 http://[2404:130:0:1000::187:2]/index.php
5843 Examples from RFC 2373, section 2.2:
5845 *http://[1080::8:800:200C:417A]/unicast
5846 *http://[FF01::101]/multicast
5847 *http://[::1]/loopback
5848 *http://[::]/unspecified
5849 *http://[::13.1.68.3]/ipv4compat
5850 *http://[::FFFF:129.144.52.38]/ipv4compat
5852 Examples from RFC 2732, section 2:
5854 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5855 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5856 *http://[3ffe:2a00:100:7031::1]
5857 *http://[1080::8:800:200C:417A]/foo
5858 *http://[::192.9.5.5]/ipng
5859 *http://[::FFFF:129.144.52.38]:80/index.html
5860 *http://[2010:836B:4179::836B:4179]
5862 <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>
5863 </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:
5865 <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>
5866 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5867 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5868 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5869 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5870 <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>
5871 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5873 <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>
5874 <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>
5875 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5876 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5877 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5878 <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>
5879 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5882 <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>
5884 <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>
5885 <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>
5886 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5887 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5888 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5889 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5890 <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>
5892 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5893 <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>
5894 <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>
5895 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5896 <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>
5897 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5898 <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>
5899 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5903 IPv6 urls, bracketed format (T23261)
5905 [http://[2404:130:0:1000::187:2]/index.php test]
5907 Examples from RFC 2373, section 2.2:
5909 *[http://[1080::8:800:200C:417A] unicast]
5910 *[http://[FF01::101] multicast]
5911 *[http://[::1]/ loopback]
5912 *[http://[::] unspecified]
5913 *[http://[::13.1.68.3] ipv4compat]
5914 *[http://[::FFFF:129.144.52.38] ipv4compat]
5916 Examples from RFC 2732, section 2:
5918 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5919 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5920 *[http://[3ffe:2a00:100:7031::1] 3]
5921 *[http://[1080::8:800:200C:417A]/foo 4]
5922 *[http://[::192.9.5.5]/ipng 5]
5923 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5924 *[http://[2010:836B:4179::836B:4179] 7]
5926 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5927 </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:
5929 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5930 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5931 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5932 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5933 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5934 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5935 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5937 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5938 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5939 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5940 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5941 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5942 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5943 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5946 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5948 <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>
5949 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5950 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5951 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5952 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5953 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5954 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5956 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5957 <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>
5958 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5959 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5960 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5961 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5962 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5963 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5967 Non-extlinks in brackets
5976 [{{echo|foo}} ''bar'']
5977 [{{echo|foo}}l's] errand
5978 [{{echo|foo}}l's errand]
5980 [url=http://example.com]
5981 [http:// bare protocols don't count]
5994 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5995 [http:// bare protocols don't count]
6003 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
6004 [<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]
6005 [<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>]
6006 [<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
6007 [<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]
6008 [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>]
6009 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
6010 [http:// bare protocols don't count]</p>
6014 Percent encoding in external links
6016 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
6018 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
6021 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
6025 Use url link syntax for links where the content is equal the link target
6029 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
6032 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
6036 Parenthesis in external links, especially URL links
6040 http://example.com/test)
6042 http://example.com/(test)
6044 http://example.com/((test)
6046 (http://example.com/(test))
6048 (http://example.com/(test)))))
6050 http://example.com/a)b
6052 [http://example.com) foo]
6054 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6055 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
6056 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
6057 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
6058 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
6059 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
6060 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
6061 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
6064 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
6065 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
6066 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
6067 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
6068 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
6069 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
6070 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
6071 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
6075 Parenthesis in external links, w/ transclusion or comment
6077 (http://example.com/{{echo|hi}})
6079 (http://example.com<!-- hi -->)
6081 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6082 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6085 <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>
6087 <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>
6091 Serialize <a> tags with invalid link targets as plain text
6093 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6095 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6096 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6097 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6098 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6101 <nowiki>*</nowiki>text
6102 <nowiki>[[foo]]</nowiki>
6103 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6107 mw:ExtLink -vs- mw:WikiLink (T94723)
6111 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6112 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6113 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6114 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6116 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6117 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6125 [[:en:European_Robin|European Robin]]
6126 [[:en:European_Robin|European Robin]]
6130 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6134 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6136 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6147 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6149 Normal text. '''''Bold italic text.''''' Normal text.
6151 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6152 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6157 Quotes wrapping HTML table
6159 '''<table><tr><td>hi</td></tr></table>'''
6161 <b><table><tbody><tr><td>hi</td></tr></tbody></table></b>
6163 <b><table data-parsoid='{"stx":"html"}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>hi</td></tr></tbody></table></b>
6166 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6167 # parser strips. The wikitext contains just the first half of the bold
6170 Unclosed and unmatched quotes
6172 '''''Bold italic text '''with bold deactivated''' in between.'''''
6174 '''''Bold italic text ''with italic deactivated'' in between.'''''
6178 ..spanning two paragraphs (should not work).'''
6180 '''Bold tag left open
6182 ''Italic tag left open
6186 <!-- Unmatching number of opening, closing tags: -->
6187 '''This year''''s election ''should'' beat '''last year''''s.
6189 ''Tom'''s car is bigger than ''Susan'''s.
6191 Plain ''italic'''s plain
6193 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6194 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6195 </p><p><b>Bold text..</b>
6196 </p><p>..spanning two paragraphs (should not work).
6197 </p><p><b>Bold tag left open</b>
6198 </p><p><i>Italic tag left open</i>
6200 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6201 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6202 </p><p>Plain <i>italic'</i>s plain
6205 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6206 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6207 </p><p><b>Bold text..</b>
6208 </p><p>..spanning two paragraphs (should not work).<b></b>
6209 </p><p><b>Bold tag left open</b>
6210 </p><p><i>Italic tag left open</i>
6213 <!-- Unmatching number of opening, closing tags: -->
6214 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6215 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6216 </p><p>Plain <i>italic'</i>s plain
6223 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6226 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6227 # is the bare minimum required by the spec, see:
6228 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6229 # Parsoid team replies: empty table tags are legal in HTML5
6231 A table with no data.
6244 A table with stray table end tags on start tag line (wt2html)
6248 {|style="color: red;"|}
6250 {|style="color: red;" |}
6254 {|style="color: red;"|} id="foo"
6258 {|style="color: red;" |} id="foo"
6262 <table style="color: red;"></table>
6264 <table style="color: red;">
6270 <table style="color: red;" id="foo">
6276 <table style="color: red;" id="foo">
6285 A table with no data (take 2)
6293 # A table with nothing but a caption is invalid XHTML, we might want to render
6294 # this as <p>caption</p>
6295 # Parsoid team replies: table with only a caption is legal in HTML5
6297 A table with nothing but a caption
6305 </caption><tr><td></td></tr></table>
6308 <table><caption>caption</caption></table>
6312 A table with caption with default-spaced attributes and a table row
6315 |+ style="color: red;" |caption1
6321 <caption style="color: red;">caption1
6330 A table with captions with non-default spaced attributes and a table row
6333 |+style="color: red;"|caption2
6334 |+ style="color: red;"|caption3
6340 <caption style="color: red;">caption2
6342 <caption style="color: red;">caption3
6351 Table td-cell syntax variations
6356 |style='color:red;'|baz
6357 |style='color:red;'||baz
6364 <td>foo bar foo</td>
6367 <td style="color:red;">baz
6369 <td>style='color:red;'</td>
6397 Simple table but with multiple dashes for row wikitext
6416 Multiplication table
6418 {| border="1" cellpadding="2"
6419 |+Multiplication table
6439 <table border="1" cellpadding="2">
6440 <caption>Multiplication table
6487 Accept "||" in table headings
6502 Accept "!!" in table data
6516 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6521 Accept "||" in indented table headings
6531 </th></tr></table></dd></dl>
6536 Accept "!!" in templates
6550 <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>
6554 Accept "!!" in table headings after newline
6571 <p>b!!c</p></th></tr>
6576 Accept "!!" in table data of mixed wikitext / html syntax
6580 <tr><td>b!!c</td></tr>
6586 </th></tr><tr><td>b!!c</td></tr>
6590 <tbody><tr><th>a</th></tr>
6591 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6596 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6613 Accept "| !" at start of line in tables (ignore !-attribute)
6617 |!style="color:red"|bar
6629 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 +/-
6633 |style='color:red;'|+1
6634 |style='color:blue;'|-1
6646 <td style="color:red;">+1
6648 <td style="color:blue;">-1
6672 |rowspan=2|Cell 2, row 1 (and 2)
6683 <td rowspan="2">Cell 2, row 1 (and 2)
6701 {| bgcolor=#ABCDEF border=2
6706 |the original table again
6714 <table bgcolor="#ABCDEF" border="2">
6722 <td>the original table again
6728 Invalid attributes in table cell (T3830)
6742 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6746 |title="foo<nowiki>|</nowiki>" |bar
6747 |title="foo<nowiki>|</nowiki>" bar
6754 <td title="foo|">bar
6756 <td>title="foo|" bar
6761 <tbody><tr><td title="foo">bar</td>
6762 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6763 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6767 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6768 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6769 # *2wt modes will fail.
6771 Table security: embedded pipes
6773 parsoid=wt2html,html2html
6776 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6780 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6781 <td>]" onmouseover="alert(document.cookie)">test
6789 <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>
6793 Element attributes with double ! should not be broken up by <th>
6796 !hi <div class="!!">ha</div> ho
6801 <th>hi <div class="!!">ha</div> ho
6806 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6811 ! and || in element attributes should not be parsed as <th>/<td>
6814 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6819 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6824 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6828 # FIXME: The output seems broken. Filed as T110268.
6830 ! and || in td attributes should not be parsed as <th>/<td>
6835 |style="color: red !important;" data-contrived="put this here ||"|foo
6840 <td>style="color: red !important;" data-contrived="put this here</td>
6846 <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>
6851 Break on | in element attribute in template
6853 parsoid=wt2html,html2html
6855 {{echo|1=<div class="hi|ho">ha</div>}}
6857 <p>ho">ha</div>
6860 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</p>
6864 Break on | in element attribute name in template
6866 {{echo|<div cla|ss="hiho">ha</div>}}
6868 <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>
6872 Don't break on | in extension attribute in template
6874 {{echo|<ref name="hi|ho">ha</ref>}}
6878 <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>
6880 <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>
6883 ## We don't support roundtripping of these attributes in Parsoid.
6884 ## Selective serialization takes care of preventing dirty diffs.
6885 ## But, on edits, we dirty-diff the invalid attribute text.
6887 Invalid text in table attributes should be discarded
6891 {| <span>boo</span> style='border:1px solid black'
6892 | <span>boo</span> style='color:blue' |1
6893 |<span>boo</span> style='color:blue'|2
6896 <table style="border:1px solid black">
6898 <td style="color:blue">1
6900 <td style="color:blue">2
6904 <table style="border:1px solid black">
6906 <td style="color:blue">1</td>
6907 <td style="color:blue">2</td>
6913 Invalid text in table attributes should be preserved by selective serializer
6916 "modes": ["selser"],
6918 ["td:first-child", "text", "abc"],
6919 ["td + td", "text", "xyz"]
6923 {| <span>boo</span> style='border:1px solid black'
6924 | <span>boo</span> style='color:blue' | 1
6925 |<span>boo</span> style='color:blue'| 2
6928 {| <span>boo</span> style='border:1px solid black'
6929 | <span>boo</span> style='color:blue' | abc
6930 |<span>boo</span> style='color:blue'| xyz
6935 1. Template-generated table cell attributes and cell content
6940 || {{table_attribs_5}}
6941 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6942 |align=center {{table_attribs}}
6943 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6948 <td style="color:red;">Foo
6950 <td style="color:red;">Foo
6952 <td>style="color:red;"</td>
6955 <td style="color:red;">Foo
6957 <td align="center" style="color:red;">Foo
6959 <td align="center" style="color:red;">Foo
6965 2. Template-generated table cell attributes and cell content
6968 |{{table_attribs_2}}
6973 <td style="color:red;">Foo
6981 <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>
6982 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6987 3. Template-generated table cell attributes and cell content
6990 !align=center {{table_header_cells}}
6992 |align=center {{table_cells}}
6997 <th align="center" style="color:red;">Foo</th>
6998 <th style="color:red;"><i>Bar</i></th>
6999 <th style="color:brown;"><i>Foo</i> and Baz
7002 <td align="center" style="color:red;">Foo</td>
7003 <td style="color:red;"><i>Bar</i></td>
7004 <td style="color:brown;"><i>Foo</i> and Baz
7009 <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>
7010 <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>
7015 4. Template-generated table cell attributes and cell content inside a templated table
7018 !align=center {{table_header_cells}}
7020 |align=center {{table_cells}}
7025 <th align="center" style="color:red;">Foo</th>
7026 <th style="color:red;"><i>Bar</i></th>
7027 <th style="color:brown;"><i>Foo</i> and Baz
7030 <td align="center" style="color:red;">Foo</td>
7031 <td style="color:red;"><i>Bar</i></td>
7032 <td style="color:brown;"><i>Foo</i> and Baz
7036 <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}}]}'>
7037 <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>
7039 <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>
7043 ## Edge case fix to prevent future regressions
7045 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
7048 |{{table_attribs_7}}
7053 <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","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
7055 <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>
7059 Table with row followed by newlines and table heading
7061 parsoid=wt2html,html2html
7079 Table with empty line following the start tag
7081 parsoid=wt2html,html2html
7099 Table attributes with empty value
7101 parsoid=wt2html,html2html
7114 <tbody><tr><td style="">hello</td></tr>
7119 Wikitext table with a lot of comments
7142 Wikitext table comments represented in parsoid dom
7144 {|<!--c1--><!--c2-->
7153 </td></tr></tbody></table>
7155 <table><!--c1--><!--c2-->
7156 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7157 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7162 Wikitext table with double-line table cell
7179 Table cell with a single comment
7196 Table-cell after a comment-only-empty-line
7213 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7215 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7221 Build table with {{!}}
7223 {{{!}} class="wikitable"
7226 {{!}}- style="color:red;"
7227 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7230 <table class="wikitable">
7236 <tr style="color:red;">
7238 <td style="color:red;">second data
7244 Build table with pipe as data
7246 {| class="wikitable"
7249 |- style="color:red;"
7250 |data|| style="color:red;" |second data
7252 | style="color:red;" |data with | || style="color:red;" | second data with |
7254 ||data with | |||second data with |
7257 <table class="wikitable">
7263 <tr style="color:red;">
7265 <td style="color:red;">second data
7268 <td style="color:red;">data with |</td>
7269 <td style="color:red;">second data with |
7272 <td>data with |</td>
7273 <td>second data with |
7279 Build table with wikilink
7281 {| class="wikitable"
7282 !header||second header
7283 |- style="color:red;"
7284 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7286 |data||second data [[Main Page|link|text with pipe]]
7289 <table class="wikitable">
7294 <tr style="color:red;">
7295 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7296 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7300 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7305 # The expected HTML structure in this test is debatable. The PHP parser does
7306 # not parse this kind of table at all. The main focus for Parsoid is on
7307 # round-tripping, so this output is ok for now. TODO: revisit!
7309 Wikitext table with html-syntax row
7319 <td>foo</td></tr></tbody></table>
7322 ## Remex doesn't account for fostered content.
7324 Fostered content in tables: Plain text
7344 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
7347 <tbody><tr class="mw-empty-elt" data-parsoid='{"startTagSrc":"|-"}'></tr></tbody></table>
7351 Fostered content in tables: Lists
7353 parsoid=wt2html,html2html
7366 <ul><li>a</li></ul><table>
7371 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7372 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7374 </tr></tbody></table>
7378 Template generated table cell with attributes
7382 {{table_attribs_4}} ||a||b
7388 <td style="background-color:#DC241f;" width="10px"></td>
7391 </td></tr></tbody></table>
7394 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7395 <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>
7399 Parsoid: Round-trip tables directly followed by content (T53219)
7401 parsoid=wt2html,wt2wt
7414 </td></tr></tbody></table><p> bar
7418 </td></tr></tbody></table><p><b>quux</b>
7423 Parsoid: Default to a newline after tables in new content (T53219)
7428 <tr><td>foo</td></tr></tbody></table> bar
7430 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7435 <nowiki> </nowiki>bar
7443 Parsoid: Row-syntax table headings followed by comment & table cells
7445 parsoid=wt2html,wt2wt
7449 <!-- foo --> ||baz||quux
7463 <tbody><tr><th>foo</th><th>bar
7464 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7469 Parsoid: Recover better from broken table attributes
7483 </td></tr></tbody></table>
7488 <p>foo</p></td></tr>
7493 Tables: Digest broken attributes on table and tr tag
7504 <tr class='mw-empty-elt'></tr>
7505 <tr class='mw-empty-elt'></tr>
7510 Table with missing opening <tr> tag
7512 parsoid=wt2html,wt2wt
7520 <tbody><tr><td>foo</td>
7525 # T137406: Whitespace in the HTML
7527 1. Generate correct wikitext for tables with thead/tbody/tfoot
7532 <caption>Test</caption>
7594 </td></tr></tbody></table>
7597 # T137406: No whitespace in the HTML
7599 2. Generate correct wikitext for tables with thead/tbody/tfoot
7603 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7613 Wikitext tables can be nested inside HTML tables
7617 <table data-parsoid='{"stx":"html"}'>
7620 <tr><td>foo</td></tr>
7638 Plain link, capitalized
7642 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7647 Plain link, uncapitalized
7651 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7658 [[Main Page|The Main Page]]
7660 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7665 Piped link with comment in link text
7667 [[Main Page|The Main<!--front--> Page]]
7669 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7674 Piped link with multiple pipe characters in link text
7676 [[Main Page||The|Main|Page|]]
7678 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7681 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7685 Piped link with no link text
7687 [[Thomas Bek (bishop of St David's)|]]
7689 <p>[[Thomas Bek (bishop of St David's)|]]
7692 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7696 Piped link with empty link text
7698 [[Main Page|<nowiki/>]] - empty nowiki
7699 [[Main Page| ]] - empty space
7700 [[Main Page| ]] - empty non breaking space
7702 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7703 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7704 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7707 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7708 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7709 <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>
7717 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7722 Broken link with fragment
7724 [[Zigzagzogzagzig#zug]]
7726 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7731 Special page link with fragment
7733 [[Special:Version#anchor]]
7735 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7740 Nonexistent special page link with fragment
7742 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7744 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7751 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7753 <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>
7760 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7762 <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>!!!
7773 T45661: Piped links with identical prefixes
7775 [[prefixed article|prefixed articles with spaces]]
7777 [[prefixed article|prefixed articlesaoeu]]
7779 [[Main Page|Main Page test]]
7781 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7782 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7783 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7789 Link with HTML entity in suffix / tail
7791 [[Main Page]]", [[Main Page]]a
7793 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7796 <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>
7800 Link with 3 brackets
7811 Link with 4 brackets
7815 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7820 Piped link with 3 brackets
7822 [[[main page|the main page]]]
7824 <p>[[[main page|the main page]]]
7829 Piped link with extlink-like text
7832 [[Main Page|This is a [bar]]]
7835 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7836 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7837 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7840 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7841 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7842 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7846 Link with multiple pipes
7848 [[Main Page|The|Main|Page]]
7850 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7855 Anchor containing a #. (T65430)
7857 wgFragmentMode=[ 'html5', 'legacy' ]
7859 [[Main Page#And#Link]]
7861 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7864 <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>
7870 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7872 <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>
7877 Link with space in namespace
7879 [[User talk:Foo bar]]
7881 <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>
7886 MemoryAlpha:AlphaTest
7888 This is an article in the MemoryAlpha namespace
7889 (which shadows the memoryalpha interwiki link).
7893 Namespace takes precedence over interwiki link (T53680)
7895 [[MemoryAlpha:AlphaTest]]
7897 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7901 # The previous test doesn't work correctly in html2*, due to not recognizing the
7902 # link as an internal one. This one checks for the correct behavior.
7904 Link to namespace preferred over interwiki with correct rel attribute
7906 parsoid=html2wt,html2html
7908 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7910 [[MemoryAlpha:AlphaTest]]
7914 Piped link to namespace
7916 [[Meta:Disclaimers|The disclaimers]]
7918 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7925 [[Usually caused by a typo (oops}]]
7927 <p>[[Usually caused by a typo (oops}]]
7934 Just a test of an article title containing a percent.
7938 Link containing % (not as a hex sequence)
7941 [[7% Solution|7%25 Solution]]
7943 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7944 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7947 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7948 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7951 # note that the parsoid HTML is identical to the previous test output,
7952 # so the previous test ensures that the html2wt mode will generate the
7953 # "not as a hex sequence" wikitext.
7955 Link containing % as a single hex sequence interpreted to char
7957 parsoid=wt2wt,wt2html,html2html
7960 [[7%25 Solution|7%25 Solution]]
7962 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7963 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7966 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7967 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7971 Link containing % as a double hex sequence interpreted to hex sequence
7975 <p>[[7%2525 Solution]]
7979 ## Example for such a section: == < ==
7981 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7983 wgFragmentMode=[ 'html5', 'legacy' ]
7985 [[%23%3c]][[%23%3e]]
7987 <p><a href="#<">#<</a><a href="#>">#></a>
7990 <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>
7993 ## Example for such a section: == < ==
7995 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7997 wgFragmentMode=[ 'legacy' ]
7999 [[%23%3c]][[%23%3e]]
8001 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
8006 Link containing "<#" and ">#" as a hex sequences
8008 [[%3c%23]][[%3e%23]]
8010 <p>[[%3c%23]][[%3e%23]]
8015 Link containing an equals sign
8017 [[Special:BookSources/isbn=4-00-026157-6]]
8019 <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>
8022 <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>
8028 Just a test of an article title containing a tilde.
8031 # note that links containing signatures, like [[Foo~~~~]], are
8032 # massaged by the pre-save transform (PST) and so the tildes are never
8033 # seen by the parser.
8035 Link containing a tilde
8039 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8042 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8046 Link containing double-single-quotes '' (T6598)
8048 [[Lista d''e paise d''o munno]]
8050 <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>
8053 <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>
8057 Link containing double quotes and spaces
8061 <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>
8064 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8068 File containing double quotes and spaces
8070 [[File:Cool "Gator".png]]
8072 <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>
8076 Redirect containing double quotes and spaces
8078 #REDIRECT [[Cool "Gator"]]
8080 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8084 Link containing double-single-quotes '' in text (T6598 sanity check)
8086 Some [[Link|pretty ''italics'' and stuff]]!
8088 <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>!
8091 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8095 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8097 ''Some [[Link|pretty ''italics'' and stuff]]!''
8099 <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>
8104 Link with double quotes in title part (literal) and alternate part (interpreted)
8106 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8110 [[''Pentecoste''|Pentecoste]]
8112 [[''Pentecoste''|''Pentecoste'']]
8114 <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>
8115 </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>
8116 </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>
8117 </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>
8120 <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>
8121 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8122 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8123 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8127 Broken image links with HTML captions (T41700)
8129 [[File:Nonexistent|<script></script>]]
8130 [[File:Nonexistent|100x100px|<script></script>]]
8131 [[File:Nonexistent|<]]
8132 [[File:Nonexistent|a<i>b</i>c]]
8134 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8135 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8136 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8137 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8140 <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>
8141 <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>
8142 <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>
8143 <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>
8149 [[http://www.example.com]]
8151 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8154 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8158 Plain link to URL with link text
8160 [[http://www.example.com Link text]]
8162 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8167 Plain link to protocol-relative URL
8169 [[//www.example.com]]
8171 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8174 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8178 Plain link to protocol-relative URL with link text
8180 [[//www.example.com Link text]]
8182 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8187 Plain link to page with question mark in title
8193 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8194 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8198 # I'm fairly sure the expected result here is wrong.
8199 # We want these to be URL links, not pseudo-pages with URLs for titles....
8200 # However the current output is also pretty screwy.
8203 # I'm changing it to match the current output--it arguably makes more
8204 # sense in the light of the test above. Old expected result was:
8205 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8207 # But I think this test is bordering on "garbage in, garbage out" anyway.
8212 Piped link to URL: [[http://www.example.com|an example URL]]
8214 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8217 <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>
8221 Plain link in template argument
8225 {{echo|[http://www.example.com |123]}}
8227 {{echo|[[http://www.example.com |123]]}}
8229 {{echo|[[http://www.example.com |123]}}
8231 {{echo|[http://www.example.com |123]]}}
8233 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8234 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8235 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8236 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8239 <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>
8241 <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>
8243 <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>
8245 <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>
8249 T2002: [[page|http://url/]] should link to page, not http://url/
8251 [[Main Page|http://url/]]
8253 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8256 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8259 # Parsoid does not mark self-links, by design.
8261 T2337: Escaped self-links should be bold
8265 [[Bug462]] [[Bug462]]
8267 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8270 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8274 Self-link to section should not be bold
8278 [[Main Page#section]]
8280 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8291 Self-link to numeric title
8297 <p><a class="mw-selflink selflink">0</a>
8302 Link to numeric-equivalent title
8308 <p><a href="/wiki/00" title="00">00</a>
8313 <nowiki> inside a link
8315 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8317 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8322 Non-breaking spaces in title
8324 [[ Main Page ]]
8326 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8330 # Add new article for the test below so that it doesn't red-link
8338 Multiple spaces in titles should normalize to a single underscore
8340 parsoid=wt2html,wt2wt
8346 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8347 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8348 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8351 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8352 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8353 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8358 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8364 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8369 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8375 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8380 Internal link with en linktrail: no apostrophes (T29473)
8386 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8391 Internal link with ca linktrail with apostrophes (T29473)
8397 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8402 Internal link with kaa linktrail with apostrophes (T29473)
8408 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8413 Link with multiple ":" in a subpage-supporting namespace (T65636)
8415 [[User:Foo/Test/63636:Bar|Test]]
8417 <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>
8420 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8423 ## Mainly a sanity check for Parsoid
8425 Handle title parsing for subpages
8445 Link to a subpage from a namespace other than main
8452 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8455 <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>
8459 Ensure that transclusion titles are not url-decoded
8461 subpage title=[[Test]]
8464 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8466 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8469 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8473 Purely hash wikilink
8475 title=[[User:Test/123]]
8480 <p><a href="#a">b</a>
8483 <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>
8487 Serialization of purely hash wikilink
8489 title=[[User:Test/123]]
8493 <p><a href="#a">[[</a></p>
8495 [[#a|<nowiki>[[</nowiki>]]
8497 <p><a href="#a">[[</a>
8502 1. Interaction of linktrail and template encapsulation
8506 <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>
8510 2. Interaction of linktrail and template encapsulation
8514 {{echo|Some [[Fool]]}}s
8516 <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>
8520 3. Interaction of linktrail and template encapsulation
8524 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8526 <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>
8536 Internal link with is link prefix
8540 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8542 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8553 Internal link with is link trail and link prefix
8557 [[mótmælendatrú|xxx]]ar
8559 mótmælenda[[söfnuður]]
8560 mótmælenda[[söfnuður|söfnuðir]]
8561 mótmælenda[[söfnuður|söfnuðir]]xxx
8563 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8564 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8565 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8566 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8567 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8572 Parsoid link trail escaping
8574 parsoid=html2wt,html2html
8576 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8582 Parsoid link prefix escaping
8585 parsoid=html2wt,html2html
8587 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8589 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8593 Parsoid link bracket escaping
8595 parsoid=html2wt,html2html
8597 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8598 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8599 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8600 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8601 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8602 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8610 [[[<nowiki/>[[Test]]]]]
8614 [[[[[<nowiki/>[[Test]]]]]]]
8618 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8626 [http://wp.org ''foo'']
8628 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8629 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8630 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8631 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8636 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8638 [[Foo|{{echo|a}} b {{echo|c}}]]
8640 <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>
8644 Link with angle bracket after anchor
8646 wgFragmentMode=[ 'html5', 'legacy' ]
8650 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8653 <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>
8657 Link with angle bracket after anchor (legacy)
8659 wgFragmentMode=[ 'legacy' ]
8663 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8668 ### Interwiki links (see maintenance/interwiki.sql)
8672 Inline interwiki link
8674 parsoid=wt2html,wt2wt,html2html
8676 [[MeatBall:SoftSecurity]]
8678 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8681 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8685 Inline interwiki link with empty title (T4372)
8687 parsoid=wt2html,wt2wt,html2html
8691 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8694 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8697 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8699 Interwiki link encoding conversion (T3636)
8701 parsoid=wt2html,wt2wt
8703 *[[Wikipedia:ro:Olteniţa]]
8704 *[[Wikipedia:ro:Olteniţa]]
8706 <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>
8707 <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>
8711 <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>
8712 <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>
8716 <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>
8717 <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>
8722 Interwiki link with fragment (T4130)
8724 [[MeatBall:SoftSecurity#foo]]
8726 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8731 Link scenarios with escaped fragments
8733 wgFragmentMode=[ 'html5', 'legacy' ]
8736 [[Foo#Is this great?]]
8737 [[meatball:Foo#Is this great?]]
8739 <p><a href="#Is_this_great?">#Is this great?</a>
8740 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8741 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8744 <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>
8745 <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>
8746 <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>
8750 Link scenarios with escaped fragments (legacy)
8752 wgFragmentMode=[ 'legacy' ]
8755 [[Foo#Is this great?]]
8756 [[meatball:Foo#Is this great?]]
8758 <p><a href="#Is_this_great.3F">#Is this great?</a>
8759 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8760 <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>
8764 # Ideally the wikipedia: prefix here should be proto-relative too
8765 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8766 # define the 'en' prefix, and originally the test used 'wikipedia',
8767 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8770 Different interwiki prefixes mapping to the same URL
8778 [[:wikipedia:Foo|Foo]]
8780 [[wikipedia:en:Foo]]
8782 [[:wikipedia:en:Foo]]
8786 <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>
8788 <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>
8790 <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>
8792 <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>
8794 <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>
8796 <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>
8798 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":" wikiPEdia :Foo"},"isIW":true}' title="wikipedia:Foo"> wikiPEdia :Foo</a></p>
8802 Interwiki links that cannot be represented in wiki syntax
8805 [[meatball:ok#foo|ok with fragment]]
8806 [[meatball:ok_as_well?|ok ending with ? mark]]
8807 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8808 [http://de.wikipedia.org/wiki/#foo is just fragment]
8811 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8812 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8813 <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>
8814 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8815 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8818 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8819 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8820 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" title="meatball:ok as well?">ok ending with ? mark</a>
8821 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8822 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8826 Interwiki links: trail
8828 [[wikipedia:Foo|Ba]]r
8830 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8833 <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>
8837 Local interwiki link
8839 parsoid=wt2html,wt2wt,html2html
8841 [[local:Template:Foo]]
8843 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8846 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8849 # Parsoid does not mark self-links, by design.
8851 Local interwiki link: self-link to current page
8854 parsoid=wt2html,wt2wt,html2html
8858 <p><a class="mw-selflink selflink">local:Main Page</a>
8861 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8865 Local interwiki link: prefix only (T66167)
8867 parsoid=wt2html,wt2wt,html2html
8871 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8874 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8878 Local interwiki link: with additional interwiki prefix (T63357)
8880 parsoid=wt2html,wt2wt,html2html
8882 [[local:meatball:Hello]]
8884 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8887 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8891 Multiple local interwiki link prefixes
8893 [[local:local:local:local:mi:local:Foo]]
8895 parsoid=wt2html,wt2wt,html2html
8897 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8900 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8904 Interwiki link with percent encoded target
8906 [[:es:Nueva Guip%C3%BAzcoa|Nueva Guipúzcoa]]
8908 <p><a href="http://es.wikipedia.org/wiki/Nueva_Guip%C3%BAzcoa" class="extiw" title="es:Nueva Guipúzcoa">Nueva Guipúzcoa</a>
8911 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Nueva%20Guipúzcoa" title="es:Nueva Guipúzcoa" data-parsoid='{"stx":"piped","a":{"href":"http://es.wikipedia.org/wiki/Nueva%20Guipúzcoa"},"sa":{"href":":es:Nueva Guip%C3%BAzcoa"},"isIW":true}'>Nueva Guipúzcoa</a></p>
8915 ### Interlanguage links
8916 ### Language links (so that searching for '### language' matches..)
8928 <p>Blah blah blah</p>
8929 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8932 ## parsoid html2wt will lose the space variations
8934 Interlanguage link with spacing
8936 parsoid=wt2html,wt2wt,html2html
8944 <p>Blah blah blah</p>
8945 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8949 Double interlanguage link
8958 <p>Blah blah blah</p>
8959 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8960 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8963 ## parsoid html2wt will lose the space variations
8965 Interlanguage link variations
8967 parsoid=wt2html,wt2wt,html2html
8977 <p>Blah blah blah</p>
8978 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8979 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8980 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8984 Escaping of interlanguage links (T129218, T156308)
8988 [[ : zh : Chinese ]]
8991 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8992 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8996 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8997 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
9001 Multiple colons escaping interlanguage links
9009 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
9014 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
9016 [[:::es:Spanish]]</p>
9019 ## parsoid html2wt will normalize the space to _
9021 Space and question mark encoding in interlanguage links (T95473)
9023 parsoid=wt2html,wt2wt,html2html
9031 <p>Blah blah blah</p>
9032 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9036 Interlanguage link, with prefix links
9046 <p>Blah blah blah</p>
9047 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9051 Double interlanguage link, with prefix links (T10897)
9062 <p>Blah blah blah</p>
9063 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9064 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9068 "Extra" interlanguage links (T34189 / gerrit 111390)
9076 <p>Blah blah blah</p>
9077 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9080 ## PHP parser tests script needs an update
9081 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9083 Language links render as inline links if $wgInterwikiMagic=false
9085 wgInterwikiMagic=false
9086 parsoid=wt2html,wt2wt,html2html
9091 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9094 ## PHP parser tests script needs an update
9095 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9097 Language links render as inline links in the Talk namespace
9100 parsoid=wt2html,wt2wt,html2html
9105 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9109 Parsoid-specific test: Wikilinks with should RT properly
9115 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9120 Parsoid T55221: Wikilinks should be properly entity-escaped
9122 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9124 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9125 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9127 He&nbsp;llo [[Foo|He&nbsp;llo]]
9129 He&nbsp;llo He&nbsp;llo
9131 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9132 </p><p>He&nbsp;llo He&nbsp;llo
9136 # html2wt will fail because of title normalization without data-parsoid
9138 Parsoid: handle constructor well
9140 parsoid=wt2html,wt2wt
9146 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9147 </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>
9150 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9152 <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>
9156 Template parameter named "constructor"
9158 {{echo| constructor = |hi}}
9160 <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>
9169 # Note that `ko` isn't a known interlanguage prefix
9171 Parsoid: recognize interlanguage links without a target page
9181 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9183 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9186 # Note that `ko` isn't a known interwiki prefix
9188 Parsoid: recognize interwiki links without a target page
9190 parsoid=wt2html,wt2wt,html2html
9196 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9197 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9200 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9201 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9205 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9209 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9212 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9216 Interlanguage link with preceding local interwiki link (T70085)
9218 parsoid=wt2html,wt2wt,html2html
9221 [[local:es:Spanish]]
9224 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9228 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9232 Looks like an interlanguage link, but is actually a local interwiki
9234 parsoid=wt2html,wt2wt,html2html
9240 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9244 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9248 ### Redirects, Parsoid-only
9252 1. Simple redirect to page
9254 #REDIRECT [[Main Page]]
9256 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9260 2. Other redirect variants
9262 #REDIRECT [[Main_Page]]
9264 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9267 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9268 # This tests the Parsoid bail-out code.
9270 3. Other redirect variants
9274 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9276 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9280 4. Redirect to a templated destination
9282 #REDIRECT [[{{echo|Foo}}bar]]
9284 <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"}]]}'/>
9290 parsoid=wt2html,wt2wt
9295 <li>REDIRECT [[]]</li></ol>
9299 Optional colon in #REDIRECT
9301 # the colon is archaic syntax. we support it for wt2html, but we
9302 # don't care that it roundtrips back to the modern syntax.
9303 parsoid=wt2html,html2html
9305 #REDIRECT:[[Main Page]]
9307 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9311 Whitespace in #REDIRECT with optional colon
9313 # the colon and gratuitous whitespace is archaic syntax. we support
9314 # it for wt2html, but we don't care that it roundtrips back to the
9315 # modern syntax (without extra whitespace)
9316 parsoid=wt2html,html2html
9323 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9327 Piped link in #REDIRECT
9329 # content after piped link is ignored. we support this syntax,
9330 # but don't care that the piped link is lost when we roundtrip this.
9333 #REDIRECT [[Main Page|bar]]
9335 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9339 Redirect to category (T104502)
9341 parsoid=wt2html,wt2wt
9343 #REDIRECT [[Category:Foo]]
9345 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9349 Redirect to category with URL encoding (T104502)
9353 #REDIRECT [[Category%3AFoo]]
9355 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9359 Redirect to category page
9361 #REDIRECT [[:Category:Foo]]
9363 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9367 Redirect to image page (1)
9369 #REDIRECT [[File:Wiki.png]]
9371 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9375 Redirect to image page (2)
9377 #REDIRECT [[Image:Wiki.png]]
9379 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9382 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9383 # Next test confirms this.
9385 Redirect to language (1) (T104918)
9387 parsoid=wt2html,wt2wt,html2html
9389 #REDIRECT [[en:File:Wiki.png]]
9391 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9395 Redirect to language (2) (T104918)
9397 #REDIRECT [[:en:File:Wiki.png]]
9399 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9403 Redirect to interwiki (T104918)
9405 #REDIRECT [[meatball:File:Wiki.png]]
9407 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9411 Non-English #REDIRECT
9415 #TILVÍSUN [[Main Page]]
9417 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9421 Redirect syntax under text isn't considered a redirect
9425 #redirect [[Main Page]]
9428 <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>
9436 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9443 Redirect followed by block on the same line
9447 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9449 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9453 Redirect followed by a newline
9455 #REDIRECT [[Main Page]]
9458 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9463 Redirect followed by multiple newlines
9465 #REDIRECT [[Main Page]]
9470 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9477 Drop duplicate redirects
9481 <link rel="mw:PageProp/redirect" href="./Foo"/>
9482 <link rel="mw:PageProp/redirect" href="./Bar"/>
9483 <link rel="mw:PageProp/redirect" href="./Baz"/>
9502 Broken br tag sanitization
9510 # TODO: Fix html2html mode (T53055)!
9512 Parsoid: Broken br tag recognition
9526 Incorrecly removing closing slashes from correctly formed XHTML
9528 <br style="clear:both;" />
9530 <p><br style="clear:both;" />
9535 Failing to transform badly formed HTML into correct XHTML
9537 <br style="clear: left;">
9538 <br style="clear: right;">
9539 <br style="clear: both;">
9541 <p><br style="clear: left;" />
9542 <br style="clear: right;" />
9543 <br style="clear: both;" />
9547 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9548 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9550 Handling html with a div self-closing tag
9559 <p><div title />
9563 <p><div title=bar />
9564 <div title=bar/>
9566 <div title="bar/"></div>
9570 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9571 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9572 <div title="" data-parsoid='{"stx":"html","autoInsertedEnd":true}'>
9573 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9574 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9575 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div></div>
9579 Elements with solidus in various attribute positions
9581 parsoid=wt2html,html2html
9583 <div cla/ss="123">ha</div>
9585 <div / class="123">ha</div>
9587 <div class= / "123">ha</div>
9590 <div class="123">ha</div>
9591 <div class="/">ha</div>
9593 <div data-parsoid='{"stx":"html","a":{"cla":null,"ss":null},"sa":{"cla":"","ss":"123"}}'>ha</div>
9595 <div class="123" data-parsoid='{"stx":"html"}'>ha</div>
9597 <div class="/" data-parsoid='{"stx":"html","a":{"\"123\"":null},"sa":{"\"123\"":""}}'>ha</div>
9601 Handling html with a br self-closing tag
9628 Horizontal ruler (should it add that extra space?)
9637 foo </p><hr /><p> bar
9642 Horizontal ruler -- 4+ dashes render hr
9651 Horizontal ruler -- eats additional dashes on the same line
9660 Horizontal ruler -- does not collapse dashes on consecutive lines
9671 Horizontal ruler -- <4 dashes render as plain text
9680 Horizontal ruler -- Supports content following dashes on same line
9692 ### Block-level elements
9701 <ul><li>Common list</li>
9703 <li>item 3</li></ul>
9714 <ol><li>Numbered list</li>
9716 <li>item 3</li></ol>
9720 # the switch from level 3 to ordered should not introduce a newline between
9731 ***#Number on level 4
9733 **#Number on level 3
9734 **#Number on level 3
9738 #**Level 3, but ordered
9741 <ol><li>with numbers</li></ol>
9742 <ul><li>and bullets</li></ul>
9743 <ol><li>and numbers</li></ol></li>
9745 <ul><li>bullet level 2
9746 <ul><li>bullet level 3
9747 <ol><li>Number on level 4</li></ol></li></ul></li>
9749 <ol><li>Number on level 3</li>
9750 <li>Number on level 3</li></ol></li></ul>
9751 <ol><li>number level 2</li></ol></li>
9753 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9754 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9759 1. Nested mixed wikitext and html list
9762 *<ul><li>ho</li></ul>
9767 <li><ul><li>ho</li></ul></li>
9769 <ul><li>ho</li></ul></li></ul>
9773 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9775 <ul><li>ho</li></ul></li></ul>
9779 2. Nested mixed wikitext and html list (incompatible)
9782 :{{echo|<li>ho</li>}}
9785 <dd><li>ho</li></dd></dl>
9789 <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>
9799 <ul><li>bar</li></ul></li></ul>
9809 <ul><li><ul><li>foo</li></ul></li>
9815 Nested lists 3 (first element empty)
9821 <ul><li>bar</li></ul></li></ul>
9826 Nested lists 4 (first element empty)
9831 <ul><li><ul><li></li></ul></li>
9837 Nested lists 5 (both elements empty)
9842 <ul><li><ul><li></li></ul></li>
9848 Nested lists 6 (both elements empty)
9854 <ul><li></li></ul></li></ul>
9859 Nested lists 7 (skip initial nesting levels)
9863 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9868 Nested lists 8 (multiple nesting transitions)
9876 <ul><li><ul><li>bar</li></ul></li>
9877 <li>baz</li></ul></li>
9883 Nested lists 9 (extension interaction)
9889 <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>
9893 1. Lists with start-of-line-transparent tokens before bullets: Comments
9906 Nested lists 10 (list and span siblings: wt2wt regression)
9911 <ul><li>a <span>x</span>
9912 <ul><li>b <span>y</span></li></ul></li></ul>
9916 2. Lists with start-of-line-transparent tokens before bullets: Template close
9921 <ul><li>foo bar</li>
9927 List items are not parsed correctly following a <pre> block (T2785)
9933 <ul><li><pre>foo</pre></li>
9934 <li><pre>bar</pre></li>
9938 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9939 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9943 # FIXME: Might benefit from a html/parsoid since this has a template
9945 List items from template
9956 *notSOL{{inner list}}
9960 <li>item 2</li></ul>
9963 <li>item 2</li></ul>
9967 <li>item 2</li></ul>
9972 List interrupted by empty line or heading
9980 <ul><li>foo</li></ul>
9981 <ul><li><ul><li>bar</li></ul></li></ul>
9982 <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>
9983 <ul><li>Another list item</li></ul>
9988 Multiple list tags generated by templates
10007 <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>"}},"i":0}},"a"]}'>a</li>
10008 <li about="#mwt2" 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>"}},"i":0}},"b"]}'>b</li>
10009 <li about="#mwt3" 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>"}},"i":0}},"c"]}'>c</li>
10013 Multiple newlines in between HTML list items don't induce paragraph wrapping
10026 <dd>ho<div>123</div>
10042 <dd>ho<div>123</div>
10050 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
10053 <!--This line will NOT split the list-->
10055 <!--This line will NOT split the list either-->
10057 <!--foo--> <!----> <!--This line NOT split the list either-->
10068 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
10071 <!--This line will NOT split the list-->
10073 <!--This line will NOT split the list either-->
10075 <!--foo--> <!----> <!--This line NOT split the list
10086 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
10087 # That pass could possibly be removed.
10089 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
10091 parsoid=wt2html,wt2wt
10095 *{{echo|<li>templated li-hack}}
10096 *<!--foo--><li> unsupported li-hack with preceding comments
10099 <li><li>not a li-hack
10104 <li class="mw-empty-elt"></li><li>li-hack</li>
10105 <li class="mw-empty-elt"></li><li>templated li-hack</li>
10106 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
10108 <li class="mw-empty-elt"></li><li>not a li-hack
10113 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
10114 <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>
10115 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
10117 <ul data-parsoid='{"stx":"html"}'>
10118 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10125 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10154 Parsoid: Test of whitespace serialization with Templated bullets
10161 <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>
10165 # ------------------------------------------------------------------------
10166 # The next set of tests are about Parsoid's ability to handle badly nested
10167 # tags (parse, minimize scope of fixup, and roundtrip back)
10168 # ------------------------------------------------------------------------
10170 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10171 # Parsoid's list handling is more aware of block structure.
10173 Unbalanced closing block tags break a list
10180 <ul><li>a</li></ul></div><div>
10192 Unbalanced closing non-block tags don't break a list
10194 parsoid=wt2html,html2html
10202 <ul><li>a<span></span></li>
10205 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></p>
10206 <ul><li>a<span data-parsoid='{"stx":"html","autoInsertedEnd":true}'></span></li>
10210 # Parsoid does some post-dom-building cleanup
10211 # which is why its output differs from Remex.
10213 Unclosed formatting tags that straddle lists are closed and reopened
10215 parsoid=wt2html,wt2wt,html2html
10220 <ol><li><s> a</s></li><s>
10221 </s><li><s>b </s></li></ol>
10223 <ol><li><s> a</s></li>
10224 <li><s>b </s></li></ol>
10227 # Output is ugly because of all the misnested tag fixups.
10229 1. List embedded in a formatting tag
10236 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10239 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
10240 <ul><li data-parsoid='{}'>foo</li></ul></small>
10241 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p>
10244 # Output is ugly because of all the misnested tag fixups.
10246 2. List embedded in a formatting tag in a misnested way
10253 </small></p><small></small><ul><small><li>a</li>
10254 </small><li><small>b</small></li></ul>
10256 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10257 <ul><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'><li>a</li></small>
10258 <li><small data-parsoid='{"stx":"html","autoInsertedStart":true}'>b</small></li></ul>
10261 # Output is ugly because of all the misnested tag fixups.
10263 3. List embedded in a formatting tag in a misnested way
10270 </small></p><small></small><ul><small></small><li><small></small><ul><small></small><li><small>123</small></li></ul></li></ul>
10272 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p>
10274 <ul><li><ul><li data-parsoid='{}'><small data-parsoid='{"stx":"html","autoInsertedStart":true}'> 123</small></li></ul></li></ul>
10281 # Note that the current date is hard-coded as
10282 # 1970-01-01T00:02:03Z (a Thursday)
10283 # when running parser tests. The timezone is also fixed to GMT, so
10284 # local date will be identical to current date.
10287 Magic Word: {{CURRENTDAY}}
10296 Magic Word: {{CURRENTDAY2}}
10305 Magic Word: {{CURRENTDAYNAME}}
10314 Magic Word: {{CURRENTDOW}}
10323 Magic Word: {{CURRENTMONTH}}
10332 Magic Word: {{CURRENTMONTH1}}
10341 Magic Word: {{CURRENTMONTHABBREV}}
10343 {{CURRENTMONTHABBREV}}
10350 Magic Word: {{CURRENTMONTHNAME}}
10352 {{CURRENTMONTHNAME}}
10359 Magic Word: {{CURRENTMONTHNAMEGEN}}
10361 {{CURRENTMONTHNAMEGEN}}
10368 Magic Word: {{CURRENTTIME}}
10377 Magic Word: {{CURRENTHOUR}}
10386 Magic Word: {{CURRENTWEEK}} (T6594)
10395 Magic Word: {{CURRENTYEAR}}
10404 Magic Word: {{CURRENTTIMESTAMP}}
10406 {{CURRENTTIMESTAMP}}
10413 Magic Words LOCAL (UTC)
10417 *{{LOCALMONTHNAME}}
10418 *{{LOCALMONTHNAMEGEN}}
10419 *{{LOCALMONTHABBREV}}
10428 *{{LOCALTIMESTAMP}}
10443 <li>19700101000203</li></ul>
10448 Magic Word: {{FULLPAGENAME}}
10450 title=[[User:Ævar Arnfjörð Bjarmason]]
10451 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10455 <p>User:Ævar Arnfjörð Bjarmason
10460 Magic Word: {{FULLPAGENAMEE}}
10462 title=[[User:Ævar Arnfjörð Bjarmason]]
10463 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10467 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10472 Magic Word: {{TALKSPACE}}
10474 title=[[User:Ævar Arnfjörð Bjarmason]]
10475 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10484 Magic Word: {{TALKSPACE}}, same namespace
10486 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10487 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10496 Magic Word: {{TALKSPACE}}, main namespace
10498 title=[[Parser Test]]
10499 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10508 Magic Word: {{TALKSPACEE}}
10510 title=[[User:Ævar Arnfjörð Bjarmason]]
10511 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10520 Magic Word: {{SUBJECTSPACE}}
10522 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10523 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10532 Magic Word: {{SUBJECTSPACE}}, same namespace
10534 title=[[User:Ævar Arnfjörð Bjarmason]]
10535 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10544 Magic Word: {{SUBJECTSPACE}}, main namespace
10546 title=[[Parser Test]]
10547 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10555 Magic Word: {{SUBJECTSPACEE}}
10557 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10558 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10567 Magic Word: {{NAMESPACE}}
10569 title=[[User:Ævar Arnfjörð Bjarmason]]
10570 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10579 Magic Word: {{NAMESPACEE}}
10581 title=[[User:Ævar Arnfjörð Bjarmason]]
10582 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10591 Magic Word: {{NAMESPACENUMBER}}
10593 title=[[User:Ævar Arnfjörð Bjarmason]]
10594 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10596 {{NAMESPACENUMBER}}
10603 Magic Word: {{SUBPAGENAME}}
10605 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10606 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10615 Magic Word: {{SUBPAGENAMEE}}
10617 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10618 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10627 Magic Word: {{ROOTPAGENAME}}
10629 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10630 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10634 <p>Ævar Arnfjörð Bjarmason
10639 Magic Word: {{ROOTPAGENAMEE}}
10641 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10642 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10646 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10651 Magic Word: {{BASEPAGENAME}}
10653 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10654 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10658 <p>Ævar Arnfjörð Bjarmason
10663 Magic Word: {{BASEPAGENAMEE}}
10665 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10666 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10670 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10675 Magic Word: {{TALKPAGENAME}}
10677 title=[[User:Ævar Arnfjörð Bjarmason]]
10678 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10682 <p>User talk:Ævar Arnfjörð Bjarmason
10687 Magic Word: {{TALKPAGENAMEE}}
10689 title=[[User:Ævar Arnfjörð Bjarmason]]
10690 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10694 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10699 Magic Word: {{SUBJECTPAGENAME}}
10701 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10702 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10704 {{SUBJECTPAGENAME}}
10706 <p>User:Ævar Arnfjörð Bjarmason
10711 Magic Word: {{SUBJECTPAGENAMEE}}
10713 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10714 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10716 {{SUBJECTPAGENAMEE}}
10718 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10723 Magic Word: {{NUMBEROFFILES}}
10725 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10734 Magic Word: {{PAGENAME}}
10736 title=[[User:Ævar Arnfjörð Bjarmason]]
10737 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10741 <p>Ævar Arnfjörð Bjarmason
10746 Magic Word: {{PAGENAME}} with metacharacters
10748 title=[['foo & bar = baz']]
10749 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10753 <p><i>'foo & bar = baz'</i>
10758 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10760 title=[[*RFC 1234 http://example.com/]]
10761 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10765 <p>*RFC 1234 http://example.com/
10770 Magic Word: {{PAGENAMEE}}
10772 title=[[User:Ævar Arnfjörð Bjarmason]]
10773 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10777 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10782 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10784 title=[[*RFC 1234 http://example.com/]]
10785 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10789 <p>*RFC_1234_http://example.com/
10794 Magic Word: {{REVISIONID}}
10796 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10803 flags=vary-revision-id
10807 Magic Word: {{SCRIPTPATH}}
10809 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10817 Magic Word: {{STYLEPATH}}
10819 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10828 Magic Word: {{SERVER}}
10830 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10834 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10839 Magic Word: {{SERVERNAME}}
10841 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10850 Magic Word: {{SITENAME}}
10852 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10861 Magic Word: {{PAGELANGUAGE}}
10864 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10873 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10875 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10884 Case-sensitive magic words, when cased differently, should just be template transclusions
10891 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10892 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10893 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10894 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10899 Case-insensitive magic words should still work with weird casing.
10909 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10913 # From plwiki:PLOS_ONE
10915 Parsoid: Page property magic word with magic word contents
10917 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10919 <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>"}]]}'/>
10922 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10923 # But, this is a limitation of our representation and is documented in
10924 # TemplateHandler.js in processSpecialMagicWord
10926 Parsoid: Template-generated DISPLAYTITLE
10928 {{{{echo|DISPLAYTITLE}}:Foo}}
10932 wgAllowDisplayTitle=true
10933 wgRestrictDisplayTitle=false
10938 <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"}]]}'/>
10942 Namespace 1 {{ns:1}}
10951 Namespace 1 {{ns:01}}
10960 Namespace 0 {{ns:0}} (T6783)
10968 Namespace 0 {{ns:00}} (T6783)
10976 Namespace -1 {{ns:-1}}
10985 Namespace User {{ns:User}}
10994 Namespace User talk {{ns:User_talk}}
11003 Namespace User talk {{ns:uSeR tAlK}}
11012 Namespace File {{ns:File}}
11021 Namespace File {{ns:Image}}
11030 Namespace (lang=de) Benutzer {{ns:User}}
11041 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
11047 <p>Benutzer Diskussion
11054 {{urlencode:hi world?!}}
11055 {{urlencode:hi world?!|WIKI}}
11056 {{urlencode:hi world?!|PATH}}
11057 {{urlencode:hi world?!|QUERY}}
11067 Magic Word: prioritize type info over data-parsoid
11071 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11077 Magic Word: serialize on separate line (parsoid)
11079 parsoid=wt2wt,html2wt
11085 foo<meta property="mw:PageProp/notoc"/>bar
11089 Magic Word: rt non-english wikis
11096 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11100 __proto__ is treated as normal wikitext (T105997)
11112 Magic links: internal link to RFC (T2479)
11116 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11119 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11123 Magic links: RFC (T2479)
11127 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11130 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
11134 Magic links: RFC (T67278)
11136 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11138 <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.
11141 <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>
11145 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11147 RFC      822
11151 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11156 <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>
11162 Magic links: ISBN (T3937)
11166 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11169 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11173 Magic links: ISBN (T67278)
11175 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11177 <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.
11180 <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>
11184 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11186 ISBN      978 0 316 09811 3
11192 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11199 <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>
11207 Magic links: PMID incorrectly converts space to underscore
11211 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11214 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11218 Magic links: PMID (T67278)
11220 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11222 <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.
11225 <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>
11229 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11231 PMID      1234
11235 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11240 <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>
11245 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11246 # since these are ExtLinkText, not MagicLinkText
11248 Magic links: use appropriate serialization for "almost" magic links.
11250 X[[Special:BookSources/0978739256|foo]]
11252 X[https://tools.ietf.org/html/rfc1234 foo]
11254 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11255 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11258 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11259 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11263 Magic links: All disabled (T47942)
11265 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11271 <p>ISBN 0-306-40615-2
11282 Nonexistent template
11284 {{thistemplatedoesnotexist}}
11286 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11291 Template with invalid target containing tags
11293 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11295 <p>{{a<b>b</b>|foo|a=b|a = b}}
11300 Template with invalid target containing unclosed tag
11302 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11304 <p>{{a<b>|foo|a=b|a = b}}</b>
11309 Template with invalid target containing wikilink
11313 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11316 <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>
11320 Template with just whitespace in it, T70421
11324 <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>
11330 This is a test template
11338 <p>This is a test template
11343 Template with explicit namespace
11347 <p>This is a test template
11355 This is a test template with parameter {{{param}}}
11361 {{paramtest|param=foo}}
11363 <p>This is a test template with parameter foo
11368 Template:paramtestnum
11370 [[{{{1}}}|{{{2}}}]]
11374 Template unnamed parameter
11376 {{paramtestnum|Main Page|the main page}}
11378 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11383 Template:templatesimple
11389 Template:templateredirect
11391 #redirect [[Template:templatesimple]]
11395 Template:templateasargtestnum
11401 Template:templateasargtest
11403 {{template{{{templ}}}}}
11407 Template:templateasargtest2
11413 Template with template name as unnamed argument
11415 {{templateasargtestnum|templatesimple}}
11422 Template with template name as argument
11424 {{templateasargtest|templ=simple}}
11431 Template with template name as argument (2)
11433 {{templateasargtest2|templ=templatesimple}}
11440 Template:templateasargtestdefault
11442 {{{{{templ|templatesimple}}}}}
11452 Template with default value
11454 {{templateasargtestdefault}}
11461 Template with default value (value set)
11463 {{templateasargtestdefault|templ=templa}}
11472 {{templateredirect}}
11477 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11481 Template with argument in separate line
11483 {{ templateasargtest |
11491 Template with complex template as argument
11494 param ={{ templateasargtest |
11495 templ = simple }}}}
11497 <p>This is a test template with parameter (test)
11502 Templates with templated name
11504 {{{{echo|echo}}|foo}}
11505 {{{{echo|inner list}} }}
11509 <ul><li>item 1</li></ul>
11512 <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>
11513 <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>
11516 ## Regression test; the output here isn't really that interesting.
11518 Templates with templated name and top level template args
11520 {{1{{2{{{3}}}|4=5}}}}
11522 <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>
11525 # Parsoid markup is deliberate "broken". This is an edge case.
11526 # See long comment in TemplateHandler.js:convertAttribsToString.
11528 Templates with invalid templated targets
11539 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11544 Template with thumb image (with link in description)
11546 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11548 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>
11551 <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>
11553 <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>
11557 Template:complextemplate
11559 {{{1}}} {{paramtest|
11560 param ={{{param}}}}}
11564 Template with complex arguments
11567 param ={{ templateasargtest |
11568 templ = simple }}|[[Template:complextemplate|link]]}}
11570 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11575 T2553: link with two variables in a piped link
11578 |[[{{{1}}}|{{{2}}}]]
11583 <td>[[{{{1}}}|{{{2}}}]]
11588 <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>
11594 Abort table cell attribute parsing on wikilink
11597 |testing [[one|two]] |three||four
11598 |testing one two |three||four
11599 |testing="[[one|two]]" |three||four
11604 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11610 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11616 <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>
11617 <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>
11618 <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>
11623 Don't abort table cell attribute parsing if wikilink is found in template arg
11626 |Test {{#tag:ref|One two "[[three]]" four}}
11630 <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>
11635 Magic variable as template parameter
11637 {{paramtest|param={{SITENAME}}}}
11639 <p>This is a test template with parameter MediaWiki
11646 [[{{{param}}}|link]]
11650 Template parameter as link source
11652 {{linktest|param=Main Page}}
11654 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11659 Template:paramtest2
11661 including another template, {{paramtest|param={{{arg}}}}}
11665 Template passing argument to another template
11667 {{paramtest2|arg='hmm'}}
11669 <p>including another template, This is a test template with parameter 'hmm'
11680 Template as link source
11684 [[{{linktest2}}|Main Page]]
11686 [[{{linktest2}}]]Page
11688 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11689 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11690 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11708 Template infinite loop
11712 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11717 Template from main namespace
11726 Template from non-includable namespace
11728 wgNonincludableNamespaces=10
11732 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11747 T2529: Template with table, not included at beginning of line
11766 T2523: Template shouldn't eat newline (or add an extra one before table)
11786 T2041: Template parameters shown as broken links
11795 Template with targets containing wikilinks
11801 {{[[{{echo|foo}}]]}}
11803 {{{{echo|[[foo}}]]}}
11805 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11806 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11810 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11811 <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>
11812 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11822 Templates: Double quotes as template target
11829 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11833 ## This test is about making sure Parsoid's data-mw is well formed in the
11834 ## face of multiple templates with intersecting and overlapping ranges. The
11835 ## wikitext itself is wretched.
11837 Templates with intersecting and overlapping ranges
11848 </table><p>ho</p><table>
11852 </td></tr></tbody></table>
11854 <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":""}]]}'>
11856 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11858 <tbody><tr><td>hi</td></tr>
11863 Template:MSGNW test
11865 ''None'' of '''this''' should be
11867 but rather passed unmodified
11875 # hmm, fix this or just deprecate msgnw and document its behavior?
11879 {{msgnw:MSGNW test}}
11881 <p>''None'' of '''this''' should be
11883  but rather passed unmodified
11884 {{test}}
11888 <!-- comment -->
11895 {{int:youhavenewmessages|lots of money|not!}}
11897 <p>You have lots of money (not!).
11902 int keyword - non-existing message
11913 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11917 <includeonly> and <noinclude> being included
11928 <onlyinclude>Foo</onlyinclude>bar
11932 <onlyinclude> being included
11944 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11948 <onlyinclude> and <includeonly> being included
11957 <includeonly> and <noinclude> on a page
11959 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11966 Un-closed <noinclude>
11973 <onlyinclude> on a page
11975 <onlyinclude>Foo</onlyinclude>bar
11982 Un-closed <onlyinclude>
11989 Self-closed noinclude, includeonly, onlyinclude tags
12000 Unbalanced includeonly and noinclude tags
12004 |b</noinclude></noinclude>
12005 |c</noinclude></includeonly>
12006 |d</includeonly></includeonly>
12015 <td>c</includeonly>
12017 <td>d</includeonly></includeonly>
12023 Template:Includeonly section
12026 ==Includeonly section==
12032 T8563: Edit link generation for section shown by <includeonly>
12034 {{includeonly section}}
12036 <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>
12037 <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>
12041 # Uses same input as the contents of [[Template:Includeonly section]]
12043 T8563: Section extraction for section shown by <includeonly>
12048 ==Includeonly section==
12056 T8563: Edit link generation for section suppressed by <includeonly>
12059 ==Includeonly section==
12063 <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>
12068 T8563: Section extraction for section suppressed by <includeonly>
12073 ==Includeonly section==
12081 Un-closed <includeonly>
12086 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}' data-mw='{"src":"<includeonly>"}'/>
12089 ## We used to, but no longer wt2wt this test since the default serializer
12090 ## will normalize the include directives to serialize on their own line.
12091 ## Selser will take care of preserving formatting in scenarios where they
12092 ## intermingled with other wikitext.
12094 Includes and comments at SOL
12096 parsoid=wt2html,html2html
12098 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
12106 some</noinclude>* stuff
12109 <includeonly>can have stuff</includeonly>===here===
12112 <h2><span class="mw-headline" id="hu">hu</span></h2>
12120 <ul><li>here</li></ul>
12121 <h3><span class="mw-headline" id="here">here</span></h3>
12124 <!-- 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>
12126 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12128 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
12131 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12132 <p>some<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/>* stuff</p>
12133 <ul><li>here</li></ul>
12135 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}' data-mw='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3 id="here">here</h3>
12139 # TODO: test with DOM fragment reuse!
12141 Parsoid: DOM fragment reuse
12143 parsoid=wt2wt,wt2html
12145 a{{echo|b<table></table>c}}d
12157 <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>
12159 <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">
12160 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12161 </span><p about="#mwt2">cd</p>
12163 <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">
12165 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12167 </span><p about="#mwt3">b</p>
12171 Parsoid: Merge double tds (T52603)
12176 |{{echo|{{!}} foo}}
12180 <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>
12185 Parsoid: Merge double tds in nested transclusion content (T52603)
12191 |{{echo|{{!}} foo}}
12195 <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}}]}'>
12197 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12203 ### <includeonly> and <noinclude> in attributes
12206 0. includeonly around the entire attribute
12208 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12210 <p><span id="v2">bar</span>
12215 1. includeonly in html attr key
12217 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12219 <p><span id="foo">bar</span>
12224 2. includeonly in html attr value
12226 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12227 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12229 <p><span id="v1">bar</span>
12230 <span id="v1">bar</span>
12235 3. includeonly in part of an attr value
12237 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12239 <p><span style="color:red;">bar</span>
12244 4. includeonly in table attributes
12268 ### Preprocessor precedence tests
12269 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12271 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12273 Preprocessor precedence 1: link is rightmost opening
12279 But close-brace is not a valid character in a link title:
12282 However, we can still tell this was handled as a link in the preprocessor:
12283 {{echo|[[Foo}}|bar]]|bat}}
12285 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12286 </p><p>But close-brace is not a valid character in a link title:
12288 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12292 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12293 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12294 <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>
12298 Preprocessor precedence 2: template is rightmost opening
12307 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12311 Preprocessor precedence 3: language converter is rightmost opening
12327 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12328 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12329 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12333 Preprocessor precedence 4: left-most angle bracket
12344 Template:Precedence5
12350 Preprocessor precedence 5: tplarg takes precedence over template
12352 {{Precedence5|Bullet}}
12354 <ul><li>Bar</li></ul>
12357 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12361 Preprocessor precedence 6: broken link is rightmost opening
12367 {{echo|[[Foo|bar|bat=baz}}
12370 </p><p>{{echo|[[Foo|bar|bat=baz}}
12373 <p>{{echo|[[Foo}}</p>
12374 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12377 # This next test exposes a difference between PHP and Parsoid:
12378 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12379 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12380 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12381 # outer `[[Foo` extends until the `y]]`
12382 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12383 # intermediate result (after template expansion), and link processing
12384 # happens on this intermediate result, which moves the wikilink
12385 # boundary leftward to `[[Foo|Bar]]`
12386 # 2b) Parsoid works in a single step, so it's going to keep the
12387 # wikilink as extending to the `y]]`
12388 # 3a) Then PHP does linktrail processing which slurps up the trailing
12389 # `xy` inside the link.
12390 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12391 # `z` inside the link.
12392 # This is "correct" behavior. Parsoid's basic worldview is that the
12393 # `]]` inside the template shouldn't be allowed to leak out to affect
12394 # the surrounding wikilink. PHP may match Parsoid (in the future)
12395 # if you use {{#balance}} (T114445).
12398 Preprocessor precedence 7: broken template is rightmost opening
12404 [[Foo|{{echo|Bar]]-x}}-y]]-z
12406 Careful: linktrails can move the end of the wikilink:
12407 [[Foo|{{echo|y']]a}}l]]l
12409 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12410 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12411 </p><p>Careful: linktrails can move the end of the wikilink:
12412 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12415 <p>[[Foo|{{echo|Bar]]</p>
12416 <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>
12417 <p>Careful: linktrails can move the end of the wikilink:
12418 <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>
12422 Preprocessor precedence 8: broken language converter is rightmost opening
12433 Template:Preprocessor_precedence_9
12438 ;7: {{{{{{{4}}}}}}}
12442 Preprocessor precedence 9: groups of braces
12444 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12450 <ul><li>Bar</li></ul>
12454 <dd>{Bullet}</dd></dl>
12457 <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}}]}'>
12462 </dl><ul about="#mwt1">
12464 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12473 Template:Preprocessor_precedence_10
12480 ;6: -{{{{{{4}}}}}}-
12481 ;7: -{{{{{{{5}}}}}}}-
12485 Preprocessor precedence 10: groups of braces with leading dash
12489 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12495 <ul><li>Bar-</li></ul>
12502 <ul><li>Bar-</li></ul>
12509 <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}}]}'>
12511 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12514 </dl><ul about="#mwt1">
12516 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12520 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12523 </dl><ul about="#mwt1">
12525 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12529 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12534 Preprocessor precedence 11: found during visual diff testing
12536 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12538 {{echo|-{{echo|-{{echo|x}}}}}}
12540 {{echo|-{{echo|x}}}}
12542 <p><span>-<span>-x</span></span>
12547 <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>
12549 <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>
12551 <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>
12555 Preprocessor precedence 12: broken language converter closed by brace.
12559 This form breaks the template, which is unfortunate:
12560 *{{echo|foo-{bar}bat}}
12562 But if the broken language converter markup is inside an extension
12563 tag, nothing bad happens:
12564 *<nowiki>foo-{bar}bat</nowiki>
12565 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12566 *<pre>foo-{bar}bat</pre>
12567 *{{echo|<pre>foo-{bar}bat</pre>}}
12569 <tag>foo-{bar}bat</tag>
12570 {{echo|<tag>foo-{bar}bat</tag>}}
12573 <p>This form breaks the template, which is unfortunate:
12575 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12576 <p>But if the broken language converter markup is inside an extension
12577 tag, nothing bad happens:
12579 <ul><li>foo-{bar}bat</li>
12580 <li>foo-{bar}bat</li>
12581 <li><pre>foo-{bar}bat</pre></li>
12582 <li><pre>foo-{bar}bat</pre></li></ul>
12583 <pre>'foo-{bar}bat'
12587 <pre>'foo-{bar}bat'
12592 <p>This form breaks the template, which is unfortunate:</p>
12594 <li>{{echo|foo-{bar}bat}}</li>
12596 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12598 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12599 <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>
12600 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12601 <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>
12603 <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>
12607 Preprocessor precedence 13: broken language converter in external link
12611 *[http://example.com/-{foo Example in URL]
12612 *[http://example.com Example in -{link} description]
12613 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12615 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12616 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12617 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12620 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12621 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12622 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12627 Preprocessor precedence 14: broken language converter in comment
12629 *<!--{{foo}}-->...should be ok
12630 *<!---{{foo}}-->...extra dashes
12631 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12633 <ul><li>...should be ok</li>
12634 <li>...extra dashes</li>
12635 <li>foobat...should be ok</li></ul>
12638 <li><!--{{foo}}-->...should be ok</li>
12639 <li><!---{{foo}}-->...extra dashes</li>
12640 <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>
12645 Preprocessor precedence 15: broken brace markup in headings
12647 wgFragmentMode=[ 'html5', 'legacy' ]
12651 __NOTOC__ __NOEDITSECTION__
12660 ===5 foo{{{bar 5===
12665 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12668 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12671 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12674 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12677 <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>
12680 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12684 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12685 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12687 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12689 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12691 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12693 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12695 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12700 Preprocessor precedence 16: matching closing braces to opening braces
12705 -{{{echo|foo}}bar}-
12710 <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>
12714 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12723 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12726 # Ensure we're using a language without variants for this test; even
12727 # if $wgUsePigLatinVariant is true. We've picked `de` arbitrarily.
12729 Preprocessor precedence 18: another rightmost wins scenario
12734 {{ -{{{{1|tplarg}}} }} }-
12736 <p>{{ -{tplarg }} }-
12739 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12743 Preprocessor precedence 19: break syntax
12756 ### Token Stream Patcher tests
12758 ### These tests won't always pass wt2wt and other modes because
12759 ### on serialization, the table will be output on a new line.
12760 ### For now, we are blacklisting them, and using this to test selser.
12764 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12766 parsoid=wt2html,wt2wt
12768 {{echo|}}{| width = '100%'
12772 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12773 <tbody><tr><td>foo</td></tr>
12777 ## We used to, but no longer wt2wt this test since the default serializer
12778 ## will normalize the include directives to serialize on their own line.
12779 ## Selser will take care of preserving formatting in scenarios where they
12780 ## intermingled with other wikitext.
12782 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12786 <includeonly>a</includeonly>{| {{{b}}}
12790 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}' data-mw='{"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":""}]]}'>
12791 <tbody><tr><td>c</td></tr>
12796 Table wikitext syntax outside wiki-tables
12800 ! not a table heading
12803 | class="foo bar" | baz
12811 ! not a table heading
12814 | class="foo bar" | baz
12823 ### Testing parsing of templates where a template arg
12824 ### has the same name as the template itself.
12830 {{{quote|{{{1}}}}}}
12834 Templates: Template Name/Arg clash: 1. Use of positional param
12843 Templates: Template Name/Arg clash: 2. Use of named param
12845 {{quote|quote=foo}}
12852 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12861 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12865 Templates: 1. Simple use
12874 Templates: 2. Inside a block tag
12876 <div>{{echo|Foo}}</div>
12877 <blockquote>{{echo|Foo}}</blockquote>
12880 <blockquote>Foo</blockquote>
12884 <blockquote><p>Foo</p></blockquote>
12888 Templates: P-wrapping: 1a. Templates on consecutive lines
12899 Templates: P-wrapping: 1b. Templates on consecutive lines
12913 Templates: P-wrapping: 1c. Templates on consecutive lines
12916 {{echo|bar}} <div>baz</div>
12925 bar </p><div>baz</div>
12929 Templates: P-wrapping: 1d. Template preceded by comment-only line
12938 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12942 Templates: Scopes should not be expanded unnecessarily
12944 parsoid=wt2html,wt2wt
12946 {{echo|<div>a</div>}}b{{echo|
12949 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>a</div>"}},"i":0}}]}'>a</div><p>b</p><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<div>c</div>"}},"i":0}}]}'>
12950 </span><div about="#mwt2">c</div>
12954 Templates: Inline Text: 1. Multiple template uses
12956 {{echo|Foo}}bar{{echo|baz}}
12963 Templates: Inline Text: 2. Back-to-back template uses
12965 {{echo|Foo}}{{echo|bar}}
12972 Templates: Block Tags: 1. Multiple template uses
12974 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12976 <div>Foo</div><div>bar</div><div>baz</div>
12981 Templates: Block Tags: 2. Back-to-back template uses
12983 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12985 <div>Foo</div><div>bar</div>
12989 ## Parsoid drops empty elements in templates.
12991 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12998 b</p><p class="mw-empty-elt"></p>
13000 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\nb</p>"}},"i":0}}]}'>a</p><span about="#mwt1">
13001 </span><p about="#mwt1">b</p>
13005 Templates: Links: 1. Simple example
13007 {{echo|[[Foo|bar]]}}
13009 <p><a href="/wiki/Foo" title="Foo">bar</a>
13014 Templates: Links: 2. Generation of link href
13016 [[{{echo|Foo}}|bar]]
13018 <p><a href="/wiki/Foo" title="Foo">bar</a>
13023 Templates: Links: 3. Generation of part of a link href
13025 [[Fo{{echo|o}}|bar]]
13027 [[Foo{{echo|bar}}]]
13029 [[Foo{{echo|bar}}baz]]
13031 [[Foo{{echo|bar}}|bar]]
13033 [[:Foo{{echo|bar}}]]
13035 [[:Foo{{echo|bar}}|bar]]
13037 <p><a href="/wiki/Foo" title="Foo">bar</a>
13038 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13039 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
13040 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13041 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13042 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
13047 Templates: Links: 4. Multiple templates generating link href
13049 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
13051 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
13056 Templates: Links: 5. Generation of link text
13058 [[Foo|{{echo|bar}}]]
13060 <p><a href="/wiki/Foo" title="Foo">bar</a>
13065 Templates: Links: 5. Nested templates (only outermost template should be marked)
13067 {{echo|[[{{echo|Foo}}|bar]]}}
13069 <p><a href="/wiki/Foo" title="Foo">bar</a>
13074 Templates: HTML Tag: 1. Generation of HTML attr. key
13076 <div {{echo|style}}="color:red;">foo</div>
13078 <div style="color:red;">foo</div>
13083 Templates: HTML Tag: 2. Generation of HTML attr. value
13085 <div style={{echo|'color:red;'}}>foo</div>
13087 <div style="color:red;">foo</div>
13092 Templates: HTML Tag: 3. Generation of HTML attr key and value
13094 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
13096 <div style="color:red;">foo</div>
13101 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
13103 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
13105 <div title="This is a long title with just one piece templated">foo</div>
13110 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
13112 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
13114 <div title="This is a long title with just one piece templated">foo</div>
13119 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13121 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13123 <div title="This is a long title with just one piece templated">foo</div>
13127 # SSS FIXME: While it is great we added support for all this,
13128 # do we want to make this part of the spec? Maybe we want to
13129 # deprecate this kind of usage in the future?
13131 Templates: HTML Tag: 7. Generation of partial attribute key string
13133 <div st{{echo|yle}}="color:red;">foo</div>
13135 <div style="color:red;">foo</div>
13140 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13142 <div {{echo|1=id="v1"}}>bar</div>
13144 <div id="v1">bar</div>
13149 Templates: HTML Tag: 9. Multiple template-generated attributes
13151 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13153 <div id="v1" title="foo">bar</div>
13158 Templates: Support for templates generating attributes and content
13160 {| {{mixed_attr_content_template}}
13165 <table style="color:red;" title="T48811">
13175 <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|}"]}'>
13184 Template:attribute_from_template
13190 Table cell with attribute before expanded attribute
13193 | align="center" {{attribute_from_template}} |456
13197 <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>
13202 1. Entities and nowikis inside templated attributes should be handled correctly
13204 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13206 <div style="background:#f9f9f9;">foo</div>
13209 <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>
13213 2. Entities and nowikis inside templated attributes should be handled correctly
13216 |{{table_attribs_3}}
13221 <td style="background:#f9f9f9;">Foo
13226 <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>
13231 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13234 |{{table_attribs_3}}
13239 <td style="background:#f9f9f9;">Foo
13243 <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}}]}'>
13244 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13250 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13253 |{{table_attribs_6}} hi
13258 <td style="background: red;">hi
13263 <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>
13268 Templates: HTML Tables: 1. Generating start of a HTML table
13270 {{echo|<table><tr><td>foo</td>}}</tr></table>
13272 <table><tr><td>foo</td></tr></table>
13277 Templates: HTML Tables: 2a. Generating middle of a HTML table
13279 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13281 <table><tr><td>foo</td></tr></table>
13286 Templates: HTML Tables: 2b. Generating middle of a HTML table
13288 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13290 <table><tr><td>foo</td></tr></table>
13295 Templates: HTML Tables: 3. Generating end of a HTML table
13297 <table><tr>{{echo|<td>foo</td></tr></table>}}
13299 <table><tr><td>foo</td></tr></table>
13304 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13306 {{echo|<table>}}<tr><td>foo</td></tr></table>
13308 <table><tr><td>foo</td></tr></table>
13313 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13315 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13317 <table><tr><td>foo</td></tr></table>
13322 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13324 <table><tr>{{echo|<td>}}foo</td></tr></table>
13326 <table><tr><td>foo</td></tr></table>
13331 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13333 <table><tr><td>foo{{echo|</td>}}</tr></table>
13335 <table><tr><td>foo</td></tr></table>
13340 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13342 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13344 <table><tr><td>foo</td></tr></table>
13349 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13351 <table><tr><td>foo</td></tr>{{echo|</table>}}
13353 <table><tr><td>foo</td></tr></table>
13358 Templates: HTML Tables: 5. Proper fostering of categories from inside
13360 parsoid=wt2html,wt2wt
13362 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13363 <!--Two categories (T52330)-->
13364 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13366 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13367 <!--Two categories (T52330)-->
13368 <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>
13371 ## Remex doesn't account for fostered content.
13373 Templates: Wiki Tables: 1a. Fostering of entire template content
13381 <tr><td></td></tr></table>
13386 <table><tbody><tr><td></td></tr></tbody></table>
13388 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}},"\n|}"]}'>a</p><table about="#mwt2">
13394 Templates: Wiki Tables: 1b. Fostering of entire template content
13407 <tr><td></td></tr></table>
13415 <tbody><tr><td></td></tr></tbody></table>
13417 <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|}"]}'>
13419 </div><table about="#mwt3">
13424 ## Remex doesn't account for fostered content.
13426 Templates: Wiki Tables: 2. Fostering of partial template content
13436 <tr><td></td></tr></table>
13441 <div>b</div><table>
13442 <tbody><tr><td></td></tr></tbody></table>
13444 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n<div>b</div>"}},"i":0}},"\n|}"]}'>a</p><div about="#mwt2">b</div><table about="#mwt2">
13451 Templates: Wiki Tables: 3. td-content via multiple templates
13454 {{echo|{{pipe}}a}}{{echo|b}}
13465 Templates: Wiki Tables: 4. Templated tags, no content
13471 <tr><td></td></tr></table>
13476 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13490 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13503 ## This test case is very specific to Parsoid's internals
13504 ## and is hence only tested for Parsoid's code. Parsoid uses
13505 ## a <meta> marker tag for <ref> tags and they are expanded
13506 ## much later. We are verifying that this <meta> tag usage
13507 ## doesn't prevent foster parenting.
13509 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13511 {{PartialTable}}<ref>foo</ref>
13516 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><sup about="#mwt3" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p><table about="#mwt2">
13520 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
13524 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13534 <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{{!}}}"]}'>
13535 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13539 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13544 Templates: Lists: Multi-line list-items via templates
13546 *{{echo|a {{nonexistent|
13548 *{{echo|b {{nonexistent|
13551 <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>
13552 <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>
13557 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13559 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13561 <p><i>ab</i>c<i>d</i>e
13566 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13567 (PHP parser generates misnested html)
13569 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13571 <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>
13575 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13576 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13578 parsoid=wt2html,wt2wt
13580 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13582 <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>
13583 <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>
13584 <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>
13588 Templates: Ugly nesting: 4. Divs opened/closed across templates
13590 a<div>b{{echo|c</div>d}}e
13595 <p>a</p><div>bc</div><p>de
13600 Templates: Ugly templates: 3. newline-only template parameter
13609 # This looks like a bug: a single newline triggers p/br for some reason.
13611 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13620 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13621 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13623 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13629 <div about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}' 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}}]}'>foo</div><span about="#mwt1">
13630 </span><table about="#mwt1">
13634 # T66017 -- ugly wikitext with fostered content generates two template ranges
13635 # that are "identical" and generate nesting cycles in the algorithm
13637 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13639 {{echo|<table><tr><td><table>}}
13643 <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"}'>
13644 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13645 </table></td></tr></tbody></table>
13649 Templates: Parameters substituted at the top-level
13651 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13655 <p><i>who</i> me? <b>never!</b>
13659 <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>
13661 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13665 Templates: Param with empty arg in the final position
13669 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13673 Parser Functions: 1. Simple example
13682 Parser Functions: 2. Nested use (only outermost should be marked up)
13690 ## Note that the templates inside the references are not wrapped
13692 Template nested in extension tag in template
13696 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13697 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13698 {{echo|hi<ref>-{ho|{{echo|hi}}}-</ref>}}
13701 <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","attrs":{},"body":{"id":"mw-reference-text-cite_note-1"}}'><a href="./Wikipedia:首页#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup>
13702 <span about="#mwt8" 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="#mwt8" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-2"}}'><a href="./Wikipedia:首页#cite_note-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup>
13703 <span about="#mwt13" 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="#mwt13" class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{},"body":{"id":"mw-reference-text-cite_note-3"}}'><a href="./Wikipedia:首页#cite_note-3" style="counter-reset: mw-Ref 3;"><span class="mw-reflink-text">[3]</span></a></sup></p>
13704 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt17" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Wikipedia:首页#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">hi</a></span></li><li about="#cite_note-2" id="cite_note-2"><a href="./Wikipedia:首页#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 rel="mw:ExtLink" class="external autonumber" href="http://test.com?q=ho"></a></span></li><li about="#cite_note-3" id="cite_note-3"><a href="./Wikipedia:首页#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text"><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["ho"],"t":"hi"}}'></span></span></li></ol>
13708 ### Pre-save transform tests
13712 pre-save transform: subst:
13718 This is a test template
13722 pre-save transform: normal template
13732 pre-save transform: nonexistent template
13736 {{thistemplatedoesnotexist}}
13738 {{thistemplatedoesnotexist}}
13742 pre-save transform: subst magic variables
13751 # This is T2089, which I fixed. -- wtm
13753 pre-save transform: subst: templates with parameters
13757 {{subst:paramtest|param="something else"}}
13759 This is a test template with parameter "something else"
13763 Template:nowikitest
13765 <nowiki>'''not wiki'''</nowiki>
13769 pre-save transform: nowiki in subst (T3188)
13773 {{subst:nowikitest}}
13775 <nowiki>'''not wiki'''</nowiki>
13779 Template:commenttest
13781 This template has <!-- a comment --> in it.
13785 pre-save transform: comment in subst (T3936)
13789 {{subst:commenttest}}
13791 This template has <!-- a comment --> in it.
13795 pre-save transform: unclosed tag
13799 <nowiki>'''not wiki'''
13801 <nowiki>'''not wiki'''
13805 pre-save transform: mixed tag case
13809 <NOwiki>'''not wiki'''</noWIKI>
13811 <NOwiki>'''not wiki'''</noWIKI>
13815 pre-save transform: unclosed comment in <nowiki>
13819 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13821 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13824 # Leading @ in this template definition works around a limitation
13825 # in parsoid's parserTests which otherwise strips the <span> from the
13826 # result (confusing it for a template wrapper)
13830 @<span onmouseover="alert('crap')">Oh no</span>
13834 (confirming safety of fix for subst T3936)
13836 {{Template:dangerous}}
13838 <p>@<span>Oh no</span>
13843 pre-save transform: comment containing gallery (T7024)
13847 <!-- <gallery>data</gallery> -->
13849 <!-- <gallery>data</gallery> -->
13853 pre-save transform: comment containing extension
13857 <!-- <tag>data</tag> -->
13859 <!-- <tag>data</tag> -->
13863 pre-save transform: comment containing nowiki
13867 <!-- <nowiki>data</nowiki> -->
13869 <!-- <nowiki>data</nowiki> -->
13873 pre-save transform: <noinclude> in subst (T5298)
13883 pre-save transform: <onlyinclude> in subst (T5298)
13887 {{subst:Includes2}}
13895 {{<includeonly>subst:</includeonly>Includes}}
13899 Template:SafeSubstTest
13901 {{<includeonly>safesubst:</includeonly>Includes}}
13905 T24297: safesubst: works during PST
13909 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13915 T24297: safesubst: works during normal parse
13924 subst: does not work during normal parse
13928 <p>{{subst:Includes}}
13933 pre-save transform: context links ("pipe trick")
13937 [[Article (context)|]]
13940 [[Bar:Article (context)|]]
13941 [[:Bar:Article (context)|]]
13943 [[|Article (context)]]
13947 [[Article (context)|Article]]
13948 [[Bar:Article|Article]]
13949 [[:Bar:Article|Article]]
13950 [[Bar:Article (context)|Article]]
13951 [[:Bar:Article (context)|Article]]
13953 [[Article (context)]]
13954 [[Bar:X (Y) Z|X (Y) Z]]
13955 [[:Bar:X (Y) Z|X (Y) Z]]
13959 pre-save transform: context links ("pipe trick") with interwiki prefix
13963 [[interwiki:Article|]]
13964 [[:interwiki:Article|]]
13965 [[interwiki:Bar:Article|]]
13966 [[:interwiki:Bar:Article|]]
13968 [[interwiki:Article|Article]]
13969 [[:interwiki:Article|Article]]
13970 [[interwiki:Bar:Article|Bar:Article]]
13971 [[:interwiki:Bar:Article|Bar:Article]]
13975 pre-save transform: context links ("pipe trick") with parens in title
13977 pst title=[[Somearticle (context)]]
13981 [[Article (context)|Article]]
13985 pre-save transform: context links ("pipe trick") with comma in title
13987 pst title=[[Someplace, Somewhere]]
13990 [[Otherplace, Elsewhere|]]
13991 [[Otherplace, Elsewhere, Anywhere|]]
13993 [[Otherplace, Somewhere|Otherplace]]
13994 [[Otherplace, Elsewhere|Otherplace]]
13995 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13999 pre-save transform: context links ("pipe trick") with parens and comma
14001 pst title=[[Someplace (IGNORED), Somewhere]]
14004 [[Otherplace (place), Elsewhere|]]
14006 [[Otherplace, Somewhere|Otherplace]]
14007 [[Otherplace (place), Elsewhere|Otherplace]]
14011 pre-save transform: context links ("pipe trick") with comma and parens
14013 pst title=[[Who, me? (context)]]
14016 [[Me, Myself, and I (1937 song)|]]
14018 [[Yes, you. (context)|Yes, you.]]
14019 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
14023 pre-save transform: context links ("pipe trick") with namespace
14025 pst title=[[Ns:Somearticle]]
14029 [[Ns:Article|Article]]
14033 pre-save transform: context links ("pipe trick") with namespace and parens
14035 pst title=[[Ns:Somearticle (context)]]
14039 [[Ns:Article (context)|Article]]
14043 pre-save transform: context links ("pipe trick") with namespace and comma
14045 pst title=[[Ns:Somearticle, Context, Whatever]]
14049 [[Ns:Article, Context, Whatever|Article]]
14053 pre-save transform: context links ("pipe trick") with namespace, comma and parens
14055 pst title=[[Ns:Somearticle, Context (context)]]
14059 [[Ns:Article (context)|Article]]
14063 pre-save transform: context links ("pipe trick") with namespace, parens and comma
14065 pst title=[[Ns:Somearticle (IGNORED), Context]]
14069 [[Ns:Article, Context|Article]]
14073 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
14077 [[Article(context)|]]
14078 [[Bar:Article(context)|]]
14079 [[:Bar:Article(context)|]]
14080 [[|Article(context)]]
14084 [[Article(context)|Article]]
14085 [[Bar:Article(context)|Article]]
14086 [[:Bar:Article(context)|Article]]
14087 [[Article(context)]]
14088 [[Bar:X(Y)Z|X(Y)Z]]
14089 [[:Bar:X(Y)Z|X(Y)Z]]
14093 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14097 [[Article (context)|]]
14098 [[Bar:Article (context)|]]
14099 [[:Bar:Article (context)|]]
14100 [[|Article (context)]]
14104 [[Article (context)|Article]]
14105 [[Bar:Article (context)|Article]]
14106 [[:Bar:Article (context)|Article]]
14107 [[Article (context)]]
14108 [[Bar:X (Y) Z|X (Y) Z]]
14109 [[:Bar:X (Y) Z|X (Y) Z]]
14113 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14117 [[Article(context)|]]
14118 [[Bar:Article(context)|]]
14119 [[:Bar:Article(context)|]]
14120 [[|Article(context)]]
14124 [[Article(context)|Article]]
14125 [[Bar:Article(context)|Article]]
14126 [[:Bar:Article(context)|Article]]
14127 [[Article(context)]]
14128 [[Bar:X(Y)Z|X(Y)Z]]
14129 [[:Bar:X(Y)Z|X(Y)Z]]
14133 pre-save transform: context links ("pipe trick") with commas (T23660)
14137 [[Article (context), context|]]
14138 [[Article (context),context|]]
14139 [[Bar:Article (context), context|]]
14140 [[Bar:Article (context),context|]]
14141 [[:Bar:Article (context), context|]]
14142 [[:Bar:Article (context),context|]]
14144 [[Article (context), context|Article]]
14145 [[Article (context),context|Article]]
14146 [[Bar:Article (context), context|Article]]
14147 [[Bar:Article (context),context|Article]]
14148 [[:Bar:Article (context), context|Article]]
14149 [[:Bar:Article (context),context|Article]]
14153 Parsoid: backwards pipe trick
14160 <p>[[|<b>bar</b>]]</p>
14164 pre-save transform: trim trailing empty lines
14168 Empty lines are trimmed
14174 Empty lines are trimmed
14178 pre-save transform: Signature expansion
14185 * <noinclude>~~~</noinclude>
14186 * <includeonly>~~~</includeonly>
14187 * <onlyinclude>~~~</onlyinclude>
14189 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14190 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14191 * 00:02, 1 January 1970 (UTC)
14192 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14193 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14194 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14199 ParserOutput flags from signature expansion (T84843)
14206 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14207 flags=user-signature
14212 pre-save transform: Signature expansion in nowiki tags (T2093)
14218 <nowiki>~~~~</nowiki>
14220 <includeonly><nowiki>~~~~</nowiki></includeonly>
14222 <noinclude><nowiki>~~~~</nowiki></noinclude>
14224 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14226 {{subst:Foo}} shall be converted to FOO
14228 As well as inside noinclude/onlyinclude
14229 <noinclude>{{subst:Foo}}</noinclude>
14230 <onlyinclude>{{subst:Foo}}</onlyinclude>
14232 But not inside includeonly
14233 <includeonly>{{subst:Foo}}</includeonly>
14237 <nowiki>~~~~</nowiki>
14239 <includeonly><nowiki>~~~~</nowiki></includeonly>
14241 <noinclude><nowiki>~~~~</nowiki></noinclude>
14243 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14245 FOO shall be converted to FOO
14247 As well as inside noinclude/onlyinclude
14248 <noinclude>FOO</noinclude>
14249 <onlyinclude>FOO</onlyinclude>
14251 But not inside includeonly
14252 <includeonly>{{subst:Foo}}</includeonly>
14256 Parsoid: Recognize nowiki with trailing space in tags
14260 <nowiki ><div>[[foo]]</nowiki >
14268 <p><div>[[foo]]
14269 </p><p>a<nowiki / >b
14271 </p><p>e<nowiki/ >f
14274 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14276 <p>a<nowiki / >b</p>
14278 <p>c<span typeof="mw:Nowiki"></span>d</p>
14280 <p>e<nowiki/ >f</p>
14284 Parsoid: Recognize nowiki with odd capitalization
14288 <noWikI ><div>[[foo]]</Nowiki >
14290 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14295 Parsoid: Escape nowiki with trailing space in tags
14299 <p><nowiki > foo </nowiki ></p>
14300 <p>a<nowiki />b</p>
14301 <p>c<nowiki/ >d</p>
14303 <nowiki > foo </nowiki >
14311 Parsoid: Escape weird noWikI capitalizations
14315 <p><noWikI > foo </NoWikI ></p>
14317 <noWikI > foo </NoWikI >
14321 ### Message transform tests
14324 message transform: magic variables
14334 message transform: should not transform wiki markup
14344 message transform: <noinclude> in transcluded template (T6926)
14354 message transform: <onlyinclude> in transcluded template (T6926)
14364 {{#special:}} page name, known
14368 {{#special:Recentchanges}}
14370 Special:RecentChanges
14374 {{#special:}} page name with subpage, known
14378 {{#special:Recentchanges/param}}
14380 Special:RecentChanges/param
14384 {{#special:}} page name, unknown
14388 {{#special:foobar nonexistent}}
14390 Special:Foobar nonexistent
14394 {{#speciale:}} page name, known
14398 {{#speciale:Recentchanges}}
14400 Special:RecentChanges
14404 {{#speciale:}} page name with subpage, known
14408 {{#speciale:Recentchanges/param}}
14410 Special:RecentChanges/param
14414 {{#speciale:}} page name, unknown
14418 {{#speciale:foobar nonexistent}}
14420 Special:Foobar_nonexistent
14426 ### For Parsoid-specific tests, see
14427 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14432 parsoid=wt2html,wt2wt,html2html
14434 [[Image:foobar.jpg]]
14436 <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>
14439 <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>
14443 Serialize simple image with span wrapper
14447 <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>
14449 [[File:Foobar.jpg]]
14453 Simple image (using File: namespace, now canonical)
14455 [[File:Foobar.jpg]]
14457 <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>
14460 <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>
14464 Right-aligned image
14466 [[File:Foobar.jpg|right]]
14468 <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>
14471 <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>
14477 [[File:Foobar.jpg|right|Caption text]]
14479 <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>
14482 <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>
14486 Image with caption, T55312 #1
14488 [[File:Foobar.jpg|right|Caption page stuff]]
14490 <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>
14493 <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>
14497 Image with caption, T55312 #2
14499 [[File:Foobar.jpg|right|Caption page=]]
14501 <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>
14504 <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>
14508 Image with caption, T55312 #3
14510 [[File:Foobar.jpg|right|Caption page=stuff]]
14512 <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>
14515 <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>
14519 Image caption with pipe entity
14521 [[File:Foobar.jpg|thumb|one | two]]
14522 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14524 <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>
14525 <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>
14528 <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>
14529 <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>
14533 Allow empty links in image captions (T62753)
14537 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14542 <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>
14545 <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>
14547 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14548 </figcaption></figure>
14552 Titles in unlinked images (T23454)
14554 [[File:Foobar.jpg|link=|stuff]]
14556 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14559 <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>
14563 Link with empty target
14572 Image with link trail
14574 Linktrails should not work for images: [[File:Foobar.jpg]]s
14576 <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
14579 <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>
14583 Image with empty attribute
14585 parsoid=wt2html,wt2wt,html2html
14587 [[File:Foobar.jpg|right||Caption text]]
14589 <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>
14592 <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>
14596 1. Block image with individual attributes from templates
14598 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14600 <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>
14603 <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>
14607 2. Block Image with individual attributes from templates
14609 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14611 <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>
14614 <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>
14618 3. Inline image with individual attributes from templates
14620 [[File:Foobar.jpg|{{echo|50px}}]]
14622 <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>
14625 <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>
14628 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14629 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14631 Image with multiple attributes from the same template
14633 [[File:Foobar.jpg|{{image_attribs}}]]
14635 <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>
14638 <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>
14642 Image with link tails
14646 123[[File:Foobar.jpg]]456
14647 123[[File:Foobar.jpg|right]]456
14648 123[[File:Foobar.jpg|thumb]]456
14650 <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
14652 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
14653 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
14656 <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
14658 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
14659 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
14662 <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>
14663 <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
14664 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>
14668 Image with multiple captions -- only last one is accepted
14670 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14672 <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>
14675 <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>
14679 Image with multiple widths -- use last
14681 [[File:Foobar.jpg|200px|300px|caption]]
14683 <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>
14686 <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>
14690 Image with multiple alignments -- use first (T50664)
14694 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14696 [[File:Foobar.jpg|middle|text-top|caption]]
14698 <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>
14699 <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>
14702 <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>
14703 <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>
14707 Image with width attribute at different positions
14709 [[File:Foobar.jpg|200px|right|Caption]]
14710 [[File:Foobar.jpg|right|200px|Caption]]
14711 [[File:Foobar.jpg|right|Caption|200px]]
14713 <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>
14714 <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>
14715 <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>
14718 <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>
14719 <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>
14720 <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>
14723 # a sad bit of backward-compatibility
14725 Image with size specified with pxpx (T15500, T53628)
14727 parsoid=wt2html,wt2wt,html2html
14729 [[File:Foobar.jpg|20pxpx]]
14730 [[File:Foobar.jpg|200x20pxpx]]
14732 <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>
14733 <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>
14736 <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>
14740 Image with link parameter, wiki target
14742 [[File:Foobar.jpg|link=Main Page]]
14744 <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>
14747 <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>
14750 # parsoid T51293 (part 1)
14752 Image with link parameter, URL target
14754 [[File:Foobar.jpg|link=http://example.com/]]
14756 <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>
14759 <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>
14762 # parsoid T51293 (part 2)
14764 Image with link parameter, protocol-less URL target
14766 [[File:Foobar.jpg|link=//example.com/]]
14768 <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>
14771 <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>
14775 Escaping non-block captions (T107435)
14778 "modes": ["wt2wt"],
14780 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14784 [[Image:Foobar.jpg|caption]]
14786 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14789 # wgExternalLinkTarget not supported by Parsoid
14791 Image with link parameter, wgExternalLinkTarget
14793 [[Image:foobar.jpg|link=http://example.com/]]
14795 wgExternalLinkTarget='foobar'
14797 <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>
14802 Image with link parameter, wgNoFollowLinks set to false
14804 [[Image:foobar.jpg|link=http://example.com/]]
14806 wgNoFollowLinks=false
14808 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14813 Image with link parameter, wgNoFollowDomainExceptions
14815 [[Image:foobar.jpg|link=http://example.com/]]
14817 wgNoFollowDomainExceptions='example.com'
14819 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14823 # wgExternalLinkTarget not supported by Parsoid
14825 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14827 [[Image:foobar.jpg|link=http://example.com/|Title]]
14829 wgExternalLinkTarget='foobar'
14831 <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>
14836 Image with empty link parameter
14838 [[File:Foobar.jpg|link=]]
14840 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14843 <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>
14847 Image with link parameter (wiki target) and unnamed parameter
14849 [[File:Foobar.jpg|link=Main_Page|Title]]
14851 <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>
14854 <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>
14858 Image with link parameter (URL target) and unnamed parameter
14860 [[File:Foobar.jpg|link=http://example.com/|Title]]
14862 <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>
14865 <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>
14869 Thumbnail image with link parameter
14872 parsoid=wt2html,wt2wt,html2html
14874 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14876 <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>
14879 <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>
14883 Manually-specified thumbnail image
14887 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14889 <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>
14892 <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>
14896 Manually-specified thumbnail image with explicit link to wiki page
14899 parsoid=wt2html,wt2wt,html2html
14901 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14903 <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>
14906 <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>
14910 Manually-specified thumbnail image with explicit link to url
14913 parsoid=wt2html,wt2wt,html2html
14915 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14917 <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>
14920 <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>
14924 Manually-specified thumbnail image with explicit no link
14927 parsoid=wt2html,wt2wt,html2html
14929 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14931 <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>
14934 <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>
14938 Manually-specified thumbnail image with explicit link and alt text
14941 parsoid=wt2html,wt2wt,html2html
14943 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14945 <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>
14948 <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>
14952 Image with frame and link
14954 parsoid=wt2html,wt2wt,html2html
14956 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14958 <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>
14961 <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>
14965 Image with frame and link and explicit alt
14967 parsoid=wt2html,wt2wt,html2html
14969 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14971 <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>
14974 <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>
14978 Image with wiki markup in implicit alt
14980 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14982 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14984 <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>
14985 </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>
14988 <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>
14990 <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>
14994 Alt image option should handle most kinds of wikitext without barfing
14996 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14998 <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>
15001 <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>
15005 Image with table with attributes in caption
15007 parsoid=wt2html,html2html
15009 [[File:Foobar.jpg|thumb|
15016 <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>
15017 <table class="123">
15018 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
15021 </figcaption></figure>
15025 Image with table with rows from templates in caption
15027 [[File:Foobar.jpg|thumb|
15033 <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>
15035 <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>
15037 </figcaption></figure>
15041 Image with nested tables in caption
15043 [[File:Foobar.jpg|thumb|Foo<br />
15052 <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}'/>
15056 <tbody><tr><td>z</td></tr>
15057 </tbody></table></td></tr>
15059 </figcaption></figure>
15063 Image with heading and horizontal rule in caption
15065 [[File:Foobar.jpg|thumb|
15071 <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>
15074 <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>
15075 <h3 id="Testing">Testing</h3>
15077 <hr data-parsoid='{"extra_dashes":10}'/>
15078 </figcaption></figure>
15081 ###################
15082 # Conflicting image format options.
15083 # First option specified should 'win'.
15084 # All three cases in each test should be identical.
15087 Image with 'frameless' first.
15089 parsoid=wt2html,wt2wt,html2html
15091 [[File:Foobar.jpg|frameless|caption]]
15093 [[File:Foobar.jpg|frameless|frame|caption]]
15095 [[File:Foobar.jpg|frameless|thumb|caption]]
15097 <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>
15098 </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>
15099 </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>
15102 <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>
15103 <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>
15104 <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>
15108 Image with 'frame' first.
15110 parsoid=wt2html,wt2wt,html2html
15112 [[File:Foobar.jpg|frame|caption]]
15113 [[File:Foobar.jpg|frame|frameless|caption]]
15114 [[File:Foobar.jpg|frame|thumb|caption]]
15116 <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>
15117 <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>
15118 <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>
15121 <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>
15122 <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>
15123 <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>
15127 Image with 'thumb' first.
15129 parsoid=wt2html,wt2wt,html2html
15131 [[File:Foobar.jpg|thumb|caption]]
15132 [[File:Foobar.jpg|thumb|frameless|caption]]
15133 [[File:Foobar.jpg|thumb|frame|caption]]
15135 <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>
15136 <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>
15137 <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>
15140 <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>
15141 <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>
15142 <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>
15145 ###################
15147 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15148 # and https://phabricator.wikimedia.org/T64258
15149 # Foobar has actual size of 1941x220
15150 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15151 # a scalable format.
15152 # 2. Framed images always ignore size options; always render at default size.
15153 # 3. "Unspecified format" and border are the only types which can be
15157 Image: unspecified format and border enlarge
15159 parsoid=wt2html,wt2wt,html2html
15161 [[File:Foobar.jpg|2000px]]
15163 [[File:Foobar.jpg|border|2000px]]
15165 <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>
15166 </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>
15169 <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>
15170 <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>
15174 Image: "unspecified format" and border reduce
15176 parsoid=wt2html,wt2wt,html2html
15178 [[File:Foobar.jpg|1000px]]
15180 [[File:Foobar.jpg|border|1000px]]
15182 <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>
15183 </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>
15186 <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>
15187 <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>
15191 Image: thumbs reduce
15193 parsoid=wt2html,wt2wt,html2html
15195 [[File:Foobar.jpg|thumb|50px]]
15197 <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>
15200 <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>
15204 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15206 parsoid=wt2html,wt2wt,html2html
15208 [[File:Foobar.jpg|thumb|2000px]]
15210 [[File:Foobar.svg|thumb|2000px]]
15212 <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>
15213 <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>
15216 <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>
15217 <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>
15221 Image: frameless can reduce in size
15223 parsoid=wt2html,wt2wt,html2html
15225 [[File:Foobar.jpg|frameless|50px]]
15227 <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>
15230 <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>
15234 Image: bitmap frameless can't be enlarged past original size, but vector can
15236 parsoid=wt2html,wt2wt,html2html
15238 [[File:Foobar.jpg|frameless|2000px]]
15240 [[File:Foobar.svg|frameless|2000px]]
15242 <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>
15243 </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>
15246 <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>
15247 <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>
15251 Image: framed images are always unscaled.
15253 parsoid=wt2html,wt2wt,html2html
15255 [[File:Foobar.jpg|frame]]
15257 [[File:Foobar.jpg|frame|50px]]
15259 [[File:Foobar.jpg|frame|50x50px]]
15261 [[File:Foobar.jpg|frame|2000px]]
15263 <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>
15264 <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>
15265 <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>
15266 <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>
15269 <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>
15270 <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>
15271 <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>
15272 <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>
15275 ###################
15278 Link to image page- image page normally doesn't exists, hence edit link
15279 Add test with existing image page
15280 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15284 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15289 T20784 Link to non-existent image page with caption should use caption as link text
15291 [[:Image:test|caption]]
15293 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15298 Frameless image caption with a free URL
15300 [[File:Foobar.jpg|http://example.com]]
15302 <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>
15305 <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>
15309 Thumbnail image caption with a free URL
15313 [[File:Foobar.jpg|thumb|http://example.com]]
15315 <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>
15318 <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>
15322 Thumbnail image caption with a free URL and explicit alt
15325 parsoid=wt2html,wt2wt,html2html
15327 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15329 <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>
15332 <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>
15336 SVG thumbnails with no language set
15339 [[File:Foobar.svg|thumb|caption]]
15341 <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>
15344 <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>
15348 SVG thumbnails with language de
15350 parsoid=wt2html,wt2wt,html2html
15352 [[File:Foobar.svg|thumb|caption|lang=de]]
15354 <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>
15357 <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>
15361 SVG thumbnails with invalid language code
15363 parsoid=wt2html,wt2wt,html2html
15365 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15367 <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>
15370 <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>
15374 T3887: A ISBN with a thumbnail
15376 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15378 <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>
15381 <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>
15385 T3887: A RFC with a thumbnail
15387 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15389 <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>
15392 <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>
15396 T3887: A mailto link with a thumbnail
15398 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15400 <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>
15403 <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>
15406 # Pending resolution to T2368
15408 T2648: Frameless image caption with a link
15410 [[File:Foobar.jpg|text with a [[link]] in it]]
15412 <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>
15415 <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>
15419 T2648: Frameless image caption with a link (suffix)
15421 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15423 <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>
15426 <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>
15430 T2648: Frameless image caption with an interwiki link
15432 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15434 <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>
15437 <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>
15441 T2648: Frameless image caption with a piped interwiki link
15443 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15445 <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>
15448 <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>
15452 T107474: Frameless image caption with <nowiki>
15454 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15456 <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>
15460 Escape HTML special chars in image alt text
15462 [[File:Foobar.jpg|& < > "]]
15464 <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>
15467 <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>
15471 Escape HTML special chars in image alt text with LanguageConverter
15475 [[File:Foobar.jpg|& < > "]]
15477 <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>
15480 <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>
15484 Entities in file name and attributes
15486 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15488 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15491 <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>
15495 T2499: Alt text should have Ӓ, not &1234;
15497 [[File:Foobar.jpg|♀]]
15499 <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>
15502 <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>
15506 Broken image caption with link
15508 parsoid=wt2html,wt2wt,html2html
15510 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15512 <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.
15515 <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>
15519 Image caption containing another image
15521 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15523 <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>
15526 <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>
15530 Image: caption containing a newline
15532 [[File:Foobar.jpg|This
15535 <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>
15538 <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>
15542 Image: caption containing leading space
15543 (The leading space should not trigger nowiki escaping in wt2wt mode)
15545 [[File:Foobar.jpg|thumb| bar]]
15547 <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>
15550 <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>
15553 # html/php output not have newlines after table, td, th, etc. because
15554 # Linker::makeThumbLink2() replaces the newlines with spaces since
15555 # the table is inside a caption.
15556 # FIXME: Verify if that circa 2004 fix is still required.
15558 Image: caption containing a table
15560 parsoid=wt2html,wt2wt,html2html
15562 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15568 and some more text.]]
15570 <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>
15573 <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
15576 <tr><th>Foo</th><th>Bar</th></tr>
15579 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15583 T5090: External links other than http: in image captions
15585 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15587 <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>
15590 <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>
15596 parsoid=wt2html,wt2wt,html2html
15598 [[Image:foobar.jpg|a|class=b]]
15600 <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>
15603 <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>
15607 Localized image handling (1).
15609 parsoid=wt2html,wt2wt,html2html
15612 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15614 <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>
15617 <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>
15621 Localized image handling (2).
15624 parsoid=wt2html,wt2wt,html2html
15627 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15629 <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>
15632 <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>
15636 Localized image handling (3).
15641 <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>
15643 [[File:Foobar.jpg|بندانگشتی]]
15647 "border", "frameless" and "class" attributes on an image.
15650 parsoid=wt2html,wt2wt,html2html
15652 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15654 <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>
15657 <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>
15660 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15662 Invalid image attributes (T64500)
15665 parsoid=wt2html,wt2wt,html2html
15667 [[File:Foobar.jpg|thumb|float|left|caption]]
15669 [[File:Foobar.jpg|thumb|righ|caption]]
15671 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15673 <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>
15674 <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>
15675 <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>
15678 <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>
15679 <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>
15680 <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>
15686 #REDIRECT [[File:Barfoo.jpg]]
15689 # FIXME: Parsoid should run this test -- but we'd need to teach the
15690 # mockAPI about the redirected Barfoo.jpg image.
15694 [[Image:Barfoo.jpg]]
15696 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15701 Missing image with uploads disabled
15705 [[File:Foobaz.jpg]]
15707 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15710 <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>
15713 # Parsoid-specific testing for images
15714 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15715 # Currently imperfect due to a flaw in the Parsoid testrunner
15717 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15721 Parsoid-specific image handling - simple image with size and middle alignment
15723 [[File:Foobar.jpg|middle|50px]]
15725 <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>
15729 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
15731 parsoid=wt2wt,wt2html,html2html
15733 [[Image:Foobar.jpg|middle|50px]]
15735 <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>
15739 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
15741 [[File:Foobar.jpg|50px|middle]]
15743 <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>
15747 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
15749 parsoid=wt2html,wt2wt,html2html
15751 [[Image:Foobar.jpg|50px|middle]]
15753 <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>
15757 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15759 [[File:Foobar.jpg|500x10px|baseline|caption]]
15761 <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>
15765 Parsoid-specific image handling - simple image with border and size spec
15767 [[File:Foobar.jpg|50px|border|caption]]
15769 <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>
15773 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15775 parsoid=wt2html,html2html
15777 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15779 <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>
15783 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
15785 parsoid=wt2html,html2html
15787 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15789 <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>
15793 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15795 parsoid=wt2html,html2html
15797 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15799 <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>
15803 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
15805 parsoid=wt2html,html2html
15807 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15809 <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>
15813 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
15815 parsoid=wt2html,wt2wt,html2html
15817 [[File:Foobar.jpg|frame|500x50px|caption]]
15819 <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>
15823 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
15825 parsoid=wt2html,html2html
15827 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15829 <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>
15833 Parsoid-specific image handling - frameless image with specific size, border, and caption
15835 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15837 <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>
15841 Parsoid-specific image handling - simple image with a formatted caption
15843 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15845 <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>
15849 Parsoid-specific image handling - caption with a template in it
15851 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15853 <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>
15857 Parsoid-specific image handling - caption with unbalanced tags in it
15859 parsoid=wt2html,wt2wt,html2html
15862 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15866 <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>
15871 Parsoid-specific image handling - empty caption (1)
15873 parsoid=wt2html,wt2wt
15875 [[File:Foobar.jpg|thumb|]]
15877 <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>
15880 # empty captions don't get serialized unless we're in the "round trip" case
15882 Parsoid-specific image handling - empty caption (2)
15886 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15887 <a href="./File:Foobar.jpg">
15888 <img resource="./File:Foobar.jpg"
15889 src="//example.com/images/3/3a/Foobar.jpg"
15890 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15891 height="25" width="220"/>
15893 <figcaption></figcaption>
15896 [[File:Foobar.jpg|thumb]]
15900 Parsoid-specific image handling - whitespace caption
15902 [[File:Foobar.jpg|thumb| ]]
15904 <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>
15908 Parsoid-specific image handling - lang option
15911 [[File:Foobar.svg|lang=de|caption]]
15915 <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>
15919 ## Edge case bugs in Parsoid from T93580
15921 T93580: 1. Templated <ref> inside block images
15923 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15927 <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>
15929 <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>
15933 T93580: 2. <ref> inside inline images
15935 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15939 <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\",\"attrs\":{},\"body\":{\"id\":\"mw-reference-text-cite_note-1\"}}'><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>
15941 <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>
15945 T93580: 3. Templated <ref> inside inline images
15947 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15951 <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>
15953 <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>
15960 Subpage test/subpage
15968 subpage title=[[Subpage test]]
15972 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15977 Subpage noslash link
15979 subpage title=[[Subpage test]]
15983 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15988 Subpage test/1/2/subpage
15994 Relative subpage noslash link
15996 parsoid=wt2wt,wt2html,html2html
15997 subpage title=[[Subpage test/1/2/3/4]]
16003 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
16004 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
16007 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
16008 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
16012 Parsoid: dot-slash prefixed wikilinks
16022 </p><p>[[././baz/]]
16027 </p><p>[[././baz/]]
16032 Render invalid page names as plain text (T53090)
16044 [[foo[http://example.com]xyz]]
16046 [[{{echo|./../foo}}|bar]]
16047 [[{{echo|foo/.}}|bar]]
16048 [[{{echo|foo/..}}|bar]]
16049 [[{{echo|foo~~~~bar}}]]
16050 [[{{echo|foo>bar}}]]
16051 [[{{echo|foo././bar}}]]
16052 [[{{echo|foo{bar}}]]
16053 [[{{echo|foo}bar}}]]
16054 [[{{echo|foo[bar}}]]
16055 [[{{echo|foo]bar}}]]
16056 [[{{echo|foo<bar}}]]
16058 <p>[[./../foo|bar]]
16068 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
16069 </p><p>[[./../foo|bar]]
16082 <p>[[./../foo|bar]]
16092 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
16094 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
16095 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
16096 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
16097 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
16098 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
16099 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
16100 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
16101 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
16102 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
16103 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
16104 [[<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>
16112 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
16117 T2561: {{/Subpage}}
16119 subpage title=[[Page]]
16123 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16131 Category:MediaWiki User's Guide
16139 [[:Category:MediaWiki User's Guide]]
16141 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16150 [[Category:MediaWiki User's Guide]]
16152 cat=MediaWiki_User's_Guide sort=
16154 <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"}}'/>
16158 PAGESINCATEGORY invalid title fatal (r33546 fix)
16160 {{PAGESINCATEGORY:<bogus>}}
16167 Category with different sort key
16171 [[Category:MediaWiki User's Guide|Foo]]
16173 cat=MediaWiki_User's_Guide sort=Foo
16175 <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"}}'/>
16179 Category with identical sort key
16183 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16185 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16187 <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"}}'/>
16191 Category with empty sort key
16196 [[Category:MediaWiki User's Guide|]]
16198 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16202 Category with empty sort key and parentheses
16207 [[Category:Foo (bar)|]]
16209 [[Category:Foo (bar)|Foo]]
16213 Category with link tail
16218 123[[Category:Foo]]456
16220 123[[Category:Foo]]456
16224 Category with template
16229 [[Category:{{echo|Foo}}]]
16231 [[Category:{{echo|Foo}}]]
16235 Category with template in sort key
16240 [[Category:Foo|{{echo|Bar}}]]
16242 [[Category:Foo|{{echo|Bar}}]]
16246 Category with template in sort key and title
16251 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16253 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16256 ## We used to, but no longer wt2wt this test since the default serializer
16257 ## will normalize all categories to serialize on their own line.
16258 ## This wikitext usage is going to be fairly uncommon in production and
16259 ## selser will take care of preserving formatting in those scenarios.
16261 Category / paragraph interactions
16265 Foo [[Category:Baz]] Bar
16267 Foo [[Category:Baz]]
16275 [[Category:Baz]] Bar
16288 {{echo|[[Category:Baz]]}}
16301 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16302 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16303 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16304 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16305 <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>
16306 <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}}]}'/>
16307 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16310 ## We used to, but no longer wt2wt this test since the default serializer
16311 ## will normalize all categories to serialize on their own line.
16312 ## This wikitext usage is going to be fairly uncommon in production and
16313 ## selser will take care of preserving formatting in those scenarios.
16315 ## The whitespace on the empty line is part of the test. Please do not delete
16317 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16323 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16325 {{echo|[[Category:Foo]] and so should this!}}
16327 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16332 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16334 <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>
16337 ## Parsoid will not try to wt2wt this while preserving newlines because
16338 ## it suppresses excess newlines within list items -- and we don't want to
16339 ## introduce a special case just for categories, which is, in reality somewhat
16340 ## odd behavior -- categories are unlikely to be used in list items like this
16341 ## in top-level pages and are only likely to show up in template-generated
16342 ## list items where this RT-ing is a non-issue.
16344 ## The whitespace on the empty line is part of the test. Please do not delete
16346 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16352 [[Category:Foo]] and this should be part of the same list item
16355 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16357 <ul><li>This and this should be part of the same list item</li>
16358 <li>So should this and this should be part of the same list item</li></ul>
16361 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16362 <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>
16366 ## Newlines and categories that follow the last item of a list
16367 ## are treated differently because this (list followed by categories)
16368 ## is an extremely common pattern on wikis.
16370 3. Categories and newlines: newline suppression for last list item should RT properly
16391 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16393 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16394 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16396 <dl><dd>c</dd></dl>
16398 <link rel="mw:PageProp/Category" href="./Category:C"/>
16400 <dl><dt>d</dt></dl>
16402 <link rel="mw:PageProp/Category" href="./Category:D"/>
16406 4. Categories and newlines: newline suppression for last list item should RT properly
16414 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16416 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16419 ## only wt2html for this to make sure the algo only applies to the rightmost path
16421 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16434 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16436 <ul><li>d</li></ul></li></ul>
16437 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16440 ## We used to, but no longer wt2wt this test since the default serializer
16441 ## will normalize all categories to serialize on their own line.
16442 ## This wikitext usage is going to be fairly uncommon in production and
16443 ## selser will take care of preserving formatting in those scenarios.
16445 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16449 *a [[Category:Foo]]
16451 <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>
16454 # This test also demonstrates because of newline+category tunneling
16455 # through the list hander, template wrapping doesn't expand to the
16456 # containing list when the list item swallows the category.
16458 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16463 <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
16464 </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>
16468 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16472 {{echo|[[Category:Foo]]
16476 <ul><li>a</li></ul>
16478 <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">
16479 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16480 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16484 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16488 [[Category:Bar]]<!--boo1--> <!--boo2-->
16489 [[Category:Baz]]<!--boo3--> <!--boo4-->
16491 <ul><li>a</li></ul>
16493 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16494 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16498 Categories and newlines: should behave properly with linkprefix (T87753)
16513 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16514 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16518 No regressions on internal links following category (T174639)
16520 parsoid=wt2html,html2html
16522 [[Category:Foo]]<div>a
16527 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16530 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16532 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16535 # Note that Parsoid differs slightly from PHP due to T175421
16537 11. Special case where only newlines separate links (T175416)
16539 parsoid=wt2html,html2html
16543 [[Foo]][[es:Alimento]]
16548 <a href="/wiki/Foo" title="Foo">Foo</a>
16549 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16552 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16554 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16556 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16560 Category links with multiple namespaces
16562 [[Category:Project:Foo]]
16564 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16568 Parsoid: Serialize link to category page with colon escape
16574 [[:Category:Foo|Bar]]
16577 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16578 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16582 # We used to, but no longer wt2wt this test since the default serializer
16583 # will normalize all categories to serialize on their own line.
16584 # This wikitext usage is going to be fairly uncommon in production and
16585 # selser will take care of preventing whitespace insertion if this
16586 # occurs in an article.
16588 # html2html disabled for the same reason (whitespace insertion between
16591 # html2wt disabled because it localizes the "Category" namespace.
16593 Link prefix/suffixes aren't applied to category links
16603 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16607 Link prefix/suffixes aren't applied to language links
16617 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16621 Parsoid: Serialize link to file page with colon escape
16627 [[:File:Foo.png|Bar]]
16630 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16631 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16636 Parsoid: Serialize a genuine category link without colon escape
16641 [[Category:Foo|Bar]]
16643 <link rel="mw:PageProp/Category" href="./Category:Foo">
16644 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16648 Normalize hrefs properly before testing for invalid link targets (T72894)
16652 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16654 [[Category:Toxine bactérienne]]
16658 Parsoid: Defaultsort
16660 {{DEFAULTSORT:Foo}}
16662 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16665 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16666 # But, this is a limitation of our representation and is documented in
16667 # TemplateHandler.js in processSpecialMagicWord
16669 Parsoid: Defaultsort (template-generated)
16671 {{{{echo|DEFAULTSORT}}:Foo}}
16673 <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"}]]}'/>
16677 ### Inter-language links
16680 Interlanguage links
16688 es:Alimento fr:Nourriture zh:食品
16690 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16691 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16692 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16696 Duplicate interlanguage links (T26502)
16707 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16708 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16709 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16710 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16717 Basic section headings
16724 ===Smaller headline===
16727 <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>
16730 <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>
16733 <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>
16739 Section headings with TOC
16742 ===Subheadline 1===
16743 =====Skipping a level=====
16744 ======Skipping a level======
16748 ===Another headline===
16750 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16752 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16754 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16756 <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>
16758 <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>
16765 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16767 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16773 <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>
16774 <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>
16775 <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>
16776 <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>
16777 <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>
16780 <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>
16785 TOC anchors don't collide
16793 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16795 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16796 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16797 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16798 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16802 <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>
16803 <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>
16804 <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>
16805 <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>
16809 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16810 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16812 Handling of sections up to level 6 and beyond
16817 ==Level 2 Heading==
16818 ===Level 3 Heading===
16819 ====Level 4 Heading====
16820 =====Level 5 Heading=====
16821 ======Level 6 Heading======
16822 =======Level 7 Heading=======
16823 ========Level 8 Heading========
16824 =========Level 9 Heading=========
16825 ==========Level 10 Heading==========
16827 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16829 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16831 <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>
16833 <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>
16835 <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>
16837 <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>
16839 <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>
16840 <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>
16841 <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>
16842 <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>
16843 <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>
16857 <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>
16858 <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>
16859 <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>
16860 <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>
16861 <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>
16862 <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>
16863 <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>
16864 <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>
16865 <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>
16866 <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>
16869 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16870 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16871 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16872 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16873 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16874 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16875 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16876 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16877 <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>
16878 <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>
16882 TOC regression (T11764)
16886 ====title 1.1.1====
16891 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16893 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16895 <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>
16897 <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>
16900 <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>
16903 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16905 <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>
16911 <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>
16912 <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>
16913 <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>
16914 <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>
16915 <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>
16916 <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>
16921 TOC for heading containing <span id="..."></span> (T96153)
16924 ==<span id="old-anchor"></span>New title==
16926 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16928 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16932 <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>
16937 TOC with wgMaxTocLevel=3 (T8204)
16943 ====title 1.1.1====
16948 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16950 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16952 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
16953 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
16956 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16958 <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>
16964 <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>
16965 <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>
16966 <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>
16967 <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>
16968 <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>
16969 <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>
16974 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16980 ====Section 1.1.1====
16981 ====Section 1.1.1.1====
16984 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
16986 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16988 <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>
16991 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16995 <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>
16996 <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>
16997 <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>
16998 <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>
16999 <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>
17005 Resolving duplicate section names
17010 <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>
17011 <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>
17016 Resolving duplicate section names with differing case (T12721)
17021 <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>
17022 <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>
17034 Template with sections, __NOTOC__
17041 <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>
17042 <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>
17043 <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>
17044 <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>
17049 __NOEDITSECTION__ keyword
17055 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
17056 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
17061 Link inside a section heading
17063 ==Section with a [[Main Page|link]] in it==
17065 <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>
17070 TOC regression (T14077)
17077 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17079 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
17081 <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>
17084 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
17088 <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>
17089 <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>
17090 <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>
17095 T3219 URL next to image (good)
17097 http://example.com [[File:Foobar.jpg]]
17099 <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>
17102 <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>
17105 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
17107 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
17109 parsoid=wt2html,html2html
17112 The line above must have a trailing space!
17115 But just in case it doesn't...
17117 <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>
17118 <p>The line above must have a trailing space!
17120 <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>
17121 <p>But just in case it doesn't...
17124 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
17125 <p>The line above must have a trailing space!</p>
17126 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
17128 <p>But just in case it doesn't...</p>
17132 Header with special characters (T27462)
17134 The tooltips shall not show entities to the user (ie. be double escaped)
17151 <p>The tooltips shall not show entities to the user (ie. be double escaped)
17153 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17155 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17156 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17157 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17158 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17159 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17163 <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>
17166 <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>
17169 <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>
17172 <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>
17175 <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>
17179 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17181 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
17184 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
17187 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
17190 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
17193 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
17198 Header with space, plus and underscore as entity
17200 Id should not contain + for spaces
17202 ==Space between Text==
17205 ==Space-Entity between Text==
17208 ==Plus+between+Text==
17211 ==Plus-Entity+between+Text==
17214 ==Underscore_between_Text==
17217 ==Underscore-Entity_between_Text==
17220 [[#Space between Text]]
17221 [[#Space-Entity between Text]]
17222 [[#Plus+between+Text]]
17223 [[#Plus-Entity+between+Text]]
17224 [[#Underscore_between_Text]]
17225 [[#Underscore-Entity_between_Text]]
17227 <p>Id should not contain + for spaces
17229 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17231 <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>
17232 <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>
17233 <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>
17234 <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>
17235 <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>
17236 <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>
17240 <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>
17243 <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>
17246 <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>
17249 <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>
17252 <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>
17255 <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>
17257 </p><p><a href="#Space_between_Text">#Space between Text</a>
17258 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17259 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17260 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17261 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17262 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17265 <p>Id should not contain + for spaces</p>
17267 <h2 id="Space_between_Text">Space between Text</h2>
17270 <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>
17273 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17276 <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>
17279 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17282 <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>
17285 <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>
17286 <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>
17287 <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>
17288 <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>
17289 <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>
17290 <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>
17293 # Parsoid html2wt disabled because it adds padding spaces around =
17295 Headers with excess '=' characters
17296 (Are similar tests necessary beyond the 1st level?)
17298 parsoid=wt2html,wt2wt,html2html
17302 =''italic'' heading==
17303 ==''italic'' heading=
17305 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17307 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17308 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17309 <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>
17310 <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>
17314 <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>
17315 <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>
17316 <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>
17317 <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>
17320 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17321 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17322 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17323 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17327 HTML headers vs TOC (T25393)
17328 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17340 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
17342 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17344 <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>
17345 <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>
17348 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17350 <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>
17351 <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>
17357 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17358 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17359 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17360 <h1><span class="mw-headline" id="Header_2">Header 2
17362 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17363 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17366 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17367 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17368 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17370 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17372 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17373 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17374 <meta property="mw:PageProp/noeditsection"/>
17378 Single-line or multiline-comments can follow headings
17380 parsoid=wt2html,wt2wt
17388 <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>
17389 <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>
17390 <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>
17393 <h2 id="foo">foo</h2><!---->
17394 <h2 id="bar">bar</h2><!--c1-->
17395 <h2 id="baz">baz</h2><!--
17401 T3219 URL next to image (broken)
17403 http://example.com[[File:Foobar.jpg]]
17405 <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>
17408 <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>
17412 T3186 news: in the middle of text
17414 http://en.wikinews.org/wiki/Wikinews:Workplace
17416 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17422 Namespaced link must have a title
17431 Namespaced link must have a title (bad fragment version)
17433 [[Project:#fragment]]
17435 <p>[[Project:#fragment]]
17441 ### HTML tags and HTML attributes
17445 div with no attributes
17447 <div>HTML rocks</div>
17449 <div>HTML rocks</div>
17454 div with double-quoted attribute
17456 <div id="rock">HTML rocks</div>
17458 <div id="rock">HTML rocks</div>
17463 div with single-quoted attribute
17465 <div id='rock'>HTML rocks</div>
17467 <div id="rock">HTML rocks</div>
17472 div with unquoted attribute
17474 <div id=rock>HTML rocks</div>
17476 <div id="rock">HTML rocks</div>
17481 div with illegal double attributes
17483 <div id="a" id="b">HTML rocks</div>
17485 <div id="b">HTML rocks</div>
17490 div with empty attribute value, space before equals
17492 parsoid=wt2html,html2html
17494 <div class =>HTML rocks</div>
17496 <div class="">HTML rocks</div>
17499 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17503 div with multiple empty attribute values
17505 wgFragmentMode=[ 'html5', 'legacy' ]
17507 parsoid=wt2html,html2html
17509 <div id= title=>HTML rocks</div>
17511 <div id="title=">HTML rocks</div>
17514 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17517 # FIXME Parsoid doesn't actually match PHP here.
17518 # Probably we should use the synthetic <foo /> or <indicator>
17519 # extensions for this test, which are enabled when running parser tests.
17521 Extension tag in attribute value
17523 <span title="<translate>123</translate>">ok</span>
17524 !! html/php+disabled
17525 <p><span title="<translate>123</translate>">ok</span>
17528 <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>
17532 table with multiple empty attribute values
17534 parsoid=wt2html,html2html
17540 <table title="id=">
17546 <table title="id=">
17547 <tbody><tr><td>hi</td></tr>
17552 div with braces in attribute value
17554 <div title="{}">Foo</div>
17556 <div title="{}">Foo</div>
17559 <div title="{}">Foo</div>
17563 div with empty attribute value, no space before equals
17565 parsoid=wt2html,html2html
17567 <div class=>HTML rocks</div>
17569 <div class="">HTML rocks</div>
17572 <div class="">HTML rocks</div>
17576 HTML multiple attributes correction
17578 <p class="error" class="awesome">Awesome!</p>
17580 <p class="awesome">Awesome!</p>
17585 Table multiple attributes correction
17588 !+ class="error" class="awesome"|status
17593 <th class="awesome">status
17601 <DIV ID="x">HTML ROCKS</DIV>
17603 <div id="x">HTML ROCKS</div>
17608 Non-ASCII pseudo-tags are rendered as text
17617 Pseudo-tag with URL 'name' renders as url link
17619 <http://example.com/>
17621 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17626 text with amp in the middle of nowhere
17630 <p>Remember AT&T?
17635 text with character entity: eacute
17637 I always thought é was a cute letter.
17639 <p>I always thought é was a cute letter.
17644 text with entity-escaped character entity-like string: eacute
17646 I always thought &eacute; was a cute letter.
17648 <p>I always thought &eacute; was a cute letter.
17653 text with undefined character entity: xacute
17655 I always thought &xacute; was a cute letter.
17657 <p>I always thought &xacute; was a cute letter.
17664 <data value="5">five</data>
17665 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17666 <mark>This highlighted text</mark>
17668 <p><data value="5">five</data>
17669 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17670 <mark>This highlighted text</mark>
17675 HTML tag with leading space is parsed as text
17679 <p>< div>foo< /div>
17683 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17684 ## the HTML5 parsing spec.
17686 Element with broken attribute syntax
17690 <div style=" style="123">hi</div>
17693 <div style="123">hi</div>
17697 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17698 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17702 ### Nesting tests (see T43545, T52604, T53081)
17705 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17706 # Note that html2wt is considerably more difficult if we use <b> in
17707 # the test case, instead of <small>
17709 Ensure that HTML adoption agency algorithm is properly implemented.
17711 <small>X<small>Y</small>Z</small>
17713 <p><small>X<small>Y</small>Z</small>
17717 # This was T43545 in the PHP parser.
17721 <kbd>X<kbd>Y</kbd>Z</kbd>
17723 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17727 # The following cases were T53081 in the PHP parser.
17728 # Note that there are some other nestable tags (b, i, etc) which are
17729 # not covered; see T53081 for discussion.
17734 <em>X<em>Y</em>Z</em>
17736 <p><em>X<em>Y</em>Z</em>
17741 Nesting of <strong>
17743 <strong>X<strong>Y</strong>Z</strong>
17745 <p><strong>X<strong>Y</strong>Z</strong>
17754 <p><q>X<q>Y</q>Z</q>
17761 <ruby>X<ruby>Y</ruby>Z</ruby>
17763 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17770 <bdo>X<bdo>Y</bdo>Z</bdo>
17772 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17784 [[Media:Foobar.jpg]]
17785 [[Media:Video.ogv]]
17786 [[:Media:Video.ogv]]
17788 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17789 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17790 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17793 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17794 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17795 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" resource="./Media:Video.ogv" title="Video.ogv" data-parsoid='{"a":{"resource":"./Media:Video.ogv"},"sa":{"resource":":Media:Video.ogv"}}'>Media:Video.ogv</a></p>
17799 Media link with text
17801 [[Media:Foobar.jpg|A neat file to look at]]
17803 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17806 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17810 Localized media link
17814 [[Miðill:Foobar.jpg]]
17816 [[Miðill:Foobar.jpg|Icelandic]]
17818 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Miðill:Foobar.jpg</a>
17819 </p><p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Icelandic</a>
17822 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Miðill:Foobar.jpg</a></p>
17823 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Miðill:Foobar.jpg" title="Foobar.jpg">Icelandic</a></p>
17826 # FIXME: this is still bad HTML tag nesting
17827 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17828 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17830 Media link with nasty text
17832 parsoid=wt2html,html2html
17834 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17836 <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>
17839 <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>
17841 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg">Safe Link</a></p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" resource="./Media:Foobar.jpg" title="Foobar.jpg"><div style="display:none" data-parsoid='{"stx":"html"}'>" onmouseover="alert(document.cookie)" onfoo="</div></a>
17845 Media link from missing resource (parsoid-only)
17849 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
17851 [[Media:Foobar.jpg|Bat!]]
17855 Media link from missing resource, localized (parsoid-only)
17860 <a rel="mw:MediaLink" href="http://example.com/images/3/3a/Foobar.jpg">Bat!</a>
17862 [[Miðill:Foobar.jpg|Bat!]]
17865 # This is a sanity test to ensure we don't crash or choke when given
17866 # old cached 1.7.0 HTML for media links; we don't require that the
17867 # result be "valid" because wt2wt was completely broken in 1.7.0
17869 Media link from old 1.7.0 DOM spec (crash test, parsoid-only) T198511
17873 <p>This is what Parsoid would emit (and we still handle this HTML fine):</p>
17874 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17875 <p>But VisualEditor would mangle the rel attribute, and give us back this:</p>
17876 <p><a rel="mw:ExtLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17877 <p>But at least we don't crash when trying to handle the mangled HTML!</p>
17879 This is what Parsoid would emit (and we still handle this HTML fine):
17881 [[Media:Foobar.jpg|A neat file to look at]]
17883 But VisualEditor would mangle the rel attribute, and give us back this:
17885 [//example.com/images/3/3a/Foobar.jpg A neat file to look at]
17887 But at least we don't crash when trying to handle the mangled HTML!
17891 Media link to nonexistent file (T3702)
17893 [[Media:No such.jpg]]
17894 [[Media:No_such file.jpg]]
17896 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17897 <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>
17900 <p><a rel="mw:MediaLink" href="./Special:FilePath/No_such.jpg" resource="./Media: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":{"resource":"./Media:No_such.jpg"},"sa":{"resource":"Media:No such.jpg"}}'>Media:No such.jpg</a>
17901 <a rel="mw:MediaLink" href="./Special:FilePath/No_such_file.jpg" resource="./Media: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":{"resource":"./Media:No_such_file.jpg"},"sa":{"resource":"Media:No_such file.jpg"}}'>Media:No_such file.jpg</a></p>
17905 Image link to nonexistent file (T3850 - good)
17907 [[File:No_such.jpg]]
17909 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17912 <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>
17916 :Image link to nonexistent file (T3850 - bad)
17918 [[:Image:No such.jpg]]
17920 <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>
17923 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17927 Character reference normalization in link text (T3938)
17929 [[Main Page|this&that]]
17931 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17938 Test for unicode normalization
17940 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17944 (T21451) Links should refer to the normalized form.
17952 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17953 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17954 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17955 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17956 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17961 Empty attribute crash test (T4067)
17963 <font color="">foo</font>
17965 <p><font color="">foo</font>
17970 Empty attribute crash test single-quotes (T4067)
17972 <font color=''>foo</font>
17974 <p><font color="">foo</font>
17979 Attribute test: equals, then nothing
17981 parsoid=wt2html,html2html
17983 <font color=>foo</font>
17985 <p><font color="">foo</font>
17988 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17992 Attribute test: unquoted value
17994 parsoid=wt2html,html2html
17996 <font color=x>foo</font>
17998 <p><font color="x">foo</font>
18001 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
18005 Attribute test: unquoted but illegal value (hash)
18007 <font color=#x>foo</font>
18009 <p><font color="#x">foo</font>
18013 # Parsoid does not serialize to empty attribute syntax,
18014 # so wt2wt and html2wt cases are skipped
18016 Attribute test: no value (T54330)
18018 parsoid=wt2html,html2html
18020 <font color>foo</font>
18022 <p><font color="">foo</font>
18025 <p><font color="">foo</font></p>
18029 T4095: link with three closing brackets
18033 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
18036 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
18040 T4095: link with pipe and three closing brackets
18042 [[Main Page|link]]]
18044 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
18047 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
18051 T4095: link with pipe and three closing brackets, version 2
18053 [[Main Page|[http://example.com/]]]
18055 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
18058 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
18067 Template:Dangerous attribute
18069 " onmouseover="alert(document.cookie)
18073 Template:Dangerous style attribute
18075 border-size: expression(alert(document.cookie))
18081 <div style="float: right; {{{1}}}">Magic div</div>
18085 T4304: HTML attribute safety (safe template; regression T4309)
18087 <div title="{{test}}"></div>
18089 <div title="This is a test template"></div>
18092 <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>
18095 # Parsoid has enough context to handle this case
18097 T4304: HTML attribute safety (dangerous template; 2309)
18099 <div title="{{dangerous attribute}}"></div>
18101 <div title=""></div>
18104 <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>
18108 T4304: HTML attribute safety (dangerous style template; 2309)
18110 <div style="{{dangerous style attribute}}"></div>
18112 <div style="/* insecure input */"></div>
18115 <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>
18119 T4304: HTML attribute safety (safe parameter; 2309)
18121 {{div style|width: 200px}}
18123 <div style="float: right; width: 200px">Magic div</div>
18126 <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>
18130 T4304: HTML attribute safety (unsafe parameter; 2309)
18132 {{div style|width: expression(alert(document.cookie))}}
18134 <div style="/* insecure input */">Magic div</div>
18137 <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>
18140 ## Parsoid output here differs; needs investigation.
18142 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
18144 {{div style|"><script>alert(document.cookie)</script>}}
18146 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18150 ## Parsoid output here differs; needs investigation.
18152 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
18154 {{div style|" ><script>alert(document.cookie)</script>}}
18156 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
18161 T4304: HTML attribute safety (link)
18163 <div title="[[Main Page]]"></div>
18165 <div title="[[Main Page]]"></div>
18168 <div title="[[Main Page]]"></div>
18172 T4304: HTML attribute safety (italics)
18174 <div title="''foobar''"></div>
18176 <div title="''foobar''"></div>
18181 T4304: HTML attribute safety (bold)
18183 <div title="'''foobar'''"></div>
18185 <div title="'''foobar'''"></div>
18190 T4304: HTML attribute safety (ISBN)
18192 <div title="ISBN 1234567890"></div>
18194 <div title="ISBN 1234567890"></div>
18199 T4304: HTML attribute safety (RFC)
18201 <div title="RFC 1234"></div>
18203 <div title="RFC 1234"></div>
18208 T4304: HTML attribute safety (PMID)
18210 <div title="PMID 1234567890"></div>
18212 <div title="PMID 1234567890"></div>
18217 T4304: HTML attribute safety (web link)
18219 <div title="http://example.com/"></div>
18221 <div title="http://example.com/"></div>
18226 T4304: HTML attribute safety (named web link)
18228 <div title="[http://example.com/ link]"></div>
18230 <div title="[http://example.com/ link]"></div>
18233 <div title="[http://example.com/ link]"></div>
18237 T5244: HTML attribute safety (extension; safe)
18239 <div style="<nowiki>background:blue</nowiki>"></div>
18241 <div style="background:blue"></div>
18244 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18248 T5244: HTML attribute safety (extension; unsafe)
18250 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18252 <div style="/* insecure input */"></div>
18255 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18258 # More MSIE fun discovered by Tom Gilder
18261 MSIE CSS safety test: spurious slash
18263 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18265 <div style="/* insecure input */">evil</div>
18268 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18272 MSIE CSS safety test: hex code
18274 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18276 <div style="/* insecure input */">evil</div>
18279 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18283 MSIE CSS safety test: comment in url
18285 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18287 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18290 <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>
18294 MSIE CSS safety test: comment in expression
18296 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18298 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18301 <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>
18305 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18307 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18309 <p style="/* invalid control char */">A</p>
18312 <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>
18316 MSIE 6 CSS safety test: Fullwidth (T57332)
18318 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18319 <div style="top:EXPRESSION(alert())">B</div>
18321 <p style="/* insecure input */">A</p>
18322 <div style="/* insecure input */">B</div>
18325 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18326 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18330 MSIE 6 CSS safety test: IPA extensions (T57332)
18332 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18333 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18335 <div style="/* insecure input */">A</div>
18336 <p style="/* insecure input */">B</p>
18339 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18340 <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>
18344 MSIE 6 CSS safety test: sup/sub script (T57332)
18346 <div style="background-image:url⁽javascript:alert())">A</div>
18347 <div style="background-image:url₍javascript:alert())">B</div>
18348 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18350 <div style="/* insecure input */">A</div>
18351 <div style="/* insecure input */">B</div>
18352 <p style="/* insecure input */">C</p>
18355 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18356 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18357 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18363 parsoid=wt2html,html2html
18366 title="data:text/html,<img src=1 onerror=alert(1)>"
18367 style="-o-link:attr(title);-o-link-source:current">X</div>
18369 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18372 <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>
18376 MSIE 6 CSS safety test: Repetition markers (T57332)
18378 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18379 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18380 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18381 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18382 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18383 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18384 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18386 <p style="/* insecure input */">A</p>
18387 <p style="/* insecure input */">B</p>
18388 <p style="/* insecure input */">C</p>
18389 <p style="/* insecure input */">D</p>
18390 <p style="/* insecure input */">E</p>
18391 <p style="/* insecure input */">F</p>
18392 <p style="/* insecure input */">G</p>
18395 <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>
18396 <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>
18397 <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>
18398 <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>
18399 <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>
18400 <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>
18401 <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>
18405 Table attribute legitimate extension
18408 !+ style="<nowiki>color:blue</nowiki>"|status
18413 <th style="color:blue">status
18419 Table attribute safety
18422 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18427 <th style="/* insecure input */">status
18433 CSS line continuation 1
18435 <div style="background-image: u\ rl(test.jpg);"></div>
18437 <div style="/* insecure input */"></div>
18442 CSS line continuation 2
18444 <div style="background-image: u\ rl(test.jpg); "></div>
18446 <div style="/* invalid control char */"></div>
18457 Expansion of multi-line templates in attribute values (T8255)
18459 <div style="background: {{identity|#00FF00}}">-</div>
18461 <div style="background: #00FF00">-</div>
18466 Expansion of multi-line templates in attribute values (T8255 sanity check)
18468 <div style="background:
18471 <div style="background: #00FF00">-</div>
18474 <div style="background:
18479 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18481 <div style="background: #00FF00">-</div>
18483 <div style="background: #00FF00">-</div>
18488 Tags which are hidden from tidiers cannot pass through the Sanitizer
18490 <mw:toc><script>alert();</script></mw:toc>
18492 <p><mw:toc><script>alert();</script></mw:toc>
18497 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18501 Parser hook: empty input
18512 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18515 ## Don't expect parsoid to rt this form.
18517 Parser hook: empty input using terminated empty elements
18519 parsoid=wt2html,html2html
18530 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
18534 Parser hook: empty input using terminated empty elements (space before)
18545 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{}}' data-parsoid='{}' about="#mwt2"></pre>
18549 Parser hook: basic input
18560 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18563 ## Don't expect parsoid to rt this form.
18565 Parser hook: case insensitive
18567 parsoid=wt2html,html2html
18578 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18581 ## Don't expect parsoid to rt this form.
18583 Parser hook: case insensitive, redux
18585 parsoid=wt2html,html2html
18596 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18600 Parser hook: nested tags
18604 <tag><tag></tag></tag>
18616 </tag></pre><p></tag>
18619 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}'></pre><p></tag></p>
18623 Parser hook: basic arguments
18625 <tag width="200" height="100" depth="50" square=""></tag>
18638 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18641 ## Don't expect parsoid to rt this form.
18643 Parser hook: basic arguments, variations
18645 parsoid=wt2html,html2html
18647 <tag width=200 height = "100" depth = '50' square></tag>
18660 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18664 Parser hook: argument containing a forward slash (T7344)
18666 <tag filename="/tmp/bla"></tag>
18671 'filename' => '/tmp/bla',
18676 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18679 ## Don't expect parsoid to rt this form.
18681 Parser hook: empty input using terminated empty elements (T4374)
18683 parsoid=wt2html,html2html
18695 <pre typeof="mw:Extension/tag" about="#mwt2" data-mw='{"name":"tag","attrs":{"foo":"bar"}}'></pre><p>text</p>
18698 ## </tag> should be output literally since there is no matching tag that begins it
18699 ## Don't expect parsoid to rt this form.
18701 Parser hook: basic arguments using terminated empty elements (T4374)
18705 <tag width=200 height = "100" depth = '50' square/>
18722 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""}}' about="#mwt2"></pre><p>other stuff
18726 ## Don't expect parsoid to rt this form.
18728 Parser hook: Don't allow unclosed extension tags
18734 this is a '''test'''
18736 <p>test <tag>123
18737 </p><p>this is a <b>test</b>
18740 <p>test <tag>123</p>
18742 <p>this is a <b>test</b></p>
18746 Parser hook: horizontal rule inside extension tag that outputs <pre>
18767 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18771 Parser hook: static parser hook not inside a comment
18773 <statictag>hello, world</statictag>
18775 <statictag action="flush" />
18781 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18782 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about="#mwt4">hello, world</p>
18786 Parser hook: static parser hook inside a comment
18788 <!-- <statictag>hello, world</statictag> -->
18789 <statictag action="flush" />
18794 <!-- <statictag>hello, world</statictag> -->
18795 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"}}' data-parsoid='{}' about='#mwt2'></p>
18798 # Nested template calls; this case was broken by Parser.php rev 1.506,
18802 Template:One-parameter
18804 (My parameter is: {{{1}}})
18808 Template:Map-one-parameter
18810 {{{{{1}}}|{{{2}}}}}
18814 Nested template calls
18816 {{Map-one-parameter|One-parameter|param}}
18818 <p>(My parameter is: param)
18828 Sanitizer: Closing of open tags
18830 <s></s><table></table>
18832 <p><s></s></p><table></table>
18834 <p><s data-parsoid='{"stx":"html"}'></s></p><table data-parsoid='{"stx":"html"}'></table>
18838 Sanitizer: Closing of open but not closed tags
18847 Sanitizer: Closing of closed but not open tags
18853 <p class="mw-empty-elt">
18858 Sanitizer: Closing of closed but not open table tags
18862 Table not started</td></tr></table>
18864 <p>Table not started
18869 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18871 wgFragmentMode=[ 'html5', 'legacy' ]
18873 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18875 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18878 <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>
18882 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18884 wgFragmentMode=[ 'legacy' ]
18886 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18888 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18892 # In HTML5, the restrictions are that id must contain at least one character,
18893 # and must not contain any space characters.
18895 Sanitizer: Validating the contents of the id attribute (T6515)
18899 <br id="" /><br id="a space" />
18904 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18906 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18910 <br id="foo" /><br id="foo" />
18912 Something need to be done. foo-2 ?
18916 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18919 <meta itemprop="hello" content="world">
18920 <meta http-equiv="refresh" content="5">
18921 <meta itemprop="hello" http-equiv="refresh" content="5">
18922 <link itemprop="hello" href="{{SERVER}}">
18923 <link rel="stylesheet" href="{{SERVER}}">
18924 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18928 <p> <meta itemprop="hello" content="world" />
18929 <meta http-equiv="refresh" content="5">
18930 <meta itemprop="hello" content="5" />
18931 <link itemprop="hello" href="http://example.org" />
18932 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18933 <link itemprop="hello" href="http://example.org" />
18940 Sanitizer: Strip comments from CSS attributes
18942 parsoid=wt2html,wt2wt
18944 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18946 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18949 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18953 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18955 [[meatball:Soft"Security]]
18957 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18960 <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>
18964 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18966 [[meatball:Foo<Bar]]
18967 [[meatball:Foo>Bar]]
18968 [[meatball:Foo<bar]]
18969 [[meatball:Foo>bar]]
18971 <p>[[meatball:Foo<Bar]]
18972 [[meatball:Foo>Bar]]
18973 [[meatball:Foo<bar]]
18974 [[meatball:Foo>bar]]
18977 <p>[[meatball:Foo<Bar]]
18978 [[meatball:Foo>Bar]]
18979 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18980 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18984 Language converter: output gets cut off unexpectedly (T7757)
18988 this bit is safe: }-
18990 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18992 then we get cut off here: }-
18994 all additional text is vanished
18996 <p>this bit is safe: }-
18997 </p><p>but if we add a conversion instance: xxx
18998 </p><p>then we get cut off here: }-
18999 </p><p>all additional text is vanished
19002 <p>this bit is safe: }-</p>
19003 <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>
19004 <p>then we get cut off here: }-</p>
19005 <p>all additional text is vanished</p>
19009 Language converter glossary rules inside attributes (T119158)
19011 language=sr variant=sr-el
19013 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
19015 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
19018 </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>
19021 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
19023 <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>
19027 Self closed html pairs (T7487)
19029 <center><font id="bug" />Centered text</center>
19030 <div><font id="bug2" />In div text</div>
19032 <center><font id="bug"></font>Centered text</center>
19033 <div><font id="bug2"></font>In div text</div>
19037 Punctuation: nbsp before exclamation
19041 <p>C'est grave !
19046 Punctuation: CSS !important (T13874)
19048 <div style="width:50% !important">important</div>
19050 <div style="width:50% !important">important</div>
19055 Punctuation: CSS ! important (T13874; with space after)
19057 <div style="width:50% ! important">important</div>
19059 <div style="width:50% ! important">important</div>
19064 HTML bullet list, closed tags (T7497)
19077 <ul data-parsoid='{"stx":"html"}'>
19078 <li data-parsoid='{"stx":"html"}'>One</li>
19079 <li data-parsoid='{"stx":"html"}'>Two</li>
19085 HTML bullet list, unclosed tags (T7497)
19097 <ul data-parsoid='{"stx":"html"}'>
19098 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19099 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19105 HTML ordered list, closed tags (T7497)
19118 <ol data-parsoid='{"stx":"html"}'>
19119 <li data-parsoid='{"stx":"html"}'>One</li>
19120 <li data-parsoid='{"stx":"html"}'>Two</li>
19126 HTML ordered list, unclosed tags (T7497)
19139 <ol data-parsoid='{"stx":"html"}'>
19140 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
19141 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
19147 HTML nested bullet list, closed tags (T7497)
19170 <ul data-parsoid='{"stx":"html"}'>
19171 <li data-parsoid='{"stx":"html"}'>One</li>
19172 <li data-parsoid='{"stx":"html"}'>Two:
19173 <ul data-parsoid='{"stx":"html"}'>
19174 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
19175 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
19182 HTML nested bullet list, open tags (T7497)
19204 HTML nested ordered list, closed tags (T7497)
19229 HTML nested ordered list, open tags (T7497)
19266 HTML ordered list item with parameters oddity
19268 <ol><li id="fragment">One</li>
19271 <ol><li id="fragment">One</li>
19276 # parsoid doesn't explicitly mark autonumbered links, see T55505
19278 T7918: autonumbering
19280 [http://first/] [http://second] [ftp://ftp]
19284 [mailto:enclosed@mail.tld With target]
19286 [mailto:enclosed@mail.tld]
19288 mailto:inline@mail.tld
19290 <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>
19291 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19292 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19293 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19294 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19297 <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>
19298 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19299 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19300 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19301 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19306 # Security and HTML correctness
19307 # From Nick Jenkins' fuzz testing
19311 Fuzz testing: Parser13
19325 # Note that Parsoid output differs from the PHP parser here: the PHP
19326 # parser breaks the URL for the magic word, while in Parsoid the URL
19327 # production takes precedence.
19329 Fuzz testing: Parser14
19334 <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>
19335 http://<div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
19337 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19343 <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>
19344 http://</p><div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
19346 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19350 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19351 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19355 Fuzz testing: Parser14-table
19357 parsoid=wt2html,html2html
19362 <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>
19363 <table style="__TOC__">
19368 <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>
19369 <table style="__TOC__">
19376 <table style="__TOC__"></table>
19379 # Known to produce bogus xml (extra </td>)
19380 # Don't add the html/php section since it generates broken HTML
19382 Fuzz testing: Parser16
19399 Fuzz testing: Parser21
19402 !irc://{{ftp://a" onmouseover="alert('hello world');"
19407 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19417 Fuzz testing: Parser22
19419 http://===r:::https://b
19423 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19431 ## Remex doesn't account for fostered content.
19432 ## Known to produce bad XML for now
19434 Fuzz testing: Parser24
19441 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19442 <br style="onmouseover='alert(document.cookie);' " />
19444 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19449 <u class="|">}}}} >
19450 <br style="onmouseover='alert(document.cookie);'" />
19452 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19462 <u class="|">}}}} >
19463 <br style="onmouseover='alert(document.cookie);'" />
19465 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19466 </u><table><tbody><tr>
19470 </tbody></table><p><u class="|">
19473 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>
19475 <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>"}'/>}}}} >
19476 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/>
19478 MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p>
19479 <table data-parsoid='{"autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedStart":true}'><td></td></tr></tbody></table>
19482 # Note: the current result listed for this is not what the original one was,
19483 # but the original bug was JavaScript injection, which is fixed in any case.
19484 # It's not clear that the original result listed was any more correct than the
19485 # current one. Original result:
19488 # <li class="||">
19489 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19491 Fuzz testing: Parser25 (T8055)
19497 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19499 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19502 <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"]}'>
19503 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19507 Fuzz testing: URL adjacent extension (with space, clean)
19509 http://example.com <nowiki>junk</nowiki>
19511 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19514 <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>
19518 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19520 http://example.com<nowiki>junk</nowiki>
19522 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19525 <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>
19529 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19531 http://example.com<pre>junk</pre>
19533 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19536 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19538 <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>
19542 Fuzz testing: image with bogus manual thumbnail
19544 [[Image:foobar.jpg|thumbnail= ]]
19546 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19549 <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>
19552 # Parsoid will emit the newline literally in wt2wt; see next test case.
19554 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19558 <pre dir=" "></pre>
19560 <pre dir=" "></pre>
19563 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19564 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19568 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19572 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19573 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19583 Templates in extension attributes are not expanded
19585 <pre dir="{{echo|ltr}}"></pre>
19587 <pre dir="{{echo|ltr}}"></pre>
19590 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19594 Parsing optional HTML elements (T8171)
19599 <td> Some tabular data</td>
19600 <td> More tabular data ...
19601 <td> And yet som tabular data</td>
19607 <td> Some tabular data</td>
19608 <td> More tabular data ...
19609 </td><td> And yet som tabular data</td>
19616 Correct handling of <td>, <tr> (T8171)
19621 <td> Some tabular data</td>
19622 <td> More tabular data ...</td>
19623 <td> And yet som tabular data</td>
19629 <td> Some tabular data</td>
19630 <td> More tabular data ...</td>
19631 <td> And yet som tabular data</td>
19639 Parsing crashing regression (fr:JavaScript)
19643 <p></body></x>
19648 Inline wiki vs wiki block nesting
19654 <p><b>Bold paragraph</b>
19655 </p><p>New wiki paragraph
19659 # FIXME: The current php output is documented
19660 # and desired output is the parsoid target.
19662 Inline HTML vs wiki block nesting
19668 <p><b>Bold paragraph
19669 </p><p>New wiki paragraph</b>
19672 <p><b>Bold paragraph
19673 </b></p><p><b>New wiki paragraph
19676 <p><b>Bold paragraph</b>
19677 </p><p>New wiki paragraph
19681 # Original result was this:
19682 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19684 # While that might be marginally more intuitive, maybe, the six-apostrophe
19685 # construct is clearly pathological and the result stated here (which is what
19686 # the parser actually does) is about as reasonable as anything.
19688 Mixing markup for italics and bold
19691 '''bold''''''bold''bolditalics'''''
19693 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19701 Article for special page transclusion test
19705 Special page transclusion
19708 {{Special:Prefixindex/Xyzzyx}}
19710 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19716 Special page transclusion twice (T7021)
19719 {{Special:Prefixindex/Xyzzyx}}
19720 {{Special:Prefixindex/Xyzzyx}}
19722 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19724 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19730 Transclusion of default MediaWiki message
19732 {{MediaWiki:Mainpage}}
19739 Transclusion of nonexistent MediaWiki message
19741 {{MediaWiki:Mainpagexxx}}
19743 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19748 Transclusion of MediaWiki message with underscore
19750 {{MediaWiki:history_short}}
19757 Transclusion of MediaWiki message with space
19759 {{MediaWiki:history short}}
19766 Invalid header with following text
19776 Section extraction test (section 0)
19796 Section extraction test (section 1)
19818 Section extraction test (section 2)
19839 Section extraction test (section 3)
19859 Section extraction test (section 4)
19883 Section extraction test (section 5)
19903 Section extraction test (section 6)
19924 Section extraction test (section 7)
19944 Section extraction test (section 8)
19964 Section extraction test (section 9)
19985 Section extraction test (section 10)
20005 Section extraction test (nonexistent section 11)
20024 Section extraction test with bogus heading (section 1)
20029 ==bogus== not a legal section
20033 ==bogus== not a legal section
20037 Section extraction test with bogus heading (section 2)
20042 ==bogus== not a legal section
20049 Section extraction test with comment after heading (section 1)
20061 Section extraction test with comment after heading (section 2)
20073 Section extraction test with bogus <nowiki> heading (section 1)
20078 ==bogus== <nowiki>not a legal section</nowiki>
20082 ==bogus== <nowiki>not a legal section</nowiki>
20086 Section extraction test with bogus <nowiki> heading (section 2)
20091 ==bogus== <nowiki>not a legal section</nowiki>
20097 # Formerly testing for T4587, now resolved by the use of unmarked sections
20098 # instead of respecting commented sections
20100 Section extraction prefixed by comment (section 1)
20111 Section extraction prefixed by comment (section 2)
20121 # Formerly testing for T4607, now resolved by the use of unmarked sections
20122 # instead of respecting HTML-style headings
20124 Section extraction, mixed wiki and html (section 1)
20140 Section extraction, mixed wiki and html (section 2)
20156 # Formerly testing for T5342
20158 Section extraction, heading surrounded by <noinclude>
20162 <noinclude>==unmarked==</noinclude>
20168 # Test behavior of T21910
20170 Sectiion with all-equals
20175 The line above must have a trailing space
20178 But just in case it doesn't...
20182 But just in case it doesn't...
20186 Section replacement test (section 0)
20217 Section replacement test (section 1)
20246 Section replacement test (section 2)
20276 Section replacement test (section 3)
20307 Section replacement test (section 4)
20334 Section replacement test (section 5)
20365 Section replacement test (section 6)
20395 Section replacement test (section 7)
20426 Section replacement test (section 8)
20457 Section replacement test (section 9)
20486 Section replacement test (section 10)
20516 Section replacement test with initial whitespace (T15728)
20520 Preformatted initial line
20524 Preformatted initial line
20531 Section extraction, heading followed by pre with 20 spaces (T8398)
20543 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20556 Section extraction, <pre> around bogus header (T12309)
20573 Section replacement, <pre> around bogus header (T12309)
20594 Handling of 
 in URLs
20598 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20601 <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>
20605 Handling of %0A in URLs
20609 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20612 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20615 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20617 5 quotes, code coverage +1 line
20624 <p><b><i></i></b></p>
20627 # same html as previous, but wikitext adjusted to match parsoid html2wt
20628 # note that wt2html and html2html will put the <i> before the <b>
20630 5 quotes, code coverage +1 line w/ nowiki (1)
20632 parsoid=wt2wt,html2wt
20634 '''''<nowiki/>'''''
20639 <p><b><i></i></b></p>
20642 # same as previous, just swapping the <i> and <b>
20644 5 quotes, code coverage +1 line w/ nowiki (2)
20646 '''''<nowiki/>'''''
20651 <p><i><b></b></i></p>
20655 Special:Search page linking.
20659 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20664 {{!}} is a magic word
20666 {{!}} is a magic word there and {{!}} is still a magic word here
20667 | is not a magic word here but {{!}} is still a magic word here
20669 <p>| is a magic word there and | is still a magic word here
20670 | is not a magic word here but | is still a magic word here
20673 <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
20674 | 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>
20680 title=[[Parser test]]
20694 *{{SUBJECTPAGENAME}}
20695 *{{SUBJECTPAGENAMEE}}
20698 *{{NAMESPACENUMBER}}
20703 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20705 <ul><li>Parser test</li>
20706 <li>Parser_test</li>
20707 <li>Parser test</li>
20708 <li>Parser_test</li>
20709 <li>Parser test</li>
20710 <li>Parser_test</li>
20711 <li>Parser test</li>
20712 <li>Parser_test</li>
20713 <li>Parser test</li>
20714 <li>Parser_test</li>
20715 <li>Talk:Parser test</li>
20716 <li>Talk:Parser_test</li>
20717 <li>Parser test</li>
20718 <li>Parser_test</li>
20726 <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>
20729 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20732 Gallery with valid attributes
20734 <gallery type="123" summary="345">
20735 File:File:Foobar.jpg
20738 <ul class="gallery mw-gallery-traditional" type="123">
20739 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20740 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20741 <div class="gallerytext">
20747 <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"}}'>
20748 <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>
20752 ## Parsoid thinks the "centre" here is a property, not a caption.
20757 "modes": ["wt2html"],
20758 "nativeGallery": true
20766 image4 |300px| centre
20767 image5.svg| http://///////
20772 <ul class="gallery mw-gallery-traditional">
20773 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20774 <div class="thumb" style="height: 150px;">Image1.png</div>
20775 <div class="gallerytext">
20778 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20779 <div class="thumb" style="height: 150px;">Image2.gif</div>
20780 <div class="gallerytext">
20783 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20784 <div class="thumb" style="height: 150px;">Image3</div>
20785 <div class="gallerytext">
20788 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20789 <div class="thumb" style="height: 150px;">Image4</div>
20790 <div class="gallerytext">
20795 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20796 <div class="thumb" style="height: 150px;">Image5.svg</div>
20797 <div class="gallerytext">
20798 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20802 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20803 <div class="thumb" style="height: 150px;">* image6</div>
20804 <div class="gallerytext">
20810 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20811 <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>
20812 <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>
20813 <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>
20814 <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>
20815 <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>
20816 <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>
20821 Gallery (with options, html)
20824 "modes": ["wt2html", "html2html"],
20825 "nativeGallery": true
20828 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20829 File:Nonexistent.jpg|caption
20830 File:Nonexistent.jpg
20831 image:foobar.jpg|some '''caption''' [[Main Page]]
20833 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20836 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20837 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20838 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20839 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20840 <div class="gallerytext">
20845 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20846 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20847 <div class="gallerytext">
20850 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20851 <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>
20852 <div class="gallerytext">
20853 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20857 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20858 <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>
20859 <div class="gallerytext">
20862 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20863 <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>
20864 <div class="gallerytext">
20872 <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":{}}'>
20873 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20874 <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>
20875 <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>
20876 <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>
20877 <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>
20878 <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>
20883 Gallery (with options, extsrc)
20886 "nativeGallery": false
20889 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20890 File:Nonexistent.jpg|caption
20891 File:Nonexistent.jpg
20892 image:foobar.jpg|some '''caption''' [[Main Page]]
20894 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20897 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20898 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20899 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20900 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20901 <div class="gallerytext">
20906 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20907 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20908 <div class="gallerytext">
20911 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20912 <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>
20913 <div class="gallerytext">
20914 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20918 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20919 <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>
20920 <div class="gallerytext">
20923 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20924 <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>
20925 <div class="gallerytext">
20933 <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"}}'>
20934 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20935 <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>
20936 <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>
20937 <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>
20938 <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>
20939 <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>
20944 Gallery (without px units)
20946 <gallery widths="70" heights="40">
20950 <ul class="gallery mw-gallery-traditional">
20951 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20952 <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>
20953 <div class="gallerytext">
20959 <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"}}'>
20960 <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>
20965 Gallery (with invalid units)
20967 <gallery widths="70em" heights="40em">
20971 <ul class="gallery mw-gallery-traditional">
20972 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20973 <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>
20974 <div class="gallerytext">
20980 <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"}}'>
20981 <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>
20986 Gallery with link that has fragment
20989 "modes": ["wt2html", "html2html"],
20990 "nativeGallery": true
20994 image:foobar.jpg|link=Main_Page
20995 image:foobar.jpg|link=Main_Page#section
20996 image:foobar.jpg|link=Main Page#section|caption
20999 <ul class="gallery mw-gallery-traditional">
21000 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21001 <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>
21002 <div class="gallerytext">
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/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>
21007 <div class="gallerytext">
21010 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21011 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/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>
21012 <div class="gallerytext">
21020 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21021 <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>
21022 <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>
21023 <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>
21027 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
21029 Gallery with template inside caption
21032 "nativeGallery": true
21035 <gallery caption="{{echo|hi}}">
21036 File:Foobar.jpg|{{echo|ho}}
21039 <ul class="gallery mw-gallery-traditional">
21040 <li class='gallerycaption'>{{echo|hi}}</li>
21041 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21042 <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>
21043 <div class="gallerytext">
21051 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21052 <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>
21053 <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>
21058 Gallery with wikitext inside caption
21061 "nativeGallery": true
21065 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
21066 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
21069 <ul class="gallery mw-gallery-traditional">
21070 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21071 <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>
21072 <div class="gallerytext">
21073 <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>
21077 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21078 <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>
21079 <div class="gallerytext">
21080 <p>This is a test template
21087 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21088 <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>
21089 <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>
21094 Gallery (with showfilename option)
21097 "nativeGallery": true
21100 <gallery showfilename="">
21101 File:Nonexistent.jpg|caption
21102 File:Nonexistent.jpg
21103 File:Foobar.jpg|some '''caption''' [[Main Page]]
21107 <ul class="gallery mw-gallery-traditional">
21108 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21109 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21110 <div class="gallerytext">
21111 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21116 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21117 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21118 <div class="gallerytext">
21119 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
21123 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21124 <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>
21125 <div class="gallerytext">
21126 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21127 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21131 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21132 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21133 <div class="gallerytext">
21134 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
21141 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
21142 <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>
21143 <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>
21144 <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>
21145 <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>
21149 ## Should Parsoid be preserving these variations? See T151367
21151 Gallery (with namespace-less filenames)
21154 "modes": ["wt2html", "html2html"],
21155 "nativeGallery": true
21159 File:Nonexistent.jpg
21165 <ul class="gallery mw-gallery-traditional">
21166 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21167 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21168 <div class="gallerytext">
21171 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21172 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
21173 <div class="gallerytext">
21176 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21177 <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>
21178 <div class="gallerytext">
21181 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21182 <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>
21183 <div class="gallerytext">
21189 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21190 <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>
21191 <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>
21192 <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>
21193 <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>
21198 Gallery override link with wikilink (T36852)
21201 "nativeGallery": true
21205 File:Foobar.jpg|alt=galleryalt|link=Wikilink
21208 <ul class="gallery mw-gallery-traditional">
21209 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21210 <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>
21211 <div class="gallerytext">
21217 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21218 <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>
21223 Gallery override link with absolute external link (T36852)
21226 "nativeGallery": true
21230 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
21233 <ul class="gallery mw-gallery-traditional">
21234 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21235 <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>
21236 <div class="gallerytext">
21242 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21243 <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>
21248 Gallery override link with absolute external link with LanguageConverter
21253 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21256 <ul class="gallery mw-gallery-traditional">
21257 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21258 <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>
21259 <div class="gallerytext">
21267 <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"}}'>
21268 <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>
21273 Gallery override link with malicious javascript (T36852)
21276 "modes": ["wt2html", "html2html"],
21277 "nativeGallery": true
21281 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21284 <ul class="gallery mw-gallery-traditional">
21285 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21286 <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>
21287 <div class="gallerytext">
21293 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21294 <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>
21298 # Note that parsoid uses the invalid link as a caption, PHP does not.
21300 Gallery with invalid title as link (T45964)
21303 "modes": ["wt2html", "html2html"],
21304 "nativeGallery": true
21308 File:Foobar.jpg|link=<
21311 <ul class="gallery mw-gallery-traditional">
21312 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21313 <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>
21314 <div class="gallerytext">
21320 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21321 <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>
21326 Serialize gallery without attrs in data-mw
21329 "modes": ["html2wt"],
21330 "nativeGallery": true
21333 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21334 <li class="gallerycaption">123</li>
21335 <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>
21338 <gallery caption="123">
21344 Gallery with class and style attributes
21347 "nativeGallery": true
21350 <gallery class="center" style="text-align: center;">
21354 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21355 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21356 <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>
21357 <div class="gallerytext">
21363 <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":{}}'>
21364 <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>
21369 Gallery in slideshow mode
21372 "nativeGallery": true
21375 <gallery mode="slideshow" showthumbnails="">
21379 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21380 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21381 <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>
21382 <div class="gallerytext">
21388 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21389 <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>
21394 Serialize gallery image captions on a line
21397 "modes": ["html2wt"],
21398 "nativeGallery": true
21401 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21402 <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>
21403 <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>
21407 File:Foobar.jpg| hi ho
21408 File:Foobar.jpg|hi<br />ho
21413 HTML Hex character encoding (spells the word "JavaScript")
21415 parsoid=wt2html,wt2wt,html2html
21417 JavaScript
21419 <p>JavaScript
21422 <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>
21426 HTML Hex character encoding bogus encoding (T28437 regression check)
21430 <p>&#xsee;&#XSEE;
21435 HTML Hex character encoding mixed case
21437 parsoid=wt2html,wt2wt,html2html
21444 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21447 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21448 # Note that U+000C (form feed) is not a valid XML character, so
21449 # it is banned even though allowed in HTML5.
21451 Illegal character references (T106578)
21456 ; Control (low): 
21457 ; Control (high):  Ÿ
21458 ; Surrogate: ��
21459 ; This is an okay astral character: 💩
21467 <dt>Control (low)</dt>
21469 <dt>Control (high)</dt>
21470 <dd>&#x7F; &#x9F;</dd>
21472 <dd>&#xD83D;&#xDCA9;</dd>
21473 <dt>This is an okay astral character</dt>
21474 <dd>💩</dd></dl>
21478 __FORCETOC__ override
21490 ISBN 978-0-1234-56 789
21492 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21495 <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>
21499 ISBN followed by 5 spaces
21510 ISBN ISBN 1234567890
21512 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21515 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21518 # Uppercase X and lowercase x as well
21529 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21530 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21531 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21532 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21533 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21534 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21537 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21538 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21539 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21540 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21541 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21542 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21546 ISBN with empty prefix (parsoid test)
21550 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21553 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21557 T24905: <abbr> followed by ISBN followed by </a>
21559 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21561 <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>
21564 <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>
21572 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21575 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21579 Double RFC with a wiki link
21583 <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>
21586 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21594 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21597 <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>
21601 Centre-aligned image
21603 [[Image:foobar.jpg|centre]]
21605 <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>
21608 <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>
21614 [[Image:foobar.jpg|none]]
21616 <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>
21619 <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>
21623 Width + Height sized image (using px) (height is ignored)
21625 [[Image:foobar.jpg|640x480px]]
21627 <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>
21630 <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>
21634 Width-sized image (using px, no following whitespace)
21636 [[Image:foobar.jpg|640px]]
21638 <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>
21641 <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>
21645 Width-sized image (using px, with following whitespace - test regression from r39467)
21647 [[Image:foobar.jpg|640px ]]
21649 <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>
21652 <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>
21656 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21658 [[Image:foobar.jpg| 640px]]
21660 <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>
21663 <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>
21667 Image with page parameter
21671 [[File:LoremIpsum.djvu|page=2]]
21673 <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>
21676 <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>
21680 Another italics / bold test
21688 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21694 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21697 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21701 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21703 Images with the "|" character in the comment
21705 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21707 <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>
21710 <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>
21714 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21716 <html><script>alert(1);</script></html>
21718 <p><html><script>alert(1);</script></html>
21723 HTML with raw HTML ($wgRawHtml==true)
21727 <html><script>alert(1);</script></html>
21729 <p><script>alert(1);</script>
21734 Parents of subpages, one level up
21736 subpage title=[[Subpage test/L1/L2/L3]]
21740 <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>
21746 Parents of subpages, one level up, not named
21748 subpage title=[[Subpage test/L1/L2/L3]]
21752 <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>
21759 Parents of subpages, two levels up
21761 subpage title=[[Subpage test/L1/L2/L3]]
21767 <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
21768 </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>
21773 Parents of subpages, two levels up, without trailing slash or name.
21775 subpage title=[[Subpage test/L1/L2/L3]]
21784 Parents of subpages, two levels up, with lots of extra trailing slashes.
21786 subpage title=[[Subpage test/L1/L2/L3]]
21790 <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>
21795 Subpage test/L1/L2/L3Sibling
21801 Transclusion of a sibling page (one level up)
21803 subpage title=[[Subpage test/L1/L2/L3]]
21812 Transclusion of a child page
21814 subpage title=[[Subpage test/L1/L2]]
21822 # This is wt2html only in Parsoid because we add <nowiki>
21823 # because of {{..}} and we don't expect to fix that to
21824 # eliminate the nowikis selective for {{..}} markup.
21826 Non-transclusion because of too many up levels
21828 subpage title=[[Subpage test/L1/L2/L3]]
21831 {{../../../../More than parent}}
21833 <p>{{../../../../More than parent}}
21836 <p>{{../../../../More than parent}}</p>
21840 Definition list code coverage
21854 <dl><dt>title </dt><dd>def</dd>
21855 <dt>title </dt><dd>def</dd>
21856 <dt>title</dt><dd>def</dd></dl>
21860 Don't fall for the self-closing div
21862 <div>hello world</div/>
21864 <div>hello world</div>
21873 <p>[[:Template:Msg]]
21882 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21886 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21888 Always escape literal '>' in output, not just after '<'
21902 <p>This is a test template
21903 This is a test template
21915 Inclusion of !userCanEdit() content
21919 <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>
21925 Out-of-order TOC heading levels
21934 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
21936 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21938 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21939 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21942 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21944 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21945 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21951 <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>
21952 <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>
21953 <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>
21954 <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>
21955 <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>
21956 <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>
21962 ISBN with a dummy number
21972 ISBN with space-delimited number
21976 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21979 <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>
21984 ISBN with multiple spaces, no number
22003 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
22004 </p><p>ISBN 12345678901
22007 <p>ISBN 123456789</p>
22009 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
22011 <p>ISBN 12345678901</p>
22016 ISBN with trailing year (T9110)
22018 ISBN 1-234-56789-0 - 2006
22020 ISBN 1 234 56789 0 - 2006
22022 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
22023 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
22026 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
22028 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
22035 wgFragmentMode=[ 'html5', 'legacy' ]
22037 {{anchorencode:foo bar©#%n}}
22042 <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>
22046 anchorencode (legacy)
22048 wgFragmentMode=[ 'legacy' ]
22050 {{anchorencode:foo bar©#%n}}
22052 <p>foo_bar.C2.A9.23.25n
22057 anchorencode trims spaces
22059 wgFragmentMode=[ 'html5', 'legacy' ]
22061 {{anchorencode: __pretty__please__}}
22066 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
22070 anchorencode deals with links
22072 wgFragmentMode=[ 'html5', 'legacy' ]
22074 {{anchorencode: [[hello|world]] [[hi]]}}
22079 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
22083 anchorencode deals with templates
22085 wgFragmentMode=[ 'html5', 'legacy' ]
22087 {{anchorencode: {{Foo}} x}}
22092 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
22096 anchorencode encodes like the TOC generator: (T20431)
22098 wgFragmentMode=[ 'html5', 'legacy' ]
22100 ===_ +:.3A%3A _ &&]] x===
22101 {{anchorencode: _ +:.3A%3A _ &&]] x}}
22104 <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>
22105 <p>+:.3A%3A_&&]]_x
22108 <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>
22109 <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>
22110 <meta property="mw:PageProp/noeditsection"/>
22114 anchorencode encodes like the TOC generator: (T20431) (legacy)
22116 wgFragmentMode=[ 'legacy' ]
22118 ===_ +:.3A%3A&&]]===
22119 {{anchorencode: _ +:.3A%3A&&]] }}
22122 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
22123 <p>.2B:.3A.253A.26.26.5D.5D
22128 T8200: blockquotes and paragraph formatting
22149 T10293: Use of center tag ruins paragraph formatting
22170 Parsing of overlapping (improperly nested) inline html tags
22172 <span><s>x</span></s>
22174 <p><span><s>x</span></s></span>
22177 <p><span><s>x</s></span>
22182 ### Language variants related tests
22185 # Parsoid does not mark self-links.
22186 # Parsoid does not convert links; PHP will do any necessary redirects.
22189 Self-link in language variants
22191 title=[[Dunav]] language=sr
22193 Both [[Dunav]] and [[Дунав]] are names for this river.
22195 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
22198 <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>
22208 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
22210 title=[[Duna]] language=sr
22212 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
22214 <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.
22217 <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>
22221 Link to a section of a variant of this title shouldn't be parsed as self-link
22223 title=[[Duna]] language=sr
22225 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
22227 <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.
22230 <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>
22234 Link to pages in language variants
22238 Main Page can be written as [[Маин Паге]]
22240 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
22243 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
22248 Multiple links to pages in language variants
22252 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
22254 <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>.
22257 <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>
22262 Simple template in language variants
22268 <p>This is a test template
22274 Template with explicit namespace in language variants
22280 <p>This is a test template
22286 Basic test for template parameter in language variants
22290 {{парамтест|param=foo}}
22292 <p>This is a test template with parameter foo
22297 Simple category in language variants
22301 [[Category:МедиаWики Усер'с Гуиде]]
22303 cat=МедиаWики_Усер'с_Гуиде sort=
22305 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22320 ## We used to, but no longer wt2wt this test since the default serializer
22321 ## will normalize all categories to serialize on their own line.
22322 ## This wikitext usage is going to be fairly uncommon in production and
22323 ## selser will take care of preserving formatting in those scenarios.
22325 Don't convert blue categorylinks to another variant (T35210)
22331 [[A]][[Category:分类]]
22335 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22336 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22340 Stripping -{}- tags (language variants)
22344 Latin proverb: -{Ne nuntium necare}-
22346 <p>Latin proverb: Ne nuntium necare
22349 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22354 Prevent conversion with -{}- tags (language variants)
22356 language=sr variant=sr-ec
22358 Latinski: -{Ne nuntium necare}-
22360 <p>Латински: Ne nuntium necare
22363 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22368 Prevent conversion of text with -{}- tags (language variants)
22370 language=sr variant=sr-ec
22372 Latinski: -{Ne nuntium necare}-
22374 <p>Латински: Ne nuntium necare
22377 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22382 Prevent conversion of links with -{}- tags (language variants)
22384 language=sr variant=sr-ec
22388 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22391 <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>
22396 -{}- tags within headlines (within html for parserConvert())
22398 wgFragmentMode=[ 'html5', 'legacy' ]
22400 language=sr variant=sr-ec
22404 Note that even an unprotected headline ID is not affected by language
22409 <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>
22410 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22413 <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>
22416 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22418 <p>Note that even an unprotected headline ID is not affected by language
22421 <h2 id="Latinski">Latinski</h2>
22425 Explicit definition of language variant alternatives
22427 language=zh variant=zh-tw
22429 -{zh:China;zh-tw:Taiwan}-, not China
22431 <p>Taiwan, not China
22434 <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>
22438 Explicit definition of language variant alternatives (BCP 47 codes)
22440 language=zh variant=zh-tw
22442 -{zh:China;zh-Hant-TW:Taiwan}-, not China
22444 <p>Taiwan, not China
22447 <p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-Hant-TW","t":"Taiwan"}]}'></span>, not China</p>
22451 Filter syntax for language variants
22453 language=zh variant=zh-tw
22455 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22457 <p>fooblog, WEBJOURNAL, WEBLOGquux
22460 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22463 # Note that Parsoid post-processing for language variants needs to
22464 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22466 Conversion around HTML tags
22468 language=sr variant=sr-ec
22470 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22471 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22474 <span title="ЛаCтин">ски</span>
22477 <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"}]}'/>
22478 <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>
22482 Explicit session-wise two-way language variant mapping (A flag and - flag)
22484 language=zh variant=zh-tw
22486 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22488 Taiwan is not China.
22490 But -{A|zh:China; zh-tw:Taiwan}- is China,
22492 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22494 and -{China}- is China.
22496 <p>This is Taiwan, but we'll forget that now.
22497 </p><p>Taiwan is not China.
22498 </p><p>But Taiwan is Taiwan,
22499 </p><p>(This should be stripped!)
22500 </p><p>and China is China.
22503 <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>
22504 <p>Taiwan is not China.</p>
22505 <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>
22506 <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>
22507 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22511 Explicit session-wise one-way language variant mapping (A flag and - flag)
22513 language=zh variant=zh-tw
22515 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22517 COUNTRY is China or Taiwan.
22519 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22521 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22523 and -{COUNTRY}- is COUNTRY.
22525 <p>This is Taiwan, but we'll forget that now.
22526 </p><p>COUNTRY is China or Taiwan.
22527 </p><p>But Taiwan is Taiwan,
22528 </p><p>(This should be stripped!)
22529 </p><p>and COUNTRY is COUNTRY.
22532 <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>
22533 <p>COUNTRY is China or Taiwan.</p>
22534 <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>
22535 <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>
22536 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22540 Explicit session-wise two-way language variant mapping (H flag for hide)
22542 language=zh variant=zh-tw
22544 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22548 <p>(This should be stripped!)
22549 </p><p>Taiwan is Taiwan.
22552 <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>
22553 <p>Taiwan is China.</p>
22557 Explicit session-wise one-way language variant mapping (H flag for hide)
22559 language=zh variant=zh-tw
22561 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22563 COUNTRY is Taiwan or China.
22565 <p>(This should be stripped!)
22566 </p><p>Taiwan is Taiwan or China.
22569 <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>
22570 <p>COUNTRY is Taiwan or China.</p>
22573 ## Note that parsoid test runner does not support 'showtitle' option.
22575 Adding explicit conversion rule for title (T flag)
22577 language=zh variant=zh-tw showtitle
22579 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22584 <p>Should be stripped!
22585 </p><p>Taiwan is China.
22588 <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>
22589 <p>Taiwan is China.</p>
22593 Code coverage: T combined with H flag
22595 language=zh variant=zh-tw showtitle
22597 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22602 <p>Should be stripped!
22603 </p><p>Taiwan is Taiwan.
22606 <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>
22607 <p>Taiwan is China.</p>
22611 Code coverage: T with no variants
22613 language=zh variant=zh-tw showtitle
22615 -{H|zh:China; zh-tw:Taiwan}-
22616 Taiwan is China.-{T|Taiwan is China}-
22623 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22624 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22628 Code coverage: rules with no variants
22630 language=zh variant=zh-tw
22632 -{H|zh:China; zh-tw:Taiwan}-
22643 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22645 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22646 Taiwan is China.</p>
22651 Code coverage: D flag for conversion rule
22653 language=zh variant=zh-tw
22655 -{D|zh-cn:XA; zh-tw:YA}-
22656 -{A;D|zh-cn:XB; zh-tw:YB}-
22657 -{D;H|zh-cn:XC; zh-tw:YC}-
22659 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22665 XA XB XC YA YB YC FOO BAR BAT 012345
22670 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22674 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22677 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22678 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22679 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22680 <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>
22681 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22682 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22683 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22684 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22688 Code coverage: N flag for conversion rule
22690 language=zh variant=zh-cn
22700 </p><p>српски (ћирилица)
22703 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22704 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22705 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22708 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22710 Code coverage: N flag for conversion rule (wt2html only)
22712 language=zh variant=zh-cn
22713 parsoid=wt2html,html2html
22720 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22724 Testing that changing the language variant here in the tests actually works
22726 language=zh variant=zh showtitle
22728 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22731 <p>Should be stripped!
22734 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22738 Recursive conversion of alt and title attrs shouldn't clear converter state
22740 language=zh variant=zh-cn
22743 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22744 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22748 Should be stripped<span title="Exclamation">!</span>
22751 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22752 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>
22756 T26072: more test on conversion rule for title
22758 language=zh variant=zh-tw showtitle
22760 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22762 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22765 <p>This should be stripped!
22766 </p><p>This won't take interferes with the title rule.
22769 <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>
22770 <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>
22774 Partly disable title conversion if variant == main language code
22776 language=zh variant=zh title=[[ZH]] showtitle
22778 -{T|zh-cn:CN;zh-tw:TW}-
22784 <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>
22788 Partly disable title conversion if variant == main language code, more
22790 language=zh variant=zh title=[[ZH]] showtitle
22798 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22802 Raw output of variant escape tags (R flag)
22804 language=zh variant=zh-tw
22806 Raw: -{R|zh:China;zh-tw:Taiwan}-
22808 <p>Raw: zh:China;zh-tw:Taiwan
22811 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22814 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22816 Raw output of variant escape tags (R flag) (wt2html only)
22818 language=zh variant=zh-tw
22819 parsoid=wt2html,html2html
22821 -{Variant}- -{D|syntax}- -{D;R|options}-
22823 <p>Variant syntax options
22826 <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>
22830 Nested markup inside raw output of variant escape tags (R flag)
22832 language=zh variant=zh-tw
22834 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22836 <p>Nested raw: nested Taiwan nested
22839 <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>
22843 Nested markup and spaces inside raw output of variant escape tags (R flag)
22845 language=zh variant=zh-tw
22847 X-{ outer -{ inner }- outer }-X
22849 <p>X outer inner outer X
22852 <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>
22856 Templates inside raw output of variant escape tags (R flag)
22858 language=zh variant=zh-tw
22860 Nested raw: -{R|nested {{echo|hi}} templates}-
22862 <p>Nested raw: nested hi templates
22865 <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>
22869 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22871 language=zh variant=zh-cn
22873 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22878 <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>
22882 Conversion rules from [numeric-only string] to [something else] (T48634)
22884 language=zh variant=zh-cn
22886 -{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
22891 <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>
22895 Two-way converter rule entries with an empty value should be ignored (T53551)
22897 language=zh variant=zh-cn
22899 -{H|zh-cn:foo;zh-tw:;}-foobar
22904 <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>
22908 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22910 language=zh variant=zh-cn
22912 -{H|=>zh-cn:foo;}-foobar
22917 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22921 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22923 language=zh variant=zh-cn
22930 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22934 Nested using of manual convert syntax
22936 language=zh variant=zh-hk
22938 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22940 <p>Nested: Hello Hong Kong!
22943 <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>
22947 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22949 language=zh variant=zh-cn
22951 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22953 <p><span title="X">A</span>
22956 <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>
22960 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22962 language=zh variant=zh-cn
22964 -{<span title="-{X}-">A</span>}-
22965 !! html/php+disabled
22966 <p><span title="X">A</span>
22969 <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>
22972 # Parsoid and PHP disagree on how to parse this example: Parsoid
22973 # insists that the content of a language converter element be a valid
22974 # DOM fragment or attribute string
22976 Language converter markup with block content
22978 language=zh variant=zh-cn
22980 <span>a-{b<div>c}-d
22982 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22984 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22989 </span></div></span></div></span>
22991 <span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<div typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[10,16,5,0]}'>c</div>"}}'></div>d
22993 <span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<div typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[50,56,5,0]}'>c</div>"}}'></div>d
22995 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"x<span data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[82,89,6,0]}'>y</span>"},{"f":"0","l":"zh-tw","t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[100,106,5,0]}'>c</div>"}]}'/>d</span></p></span></span>
22999 LanguageConverter selser (1)
23001 language=zh variant=zh-cn
23003 "modes": ["wt2wt", "selser"],
23005 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23015 LanguageConverter selser (2)
23017 language=zh variant=zh-cn
23019 "modes": ["wt2wt", "selser"],
23021 ["span[class='x']", "contents", "text", "-{foo}-"],
23022 ["a", "contents", "text", "-{"],
23023 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
23027 <span class="x">TEXT1</span>
23028 [http://example.com TEXT2]
23032 <span class="x"><nowiki>-{foo}-</nowiki></span>
23033 [http://example.com -{]
23034 [[Foo|<nowiki>-{</nowiki>]]
23035 {{1x|<nowiki>-{</nowiki>}}
23038 # Tests LanguageVariantText in ConstrainedText
23040 LanguageConverter selser (3)
23042 language=zh variant=zh-cn
23044 "modes": ["wt2wt", "selser"],
23046 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
23047 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
23058 |<nowiki/>-{edited}-
23062 # Tests LanguageVariantText._fromSelSer
23064 LanguageConverter selser (4)
23066 language=zh variant=zh-cn
23068 "modes": ["wt2wt", "selser"],
23070 ["td > span.x", "remove"]
23076 |<span class="x">Foo</span>-{Bar}-
23077 ||<span class="x">Foo</span>-{Bar}-
23087 # Since Parsoid is starting to emit canonical wikitext for links,
23088 # [http://example.com http://example.com] will not RT back to that
23090 # Parsoid does not language-convert links (it is done in a
23091 # post-processing step)
23093 Proper conversion of text in external links
23095 language=sr variant=sr-ec
23098 http://www.google.com
23099 gopher://www.google.com
23100 [http://www.google.com http://www.google.com]
23101 [gopher://www.google.com gopher://www.google.com]
23102 [https://www.google.com irc://www.google.com]
23103 [ftp://www.google.com www.google.com/ftp://dir]
23104 [//www.google.com www.google.com]
23106 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
23107 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23108 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
23109 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23110 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
23111 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
23112 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
23115 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
23116 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
23117 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
23118 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
23119 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
23120 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
23121 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
23125 Do not convert roman numbers to language variants
23127 language=sr variant=sr-ec
23131 <p>Фридрих IV је цар.
23134 <p>Fridrih IV je car.</p>
23138 Unclosed language converter markup "-{"
23149 Don't convert raw rule "-{R|=>}-" to "=>"
23158 <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>
23162 Don't break link parsing if language converter markup is in the caption.
23164 language=sr variant=sr-ec
23166 [[Main Page|-{R|main page}-]]
23168 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
23171 <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>
23175 T146304: Don't break template parsing if language converter markup is in the parameter.
23177 language=sr variant=sr-ec
23184 <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>
23188 T146305: Don't break image parsing if language converter markup is in the caption.
23192 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
23194 <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>
23197 <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>
23201 T146305: Don't break image parsing if nested language converter markup is in the caption.
23203 language=zh variant=zh-cn
23205 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
23207 <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>
23210 <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>
23213 # XXX html2wt disabled because rich markup in alt is not preserved.
23215 Don't break gallery if language converter markup is inside.
23220 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
23221 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
23224 <ul class="gallery mw-gallery-traditional">
23225 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23226 <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>
23227 <div class="gallerytext">
23228 <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>
23232 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
23233 <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>
23234 <div class="gallerytext">
23235 <p>This is a test template
23242 <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"}}'>
23243 <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>
23244 <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>
23249 T153135: Don't break list handling if language converter markup is in the item.
23251 language=zh variant=zh-cn
23253 ;-{zh-cn:AAA;zh-tw:BBB}-
23257 <dt>foo:bar</dt></dl>
23260 <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>
23261 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
23265 // Note that parsoid does not protect colons unless language converter
23266 // markup is properly nested, because it is a backtracking parser.
23268 T153135: Unclosed markup in definition list (code coverage)
23270 language=zh variant=zh-cn
23275 <dl><dt><b>foo:bar</b></dt><b>
23276 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
23279 <dl><dt data-parsoid='{}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
23280 <dt data-parsoid='{}'>-{zh-cn</dt><dd data-parsoid='{"stx":"row"}'>AAA</dd></b></dl>
23284 T153135: Nested language converter markup in definition list (code coverage)
23286 language=zh variant=zh-cn
23288 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
23290 <dl><dt>AAA foo:bar bat:baz</dt>
23294 <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>
23295 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
23299 # html2wt mode disabled due to <nowiki> insertion.
23301 T153140: Don't break table handling if language converter markup is in the cell.
23303 language=sr variant=sr-ec
23304 parsoid=wt2html,wt2wt,html2html
23321 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23328 Language converter tricky html2wt cases (1)
23331 parsoid=html2wt,wt2wt
23333 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23335 -{<nowiki>}-</nowiki>}-
23342 Language converter tricky html2wt cases (2)
23345 parsoid=html2wt,wt2wt
23349 <nowiki>-{foo}-</nowiki>
23351 <p>-{foo}-
23356 Language converter tricky html2wt cases (3)
23359 parsoid=html2wt,wt2wt
23361 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23362 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23363 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23369 -{<nowiki>-{foo}-</nowiki>}-
23373 </p><p>-{foo}-
23378 Language converter tricky html2wt cases (4)
23381 parsoid=html2wt,wt2wt
23383 <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>
23391 # Note that the <nowiki> escaping added by parsoid for source text,
23392 # destination text, and language names only works on the PHP side
23393 # for *destination text*. (HTML entity escaping wouldn't work
23394 # any better.) This is probably a bug, at least for source texts.
23395 # (For language names PHP uses a precise regexp based on the languages
23396 # it currently knows have variants, which is fragile since this set
23397 # can grow/shrink over time.)
23399 Language converter tricky html2wt cases (5)
23401 language=zh variant=zh-cn
23403 <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>
23404 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23405 <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>
23406 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23409 -{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
23411 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23413 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23415 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23418 !! html/php+disabled
23419 <p>foobat;xyz=>zh-cn:abc
23423 </p><p>a:b=>c 0;zh-tw:bar
23428 T179579: Nowiki and lc interaction
23435 -{123<nowiki>|</nowiki>456}-
23437 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23439 <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>
23443 T2529: Uncovered bullet
23453 T2529: Uncovered bullet in a deeply nested list
23455 *******Foo {{bullet}}
23457 <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>
23463 T2529: Uncovered table already at line-start
23486 T2529: Uncovered bullet in parser function result
23488 *Foo {{lc:{{bullet}} }}
23496 T7678: Double-parsed template argument
23498 {{lc:{{{1}}}|hello}}
23505 T7678: Double-parsed template invocation
23507 {{lc:{{paramtest {{!}} param = hello }} }}
23509 <p>{{paramtest | param = hello }}
23514 Case insensitivity of parser functions for non-ASCII characters (T10143)
23517 title=[[Main Page]]
23519 {{PRVNÍVELKÉ:ěščř}}
23520 {{prvnívelké:ěščř}}
23540 Morwen/13: Unclosed link followed by heading
23547 <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>
23552 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23559 <h1><span class="mw-headline" id="heading">heading</span></h1>
23564 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23571 <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>
23586 Paragraphs inside divs (no extra line breaks)
23598 Paragraphs inside divs (extra line break on open)
23613 Paragraphs inside divs (extra line break on close)
23628 Paragraphs inside divs (extra line break on open and close)
23644 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23646 Nesting tags, paragraphs on lines which begin with <div>
23648 <div></div><strong>A
23651 <div></div><p><strong>A
23652 </strong></p><strong></strong><p><strong>B</strong>
23655 <div data-parsoid='{"stx":"html"}'></div><p><strong data-parsoid='{"stx":"html","autoInsertedEnd":true}'>A</strong></p>
23656 <p><strong data-parsoid='{"stx":"html","autoInsertedStart":true}'>B</strong></p>
23659 # T8200: <blockquote> should behave like <div> with respect to line breaks
23661 T8200: paragraphs inside blockquotes (no extra line breaks)
23663 <blockquote>Line one
23665 Line two</blockquote>
23667 <blockquote>Line one
23668 Line two</blockquote>
23671 <blockquote><p>Line one
23672 Line two</p></blockquote>
23676 T8200: paragraphs inside blockquotes (extra line break on open)
23681 Line two</blockquote>
23686 Line two</blockquote>
23692 Line two</p></blockquote>
23696 T8200: paragraphs inside blockquotes (extra line break on close)
23698 <blockquote>Line one
23703 <blockquote>Line one
23709 <blockquote><p>Line one
23716 T8200: paragraphs inside blockquotes (extra line break on open and close)
23732 ## This is a corner case interaction between the paragraph wrapping in the
23733 ## php parser's BlockLevelPass and Remex. `doBlockLevels` has a notion of
23734 ## some tags which close paragraphs (and thus prevent wrapping on their line),
23735 ## of which "div" is one, but do p-wrapping inside them. These are referred
23736 ## to as "never suppressing". Remex, for its part, doesn't traverse into
23737 ## "div"s to p-wrap. Hence, we only get this partial wrapping.
23739 Paragraphs inside blockquotes/divs (no extra line breaks)
23741 <blockquote><div>Line one
23743 Line two</div></blockquote>
23745 <blockquote><div>Line one
23746 Line two</div></blockquote>
23751 Paragraphs inside blockquotes/divs (extra line break on open)
23756 Line two</div></blockquote>
23761 Line two</div></blockquote>
23766 Paragraphs inside blockquotes/divs (extra line break on close)
23768 <blockquote><div>Line one
23771 </div></blockquote>
23773 <blockquote><div>Line one
23776 </div></blockquote>
23781 Paragraphs inside blockquotes/divs (extra line break on open and close)
23787 </div></blockquote>
23793 </div></blockquote>
23798 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23800 wgLinkHolderBatchSize=0
23806 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23807 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23808 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23813 Free external link invading image caption
23815 [[Image:Foobar.jpg|thumb|http://x|hello]]
23817 <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>
23820 <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>
23824 T17196: localised external link numbers
23828 [http://en.wikipedia.org/]
23830 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23833 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23837 Multibyte character in padleft
23839 {{padleft:-Hello|7|Æ}}
23844 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23848 Multibyte character in padright
23850 {{padright:Hello-|7|Æ}}
23855 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23859 formatdate parser function
23861 {{#formatdate:2009-03-24}}
23863 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23868 formatdate parser function, with default format
23870 {{#formatdate:2009-03-24|mdy}}
23872 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23877 Spacing of numbers in formatted dates
23879 {{#formatdate:January 15}}
23881 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23886 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
23888 language=nl title=[[MediaWiki:Common.css]]
23890 {{#formatdate:2009-03-24|dmy}}
23892 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23905 Edit comment with link
23909 I like the [[Main Page]] a lot
23911 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23915 Edit comment with link and link text
23919 I like the [[Main Page|best pages]] a lot
23921 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23925 Edit comment with link and link text with suffix
23929 I like the [[Main Page|best page]]s a lot
23931 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23935 Edit comment with section link (non-local, eg in history list)
23937 comment title=[[Main Page]]
23939 /* External links */ removed bogus entries
23941 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23945 Edit comment with section link and text before it (non-local, eg in history list)
23947 comment title=[[Main Page]]
23949 pre-comment text /* External links */ removed bogus entries
23951 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>
23955 Edit comment with section link (local, eg in diff view)
23957 comment local title=[[Main Page]]
23959 /* External links */ removed bogus entries
23961 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23965 Edit comment with subpage link (T16080)
23969 title=[[Subpage test]]
23971 Poked at a [[/subpage]] here...
23973 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23977 Edit comment with subpage link and link text (T16080)
23981 title=[[Subpage test]]
23983 Poked at a [[/subpage|neat little page]] here...
23985 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23989 Edit comment with bogus subpage link in non-subpage NS (T16080)
23992 title=[[Subpage test]]
23994 Poked at a [[/subpage]] here...
23996 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
24000 Edit comment with bare anchor link (local, as on diff)
24004 title=[[Main Page]]
24008 <a href="#section">#section</a>
24012 Edit comment with bare anchor link (non-local, as on history)
24015 title=[[Main Page]]
24019 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
24023 Anchor starting with underscore
24029 <p><a href="#_ref">One</a>
24032 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
24036 Id starting with underscore
24038 <div id="_ref"></div>
24040 <div id="_ref"></div>
24045 Edit comment with link with more than one pipe (T99346)
24049 [[Main Page|Many|pipes]]
24051 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
24055 Complex edit comment with link with more than one pipe (T99346)
24059 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
24061 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..."
24065 Space normalisation on autocomment (T24784)
24068 title=[[Main Page]]
24070 /* __hello__world__ */
24072 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
24076 percent-encoding and + signs in comments (T28410)
24080 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
24082 <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>
24085 # Parsoid doesn't support this yet: see T75581
24086 # but it *should* omit the 'src' attribute if the image is bad.
24087 # PHP side of tests was disabled in
24088 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
24089 # because of issues in the PHP parserTests infrastructure
24090 # (but the output below is indeed what the PHP side emits)
24092 Bad images - basic functionality
24095 !! html/php+disabled
24097 <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>
24101 Bad images - T18039: text after bad image disappears
24106 !! html/php+disabled
24112 <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>
24117 Verify that displaytitle works (T24501) no displaytitle
24121 wgAllowDisplayTitle=true
24122 wgRestrictDisplayTitle=false
24124 this is not the the title
24127 <p>this is not the the title
24132 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
24137 wgAllowDisplayTitle=true
24138 wgRestrictDisplayTitle=false
24140 this is not the the title
24141 {{DISPLAYTITLE:whatever}}
24144 <p>this is not the the title
24149 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
24154 wgAllowDisplayTitle=true
24155 wgRestrictDisplayTitle=true
24157 this is not the the title
24158 {{DISPLAYTITLE:whatever}}
24161 <p>this is not the the title
24166 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
24171 wgAllowDisplayTitle=true
24172 wgRestrictDisplayTitle=true
24174 this is not the the title
24175 {{DISPLAYTITLE:screen}}
24178 <p>this is not the the title
24183 Verify that displaytitle works (T24501) AllowDisplayTitle=false
24188 wgAllowDisplayTitle=false
24190 this is not the the title
24191 {{DISPLAYTITLE:screen}}
24194 <p>this is not the the title
24195 <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>
24200 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
24205 wgAllowDisplayTitle=false
24207 this is not the the title
24210 <p>this is not the the title
24215 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
24220 wgAllowDisplayTitle=true
24221 wgRestrictDisplayTitle=true
24223 this is not the the title
24224 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
24226 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
24227 <p>this is not the the title
24232 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
24237 wgAllowDisplayTitle=true
24238 wgRestrictDisplayTitle=true
24240 this is not the the title
24241 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
24243 <span style="color: red;">s</span>creen
24244 <p>this is not the the title
24249 Page status indicators: Empty name is invalid
24253 <indicator name=" "></indicator>
24254 <indicator></indicator>
24256 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24257 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
24262 Page status indicators: Weird syntaxes that are okay
24266 <indicator name="empty" />
24267 <indicator name="name"></indicator>
24276 Page status indicators: Torture test
24280 <indicator name="01">hello world</indicator>
24281 <indicator name="02">[[Main Page]]</indicator>
24282 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
24283 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
24284 <indicator name="05">*foo
24286 <indicator name="06"><nowiki>foo</nowiki></indicator>
24287 <indicator name="07"> Preformatted</indicator>
24288 <indicator name="08"><div>Broken tag</indicator>
24289 <indicator name="09">{| class=wikitable
24292 <indicator name="10">Two
24294 paragraphs</indicator>
24297 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
24298 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" />
24299 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>
24300 05=<ul><li>foo</li>
24304 07=<pre>Preformatted
24306 08=<div>Broken tag</div>
24308 09=<table class="wikitable">
24325 preload: check <noinclude> and <includeonly>
24329 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24335 preload: check <onlyinclude>
24339 Goodbye <onlyinclude>Hello world</onlyinclude>
24345 preload: can pass tags through if we want to
24349 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24351 <includeonly>Hello world</includeonly>
24355 preload: check that it doesn't try to do tricks
24359 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24361 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24365 Play a bit with r67090 and T5158
24367 <div style="width:50% !important"> </div>
24368 <div style="width:50% !important"> </div>
24369 <div style="width:50% !important"> </div>
24370 <div style="border : solid;"> </div>
24372 <div style="width:50% !important"> </div>
24373 <div style="width:50% !important"> </div>
24374 <div style="width:50% !important"> </div>
24375 <div style="border : solid;"> </div>
24378 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24379 <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>
24380 <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>
24381 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24386 French spaces in wikitext
24388 foo ! bar ? bat 50 % is less than 75 %.
24390 Hello : this ; is « something ‹ else › again »
24392 <p>foo ! bar ? bat 50 % is less than 75 %.
24393 </p><p>Hello : this ; is « something ‹ else › again »
24397 # It would be reasonable for Parsoid and PHP to differ here.
24398 # The PHP behavior is arguably a bug.
24400 Corner case: french spaces in definition list
24404 <dl><dt>foo </dt>
24409 T5158: Test for French spaces in attributes
24411 <br style=" clear : both ; " />
24413 <p><br style="clear : both ;" />
24418 HTML5 data attributes
24420 <span data-foo="bar">Baz</span>
24421 <p data-abc-def_hij="">Quuz</p>
24423 <p><span data-foo="bar">Baz</span>
24425 <p data-abc-def_hij="">Quuz</p>
24428 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24429 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24433 Strip reserved data attributes
24435 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24437 <div data-ok="fred">d</div>
24440 <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>
24444 percent-encoding and + signs in internal links (T28410)
24446 [[User:+%]] [[Page+title%]]
24447 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24448 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24449 [[%33%45]] [[%33%45+]]
24451 <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>
24452 <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>
24453 <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>
24454 <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>
24457 <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>
24458 <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>
24459 <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>
24460 <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>
24464 Special characters in embedded file links (T29679)
24466 [[File:Contains & ampersand.jpg]]
24467 [[File:Does not exist.jpg|Title with & ampersand]]
24469 <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>
24470 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24473 <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>
24474 <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>
24478 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24480 Text's been normalized?
24482 <p>Text's been normalized?
24487 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24489 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24491 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24496 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24498 [http://www.example.org/ ideograms]
24500 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24505 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24507 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24509 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24533 T33098 Template which includes system messages which includes the template
24537 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24538 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24543 T33490 Turkish: ucfirst 'blah'
24554 T33490 Turkish: ucfirst 'ix'
24565 T33490 Turkish: lcfirst 'BLAH'
24576 T33490 Turkish: ucfırst (with a dotless i)
24582 <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>
24587 T33490 ucfırst (with a dotless i) with English language
24593 <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>
24597 # Note that Parsoid doesn't emit an explicit TOC.
24598 # Note also that the html2wt direction tends to emit an extra newline
24599 # between the __TOC__ magicword and the first heading unless *both*
24600 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24604 T28375: TOC with italics
24606 title=[[Main Page]]
24609 ==''Lost'' episodes==
24611 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24613 <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>
24617 <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>
24620 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24621 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24625 T28375: TOC with bold
24627 title=[[Main Page]]
24630 =='''should be bold''' then normal text==
24632 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24634 <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>
24638 <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>
24641 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24642 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24646 T35845: Headings become cursive in TOC when they contain an image
24648 title=[[Main Page]]
24651 ==Image [[Image:foobar.jpg]]==
24653 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24655 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24659 <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>
24662 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24663 <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>
24667 T35845 (2): Headings become bold in TOC when they contain a blockquote
24669 title=[[Main Page]]
24672 ==<blockquote>Quote</blockquote>==
24674 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24676 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24680 <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>
24683 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24685 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24689 <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>
24691 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24692 <h2 id="Quote" data-parsoid='{}'><blockquote><p>Quote</p></blockquote></h2>
24696 Unclosed tags in TOC
24698 wgFragmentMode=[ 'html5', 'legacy' ]
24700 title=[[Main Page]]
24704 <small>Hanc marginis exiguitas non caperet.</small>
24707 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24709 <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>
24713 <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>
24714 <p><small>Hanc marginis exiguitas non caperet.</small>
24718 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24719 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24720 <p><small>Hanc marginis exiguitas non caperet.</small>
24725 Multiple tags in TOC
24728 ==<i>Foo</i> <b>Bar</b>==
24730 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24732 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24734 <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>
24735 <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>
24739 <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>
24740 <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>
24743 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24745 <li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
24746 <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>
24750 <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>
24751 <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>
24753 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24754 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24756 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote><p>Bar</p></blockquote></h2>
24759 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24760 # html5 tag parsing.
24762 Tags with parameters in TOC
24767 ==<sup class="in-h2">Hello</sup>==
24769 ==<sup class="a > b">Evilbye</sup>==
24771 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24773 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24774 <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>
24778 <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>
24779 <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>
24782 <meta property="mw:PageProp/toc" />
24783 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24785 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24789 span tags with directionality in TOC
24792 ==<span dir="ltr">C++</span>==
24794 ==<span dir="rtl">זבנג!</span>==
24796 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24798 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24800 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24802 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24804 <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>
24805 <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>
24806 <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>
24807 <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>
24808 <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>
24812 <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>
24813 <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>
24814 <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>
24815 <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>
24816 <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>
24819 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24820 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24821 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24822 <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>
24823 <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>
24824 <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>
24828 T74884: bdi element in ToC
24831 ==<bdi>test</bdi>==
24833 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24835 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24839 <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>
24842 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24843 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24847 T35715: s/strike element in ToC
24850 ==<s>test</s> test <strike>test</strike>==
24852 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24854 <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>
24858 <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>
24861 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24862 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24866 T198618: style element in ToC
24871 ==<style>.foo {}</style>Style<style>.bar {}</style>==
24873 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24875 <li class="toclevel-1 tocsection-1"><a href="#Style"><span class="tocnumber">1</span> <span class="toctext">Style</span></a></li>
24879 <h2><span class="mw-headline" id="Style"><style>.foo {}</style>Style<style>.bar {}</style></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Style">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
24882 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24883 <h2 id="Style" data-parsoid='{}'><style>.foo {}</style>Style<style>.bar {}</style></h2>
24887 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24892 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
24894 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24898 <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>
24901 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24902 <h2 id="x" data-parsoid='{}'>x</h2>
24908 == {{int:headline_sample}} ==
24912 T34057: Title needed when expanding <h> nodes.
24914 title=[[Main Page]]
24918 <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>
24923 Strip marker in urlencode
24925 {{urlencode:x<nowiki/>y}}
24926 {{urlencode:x<nowiki/>y|wiki}}
24927 {{urlencode:x<nowiki/>y|path}}
24928 {{urlencode:x<pre id="one">two</pre>y}}
24956 Strip marker in formatNum
24958 {{formatnum:1<nowiki/>2}}
24959 {{formatnum:1<nowiki/>2|R}}
24967 Check noCommafy in formatNum
24971 {{formatnum:123456.78}}
24972 {{formatnum:123456.78|NOSEP}}
24980 Wrong option for formatNum (T58199)
24982 {{formatnum:1,234.56|Random}}
24983 {{formatnum:1,234.56|EVERYTHING}}
24984 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24993 Strip marker in grammar
24997 {{grammar:elative|foo<nowiki/>bar}}
25004 Strip marker in padleft
25006 {{padleft:|2|x<nowiki/>y}}
25013 Strip marker in padright
25015 {{padright:|2|x<nowiki/>y}}
25022 Strip marker in anchorencode
25024 {{anchorencode:x<nowiki/>y}}
25029 <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>
25033 nowiki inside link inside heading (T20295)
25035 ==[[foo|x<nowiki>y</nowiki>z]]==
25037 <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>
25042 new support for bdi element (T33817)
25044 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25046 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
25051 Ignore pipe between table row attributes
25055 |- id=foo | style='color: red'
25063 <tr id="foo" style="color: red">
25070 Language parser function
25079 Padleft and padright (default 0-padding)
25088 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
25089 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
25093 Padleft and padright (partial fill)
25095 {{padleft:xyz|6|ab}}
25096 {{padright:xyz|6|ab}}
25102 <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>
25103 <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>
25107 Padleft and padright as substr
25109 {{padleft:|3|abcde}}
25110 {{padright:|3|abcde}}
25116 <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>
25117 <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>
25121 Padleft and padright with non-numerical length (T180403)
25123 {{padleft:abcdef|junk}}
25124 {{padright:abcdef|junk}}
25132 Special parser function
25134 {{#special:RandomPage}}
25135 {{#special:BaDtItLe}}
25136 {{#special:Foobar}}
25145 T36939 - Case insensitive link parsing ([HttP://])
25147 [HttP://MediaWiki.Org/]
25149 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
25152 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
25156 T36939 - Case insensitive link parsing ([HttP:// title])
25158 [HttP://MediaWiki.Org/ MediaWiki]
25160 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
25165 T36939 - Case insensitive link parsing (HttP://)
25167 HttP://MediaWiki.Org/
25169 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
25172 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
25190 <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>
25191 <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>
25192 <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>
25193 <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>
25194 <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>
25200 ### Parsoid-specific tests
25201 ### Parsoid-PHP parser incompatibilities
25204 1. SOL-sensitive wikitext tokens as template-args
25206 parsoid=wt2html,wt2wt
25212 <span about="#mwt1" typeof="mw:Transclusion">
25213 </span><ul about="#mwt1"><li>a</li>
25215 <span about="#mwt2" typeof="mw:Transclusion">
25216 </span><ol about="#mwt2"><li>a</li>
25218 <span about="#mwt3" typeof="mw:Transclusion">
25219 </span><dl about="#mwt3"><dd>a</dd>
25223 #### -----------------------------------------------------------------
25224 #### Parsoid-specific functionality tests
25225 #### -----------------------------------------------------------------
25227 # T65642/T68749: Formatting elt fixup around images.
25228 # We know wt2wt will fail, but we expect selser to pass.
25229 # Due to the nature of our testing, wt2wt and selser tests will enter the
25230 # blacklist and we'll catch selser regressions based on changes to the
25231 # blacklist entries for selser tests.
25233 1. Treebuilder fixup of formatting elt
25235 parsoid=wt2html,wt2wt
25240 [[Image:Foobar.jpg|right|Test]]
25248 </small></p><small>
25249 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Test"><img alt="Test" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
25250 </small><p><small></small>
25252 </td></tr></tbody></table>
25256 <p><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></p><small data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
25257 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Test</figcaption></figure></small>
25258 <p><small data-parsoid='{"stx":"html","autoInsertedStart":true}'></small></p></td></tr>
25263 2. Treebuilder fixup of formatting elt
25265 parsoid=wt2html,wt2wt
25267 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
25269 <small>[[Image:Foobar.jpg|right|300px]]</small>
25271 <p><b>foo</b></p><b><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div></b><p><b>bar</b>
25272 </p><small><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a></div></small>
25274 <p><b>foo</b></p><b><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure></b><p><b>bar</b></p>
25276 <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>
25280 3. Treebuilder fixup of formatting elt
25282 parsoid=wt2html,wt2wt
25284 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
25286 <p><small><b>foo</b></small></p><small><b><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div></b></small><p><small><b>bar</b></small>
25289 <p><small><b>foo</b></small></p><small><b><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure></b></small><p><small><b>bar</b></small></p>
25293 4. Treebuilder fixup of formatting elt: formatting tags around captionless images
25295 parsoid=wt2html,wt2wt
25297 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
25299 <b><small><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a></div></small></b>
25301 <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>
25304 #### ----------------------------------------------------------------
25305 #### Parsoid-only testing of Parsoid's impl of LST
25306 #### Not implemented yet, see
25307 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
25308 #### ----------------------------------------------------------------
25310 ## We still need to support serializing the older format while content is stored.
25312 LST Sections: Backwards compatibility
25315 "suppressErrors": true,
25316 "modes": ["html2wt"]
25319 <section begin="2011-05-16" />
25320 <section end="2014-04-10 (MW 1.23wmf22)" />
25322 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
25323 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
25327 LST Sections: Newfangled approach
25329 <section begin="2011-05-16" />
25330 <section end="2014-04-10 (MW 1.23wmf22)" />
25332 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"}}'>
25334 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"}}'>
25338 #--------- Test stripping of empty nodes in template content ----------
25341 Empty LI and TR nodes should be stripped from template content
25346 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25350 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25363 Empty LI and TR nodes should not be stripped from top-level content
25377 <li class='mw-empty-elt'></li>
25382 <tr class='mw-empty-elt'></tr>
25391 Empty TR nodes should not be stripped if they have any attributes set
25393 {{EmptyTRWithHTMLAttrTest}}
25395 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25396 <tr align='center'></tr>
25397 <tr><td>foo</td></tr>
25398 <tr align='center'></tr>
25399 <tr><td>bar</td></tr>
25403 #### ----------------------------------------------------------------
25404 #### The following section of tests are primarily to test
25405 #### wikitext escaping capabilities of Parsoid. Given that
25406 #### escaping can be done any number of ways, the wikitext (input)
25407 #### is always adjusted to reflect how Parsoid adds nowiki
25410 #### We are marking several tests as parsoid-only since the
25411 #### HTML in the result section is different from what the
25412 #### PHP parser generates for it.
25413 #### ----------------------------------------------------------------
25416 #### --------------- Headings ---------------
25418 #### 1. Nested inside html <h1>=foo=</h1>
25419 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25420 #### 3. Nested inside html with wikitext split by html tags
25421 #### 4. No escape needed
25422 #### 5. Empty headings <h1></h1>
25423 #### 6. Heading chars in SOL context
25424 #### ----------------------------------------
25426 Headings: 0. Unnested
25436 <p>=foo<i>a</i>=</p>
25438 <nowiki>=foo=</nowiki>
25440 <nowiki> </nowiki>=foo=
25442 <nowiki>=foo=</nowiki>
25444 =foo''a''<nowiki>=</nowiki>
25447 # New headings and existing headings are handled differently
25449 Headings: 1. Nested inside html
25457 <h1 data-parsoid=''>=foo=</h1>
25458 <h2 data-parsoid=''>=foo=</h2>
25459 <h3 data-parsoid=''>=foo=</h3>
25460 <h4 data-parsoid=''>=foo=</h4>
25461 <h5 data-parsoid=''>=foo=</h5>
25462 <h6 data-parsoid=''>=foo=</h6>
25470 =<nowiki>=foo=</nowiki>=
25471 ==<nowiki>=foo=</nowiki>==
25472 ===<nowiki>=foo=</nowiki>===
25473 ====<nowiki>=foo=</nowiki>====
25474 =====<nowiki>=foo=</nowiki>=====
25475 ======<nowiki>=foo=</nowiki>======
25480 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25489 <nowiki>*</nowiki>bar
25495 <nowiki>=bar=</nowiki>
25499 Headings: 3. Nested inside html with wikitext split by html tags
25503 <h1>=<b>bold</b>foo=</h1>
25505 = ='''bold'''foo= =
25509 Headings: 4a. No escaping needed (testing just h1 and h2)
25520 <h1><i>=</i>foo=</h1>
25540 Headings: 4b. No escaping needed (inside p-tags)
25557 Headings: 4c. Short headings (1)
25564 <nowiki>===</nowiki>
25570 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25572 Headings: 4d. Short headings (2)
25574 parsoid=wt2html,html2html
25585 <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>
25586 <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>
25587 <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>
25592 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25593 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25594 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25598 Headings: 5. Empty headings
25602 <h1 data-parsoid='{}'></h1>
25604 <h2 data-parsoid='{}'></h2>
25606 <h3 data-parsoid='{}'></h3>
25608 <h4 data-parsoid='{}'></h4>
25610 <h5 data-parsoid='{}'></h5>
25612 <h6 data-parsoid='{}'></h6>
25622 =====<nowiki/>=====
25624 ======<nowiki/>======
25628 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25638 <nowiki>=a=</nowiki>
25640 <nowiki>=a=</nowiki>
25642 <nowiki>=a=</nowiki>
25646 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25659 <nowiki>=a=</nowiki>
25662 <nowiki>=a=</nowiki>
25665 <nowiki>=a=</nowiki>
25670 Headings: 6c. Heading chars in SOL context (leading newline break)
25678 <nowiki>=b=</nowiki>
25682 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25686 <!--c0--><p>=a=</p>
25688 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25690 <!--c0--><nowiki>=a=</nowiki>
25692 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25696 Headings: 6d. Heading chars in SOL context (No escaping needed)
25706 Headings: 7. Insert a newline between new content and headings
25712 <h2 data-parsoid='{}'>A</h2>
25713 <p data-parsoid='{}'>a</p>
25724 Headings: Used as horizontal rule
25726 wgFragmentMode=[ 'html5', 'legacy' ]
25732 <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>
25735 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25738 #### --------------- Lists ---------------
25739 #### 0. Outside nests (*foo, etc.)
25740 #### 1. Nested inside html <ul><li>*foo</li></ul>
25741 #### 2. Inside definition lists
25742 #### 3. Only bullets at start should be escaped
25743 #### 4. No escapes needed
25744 #### 5. No unnecessary escapes
25745 #### 6. Escape bullets in SOL position
25746 #### 7. Escape bullets in a multi-line context
25747 #### ----------------------------------------
25750 Lists: 0. Outside nests
25760 <nowiki>*</nowiki>foo
25762 <nowiki>#</nowiki>foo
25764 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25767 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25768 ## to test wikitext escaping, and insignificant whitespace diffs
25769 ## cause PHP parser tests to barf
25771 Lists: 1. Nested inside html (No unnecessary escapes)
25780 <li data-parsoid='{}'>*foo</li>
25781 <li data-parsoid='{}'>#foo</li>
25782 <li data-parsoid='{}'>:foo</li>
25783 <li data-parsoid='{}'>;foo</li>
25791 <li data-parsoid='{}'>*foo</li>
25792 <li data-parsoid='{}'>#foo</li>
25793 <li data-parsoid='{}'>:foo</li>
25794 <li data-parsoid='{}'>;foo</li>
25801 *<nowiki>*foo</nowiki>
25802 *<nowiki>#foo</nowiki>
25803 *<nowiki>:foo</nowiki>
25804 *<nowiki>;foo</nowiki>
25810 #<nowiki>*foo</nowiki>
25811 #<nowiki>#foo</nowiki>
25812 #<nowiki>:foo</nowiki>
25813 #<nowiki>;foo</nowiki>
25817 Lists: 2. Inside definition lists
25821 <dl><dt>;foo</dt></dl>
25822 <dl><dt>:foo</dt></dl>
25825 <dl><dd>:foo</dd></dl>
25829 ; <nowiki>:foo</nowiki>
25831 ; <nowiki>:foo</nowiki>
25838 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25844 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25848 *<nowiki>*foo</nowiki>''it''*bar
25852 Lists: 4. No escapes needed
25865 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25869 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25883 Lists: 5. No unnecessary escapes
25887 <ul><li> bar <span>[[foo]]</span></li></ul>
25888 <ul><li> =bar <span>[[foo]]</span></li></ul>
25889 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25890 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25891 <ul><li> =bar <span>foo]]</span>=</li></ul>
25892 <ul><li> <s></s>: a</li></ul>
25893 <ul><li> <i>* foo</i></li></ul>
25896 * bar <span><nowiki>[[foo]]</nowiki></span>
25898 * =bar <span><nowiki>[[foo]]</nowiki></span>
25900 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25902 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25904 * =bar <span>foo]]</span>=
25912 Lists: 6. Escape bullets in SOL position
25916 <p><!--cmt-->*foo</p>
25918 <!--cmt--><nowiki>*</nowiki>foo
25922 Lists: 7. Escape bullets in a multi-line context
25931 <nowiki>*</nowiki>b
25935 Lists: 8. Escape colons only if not present in tags
25939 <dl><dt>a:b<i>c:d</i></dt></dl>
25941 ; <nowiki>a:b</nowiki>''c:d''
25944 #### --------------- HRs ---------------
25945 #### 1. Single line
25946 #### -----------------------------------
25949 HRs: 1. Single line
25957 ----<nowiki>----</nowiki>
25962 #### --------------- Tables ---------------
25963 #### 1a. Simple example
25964 #### 1b. No escaping needed (!foo)
25965 #### 1c. No escaping needed (|foo)
25966 #### 1d. No escaping needed (|}foo)
25968 #### 2a. Nested in td (<td>foo|bar</td>)
25969 #### 2b. Nested in td (<td>foo||bar</td>)
25970 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25972 #### 3a. Nested in th (<th>foo!bar</th>)
25973 #### 3b. Nested in th (<th>foo!!bar</th>)
25974 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25978 #### 4c. No escaping needed
25979 #### --------------------------------------
25982 Tables: 1a. Simple example
25990 <nowiki>{|</nowiki>
25995 Tables: 1b. No escaping needed
26006 Tables: 1c. No escaping needed
26017 Tables: 1d. No escaping needed
26028 Tables: 2a. Nested in td
26033 <td>foo|bar</td></tr>
26034 <tr><td>x<div>a|b</div></td>
26038 |<nowiki>foo|bar</nowiki>
26040 |x<div><nowiki>a|b</nowiki></div>
26048 <td>x<div>a|b</div>
26049 </td></tr></tbody></table>
26053 Tables: 2b. Nested in td
26059 <td>a<i>b||c</i></td>
26060 <td>a<i><div>b||c</div></i></td>
26061 </tr></tbody></table>
26064 |<nowiki>foo||bar</nowiki>
26065 |a''<nowiki>b||c</nowiki>''
26066 |a''<div><nowiki>b||c</nowiki></div>''
26075 <td>a<i><div>b||c</div></i>
26081 Tables: 2c. Nested in td -- no escaping needed
26097 Tables: 3a. Nested in th
26113 Tables: 3b. Nested in th
26118 <tr><th>foo!!bar</th>
26119 <th><i>foo|bar</i></th>
26120 <th><i>foo!!bar</i></th>
26121 <th><i><span>foo!!bar</span></i></th>
26122 </tr></tbody></table>
26125 !<nowiki>foo!!bar</nowiki>
26126 !''<nowiki>foo|bar</nowiki>''
26127 !''<nowiki>foo!!bar</nowiki>''
26128 !''<span><nowiki>foo!!bar</nowiki></span>''
26137 <th><i>foo!!bar</i>
26139 <th><i><span>foo!!bar</span></i>
26145 Tables: 3c. Nested in th
26150 <tr><th>foo||bar</th>
26151 <th><span typeof="mw:Nowiki">foo||bar</span></th>
26152 </tr></tbody></table>
26155 !<nowiki>foo||bar</nowiki>
26156 !<nowiki>foo||bar</nowiki>
26169 Tables: 4a. Escape -
26185 |<nowiki>-bar</nowiki>
26190 Tables: 4b. Escape +
26206 |<nowiki>+bar</nowiki>
26211 Tables: 4c. No escaping needed
26216 <tr><td>foo-bar</td><td>foo+bar</td></tr>
26217 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
26223 <div>a|b</div></td>
26268 Tables: 4d. No escaping needed
26273 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
26274 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
26275 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
26286 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
26296 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
26300 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26302 <table><tr><td></td><td align="center"></td><td></td></tr></table>
26304 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
26306 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
26309 | || align="center" | ||
26319 | {{!}}{{!}} align="center" | ||
26323 ! !! align="center" | !!
26329 <td align="center"></td>
26331 </td></tr></tbody></table>
26336 <td align="center">
26339 </td></tr></tbody></table>
26343 <td align="center"></td>
26345 </td></tr></tbody></table>
26349 <th align="center"></th>
26351 </th></tr></tbody></table>
26355 T97430: Don't emit empty nowiki pairs around marker meta tags
26359 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26360 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26362 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26363 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26367 Unclosed xmlish element in table line shouldn't eat end delimiters
26372 <tbody><tr><td> <foo</td>
26373 <td> bar></td></tr>
26390 #### --------------- Links ----------------
26391 #### 1. Quote marks in link text
26392 #### 2. Wikilinks: Escapes needed
26393 #### 3. Wikilinks: No escapes needed
26394 #### 4. Extlinks: Escapes needed
26395 #### 5. Extlinks: No escapes needed
26396 #### --------------------------------------
26398 Links 1. WikiLinks: No escapes needed
26402 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26403 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26404 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26408 [[Foo|x [Foobar] x]]
26410 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26411 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26412 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26417 Links 2. WikiLinks: Escapes needed
26421 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26422 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26423 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26424 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26425 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26426 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26427 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26428 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26429 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26430 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26432 [[Foo|<nowiki>Foobar]</nowiki>]]
26433 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26434 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26435 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26436 [[Foo|<nowiki>|Bar</nowiki>]]
26437 [[Foo|<nowiki>]]bar</nowiki>]]
26438 [[Foo|<nowiki>[[bar</nowiki>]]
26439 [[Foo|<nowiki>x [[ y</nowiki>]]
26440 [[Foo|<nowiki>x ]] y</nowiki>]]
26441 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26443 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26444 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26445 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26446 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26447 <a href="/wiki/Foo" title="Foo">|Bar</a>
26448 <a href="/wiki/Foo" title="Foo">]]bar</a>
26449 <a href="/wiki/Foo" title="Foo">[[bar</a>
26450 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26451 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26452 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26457 Links 3. WikiLinks: No escapes needed
26461 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26462 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26467 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26468 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26473 Links 4. ExtLinks: Escapes needed
26477 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26478 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26479 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26480 <p>[http://google.com]</p>
26481 <p>[http://google.com google]</p>
26482 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26483 <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>
26485 [http://google.com <nowiki>[google]</nowiki>]
26486 [http://google.com <nowiki>google]</nowiki>]
26487 [http://google.com <nowiki>goog] le</nowiki>]
26489 <nowiki>[http://google.com]</nowiki>
26491 <nowiki>[http://google.com google]</nowiki>
26493 [http://google.com<nowiki>]</nowiki>
26495 [{{echo|http://google.com}}<nowiki>]</nowiki>
26497 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26498 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26499 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26500 </p><p>[http://google.com]
26501 </p><p>[http://google.com google]
26502 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26503 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26508 Links 5. ExtLinks: No escapes needed
26512 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26513 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26515 [http://google.com [google]
26517 [[http://google.com]]
26519 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26520 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26525 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26529 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26530 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26531 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26532 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26533 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26534 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26535 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26536 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26537 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26538 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26539 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26540 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26541 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26544 x<nowiki/>http://example.com<nowiki/>y
26545 http://example.com<nowiki/>?x
26546 http://example.com<nowiki/>&x
26547 http://example.com<nowiki/>'x
26548 http://example.com<nowiki/>,x
26549 http://example.com<nowiki/>.x
26550 http://example.com<nowiki/>;x
26551 http://example.com<nowiki/>:x
26552 http://example.com<nowiki/>;x
26553 http://example.com<nowiki/>!x
26554 http://example.com<nowiki/>=x
26555 http://example.com<nowiki/>(x)
26556 http://example.com(x<nowiki/>)
26560 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26565 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26567 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26568 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26569 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26570 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26571 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26577 "http://example.com"
26578 (http://example.com)
26579 (http://example.com) foo
26580 http://example.com,
26581 http://example.com, foo
26584 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26586 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26587 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26588 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26589 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26590 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26595 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26599 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26600 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26602 http://example.com.,;:!?\
26603 -http://example.com:
26605 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26606 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26611 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26615 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26616 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26617 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26621 X<nowiki/>RFC 123<nowiki/>y
26625 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26629 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26630 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26631 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26638 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26639 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26640 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26645 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26649 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26650 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26651 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26655 X<nowiki/>PMID 123<nowiki/>y
26659 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26663 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26664 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26665 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26672 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26673 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26674 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26679 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26683 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26684 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26685 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26688 ISBN 1234567890<nowiki/>1
26689 ISBN 1234567890<nowiki/>x
26690 a<nowiki/>ISBN 1234567890<nowiki/>b
26694 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26698 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26702 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26707 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26711 <p>this is not a link: http://example.com
26714 this is not a link: <nowiki>http://example.com</nowiki>
26718 Links 15. Link trails can't become link prefixes.
26723 <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>
26725 [[Söfnuður]]-[[00]]
26727 <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>
26731 #### --------------- Quotes ---------------
26732 #### 1. Quotes inside <b> and <i>
26733 #### 2. Link fragments separated by <i> and <b> tags
26734 #### 3. Link fragments inside <i> and <b>
26735 #### 4. No escaping needed
26736 #### --------------------------------------
26738 1a. Quotes inside <b> and <i>
26749 <b>foo'<i>bar'</i>baz</b>
26758 <i>fools'<span> errand</span></i>
26759 <i><span>fool</span>'s errand</i>
26760 '<i>foo</i> bar '<i>baz</i>
26761 a|!*#-:;+-~[]{}b'<i>x</i>
26765 ''<nowiki>''foo''</nowiki>''
26766 ''<nowiki>'''foo'''</nowiki>''
26768 '''<nowiki/>'foo''''
26769 '''<nowiki>''foo''</nowiki>'''
26770 '''<nowiki>'''foo'''</nowiki>'''
26771 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26772 '''foo'''<nowiki/>'s
26778 '''foo'''<nowiki/>'
26779 ''''foo'''<nowiki/>'
26780 ''fools'<span> errand</span>''
26781 ''<span>fool</span>'s errand''
26782 '<nowiki/>''foo'' bar '''baz''
26783 a|!*#-:;+-~[]{}b'''x''
26787 1b. Quotes inside <b> and <i> with other tags on same line
26791 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26792 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26793 <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>
26794 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26795 '<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>
26796 '<i>foo</i> <div title="name">test</div>
26797 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26798 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26799 <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>
26802 '''a'' foo ''[[bar]]''
26803 ''a''' foo ''[[bar]]''
26804 ''a''' foo '''{{echo|[[bar]]}}'''
26805 [[foo]] x'''[[bar]]''
26806 '''foo'' <ref>test</ref>
26807 '''foo'' <div title="name">test</div>
26808 '''foo'' and <br> bar
26813 2. Link fragments separated by <i> and <b> tags
26817 <p>[[<i>foo</i>hello]]</p>
26818 <p>[[<b>foo</b>hello]]</p>
26820 [[''foo''<nowiki>hello]]</nowiki>
26822 [['''foo'''<nowiki>hello]]</nowiki>
26825 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26826 # this is one of the shortcomings of this format
26828 3. Link fragments inside <i> and <b>
26832 <p><i>[[foo</i>]]</p>
26833 <p><b>[[foo</b>]]</p>
26835 ''[[foo''<nowiki>]]</nowiki>
26837 '''[[foo'''<nowiki>]]</nowiki>
26841 4. No escaping needed
26845 <p>'<span><i>bar</i></span>'
26846 '<span><b>bar</b></span>'
26850 '<span>''bar''</span>'
26851 '<span>'''bar'''</span>'
26855 #### ----------- Paragraphs ---------------
26856 #### 1. No unnecessary escapes
26857 #### --------------------------------------
26860 1. No unnecessary escapes
26864 <p>bar <span>[[foo]]</span>
26865 </p><p>=bar <span>[[foo]]</span>
26866 </p><p>[[bar <span>[[foo]]</span>
26867 </p><p>]]bar <span>[[foo]]</span>
26868 </p><p>=bar <span>foo]]</span>=
26871 bar <span><nowiki>[[foo]]</nowiki></span>
26873 =bar <span><nowiki>[[foo]]</nowiki></span>
26875 [[bar <span><nowiki>[[foo]]</nowiki></span>
26877 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26879 =bar <span>foo]]</span><nowiki>=</nowiki>
26882 #### ----------------------- PRE --------------------------
26884 1. Leading whitespace in SOL context should be escaped
26907 <nowiki> </nowiki>a
26909 <nowiki> </nowiki> a
26913 <nowiki> </nowiki> a
26915 <nowiki> </nowiki>a
26918 <nowiki> </nowiki>b
26941 2. Leading whitespace in non-indent-pre contexts should not be escaped
26945 <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>
26946 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26947 <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>
26957 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26976 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26980 <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>
26982 [[File:Foobar.jpg|thumb|caption]]
26986 5. Nowiki escaping should account for indent-pres
26996 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
27010 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
27013 "modes": ["html2wt"],
27014 "scrubWikitext": true
27022 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
27023 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
27024 <p> <!--boo-->*foo</p>
27025 <p><!--boo--> *foo</p>
27026 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
27027 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
27043 <nowiki>*</nowiki>foo
27045 <nowiki/><!--boo-->*foo
27047 <!--boo--><nowiki/>*foo
27049 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
27051 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
27054 #### --------------- Behavior Switches --------------------
27057 1. Valid behavior switches should be escaped
27064 <nowiki>__TOC__</nowiki>
27065 ''<nowiki>__TOC__</nowiki>''
27069 2. Invalid behavior switches should not be escaped
27080 # We use indent-pre as an indirect way to test for sol-transparent behavior.
27082 Behavior switches should be SOL-transparent
27086 <meta property="mw:PageProp/toc" />
27088 <!-- this one's bogus -->
27091 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
27093 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
27097 <!-- this one's bogus -->
27106 #### --------------- HTML tags ---------------
27109 #### 3. multi-line html tag
27110 #### 4. extension tags
27111 #### -----------------------------------------
27117 <a href="http://google.com">google</a>
27119 <a href="http://google.com">google</a>
27127 <ul><li> <div>foo</div></li>
27128 <li> <div style="color:red">foo</div></li>
27129 <li> <td></li></ul>
27132 * <nowiki><div>foo</div></nowiki>
27133 * <nowiki><div style="color:red">foo</div></nowiki>
27134 * <nowiki><td></nowiki>
27138 3. multi-line html tag
27157 <p><ref>foo</ref>
27158 </p><p><ref>bar
27159 </p><p>baz</ref>
27162 <nowiki><ref>foo</ref></nowiki>
27164 <nowiki><ref>bar</nowiki>
27166 baz<nowiki></ref></nowiki>
27170 Parsoid: newline inducing block nodes don't suppress <nowiki>
27176 <nowiki> </nowiki>a
27181 #### --------------- Others ---------------
27187 <p><nowiki>foo</nowiki>
27190 <nowiki>foo</nowiki>
27193 ## The quote-char in the input is necessary for triggering the bug
27195 (T54035) Nowiki-escaping should not get tripped by " :" in text
27204 #----------- End of wikitext escaping tests --------------
27208 Tag-like HTML structures are passed through as text
27230 </p><p>1<d e>f
27235 HTML tag with necessary entities in attributes
27237 <span title="&amp;">foo</span>
27239 <p><span title="&amp;">foo</span>
27244 HTML tag with 'unnecessary' entity encoding in attributes
27246 <span title="&">foo</span>
27248 <p><span title="&">foo</span>
27253 HTML tag with broken attribute value quoting
27255 parsoid=wt2html,html2html
27257 <span title="Hello world>Foo</span>
27259 <p><span title="Hello world">Foo</span>
27262 <p><span title="Hello world">Foo</span></p>
27266 Self-closed tag with broken attribute value quoting
27268 parsoid=wt2html,html2html
27270 <div title="Hello world />Foo
27272 <div title="Hello world"></div><p>Foo
27275 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
27279 Table with broken attribute value quoting
27281 parsoid=wt2html,html2html
27284 | title="Hello world|Foo
27289 <td title="Hello world">Foo
27295 <td title="Hello world">Foo
27301 Table with broken attribute value quoting on consecutive lines
27303 parsoid=wt2html,html2html
27306 | title="Hello world|Foo
27307 | style="color:red|Bar
27312 <td title="Hello world">Foo
27314 <td style="color:red">Bar
27320 <td title="Hello world">Foo
27321 </td><td style="color: red">Bar
27322 </td></tr></tbody></table>
27327 Accept empty td cell attribute
27330 | align="center" |foo|| |
27335 <td align="center">foo</td>
27342 Non-empty attributes in th-cells
27345 !Foo!! style="color: red" |Bar
27351 <th style="color: red">Bar
27357 Accept empty attributes in th-cells
27372 Empty table rows go away
27393 ### Parsoid-centric tests for testing RTing of inter-element separators
27394 ### Edge cases not tested by existing parser tests and specific to
27395 ### Parsoid-specific serialization strategies.
27399 RT-ed inter-element separators should be valid separators
27411 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27415 # Parsoid-only test of a DOM pass
27417 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27429 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27430 <p>bar</p></small></td></tr>
27434 <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>
27438 # Note that the "style" attribute is really a template parameter here.
27439 # The = would have to be {{=}} if you wanted the literal.
27441 Empty TD followed by TD with tpl-generated attribute
27446 |{{echo|style='color:red'}}|foo
27460 Indented table with an empty td
27479 Indented table with blank lines in between (T85627)
27498 <br /></p></td></tr>
27503 Indented block & table
27517 <div data-parsoid='{"stx":"html"}'>foo</div>
27519 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27524 Indent and comment before table row
27539 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27540 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27544 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27546 Empty TR followed by a template-generated TR
27552 {{echo|<tr><td>foo</td></tr>}}
27557 <tr class='mw-empty-elt'></tr>
27558 <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}}]}'>
27563 ## PHP and parsoid output differ for this, and since this is primarily
27564 ## for testing Parsoid's serializer, marking this Parsoid only
27566 Empty TR followed by mixed-ws-comment line should RT correctly
27579 <tr class='mw-empty-elt'></tr>
27582 <!--c--> </tr><!--d-->
27588 Multi-line image caption generated by templates with/without trailing newlines
27590 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27591 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27593 <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>
27594 <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>
27598 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27602 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}' data-mw='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27604 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27606 <includeonly>foo</includeonly>
27614 ## PHP emits broken html for this, and since this is primarily
27615 ## a Parsoid serializer test, marking this Parsoid only
27617 Improperly nested inline or quotes tags with whitespace in between
27619 <span> <s>x</span> </s>
27622 <p><span> <s>x</s></span><s> </s>
27623 <b> <i>x</i></b><i> </i>
27628 Encapsulate protected attributes from wt
27630 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27632 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27636 <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>
27638 <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">
27639 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
27643 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27644 ## Having nested or stray pre tags results in the attempt to add duplicates,
27645 ## causing an assertion fail. This test tries to prevent that situation.
27647 Ensure ParagraphWrapper can deal with stray closing pre tags
27656 ## Remex doesn't account for fostered content.
27658 1. Ensure fostered text content is wrapped in element nodes
27662 <table>hi</table><table>ho</table>
27664 hi<table></table>ho<table></table>
27666 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>hi</p><table data-parsoid='{"stx":"html"}'></table><p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>ho</p><table data-parsoid='{"stx":"html"}'></table>
27669 ## Remex doesn't account for fostered content.
27671 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27673 parsoid=wt2html,wt2wt
27683 </td></tr></tbody></table>
27685 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||</p>
27686 <table data-parsoid='{"stx":"html"}'>
27687 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
27688 </td></tr></tbody></table>
27691 ## Remex doesn't account for fostered content.
27693 Encapsulation properly handles null DSR information from foster box
27695 parsoid=wt2html,wt2wt
27697 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27699 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>foo<tr><td>bar</td></tr></table>"}},"i":0}}]}'>foo</p><table about="#mwt1" data-parsoid='{"stx":"html"}'><tbody><tr><td>bar</td></tr></tbody></table>
27702 ## Remex doesn't account for fostered content.
27704 1. Encapsulate foster-parented transclusion content
27706 parsoid=wt2wt,wt2html
27708 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27710 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
27712 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<tr><td>bar</td></tr>"}},"i":0}},"</table>"]}'>foo</p><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td>bar</td></tr></tbody></table>
27716 2. Encapsulate foster-parented transclusion content
27718 parsoid=wt2wt,wt2html
27720 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27722 <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>
27733 3. Encapsulate foster-parented transclusion content
27735 parsoid=wt2wt,wt2html
27737 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27739 <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>"]}">
27752 4. Encapsulate foster-parented transclusion content
27754 parsoid=wt2wt,wt2html
27756 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27758 <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>"]}">
27770 ## Remex doesn't account for fostered content.
27772 5. Encapsulate foster-parented transclusion content
27774 parsoid=wt2wt,wt2html
27776 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27778 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27780 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}'>foo</p><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27783 ## Remex doesn't account for fostered content.
27785 6. Encapsulate foster-parented transclusion content
27787 parsoid=wt2wt,wt2html
27789 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27791 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
27793 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}'>foo</p><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p data-parsoid='{"stx":"html"}'>ok</p>
27797 7. Encapsulate foster-parented transclusion content
27799 parsoid=wt2wt,wt2html
27801 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27803 <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>
27813 ## Remex doesn't account for fostered content.
27814 # Note that the wt is broken on purpose: the = should be {{=}} if you
27815 # don't want it to be a template parameter key.
27817 8. Encapsulate foster-parented transclusion content
27819 parsoid=wt2wt,wt2html
27822 }}{|{{echo|style='color:red'}}
27833 </td></tr></tbody></table>
27835 <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">
27836 </span><p about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"style","named":true}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"style":{"wt":"'color:red'"}},"i":0}},"\n|-\n|b\n|}"]}'>{{{1}}}</p><table about="#mwt3">
27839 </td></tr></tbody></table>
27842 ## Remex doesn't account for fostered content.
27844 9. Encapsulate foster-parented transclusion content
27846 parsoid=wt2wt,wt2html
27848 <table>{{echo|hi</table>hello}}
27850 hi<table></table><p>hello
27853 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi</table>hello"}},"i":0}}]}'>hi</p><table about="#mwt2"></table><p about="#mwt2">hello</p>
27857 Table in fosterable position
27868 <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">
27870 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27876 # Parsoid only for T66747
27878 Properly encapsulate empty-content transclusions in fosterable positions
27886 <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"}]]}'>
27891 ## No longer captures its original intention
27893 Always encapsulate foster box when template range is expanded to table
27907 T115289: Unclosed table
27909 {{echo|<table>}}<!--c-->[[Category:Two]]
27911 <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>
27915 T115289: Don't migrate newlines out of tables with fostered content
27917 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27919 <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>
27923 T73074: More fostering fun
27925 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27927 <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>
27931 Support <object> element with .data attribute
27935 <object data="test.swf"></object>
27937 <object data="test.swf"></object>
27941 Don't block XML namespace declaration
27943 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27945 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27948 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27951 # -----------------------------------------------------------------
27952 # The following section of tests are primarily to spec requirements
27953 # around Parsoid's serialization (old, new, edited content)
27955 # All these tests are marked Parsoid html2wt and html2html only
27956 # ----------------------------------------------------------------
27959 Ignore rel attribute in a-tags during serialization to url-links
27963 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27964 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27965 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27967 http://en.wikipedia.org/wiki/Foobar
27968 http://en.wikipedia.org/wiki/Foobar
27969 http://en.wikipedia.org/wiki/Foobar
27972 # 'mi' is a localinterwiki prefix as well as a language
27974 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27978 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27984 Parsoid should accept interwiki shortcuts
27988 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27989 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27990 <a href='./fr:Foo'>Foo</a></p>
27991 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27992 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27993 <a href='fr%3AFoo'>Foo</a></p>
27994 <p><a href='FR%3AFoo'>Foo</a>
27995 <a href='./FR:Foo'>Foo</a></p>
28010 Parsoid should not accept invalid interwiki shortcuts
28014 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
28015 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
28016 <a href='news:Foo'>Foo</a></p>
28025 New wikilinks should be serialized properly
28029 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
28030 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
28031 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
28032 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
28033 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
28037 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
28038 http://en.wikipedia.org/wiki/Foo
28039 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
28043 New wiki links (href variations)
28047 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28048 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
28049 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
28050 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
28055 [[Toxine bactérienne]]
28059 New wiki links (content string variations)
28063 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
28064 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
28065 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
28069 [[Foo_bar|./Foo_bar]]
28073 New category links (href variations)
28077 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
28078 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
28079 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
28081 [[Category:Toxine bactérienne]]
28082 [[Category:Toxine bactérienne]]
28083 [[Category:Toxine bactérienne]]
28087 New sol transparent links don't need indent-pre nowiki protection
28092 <link rel="mw:PageProp/redirect" href="./Main_Page">
28093 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
28094 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
28096 #WEITERLEITUNG [[Main Page]]
28097 <!-- this is good --> [[Category:Good]]
28098 <!-- this is great --> [[Kategorie:Great]]
28102 New interlanguage links (href variations)
28106 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
28107 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
28108 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
28110 [[es:Toxine bactérienne]]
28111 [[es:Toxine_bactérienne]]
28112 [[es:Toxine_bactérienne]]
28116 Image: Modifying size of an image (1)
28119 "modes": ["wt2wt"],
28121 ["img[height]", "attr", "height", "22"],
28122 ["img[width]", "attr", "width", "200"]
28126 [[Image:Foobar.jpg|230x230px]]
28128 [[Image:Foobar.jpg|200x200px]]
28132 Image: Modifying size of an image (2)
28135 "modes": ["wt2wt"],
28137 ["img[height]", "attr", "height", "100"],
28138 ["img[width]", "attr", "width", "500"]
28142 [[Image:Foobar.jpg|230x230px]]
28144 [[Image:Foobar.jpg|500x500px]]
28147 # Change in size is ignored so long as class='mw-default-size'
28149 Image: Modifying size of an image (3)
28152 "modes": ["wt2wt"],
28154 ["figure[class]", "removeClass", "mw-default-size"],
28155 ["figure img", "attr", "height", "19"],
28156 ["figure img", "attr", "width", "170"]
28160 [[Image:Foobar.jpg|thumb]]
28162 [[Image:Foobar.jpg|thumb|170x170px]]
28166 Image: Modifying alignment of an image (T50665)
28169 "modes": ["wt2wt"],
28171 ["figure[class]", "removeClass", "mw-halign-right"],
28172 ["figure[class]", "addClass", "mw-halign-left"]
28176 [[Image:Foobar.jpg|thumb|caption|right]]
28178 [[Image:Foobar.jpg|thumb|caption|left]]
28182 Image: Modifying mw-default-size of an frameless image (T64805)
28185 "modes": ["wt2wt"],
28187 ["figure.mw-default-size", "removeClass", "mw-default-size"]
28191 [[Image:Foobar.jpg|frameless|right]]
28193 [[Image:Foobar.jpg|frameless|right|220x220px]]
28197 Image: Modifying valign of an image (T51221)
28200 "modes": ["wt2wt"],
28202 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
28203 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
28207 [[File:Foobar.jpg|20px|middle]]
28209 [[File:Foobar.jpg|20px|text-top]]
28213 Image: Modifying alt attribute of an image (T58400)
28216 "modes": ["wt2wt"],
28218 ["img[alt]", "attr", "alt", "some alternate edited text"]
28222 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
28224 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
28228 Image: Modifying caption of an image
28231 "modes": ["wt2wt"],
28233 ["figcaption", "text", "new caption"]
28237 [[Image:Foobar.jpg|thumb|original caption]]
28239 [[Image:Foobar.jpg|thumb|new caption]]
28243 Image: empty alt attribute (T50924)
28247 [[File:Foobar.jpg|thumb|alt=|bar]]
28249 <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>
28253 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
28259 <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>
28261 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
28265 Image: Block level image should have \n before and after
28268 [[File:Foobar.jpg|right|thumb|150x150px]]
28272 <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>
28277 Image: New block level image should have \n before and after (existing content)
28280 [[File:Foobar.jpg|right|thumb|150x150px]]
28284 <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>
28289 Image: upright option (parsoid)
28291 [[File:Foobar.jpg|thumb|upright|caption]]
28292 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
28293 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
28295 <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>
28296 <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>
28297 <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>
28301 Image: upright option is ignored on inline and frame images (parsoid)
28303 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
28305 <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>
28309 Image: in template parameter with empty parameter
28311 {{echo|[[File:Foobar.jpg|link=]]}}
28313 <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>
28317 Image: from basic HTML (1)
28321 <span typeof="mw:Image">
28322 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28325 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28329 Image: from basic HTML (2)
28333 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
28335 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
28339 Image: from basic HTML (3)
28343 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
28345 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
28349 Image: from basic HTML (4)
28353 <img src="./File:Foobar.jpg">
28355 [[File:Foobar.jpg|link=]]
28359 Image: Invalid title as link
28361 [[File:Foobar.jpg|link=<]]
28363 <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>
28366 <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>
28370 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28375 <li><p>foo</p></li>
28382 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28386 <ul> <li>foo</li></ul>
28392 Don't strip leading whitespace when handling indent-pre suppressing tags
28397 <tr><td> indented row</td></tr>
28400 <b>This is very bold of you!</b>
28403 indented cell (no pre-wrapping!)
28413 '''This is very bold of you!'''
28417 indented cell (no pre-wrapping!)
28425 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28447 <nowiki> </nowiki></span>bar2
28450 <nowiki> </nowiki><span>bar</span>
28453 <nowiki> </nowiki><span>foo</span>
28458 Lists: Dont insert newlines in a serialized list item.
28462 <ul><li>a<br>b</li><li>c</li></ul>
28469 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28472 "modes": ["html2wt"],
28473 "scrubWikitext": false
28476 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28477 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28479 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28480 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28482 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28484 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28486 == hello there [[Category:A1]] ==
28488 == [[Category:A2]] hi pal ==
28490 == <!--foo--> [[Category:A3]] how goes it ==
28492 == it goes well [[Category:A4]] <!--bar--> ==
28494 ==howdy [[Category:A5]]==
28500 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28503 "modes": ["html2wt"],
28504 "scrubWikitext": true
28507 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28508 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28510 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28511 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28513 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28521 <!--foo-->[[Category:A3]]
28526 [[Category:A4]] <!--bar-->
28534 Headings: Don't hoist metas that come from templates
28537 "modes": ["html2wt"],
28538 "scrubWikitext": true
28541 <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>
28543 == {{echo|foo [[Category:Foo]]}} ==
28547 Headings: Category in ref isn't hoisted
28550 "modes": ["html2wt"],
28551 "scrubWikitext": true
28554 <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>
28556 <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>
28559 [[Category:Baz]] </ref> ==
28565 Parsoid: Serialize positional parameters with = in them as named parameter
28569 <p about="#mwt1" typeof="mw:Transclusion"
28570 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28572 <p about="#mwt1" typeof="mw:Transclusion"
28573 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28575 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28576 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28577 <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>
28581 {{echo|1=f=oo|2=bar}}
28583 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28584 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28585 {{echo|<nowiki>f=oo</nowiki>|bar}}
28589 Parsoid: Serialize positional parameters with = in extlink as named parameter
28593 <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>
28595 {{echo|1=http://stuff?is=ok}}
28599 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28603 <div>a<p>b</p></div>
28624 Substrings resembling wikitext in hrefs should not get nowiki escapes
28628 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28634 Enforce single-line context in the serializer
28641 <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">
28642 </span><span about="#mwt1">you</span> </h2>
28644 <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>
28646 <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
28647 there</span></li></ol>
28659 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28666 </tbody></table></dd></dl>
28670 == hi {{bogus|there
28681 * foo '''bar''' baz
28693 Serialize new placeholder space without spans
28697 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28699 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28701 <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>
28707 <ref>foo : bar</ref>ok
28711 #-----------------------
28712 # Tag minimization tests
28713 #-----------------------
28716 1. I/B quote minimization: wikitext-only tags should be combined
28720 <p><i>A</i><i>B</i></p>
28721 <p><b>A</b><b>B</b></p>
28722 <p><i>A</i><b><i>B</i></b></p>
28723 <p><b>A</b><i><b>B</b></i></p>
28724 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28725 <p><i><b>A</b></i><i><b>B</b></i></p>
28726 <p><i><b>A</b></i><b><i>B</i></b></p>
28727 <p><b><i>A</i></b><i><b>B</b></i></p>
28747 2. I/B quote minimization: wikitext and html tags should not be combined
28751 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28752 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28756 ''A''<nowiki/>'''<i>B</i>'''
28760 3. I/B quote minimization: templated content stops minimization
28764 <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>
28765 <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>
28767 ''A''{{echo|''B''}}
28769 ''A''{{echo|'''''B'''''}}
28773 4. I/B quote minimization: new content should be mimimized with adjacent old content
28777 <p><i>A</i><i>B</i></p>
28778 <p><b>A</b><b>B</b></p>
28779 <p><i>A</i><b><i>B</i></b></p>
28789 5a. Merge adjacent quote nodes if they've been edited
28792 "modes": ["wt2wt", "selser"],
28794 ["p", "contents", "remove", ":contains('b')"]
28804 5b. Merge adjacent quote nodes if they've been edited
28807 "modes": ["wt2wt", "selser"],
28813 ''a''<span id="x">b</span>''c''
28819 1. Merge adjacent link nodes as long as at least one element is new
28822 "modes": ["html2wt"],
28823 "scrubWikitext": true
28826 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28827 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28828 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28832 [[Football|Foot]][[Football|ball]]
28836 2. Merge adjacent link nodes and enable additional normalizations
28839 "modes": ["html2wt"],
28840 "scrubWikitext": true
28843 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28849 3. Don't merge adjacent link nodes if scrubWikitext is false
28852 "modes": ["html2wt"],
28853 "scrubWikitext": false
28856 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28858 [[Football|Foot]][[Football|ball]]
28862 1. Move format tags outside of WikiLink
28865 "modes": ["html2wt"],
28866 "scrubWikitext": true
28869 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
28870 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
28871 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
28874 '''''[[Football]]'''''
28875 <u>'''''[[Football]]'''''</u>
28879 2. Move format tags outside of WikiLink with mergable A tags
28882 "modes": ["html2wt"],
28883 "scrubWikitext": true
28886 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
28888 '''''[[Football]]'''''
28892 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
28895 "modes": ["html2wt"],
28896 "scrubWikitext": true
28899 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
28901 <font color="red"><u>'''[[Foo]]'''</u></font>
28905 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
28908 "modes": ["html2wt"],
28909 "scrubWikitext": true
28912 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
28913 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
28914 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
28916 [[Foo|<font color="red">Foo</font>]]
28917 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
28918 [[Foo|<span class="Bar">Foo</span>]]
28922 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
28925 "modes": ["selser"],
28926 "scrubWikitext": true,
28928 ["a", "html", "<i>Foo</i>"]
28938 6. Regression test: Manual edit test to ensure diff markers are not lost
28941 "modes": ["selser"],
28942 "scrubWikitext": true,
28944 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
28954 7. T194083 Regression test: Manual edit test to ensure nested diff markers aren't inserted
28957 "modes": ["selser"],
28958 "scrubWikitext": true,
28960 ["div", "after", "\n<p><a href='./Foo' rel='mw:WikiLink'>Foo </a>, placeholder</p>"]
28964 <div>placeholder</div>
28966 <div>placeholder</div>
28967 [[Foo]] , placeholder
28970 #------------------------------
28971 # End of tag minimization tests
28972 #------------------------------
28975 T56262: New entities
28979 <span typeof="mw:Entity"> </span>
28984 ## Note that there is no wikitext output for 'unknownproperty' ##
28985 ## Unknown magic words are silently dropped ##
28992 <meta property='mw:PageProp/toc' />
28993 <meta property='mw:PageProp/notoc' />
28994 <meta property='mw:PageProp/forcetoc' />
28995 <meta property='mw:PageProp/index' />
28996 <meta property='mw:PageProp/noindex' />
28997 <meta property='mw:PageProp/nogallery' />
28998 <meta property='mw:PageProp/noeditsection' />
28999 <meta property='mw:PageProp/notitleconvert' />
29000 <meta property='mw:PageProp/nocontentconvert' />
29001 <meta property='mw:PageProp/unknownproperty' />
29011 __NOCONTENTCONVERT__
29015 Consecutive <pre>s should not get merged
29017 parsoid=html2wt,html2html
29019 <pre>a</pre><pre>b</pre>
29047 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
29051 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
29053 [[Special:BookSources/1234567890|ISBN 1234567895]]
29057 Edited RFC links not serializable as RFC links should serialize as extlinks
29061 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
29063 [https://tools.ietf.org/html/rfc123 New RFC]
29067 Edited PMID links not serializable as PMID links should serialize as extlinks
29071 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
29073 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
29077 WTS of autolinks with trailing/surrounding context
29081 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
29082 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
29083 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
29084 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
29085 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
29086 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
29088 http://cscott.net'''foo'''
29090 http://cscott.net<b>foo</b>
29092 '''http://cscott.net'''
29094 '''http://cscott.net '''
29096 '''http://cscott.net<nowiki/>x'''
29098 http://cscott.net<nowiki/>x
29102 WTS of autolinks with nowikis (round-trip)
29104 x<nowiki/>http://cscott.net<nowiki/>x
29106 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
29109 # this is the "easy" test because it leaves in place all the
29110 # data-parsoid information indicating this is an autolink
29112 WTS of autolinks with escapes (editing)
29115 "modes": ["wt2wt"],
29117 [ "span", "remove" ]
29121 x<nowiki/>http://cscott.net<nowiki/>x
29123 x<nowiki/>http://cscott.net<nowiki/>x
29127 WTS of edited autolink-like text (T103364)
29130 "modes": ["wt2wt"],
29132 [ "span[typeof]", "removeAttr", "typeof" ]
29136 Not a link: <nowiki>http://example.com</nowiki>.
29138 Not a link: <span><nowiki>http://example.com</nowiki></span>.
29142 WTS of newly-authored autolink-like text (T103364)
29146 <p>http://example.com is not a link.</p>
29148 <nowiki>http://example.com</nowiki> is not a link.
29152 WTS of autolink-like text after an autolink (T108563)
29156 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
29158 http://example.com <nowiki>http://example.com</nowiki> is not a link.
29162 Magic links inside links (not autolinked)
29164 [[Foo|http://example.com]]
29167 [[Foo|ISBN 123456789x]]
29169 [http://foo.com http://example.com]
29170 [http://foo.com RFC 1234]
29171 [http://foo.com PMID 1234]
29172 [http://foo.com ISBN 123456789x]
29174 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
29175 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
29176 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
29177 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
29178 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
29179 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
29180 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
29181 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
29184 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
29185 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
29186 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
29187 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
29189 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
29190 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
29191 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
29192 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
29196 Magic links inside image captions (autolinked)
29198 [[File:Foobar.jpg|thumb|http://example.com]]
29199 [[File:Foobar.jpg|thumb|RFC 1234]]
29200 [[File:Foobar.jpg|thumb|PMID 1234]]
29201 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
29203 <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>
29204 <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>
29205 <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>
29206 <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>
29208 <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>
29209 <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>
29210 <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>
29211 <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>
29215 WTS of magic word text (T109371)
29220 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
29221 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
29223 <nowiki>RFC 1234</nowiki>
29225 [http://foo.com RFC 1234]
29231 Edited Redirect link should emit a non-piped wikitext link
29235 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
29241 T75121: Infer extension name from typeOf if data-mw is not present
29243 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29245 <div typeOf="mw:Extension/foo"></div>
29250 # Note that the <p> wrapping isn't present in PHP parser output
29251 # The important thing for this test is that P-wrapping doesn't
29252 # interfere with the <nowiki> protection for leading - in <td>
29253 # (which isn't necessary for <th>).
29255 T88318: p-wrapped dash in table.
29257 parsoid=html2wt,wt2wt
29260 <tr><th><p>-</p></th><th><p>- </p></th></tr>
29261 <tr><td><p>-</p></td><td><p>- </p></td></tr>
29262 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
29269 |<nowiki>-</nowiki>
29270 |<nowiki>- </nowiki>
29290 <td><small>-</small>
29297 </td></tr></tbody></table>
29301 T149209: WTS: Handle newlines in table cells properly
29309 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
29311 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
29317 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
29319 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
29341 T149209: Selser: Handle newlines in table cells properly
29344 "modes": ["selser"],
29346 [ "#h1", "html", "a\nb\n" ],
29347 [ "#h2", "html", "a\nb\n" ],
29348 [ "#c1", "html", "a\nb\n" ],
29349 [ "#c2", "html", "<p>a</p>" ],
29350 [ "#c3", "html", "<p>a</p>" ],
29351 [ "#c4", "html", "edit-me<p>a</p>" ]
29356 ! id="h1" |edit-me!!1
29358 ! id="h2" |edit-me||2
29360 | id="c1" |edit-me||3
29362 | id="c2" |edit-me||4
29364 | id="c3" |edit-me||p||q||r
29366 | id="c4" |edit-me||p||q||r
29395 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29400 <td id='mwAc'>foo</td>
29401 <td id='serialize-this'>bar</td>
29406 | id="serialize-this" |bar
29411 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29415 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29417 <div id="hello">ok</div>
29421 Testing serialization after deletion in references
29424 "modes": ["wt2wt"],
29430 hi <ref><div id="x">ho</div></ref>
29440 Testing serialization after deletion of table cells
29443 "modes": ["wt2wt", "selser"],
29451 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29461 Testing selser after addition of new row before first row (T125419)
29464 "modes": ["wt2wt", "selser"],
29466 [ "tr", "before", "<tr><td>X</td></tr>" ]
29482 Serialize new table rows in a HTML table using HTML tags
29485 "modes": ["wt2wt", "selser"],
29487 [ "tr", "before", "<tr><td>X</td></tr>" ]
29491 <table><tr><td>a</td></tr></table>
29493 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29497 Serialize new table cells in a HTML row using HTML tags
29500 "modes": ["wt2wt", "selser"],
29502 [ "td", "before", "<td>X</td>" ]
29506 <table><tr><td>a</td></tr></table>
29508 <table><tr><td>X</td><td>a</td></tr></table>
29512 Serialize wikitext list items as HTML list items when embedded in a HTML list
29516 <ul data-parsoid='{"stx": "html"}'>
29517 <li data-parsoid='{}'>a</li>
29527 # SSS FIXME: Is this actually a good thing given the
29528 # odd nested list output that is generated by MW?
29529 # <ul><li>foo<ul>..</ul></li></ul> instead of
29530 # <ul><li>foo</li><ul>..</ul></ul>
29532 Wikitext lists can be nested inside HTML lists
29536 <ul data-parsoid='{"stx": "html"}'>
29537 <li data-parsoid='{"stx": "html"}'>a
29538 <ul><li>b</li></ul>
29542 <ul data-parsoid='{"stx": "html"}'>
29544 <ul><li>y</li></ul>
29565 "modes": ["wt2wt"],
29567 [ "#xyz", "before", "<b>before</b> stuff " ],
29568 [ "#xyz", "after", " stuff <i>after</i>" ],
29569 [ "#xyz", "html", "x <b>y</b> z" ]
29573 <span id="xyz">hello</span>
29575 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29579 Never serialize a-tag as html, regardless of what data-parsoid has to say
29581 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29583 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29588 ## SSS FIXME: This is broken output nevertheless.
29589 ## What might be a reasonable non-broken output for this?
29590 ## This is an edge case unlikely to be seen in production
29591 ## that I am not wasting more time on this right now.
29593 Never serialize a-tag as html, no matter what attributes it has
29595 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29597 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29599 [http://boo.org http://boohoo.org]
29602 # Misnested is an indication that selser can reuse the source but these have
29603 # shown to sneak through on occasion. See T101768.
29604 # The original wikitext here is: [http://test.com [[one]] two three]
29606 Strip span tags added to mark misnested links
29610 <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>
29612 [http://test.com][[one]] two three
29616 Catch regression when unpacking misnested links
29620 {{echo|hi}}[http://example.com [[ho]]]
29622 <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>
29626 Catch regression when unpacking with trailing content
29628 {{echo|Foo <references/> bar}}
29630 <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>
29634 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29638 <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|}"]}'>
29650 ## This test verifies the presence and computation of this attribute indirectly
29651 ## by making an edit and ensuring that the serialization is correct (which it would be
29652 ## only if firstWikitextNode is properly set).
29654 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
29657 "modes": ["wt2wt"],
29659 [ "div#x", "remove" ],
29660 [ "div", "before", "<div>new</div>" ]
29664 <div id="x">foo</div>
29666 {{echo|<div>boo</div>
29674 {{echo|<div>boo</div>
29680 # --------------------------------------------
29681 # Tests spec'ing wikitext serialization norms |
29682 # --------------------------------------------
29685 Serialize multi-line indent-pre starting with wikitext syntax
29699 1. Categories should always be serialized on their own line
29703 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
29711 2. Categories that are part of templates should not introduce a line break
29713 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
29715 <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>
29718 # Careful while editing these next 2 tests. There are \u200f characters
29719 # before and after the <link> tags in the HTML and following some
29720 # of the categories in wikitext
29721 # Do not remove these characters in edits.
29723 # As part of the serialization, these bidi characters will get stripped.
29725 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
29728 "modes": ["html2wt"],
29729 "scrubWikitext": true
29732 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
29733 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
29736 [[קטגוריה: שיטות משפט]]
29740 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
29743 "modes": ["html2wt"],
29744 "scrubWikitext": true
29747 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
29754 Lists: Add space after bullets
29761 <li><span> baz</span></li>
29766 * <span> baz</span>
29770 1. Headings: Add space before/after == (T53744)
29777 <h2><span> baz</span></h2>
29785 == <span> baz</span> ==
29789 2. Headings: Add space before/after == even after hoisted content
29792 "modes": ["html2wt"],
29793 "scrubWikitext": true
29796 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29804 1. Headings: suppress newly created empty headings
29807 "modes": ["html2wt"],
29808 "scrubWikitext": true
29816 2. Headings: don't suppress empty headings if scrubWikitext is false
29826 3. Headings: suppress empty headings on edits
29829 "modes": ["selser"],
29830 "scrubWikitext": true,
29836 ==<span id="x">foo</span>==
29841 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29844 "modes": ["html2wt"],
29845 "scrubWikitext": true
29848 <h2>foo<br/>bar</h2>
29849 <h2>foo <span><br/>bar</span> baz</h2>
29853 == foo <span> bar</span> baz ==
29857 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29860 "modes": ["html2wt"],
29861 "scrubWikitext": false
29864 <h2>foo<br/>bar</h2>
29870 1. WT Quote Tags: suppress newly created empty style tags
29873 "modes": ["html2wt"],
29874 "scrubWikitext": true
29882 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29888 ''<nowiki/>'''''<nowiki/>'''
29892 3. WT Quote Tags: suppress empty style tags on edits
29895 "modes": ["selser"],
29896 "scrubWikitext": true,
29902 '''<span id="x">foo</span>'''
29907 1. Anchors: suppress newly created empty anchors
29910 "modes": ["html2wt"],
29911 "scrubWikitext": true
29914 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29919 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29922 "modes": ["html2wt"],
29923 "scrubWikitext": false
29926 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29932 3. Anchors: suppress empty anchors on edits
29935 "modes": ["selser"],
29936 "scrubWikitext": true,
29942 [[Test|<span id="x">foo</span>]]
29947 3a. Anchors: do not suppress numbered extlinks
29950 "modes": ["wt2wt"],
29951 "scrubWikitext": true
29956 <a rel="mw:ExtLink" href="http://foo.com"></a>
29960 3b. Anchors: do not suppress numbered extlinks
29963 "modes": ["wt2wt"],
29964 "scrubWikitext": true,
29970 [http://foo.com <span id="x">foo</span>]
29976 Normalizations should be restricted to edited content
29979 "modes": ["selser"],
29980 "scrubWikitext": true,
29982 [ "h1", "before", "<i></i>"]
29996 1. Multiple normalizations (html2wt)
29999 "modes": ["html2wt"],
30000 "scrubWikitext": true
30004 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
30005 </a><b><i></i></b>x</p>
30014 2. Multiple normalizations (selser)
30017 "modes": ["selser"],
30018 "scrubWikitext": true,
30020 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
30024 <span id="x">foo</span>
30026 <span id="x">foo</span>
30032 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
30035 "modes": ["html2wt"],
30036 "scrubWikitext": true
30048 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
30055 <nowiki> </nowiki>hi
30057 <nowiki> </nowiki> hello
30061 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
30064 "modes": ["html2wt"],
30065 "scrubWikitext": true
30074 baz bang</td></tr></table>
30080 bar<span>boo</span></p>
30096 bar<span>boo</span>
30100 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
30103 "modes": ["selser"],
30104 "scrubWikitext": true,
30106 [ "p", "html", " a\n b" ]
30117 1. New links that end in spaces
30120 "modes": ["html2wt"],
30121 "scrubWikitext": false
30124 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30125 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30126 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30128 [[Berlin ]]<nowiki/>is the capital of Germany.
30132 [[Boston ]] is a city.
30136 2. New links that end in spaces
30139 "modes": ["html2wt"],
30140 "scrubWikitext": true
30143 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
30144 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
30145 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
30147 [[Berlin]] is the capital of Germany.
30151 [[Boston]] is a city.
30155 1. Table cells with escapable prefixes
30158 "modes": ["html2wt"],
30159 "scrubWikitext": false
30163 <tr><td>a</td></tr>
30164 <tr><td>-</td></tr>
30165 <tr><td>+</td></tr>
30171 |<nowiki>-</nowiki>
30173 |<nowiki>+</nowiki>
30178 2. Table cells with escapable prefixes
30181 "modes": ["html2wt"],
30182 "scrubWikitext": true
30186 <tr><td>a</td></tr>
30187 <tr><td>-</td></tr>
30188 <tr><td>+</td></tr>
30201 3a. Table cells with escapable prefixes after edits
30204 "modes": ["selser"],
30205 "scrubWikitext": true,
30207 [ "table tbody tr:first-child td:first-child", "remove"]
30221 3b. Table cells with escapable prefixes after edits
30224 "modes": ["selser"],
30225 "scrubWikitext": true,
30227 [ "table tbody tr:first-child td:first-child", "html", "-" ],
30234 |<span id="x">foo</span>+
30243 # FIXME: This test will fail because
30244 # normalization doesn't realize that the id attribute
30245 # will eliminate the escapable scenario
30247 4a. Table cells without escapable prefixes after edits
30250 "modes": ["selser"],
30251 "scrubWikitext": true,
30253 [ "#x", "html", "-" ]
30266 ## This tests normalizer's ability to discriminate between
30267 ## cells having identical content.
30269 4b. Table cells without escapable prefixes after edits
30272 "modes": ["selser"],
30273 "scrubWikitext": true,
30275 [ "td", "html", "-" ]
30288 ## This tests normalizer's ability to not be tripped by
30289 ## comments (and whitespace)
30291 4c. Table cells without escapable prefixes after edits
30294 "modes": ["selser"],
30295 "scrubWikitext": true,
30297 [ "table tbody tr td:first-child", "remove" ]
30312 ## This tests normalizer's ability to handle HTML cells
30314 4d. Table cells without escapable prefixes after edits
30317 "modes": ["selser"],
30318 "scrubWikitext": true,
30320 [ "td", "html", "-" ]
30325 <tr><td>a</td></tr>
30329 <tr><td>-</td></tr>
30333 ## T111151 Remove font elements without attributes
30335 5a. font tags without attributes should be dropped in scrubWikitext mode
30338 "modes": ["html2wt"],
30339 "scrubWikitext": true
30343 <font><font>bar</font></font>
30344 <font class="x">boo</font>
30348 <font class="x">boo</font>
30352 5b. font tags should not be dropped without scrubWikitext being enabled
30355 "modes": ["html2wt"],
30356 "scrubWikitext": false
30365 Escape nowiki DOM elements
30369 <nowiki><i>foo</i></nowiki>
30371 <nowiki>''foo''</nowiki>
30374 # This is meant to be an interim fix while we go about figuring out
30375 # how to not introduce these trailing <nowiki/>s in the first place.
30377 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30381 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30383 <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>
30384 <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>
30398 New list is serialized on newlines
30402 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30406 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30408 The quick brown fox jumps over the lazy dog.
30414 The quick onyx goblin jumps over the lazy dwarf.
30418 New lists in formatting elements serialized w/o newlines
30430 <small><ul><li>hi</li></ul></small>
30442 New list in table doesn't need newlines
30446 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30455 # ---------------------------------------------------
30456 # End of tests spec'ing wikitext serialization norms |
30457 # ---------------------------------------------------
30461 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30469 <td><b>c</b><p>d</p></td>
30488 Anchor without href scenarios
30490 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30493 <a class="no">dice</a>
30498 <span name="foo"></span>
30502 New transclusion added after a list should be serialized after the list
30506 <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>
30512 # -----------------------------------------------------------------
30513 # End of section for Parsoid-only html2wt tests for serialization
30515 # -----------------------------------------------------------------
30517 # -----------------------------------------------------------------
30518 # The following section of tests are primarily to spec behavior of
30519 # the selective serializer. All these tests have manual selser
30520 # changes. The automated selser changes for all tests handle the
30521 # wide variation of changes, but these tests here capture specs
30522 # deterministically.
30523 # ----------------------------------------------------------------
30527 Selser: New comments should not be lost
30530 "modes": ["selser"],
30532 [ "#a", "after", "<!--c1-->" ],
30533 [ "#b", "before", "<!--c2-->" ]
30537 <span id="a">a</span>
30539 <span id="b">b</span>
30541 <span id="a">a</span><!--c1-->
30543 <!--c2--><span id="b">b</span>
30548 Selser: Check for validity of DSR before using it
30551 "modes": ["selser"],
30553 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30557 <span id="a">a</span>
30559 {{DISPLAYTITLE:foo}}
30560 <span id="a">a</span>
30564 1. DOMDiff: Changes to <ref> content should be looked up using id
30567 "modes": ["selser"],
30569 ["#X", "after", "bar"],
30570 ["#Y", "after", "baz"]
30574 X <ref><span id="X">foo</span></ref>
30577 <ref name="a"><span id="Y">foo</span></ref>
30580 X <ref><span id="X">foo</span>bar</ref>
30583 <ref name="a"><span id="Y">foo</span>baz</ref>
30588 2. DOMDiff: Changes to <ref> content should be looked up using id
30591 "modes": ["selser"],
30593 ["#Z", "after", "bar"]
30597 A <ref>foo bar for a</ref>
30598 B <ref group="X" name="b" />
30602 <references group="X">
30603 <ref name="b"><span id="Z">foo</span></ref>
30606 A <ref>foo bar for a</ref>
30607 B <ref group="X" name="b" />
30611 <references group="X">
30612 <ref name="b"><span id="Z">foo</span>bar</ref>
30617 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30620 "modes": ["selser"],
30622 [ "div:first-child", "text", "bar" ]
30626 <div style="{{1x|color:red;}}%">foo</div>
30628 <div style="{{1x|color:red;}}%">bar</div>
30640 <li class="mw-empty-elt"></li>
30641 <li class="mw-empty-elt"></li>
30648 [[File:Thumb.png|thumb]]
30650 <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>
30652 <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>
30656 unclosed internal link XSS (T137264)
30658 [[#%3Cscript%3Ealert(1)%3C/script%3E|
30660 <p>[[#<script>alert(1)</script>|
30663 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
30667 Validating that <style> isn't eaten by tidy (T167349)
30672 <style>.foo::before { content: "<foo>"; }</style>
30673 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30677 <style>.foo::before { content: "<foo>"; }</style>
30678 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30683 Validating that <style> isn't wrapped in a paragraph (T186965)
30687 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30689 <style>.foo::before { content: "<foo>"; }</style>
30691 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30693 But if it's on a line with other content, let it be wrapped.
30695 <style>.foo::before { content: "<foo>"; }</style> bar
30697 foo <style>.foo::before { content: "<foo>"; }</style>
30699 foo <style>.foo::before { content: "<foo>"; }</style> bar
30701 And the same if we have non-paragraph-breaking whitespace
30704 <style>.foo::before { content: "<foo>"; }</style>
30707 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30709 <style>.foo::before { content: "<foo>"; }</style>
30710 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30711 <p>But if it's on a line with other content, let it be wrapped.
30712 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
30713 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
30714 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
30715 </p><p>And the same if we have non-paragraph-breaking whitespace
30717 <style>.foo::before { content: "<foo>"; }</style>
30723 Validating that <link> isn't wrapped in a paragraph (T186965)
30727 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30729 <link rel="foo" href="bar"/>
30731 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30733 But if it's on a line with other content, let it be wrapped.
30735 <link rel="foo" href="bar"/> bar
30737 foo <link rel="foo" href="bar"/>
30739 foo <link rel="foo" href="bar"/> bar
30741 And the same if we have non-paragraph-breaking whitespace
30744 <link rel="foo" href="bar"/>
30747 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30749 <link rel="foo" href="bar"/>
30750 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30751 <p>But if it's on a line with other content, let it be wrapped.
30752 </p><p><link rel="foo" href="bar"/> bar
30753 </p><p>foo <link rel="foo" href="bar"/>
30754 </p><p>foo <link rel="foo" href="bar"/> bar
30755 </p><p>And the same if we have non-paragraph-breaking whitespace
30757 <link rel="foo" href="bar"/>
30763 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
30765 wgFragmentMode=[ 'html5', 'legacy' ]
30767 ==A&B&C&amp;D&amp;amp;E==
30768 [[#A&B&C&amp;D&amp;amp;E]]
30770 <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>
30771 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
30774 <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>
30775 <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>
30779 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
30781 wgFragmentMode=[ 'legacy' ]
30783 ==A&B&C&amp;D&amp;amp;E==
30784 [[#A&B&C&amp;D&amp;amp;E]]
30786 <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>
30787 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
30792 Decoding of HTML entities in embedded HTML tags
30794 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30796 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30799 <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>
30803 Decoding of HTML entities in indicator names for IDs (T104196)
30805 parsoid=wt2html,html2html
30808 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30810 1&2&3&4&amp;5=Indicator
30813 <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>
30816 # this version of the test strips out the ambiguity so Parsoid rts cleanly
30818 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
30822 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30824 1&2&3&4&amp;5=Indicator
30827 <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>
30830 # This fragment mode is what Parsoid supports.
30832 HTML5 ids: fallback to legacy
30834 wgFragmentMode=[ 'html5', 'legacy' ]
30846 ==Hey < # " > % : '==
30847 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30849 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30851 <!-- These two links should produce identical HTML -->
30852 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30855 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
30857 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30858 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30859 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30860 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30861 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30862 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30866 <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>
30867 <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>
30868 <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>
30869 <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>
30870 <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>
30871 <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>
30872 <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>
30873 </p><p>💩 <span id="💩"></span>
30874 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30877 <h2 id="Foo_bar">Foo bar</h2>
30879 <h2 id="foo_Bar_2">foo Bar</h2>
30881 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30883 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30885 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30887 <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>
30888 <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>
30890 <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>
30892 <!-- These two links should produce identical HTML -->
30893 <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>
30896 # Parsoid doesn't support this mode
30898 HTML5 ids: legacy with a fallback to modern
30900 wgFragmentMode=[ 'legacy', 'html5' ]
30912 ==Hey < # " > % : '==
30913 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30915 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30917 <!-- These two links should produce identical HTML -->
30918 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30921 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
30923 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30924 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30925 <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>
30926 <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>
30927 <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>
30928 <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>
30932 <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>
30933 <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>
30934 <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>
30935 <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>
30936 <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>
30937 <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>
30938 <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>
30939 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30940 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30944 # Parsoid doesn't support this mode.
30946 HTML5 ids: no legacy
30948 wgFragmentMode=[ 'html5' ]
30960 ==Hey < # " > % : '==
30961 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30963 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30965 <!-- These two links should produce identical HTML -->
30966 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30969 <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"/><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
30971 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30972 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30973 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30974 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30975 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30976 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30980 <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>
30981 <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>
30982 <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>
30983 <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>
30984 <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>
30985 <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>
30986 <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>
30987 </p><p>💩 <span id="💩"></span>
30988 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30993 T90902: Normalize weird characters in section IDs
30995 wgFragmentMode=[ 'html5', 'legacy' ]
31001 <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>
31002 <p><a href="#Foo_bar">#Foo bar</a>
31005 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
31006 <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>
31010 T51672: Test for brackets in attributes of elements in external link texts
31012 [http://example.com/ link <span title="title with [brackets]">span</span>]
31013 [http://example.com/ link <span title="title with [brackets]">span</span>]
31016 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31017 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31020 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
31021 <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>
31025 T72875: Test for brackets in attributes of elements in internal link texts
31027 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31028 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
31031 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31032 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31035 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
31036 <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>
31040 T199926: html arrow wt: Parsoid sometimes trips up on verticalbar chars in hrefs
31043 "modes": ["html2wt"]
31046 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total">9</a>
31047 <a href="https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total">10</a>
31049 [https://stats.wikimedia.org/v2/#/fr.wikipedia.org/reading/page-views-by-country/normal|map|2-Year~2016060100~2018071100|~total 9]
31050 [[stats:v2/#/fr.wikipedia.org/reading/page-views-by-country/normal%7Cmap%7C2-Year~2016060100~2018071100%7C~total|10]]
31054 T179544: {{anchorencode:}} output should be always usable in links
31056 wgFragmentMode=[ 'html5' ]
31058 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
31060 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
31063 <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>
31066 ## ------------------------------
31067 ## Parsoid section-wrapping tests
31068 ## ------------------------------
31070 Section wrapping for well-nested sections (no leading content)
31073 "wrapSections": true
31094 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31097 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31100 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31103 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
31106 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
31109 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
31116 Section wrapping for well-nested sections (with leading content)
31119 "wrapSections": true
31124 Para 2 with a <div>nested in it</div>
31137 <section data-mw-section-id="0"><p>Para 1.</p>
31139 <p>Para 2 with a </p><div>nested in it</div>
31143 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31146 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31149 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
31152 </section></section>
31156 Section wrapping with template-generated sections (good nesting 1)
31159 "wrapSections": true
31176 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31179 <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">
31180 </span><p about="#mwt1">b</p>
31181 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
31184 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
31188 # In this example, the template scope is mildly expanded to incorporate the
31189 # trailing newline after the transclusion since that is part of section 1.1.1
31191 Section wrapping with template-generated sections (good nesting 2)
31194 "wrapSections": true,
31195 "modes": ["wt2html", "wt2wt"]
31210 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31213 <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">
31214 </span><p about="#mwt1">b</p><span about="#mwt1">
31215 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
31216 </span><p about="#mwt1">d</p><span about="#mwt1">
31217 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
31221 # In this example, the template scope is mildly expanded to incorporate the
31222 # trailing newline after the transclusion since that is part of section 1.2.1
31224 Section wrapping with template-generated sections (good nesting 3)
31227 "wrapSections": true,
31228 "modes": ["wt2html", "wt2wt"]
31246 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
31249 <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">
31250 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
31251 </span><p about="#mwt1">b</p><span about="#mwt1">
31252 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
31253 </span><p about="#mwt1">c</p><span about="#mwt1">
31254 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
31255 </span><p about="#mwt1">d</p><span about="#mwt1">
31256 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
31260 # Because of section-wrapping and template-wrapping interactions,
31261 # the scope of the template is expanded so that the template markup
31262 # is valid in the presence of <section> tags.
31263 # This exercises the s1 is null scenario in the wrapSections code
31265 Section wrapping with template-generated sections (bad nesting 1)
31268 "wrapSections": true
31282 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
31285 <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"]}'>
31286 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
31287 </span><p about="#mwt1">b
31288 </p><span about="#mwt1">
31290 </span><p about="#mwt1">c</p><span about="#mwt1">
31291 </span></section></div></section>
31294 # Because of section-wrapping and template-wrapping interactions,
31295 # the scope of the template is expanded so that the template markup
31296 # is valid in the presence of <section> tags.
31297 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
31299 Section wrapping with template-generated sections (bad nesting 2)
31302 "wrapSections": true
31320 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
31323 </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">
31324 </span><p about="#mwt1">b</p><span about="#mwt1">
31325 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
31326 </span><p about="#mwt1">c</p><span about="#mwt1">
31328 </span><p about="#mwt1">d</p><span about="#mwt1">
31330 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
31334 # Because of section-wrapping and template-wrapping interactions,
31335 # additional template wrappers are added to <section> tags
31336 # so that template wrapping semantics are valid whether section
31337 # tags are retained or stripped. But, the template scope can expand
31338 # greatly when accounting for section tags.
31339 # This exercises the s1 and s2 are in different subtrees scenario
31341 Section wrapping with template-generated sections (bad nesting 3)
31344 "wrapSections": true,
31345 "modes": ["wt2html", "wt2wt"]
31363 <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>
31366 <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">
31367 </span><p about="#mwt1">b</p><span about="#mwt1">
31368 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
31369 </span><p about="#mwt1">c</p>
31372 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
31377 Section wrapping with uneditable lead section + div wrapping multiple sections
31380 "wrapSections": true
31385 <div style="border:1px solid red;">
31402 <section data-mw-section-id="-1"><p>foo</p>
31404 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31405 <section data-mw-section-id="1"><h1 id="1">1</h1>
31408 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31411 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31415 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31418 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31420 </section></section>
31424 Section wrapping with editable lead section + div overlapping multiple sections
31427 "wrapSections": true
31434 <div style="border:1px solid red;">
31451 <section data-mw-section-id="0"><p>foo</p>
31453 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31455 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31458 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31461 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31466 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31469 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31471 </section></section>
31475 HTML header tags should not be wrapped in section tags
31478 "wrapSections": true
31491 <section data-mw-section-id="0"><p>foo</p>
31493 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31495 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31497 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31499 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31503 Lead section containing only whitespace and comments.
31506 "wrapSections": true
31510 <!-- this is a comment, presumably significant to editors -->
31517 <section data-mw-section-id="0" data-parsoid="{}">
31518 <!-- this is a comment, presumably significant to editors -->
31519 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31522 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31527 Pseudo-sections emitted by templates should have id -2
31530 "wrapSections": true
31540 <section data-mw-section-id="-1"><p>foo</p>
31541 </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}}]}'>
31542 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31543 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31544 </section></div><span about="#mwt1">
31548 ##########################################################################
31549 Tests demonstrating white-space insensitivity in input wikitext
31550 for wikitext headings, wikitext list items, and wikitext table captions,
31551 headings, and cells. HTML versions of the same should preserve whitespace.
31552 ##########################################################################
31554 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31557 "modes": ["wt2html"],
31558 "preserveIEW": true
31562 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31563 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31564 == <!--Headings with fallback ids--> Личная жизнь ==
31565 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31566 ; <!--term to define--> term : <!--term's definition--> definition
31568 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31570 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31572 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31574 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
31576 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
31579 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31582 <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>
31583 <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>
31584 <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>
31585 <ul><li>List item</li></ul>
31586 <dl><dt>term </dt>
31587 <dd>definition</dd></dl>
31589 <caption>Table Caption
31592 <th>Table Heading 1</th>
31593 <th>Table Heading 2
31596 <td>Table Cell 1</td>
31600 <td>class="foo"</td>
31604 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
31605 </td></tr></tbody></table>
31608 <td>Table Cell 1</td>
31610 </td></tr></tbody></table> foo</dd></dl>
31612 <meta property="mw:PageProp/notoc">
31613 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
31614 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
31615 <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>
31616 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
31617 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
31619 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
31621 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
31623 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31625 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
31627 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
31630 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31631 </tbody></table> foo<!--c1--></dd></dl>
31634 # Looks like <caption> is not accepted in HTML
31636 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
31639 "modes": ["wt2html"],
31640 "preserveIEW": true
31644 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31645 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31647 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
31648 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
31651 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
31652 <ul><li> List item </li></ul>
31654 <tbody><tr><th> Table Heading </th><th></th></tr>
31655 <tr><td> Table Cell </td><th></th></tr>
31658 <meta property="mw:PageProp/notoc"/>
31659 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31660 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31662 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
31663 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
31668 Do not trim whitespace in links and quotes
31671 "modes": ["wt2html"],
31672 "preserveIEW": true
31675 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
31676 [[Foo| some text ]]
31678 <p>foo <i> italic </i> and <b> bold </b>
31679 <a href="/wiki/Foo" title="Foo"> some text </a>
31682 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
31683 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
31687 Remove p tags surrounding a single element in a figcaption
31691 [[File:Foobar.jpg|right|200x200px|Caption]]
31693 <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>
31697 Selser preserves lack of newline before list and allows newline after the list
31700 "modes": ["selser"],
31701 "scrubWikitext": true,
31703 [ "ul", "after", "<p>footer</p>" ]
31720 Selser does not introduce newlines between unedited paragraph preceding the list
31723 "modes": ["selser"],
31725 [ "table tbody tr td p:last-child", "empty" ]
31747 Selser does not introduce newlines between unedited paragraph following the list
31750 "modes": ["selser"],
31752 [ "table tbody tr td p:first-child", "empty" ]
31774 Remove a list item but do not insert newline above list
31777 "modes": ["selser"],
31779 [ "ul li:last-child", "remove" ]