1 # MediaWiki Parser test cases
2 # Some taken from https://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
66 Template:redirect to foo
68 #REDIRECT [[Template:Foo]]
89 MediaWiki:bad image list
91 * [[File:Bad.jpg]] except [[Nasty page]]
126 // For Serbian; localize Template namespace
134 Template:echo_with_span
140 Template:echo_with_div
146 Template:echo with depth
159 Template:table_attribs
162 |</noinclude>style="color:red;"|Foo
166 Template:table_attribs_2
169 |</noinclude>style="color:red;"|Foo
174 Template:table_attribs_3
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
181 Template:table_attribs_4
183 | style="background-color:#DC241f;" width="10px" |
187 Template:table_attribs_5
190 |</noinclude>style="color:red;"||Bar
194 Template:table_attribs_6
196 style="background: <nowiki>
203 Template:table_attribs_7
206 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
210 Template:table_header_cells
212 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
218 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
222 Template:PartialTable
229 Template:image_attribs
232 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
235 ## See T48811 for details
237 Template:mixed_attr_content_template
239 style="color:red;" title="T48811"
245 Template:definition_list
292 Template:EmptyTRWithHTMLAttrTest
295 <tr align="center"></tr>
296 <tr><td>foo</td></tr>
297 <tr align="center"></tr>
298 <tr><td>bar</td></tr>
321 This is a simple paragraph.
323 <p>This is a simple paragraph.
328 Paragraphs with extra newline spacing
359 Paragraphs with newline spacing with comment lines in between
367 <!--foo--><!--More than 1 comment, still stripped-->
371 <!--foo--> <!----> <!-- bar -->
432 Paragraphs with newline spacing with non-empty white-space lines in between
459 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
467 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
506 Extra newlines: More paragraphs with indented comment
521 Extra newlines followed by heading
535 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
536 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
539 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
544 Extra newlines between heading and content are swallowed (Parsoid does not)
552 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
553 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
560 <p><a rel="mw:WikiLink" href="./A" title="A">a</a></p>
564 Extra new lines before and after lists are preserved
591 # Parsoid regression test
593 Multiple newlines after tables are converted to p-br-p tags
595 parsoid=wt2html,wt2wt
609 </td></tr></tbody></table>
613 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
628 Heading with line break in nowiki
632 wgFragmentMode=[ 'html5', 'legacy' ]
637 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
639 C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
643 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
650 http://fr.wikipedia.org/wiki/🍺
651 <!-- EasterEgg we love beer, better be able be able to link to it -->
653 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
672 *plain''italic''plain
673 *plain''italic''plain''italic''plain
674 *plain'''bold'''plain
675 *plain'''bold'''plain'''bold'''plain
676 *plain''italic''plain'''bold'''plain
677 *plain'''bold'''plain''italic''plain
678 *plain''italic'''bold-italic'''italic''plain
679 *plain'''bold''bold-italic''bold'''plain
680 *plain'''''bold-italic'''italic''plain
681 *plain'''''bold-italic''bold'''plain
682 *plain''italic'''bold-italic'''''plain
683 *plain'''bold''bold-italic'''''plain
684 *plain l'''italic''plain
685 *plain l''''bold''' plain
688 <li>plain<i>italic</i>plain</li>
689 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
690 <li>plain<b>bold</b>plain</li>
691 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
692 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
693 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
694 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
695 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
696 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
697 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
698 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
699 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
700 <li>plain l'<i>italic</i>plain</li>
701 <li>plain l'<b>bold</b> plain</li></ul>
705 # this example taken from the [[simple:Moon]] article (T49326)
707 Italics and possessives (1)
709 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
711 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
715 # this example taken from [[en:Flaming Pie]] (T51926)
717 Italics and possessives (2)
719 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
721 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
725 # this example taken from [[en:Dictionary]] (T51926)
727 Italics and possessives (3)
729 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
731 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
737 ### 2-quote opening sequence tests
740 Italics and bold: 2-quote opening sequence: (2,2)
749 Italics and bold: 2-quote opening sequence: (2,3)
758 Italics and bold: 2-quote opening sequence: (2,4)
768 # same html as previous, but wikitext adjusted to match parsoid html2wt
770 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
772 ''foo<nowiki>''</nowiki>''
778 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
780 Italics and bold: 2-quote opening sequence: (2,5)
793 # same html as previous, but wikitext adjusted to match parsoid html2wt
795 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
797 ''foo'''''<nowiki/>'''
808 ### 3-quote opening sequence tests
812 Italics and bold: 3-quote opening sequence: (3,2)
821 Italics and bold: 3-quote opening sequence: (3,3)
830 Italics and bold: 3-quote opening sequence: (3,4)
838 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
840 Italics and bold: 3-quote opening sequence: (3,5)
853 # same html as previous, but wikitext adjusted to match parsoid html2wt
855 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
857 '''foo'''''<nowiki/>''
868 ### 4-quote opening sequence tests
872 Italics and bold: 4-quote opening sequence: (4,2)
882 # same html as previous, but wikitext adjusted to match parsoid html2wt
884 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
886 <nowiki>''</nowiki>''foo''
893 Italics and bold: 4-quote opening sequence: (4,3)
902 Italics and bold: 4-quote opening sequence: (4,4)
912 # same html as previous, but wikitext adjusted to match parsoid html2wt
914 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
922 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
924 Italics and bold: 4-quote opening sequence: (4,5)
933 <p>'<b>foo</b><i></i>
937 # same html as previous, but wikitext adjusted to match parsoid html2wt
939 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
941 '<nowiki/>'''foo'''''<nowiki/>''
946 <p>'<b>foo</b><i></i>
952 ### 5-quote opening sequence tests
956 Italics and bold: 5-quote opening sequence: (5,2)
966 # same html as previous, but wikitext adjusted to match parsoid html2wt
968 Italics and bold: 5-quote opening sequence: (5,2+3)
977 Italics and bold: 5-quote opening sequence: (5,3)
987 # same html as previous, but wikitext adjusted to match parsoid html2wt
989 Italics and bold: 5-quote opening sequence: (5,3+2)
998 Italics and bold: 5-quote opening sequence: (5,4)
1004 <p><i><b>foo'</b></i>
1009 Italics and bold: 5-quote opening sequence: (5,5)
1013 <p><i><b>foo</b></i>
1018 Italics and bold: 5-quote opening sequence: (5,6)
1022 <p><i><b>foo'</b></i>
1027 ### multiple quote sequences in a line
1031 Italics and bold: multiple quote sequences: (2,4,2)
1037 <p><i>foo'<b>bar</b></i>
1041 # same html as previous, but wikitext adjusted to match parsoid html2wt
1043 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
1045 ''foo'<nowiki/>'''bar'''''
1047 <p><i>foo'<b>bar</b></i>
1052 Italics and bold: multiple quote sequences: (2,4,3)
1058 <p><i>foo'<b>bar</b></i>
1062 # same html as previous, but wikitext adjusted to match parsoid html2wt
1064 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
1066 ''foo'<nowiki/>'''bar'''''
1068 <p><i>foo'<b>bar</b></i>
1073 Italics and bold: multiple quote sequences: (2,4,4)
1079 <p><i>foo'<b>bar'</b></i>
1083 # same html as previous, but wikitext adjusted to match parsoid html2wt
1085 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1087 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1089 <p><i>foo'<b>bar'</b></i>
1093 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1095 Italics and bold: multiple quote sequences: (3,4,2)
1104 <p><b>foo'</b>bar<i></i>
1108 # same html as previous, but wikitext adjusted to match parsoid html2wt
1110 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1112 '''foo''''bar''<nowiki/>''
1117 <p><b>foo'</b>bar<i></i>
1121 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1123 Italics and bold: multiple quote sequences: (3,4,3)
1132 <p><b>foo'</b>bar<b></b>
1136 # same html as previous, but wikitext adjusted to match parsoid html2wt
1138 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1140 '''foo''''bar'''<nowiki/>'''
1145 <p><b>foo'</b>bar<b></b>
1150 ### other quote tests
1153 Italics and bold: other quote tests: (2,3,5)
1155 ''this is about '''foo's family'''''
1157 <p><i>this is about <b>foo's family</b></i>
1163 Italics and bold: other quote tests: (2,(3,3),2)
1165 ''this is about '''foo's''' family''
1167 <p><i>this is about <b>foo's</b> family</i>
1173 Italics and bold: other quote tests: (3,2,3,2)
1177 '''this is about ''foo'''s family''
1179 <p><b>this is about <i>foo</i></b><i>s family</i>
1184 # same html as previous, but wikitext adjusted to match parsoid html2wt
1186 Italics and bold: other quote tests: (3,2,3+2+2,2)
1188 '''this is about ''foo'''''<nowiki/>''s family''
1190 <p><b>this is about <i>foo</i></b><i>s family</i>
1196 Italics and bold: other quote tests: (3,2,3,3)
1198 '''this is about ''foo'''s family'''
1200 <p>'<i>this is about </i>foo<b>s family</b>
1206 Italics and bold: other quote tests: (3,(2,2),3)
1208 '''this is about ''foo's'' family'''
1210 <p><b>this is about <i>foo's</i> family</b>
1216 Italicized possessive
1218 The ''[[Main Page]]'''s talk page.
1220 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1223 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1227 Quote balancing context should be restricted to td/th cells on the same wikitext line
1229 parsoid=wt2html,wt2wt
1243 </td></tr></tbody></table>
1251 Non-html5 tags should be accepted
1253 <center>''foo''</center>
1255 <font>''foo''</font>
1256 <strike>''foo''</strike>
1259 <center><i>foo</i></center>
1260 <p><big><i>foo</i></big>
1261 <font><i>foo</i></font>
1262 <strike><i>foo</i></strike>
1268 <wbr> is valid wikitext (T54468)
1276 # <strike> is HTML4, <s> is HTML4/5.
1278 <s> or <strike> for strikethrough
1280 <strike>strike</strike>
1284 <p><strike>strike</strike>
1292 Text-level semantic html elements in wikitext
1295 <strong>text</strong>
1311 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1318 <strong>text</strong>
1334 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1342 # test cases taken from
1343 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1345 Ruby markup (W3C-style)
1347 ;Mono-ruby for individual base characters
1348 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1350 :<ruby>今日<rt>きょう</rt></ruby>
1352 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1354 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1356 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1359 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1360 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1361 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1364 <dl><dt>Mono-ruby for individual base characters</dt>
1365 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1367 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1368 <dt>Jukugo ruby</dt>
1369 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1370 <dt>Inline ruby</dt>
1371 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1372 <dt>Double-sided ruby</dt>
1373 <dd><ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1375 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1376 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1377 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1382 # The next two test different paths in the sanitizer.
1384 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1386 <blockquote|>a</blockquote>
1388 <b→> doesn't terminate </b→>
1390 <bä> doesn't terminate </bä>
1392 <boo> doesn't terminate </boo>
1394 <s.foo> doesn't terminate </s.foo>
1398 <p><blockquote|>a</blockquote>
1399 </p><p><b→> doesn't terminate </b→>
1400 </p><p><bä> doesn't terminate </bä>
1401 </p><p><boo> doesn't terminate </boo>
1402 </p><p><s.foo> doesn't terminate </s.foo>
1403 </p><p><sub-ID#1>
1408 Non-word characters don't terminate tag names
1410 <blockquote|>a</blockquote>
1412 <b→> doesn't terminate </b→>
1414 <bä> doesn't terminate </bä>
1416 <boo> doesn't terminate </boo>
1418 <s.foo> doesn't terminate </s.foo>
1422 <p><blockquote|>a
1423 </p><p><b→> doesn't terminate </b→>
1424 </p><p><bä> doesn't terminate </bä>
1425 </p><p><boo> doesn't terminate </boo>
1426 </p><p><s.foo> doesn't terminate </s.foo>
1427 </p><p><sub-ID#1>
1432 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1433 ### This checks that HTML5 tags (with non-word characters in the tag
1434 ### name) make it safely through the parser -- the Sanitizer will
1435 ### munge them later, as it should.
1438 Non-word characters are valid in extension tags (T19663)
1449 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1453 Isolated close tags should be treated as literal text (T54760)
1461 <p class="mw-empty-elt">
1462 </p><p><s.foo>s
1465 <p><s.foo>s</p>
1469 ### Special characters
1473 Bare pipe character (T54363)
1482 Bare pipe character from a template (T54363)
1491 ### <nowiki> test cases
1495 <nowiki> unordered list
1497 <nowiki>* This is not an unordered list item.</nowiki>
1499 <p>* This is not an unordered list item.
1502 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1508 <nowiki>Lorem ipsum dolor
1516 <p>Lorem ipsum dolor
1525 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1535 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1537 <nowiki><span class="error"></nowiki>
1539 <p><span class="error">
1542 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1548 :There is not nowiki.
1549 :There is <nowiki>nowiki</nowiki>.
1551 #There is not nowiki.
1552 #There is <nowiki>nowiki</nowiki>.
1554 *There is not nowiki.
1555 *There is <nowiki>nowiki</nowiki>.
1557 <dl><dd>There is not nowiki.</dd>
1558 <dd>There is nowiki.</dd></dl>
1559 <ol><li>There is not nowiki.</li>
1560 <li>There is nowiki.</li></ol>
1561 <ul><li>There is not nowiki.</li>
1562 <li>There is nowiki.</li></ul>
1565 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1566 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1568 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1569 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1571 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1572 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1576 Entities inside <nowiki>
1578 <nowiki><</nowiki>
1583 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1587 Entities inside template parameters
1594 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1598 Properly escape nowiki when combined with other wiki markup
1602 <p>* </nowiki> tag</p>
1604 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1608 T93824: Put escaped HTML tags inside nowiki
1612 <p><h2>foo</h2></p>
1614 <nowiki><h2>foo</h2></nowiki>
1618 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1622 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1623 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1624 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1626 This text: L'[[Foo]]
1627 This text: L<nowiki>''</nowiki>[[Foo]]
1628 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1631 # This test fails because wikitext whitespace is not normalized before comparing.
1633 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1637 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1640 This text : L<nowiki>''</nowiki>[[Foo]]
1643 # This test and the next one are html2wt only as they test that incorrect wikitext
1644 # passed in template arguments gets escaped or wrapped in nowikis where required.
1646 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1650 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1651 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1653 {{echo|foo{{!}}bar}}
1654 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1658 T53961: Output correct nowikis in template arguments
1662 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1663 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1664 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1665 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1666 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1669 {{echo|<nowiki>a }} b</nowiki>}}
1670 {{echo|<nowiki>a [[ b</nowiki>}}
1671 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1672 {{echo|a <nowiki>}</nowiki>}}
1676 Cases where "!!" needs nowiki protection
1681 <tr><th>this needs protection !! here</th></tr>
1685 <tr><th>this does not need
1686 protection !! here</th></tr>
1690 !<nowiki>this needs protection !! here</nowiki>
1703 Comments and Indent-Pre
1705 <!-- comment 1 --> asdf
1707 <!-- comment 1 --> asdf
1710 <!-- comment 1 --> asdf
1711 <!-- comment 2 -->xyz
1713 <!-- comment 1 --> asdf
1714 <!-- comment 2 --> xyz
1770 asdf<!-- comment 1 -->jkl
1780 <!-- foo --> b <!-- bar -->
1794 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1800 Comment semantics and delimiters
1802 <!-- --><!----><!-----><!------>
1806 <!-- --><!----><!-----><!------>
1810 Comment semantics and delimiters, redux
1812 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1813 -- foo -- funky huh? ... -->
1817 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1818 -- foo -- funky huh? ... -->
1822 Comment semantics and delimiters: directors cut
1824 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1825 everything starting with < followed by !-- until the first -- and > we see,
1826 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1832 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1833 everything starting with < followed by !-- until the first -- and > we see,
1834 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1839 Comment semantics: nesting
1841 <!--<!-- no, we're not going to do anything fancy here -->-->
1846 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1849 # Parsoid closes the unclosed comment, even if it means a slight
1852 Comment semantics: unclosed comment at end
1854 parsoid=wt2html,html2html
1856 <!--This comment will run out to the end of the document
1860 <!--This comment will run out to the end of the document-->
1864 Comment semantics: normalize comments to play nice with XML and browsers
1866 <!-- Browsers --!> think this is closed -->
1867 <!--> This would normally be text -->
1868 <!---> As would this -->
1869 <!-- XML doesn't like trailing dashes -------->
1870 <!-- Nor doubled hyphens -- anywhere in the data -->
1871 But this is not a comment.
1873 <p>But this is not a comment.
1876 <!-- Browsers --!> think this is closed -->
1877 <!--> This would normally be text -->
1878 <!---> As would this -->
1879 <!-- XML doesn't like trailing dashes -------->
1880 <!-- Nor doubled hyphens -- anywhere in the data -->
1881 <p>But this is not a comment.</p>
1885 Comment semantics: round-trip even text which contains encoded -->
1887 <!-- hello & goodbye - > --> --&gt; --&xx -->
1889 <!-- hello & goodbye - > --> --&gt; --&xx -->
1893 Comment in template title
1902 Comment on its own line post-expand
1914 Comment on its own line post-expand with non-significant whitespace
1926 post-expand include size being exceeded
1930 {{echo3|1234567890}}
1932 <p><a href="/wiki/Template:Echo3" title="Template:Echo3">Template:Echo3</a><!-- WARNING: template omitted, post-expand include size too large -->
1937 max template depth being reached
1941 {{echo with depth|too deep!}}
1943 <p><span class="error">Template recursion depth limit exceeded (1)</span>
1948 multiple templates that are redirects
1959 Multiple comments should still parse as SOL-transparent
1961 parsoid=wt2html,wt2wt
1964 <!--c2--><!--c3--><!--c4-->*b
1973 <!--c2--><!--c3--><!--c4-->
1979 ## Make sure ">" gets escaped in comments to avoid XSS
1981 IE conditional comments
1984 <script>alert('hi');</script>
1987 <!--[if lt IE 9]>
1988 <script>alert('hi');</script>
1993 ### paragraph wrapping tests
2009 Block tag on one line (<div>)
2019 <p>a </p><div>foo</div>
2024 # Remex wraps empty tag runs with p-tags.
2025 # Parsoid strips them out during p-wrapping.
2027 No p-wrappable content
2029 <span><div>x</div></span>
2030 <span><s><div>x</div></s></span>
2031 <small><em></em></small><span><s><div>x</div></s></span>
2033 <span><div>x</div></span>
2034 <span><s><div>x</div></s></span>
2035 <p><small><em></em></small></p><span><s><div>x</div></s></span>
2037 <span><div>x</div></span>
2038 <span><s><div>x</div></s></span>
2039 <small><em></em></small><span><s><div>x</div></s></span>
2042 # T177612: Parsoid-only test
2044 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
2046 {{echo|<span><div>x</div></span>}}
2049 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
2054 Block tag on one line (<blockquote>)
2056 a <blockquote>foo</blockquote>
2060 a <blockquote>foo</blockquote>
2064 <p>a </p><blockquote><p>foo</p></blockquote>
2070 Block tag on both lines (<div>)
2080 <p>a </p><div>foo</div><p>
2081 b </p><div>foo</div>
2085 Block tag on both lines (<blockquote>)
2087 a <blockquote>foo</blockquote>
2089 b <blockquote>foo</blockquote>
2091 a <blockquote>foo</blockquote>
2092 b <blockquote>foo</blockquote>
2095 <p>a </p><blockquote><p>foo</p></blockquote><p>
2096 b </p><blockquote><p>foo</p></blockquote>
2100 Multiple lines without block tags
2121 x </p><div>foo</div><p> z
2125 # The difference between Parsoid & Remex here
2126 # is because of Parsoid's Tidy-emulation code
2127 # for p-wrapping. We'll start work to remove this
2128 # emulation code in Parsoid sooner than later.
2129 # Remex wraps empty tag runs with p-tags.
2130 # Parsoid strips them out in a separate pass.
2132 Empty lines between lines with block tags
2167 </p><div>b</div><p>d
2172 <div data-parsoid='{"stx":"html"}'></div>
2175 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2178 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2180 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2183 <div data-parsoid='{"stx":"html"}'>e</div>
2187 Unclosed HTML p-tags should be handled properly
2194 <div><p>foo</p></div>
2199 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2204 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2205 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2208 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2212 a [[Category:A1]] [[Category:A2]]
2217 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2221 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2227 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2231 No paragraph necessary for SOL transparent template
2233 <span><div>foo</div></span>
2236 <span><div>foo</div></span>
2237 {{echo|[[Category:Foo]]}}
2239 <span><div>foo</div></span>
2240 <span><div>foo</div></span>
2243 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2244 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2246 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2247 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]"}},"i":0}}]}'/>
2251 Avoid expanding multiline sol transparent template ranges unnecessarily
2269 <br about="#mwt1" typeof="mw:Transclusion" data-parsoid='{}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<br/>\n"}},"i":0}}]}'/><span about="#mwt1">
2272 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2276 ### Preformatted text
2286 And a [[Main Page|link]]
2292 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2297 Tabs don't trigger preformatted text
2301 This is preformatted text.
2307 <pre>This is preformatted text.
2312 preformatted text.</p>
2313 <pre>This is preformatted text.
2318 Space before tab needs nowiki pre protection
2324 <nowiki> </nowiki> a
2328 Ident preformatting with inline content
2339 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2356 Regression with preformatted in <center>
2370 T54763: Preformatted in <blockquote>
2376 indented cell (no pre-wrapping!)
2386 <p> indented cell (no pre-wrapping!)
2394 T53086: Double newlines in blockquotes should be turned into paragraphs
2411 T17491: <ins>/<del> in blockquote
2414 Foo <del>bar</del> <ins>baz</ins> quux
2418 <p>Foo <del>bar</del> <ins>baz</ins> quux
2425 T17491: <ins>/<del> in blockquote (2)
2427 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2430 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2434 <blockquote><p>Foo </p><del>bar</del> <ins>baz</ins><p> quux
2439 <pre> with attributes (T5202)
2441 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2443 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2448 <pre> with width attribute (T5202)
2450 <pre width="8">Narrow screen goodies</pre>
2452 <pre width="8">Narrow screen goodies</pre>
2457 <pre> with forbidden attribute (T5202)
2459 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2461 <pre width="8">Narrow screen goodies</pre>
2466 Entities inside <pre>
2475 <pre> with forbidden attribute values (T5202)
2477 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2479 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2484 <nowiki> inside <pre> (T15238)
2492 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2500 <pre><nowiki>Foo</nowiki></pre>
2505 <nowiki> inside of #tag:pre
2507 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2509 <pre>Foo →bar</pre>
2512 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2515 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2516 ## aren't enclosed in nowikis.
2518 <nowiki> and <pre> preference (first one wins)
2549 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2554 <p><span typeof="mw:Nowiki">
2562 </pre> inside nowiki
2564 <nowiki></pre></nowiki>
2571 Empty pre; pre inside other HTML tags (T56946)
2588 <div data-parsoid='{"stx":"html"}'><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
2590 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2594 HTML pre followed by indent-pre
2607 <p><pre>foo</pre></p>
2609 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2611 <p class='mw-empty-elt' data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2615 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2623 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2633 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2645 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2666 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2670 {{echo| foo}}{{echo| bar}}
2675 {{echo|<!--cmt--> foo}}
2677 <!--cmt-->{{echo| foo}}
2679 {{echo|{{echo| }}bar}}
2697 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2733 ## Hmm, should Parsoid rt this?
2735 Pres with newline attributes
2737 parsoid=wt2html,html2html
2742 <pre class="one two">hi</pre>
2745 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2749 Things that look like <pre> tags aren't treated as such
2751 Barack Obama <President> of the United States
2752 <President></President>
2754 <p>Barack Obama <President> of the United States
2755 <President></President>
2760 Handle broken pre-like tags (T66025)
2764 {{echo|<pre <pre>x</pre>}}
2766 <table><pre </table>
2769 <table><pre </table>
2773 <pre <table></table>
2775 <pre typeof="mw:Transclusion mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html","a":{"<pre":null},"sa":{"<pre":""},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2777 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'><pre </span><table data-parsoid='{"stx":"html"}'></table>
2781 Parsoid: handle pre with space after attribute
2785 <pre style="width:50%;" >{{echo|foo}}</pre>
2787 <pre style="width:50%;">{{echo|foo}}</pre>
2790 <pre typeof="mw:Extension/pre" about="#mwt2" style="width:50%;" data-mw='{"name":"pre","attrs":{"style":"width:50%;"},"body":{"extsrc":"{{echo|foo}}"}}'>{{echo|foo}}</pre>
2793 # TODO / maybe: fix wt2wt for this
2795 Parsoid: Don't paragraph-wrap fosterable content
2828 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2832 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2860 #--------------------------------------------------------------------
2861 # Transclusion parameter whitespace stripping tests
2862 # Behavior is different for positional and named parameters
2863 #--------------------------------------------------------------------
2865 Templates: Strip leading and trailing whitespace from named-param values
2869 {{echo|1= {{echo|b}} }}
2887 Templates: Don't strip whitespace from positional-param values
2891 {{echo|{{echo|b}} }}
2931 Templates: Don't recognize targets split by newlines
2947 Templates: Recognize targets when newlines and comments don't split the target
2952 <!--X--> ech<!--X-->o<!--X-->
2960 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech<!--X-->o<!--X--> \n <!--X--> <!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2964 Templates: Handle empty comment-and-ws-only lines correctly
2967 <!--should be ignored-->
2968 <!--should be ignored as well-->
2975 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n<!--should be ignored-->\n <!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
2979 Templates: Handle comments in the target
2982 <!-- should be ignored -->
2986 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2989 {{echo<!-- should be ignored -->
2992 {{echo<!-- should be ignored -->|foo}}
2994 {{<!-- should be ignored -->echo|foo}}
3003 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3005 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3007 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3009 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3011 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
3015 Templates: Handle comments in parameter names (T69657)
3018 <!-- should be ignored -->
3022 <!-- should be ignored -->
3025 {{echo|1<!-- should be ignored -->=foo}}
3027 {{echo|<!-- should be ignored -->1=foo}}
3035 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3037 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
3039 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
3041 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
3045 Templates: Other wikitext in parameter names (T69657)
3052 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3056 Templates: With colons
3060 <p>Template with colon
3063 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"With: Colon","href":"./Template:With:_Colon"},"params":{},"i":0}}]}'>Template with colon</p>
3066 #--------------------------------------------------------------------
3067 # Transclusion parameter escaping tests
3068 #--------------------------------------------------------------------
3071 Templates: Parsoid parameter escaping test 1
3073 {{echo|[foo]|{{echo|[bar]}}}}
3078 <p about="#mwt1" typeof="mw:Transclusion"
3079 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
3083 Parsoid: Pipes in external links in template parameter
3085 {{echo|[{{echo|http://example.com}} link]}}
3087 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
3090 <p><a rel="mw:ExtLink" class="external text" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
3094 Parsoid: pipe in transclusion parameter
3096 {{echo|http://foo.com/a|b}}
3098 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
3101 <p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
3105 Parsoid: Pipe in external link target and content in template parameter
3107 parsoid=html2wt,wt2wt
3109 {{echo|[http://foo.com/a|b a|b]}}
3111 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
3114 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
3115 typeof="mw:Transclusion"
3116 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
3117 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
3121 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
3125 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
3127 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
3131 Templates: Don't escape already nowiki-escaped text in template parameters
3133 parsoid=html2wt,wt2wt
3135 {{echo|foo<nowiki>|</nowiki>bar}}
3136 {{echo|<nowiki><div></nowiki>}}
3137 {{echo|<nowiki></nowiki>}}
3144 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
3145 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
3146 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
3152 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3154 parsoid=html2wt,wt2wt
3156 {{echo|{{echo|1=bar}}}}
3161 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
3166 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3173 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
3178 Templates: Preserve blank parameter names
3185 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3189 Templates: Preserve blank parameter names in other positions
3191 {{blank_param|bar|=foo}}
3197 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
3202 ### Parsoid-centric tests for testing RT edge cases for pre
3206 1a. Indent-Pre and Comments
3219 1b. Indent-Pre and Comments
3232 1c. Indent-Pre and Comments
3245 1d. Indent-Pre and Comments
3246 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3259 2a. Indent-Pre and tables
3280 2b. Indent-Pre and tables
3296 2c. Indent-Pre and tables (T44252)
3313 2d. Indent-Pre and tables
3330 <tbody><tr><td> b</td></tr>
3335 2e. Indent-Pre and table-line syntax
3348 2f. Indent-pre started by table-line syntax
3367 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3372 Text that should be rendered preformatted
3380 <pre>Text that should be rendered preformatted
3389 2h. Indent pre in tables
3391 parsoid=wt2html,html2html
3434 </td><td data-parsoid='{"startTagSrc":"{{!}}"}'>
3436 </td></tr></tbody></table>
3440 3a. Indent-Pre and block tags (single-line html)
3444 c <blockquote> foo </blockquote>
3449 c <blockquote> foo </blockquote>
3450 <pre><span> foo </span>
3453 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3454 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3455 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3456 <pre><span> foo </span>
3459 <p> a </p><p> foo </p><p>
3460 b </p><div> foo </div><p>
3461 c </p><blockquote><p> foo </p></blockquote>
3462 <pre><span> foo </span>
3467 3b. Indent-Pre and block tags (multi-line html)
3470 <!-- comment --> b <div> foo </div>
3472 <pre>a <span>foo</span>
3477 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3478 <!-- comment --> <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3480 <pre>a <span>foo</span>
3482 b </p><div> foo </div>
3486 3c. Indent-Pre and block tags (pre-content on separate line)
3550 4. Indent-Pre and extension tags
3561 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3565 5. Indent-Pre and html pre
3567 <pre class="123">hi</pre>
3569 <pre class="123">hi</pre>
3572 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3576 Render paragraphs when indent-pre is suppressed in blocklevels
3593 4. Multiple spaces at start-of-line
3611 ## NOTE: the leading white-space chars on empty line are significant
3613 5a. White-space in indent-pre
3625 ## NOTE: the leading white-space chars on empty line are significant
3627 5b. White-space in indent-pre
3646 5c. White-space in indent-pre
3659 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3682 7a. Indent-pre and category links
3684 parsoid=wt2html,wt2wt
3686 [[Category:foo]] <!-- No pre-wrapping -->
3687 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3690 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3691 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3694 ## We used to, but no longer wt2wt this test since the default serializer
3695 ## will normalize all categories to serialize on their own line.
3696 ## This wikitext usage is going to be fairly uncommon in production and
3697 ## selser will take care of preserving formatting in those scenarios.
3699 7b. Indent-pre and category links
3704 [[Category:foo]] {{echo|b}}
3706 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3707 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
3711 Indent-Pre: Newlines in comments shouldn't affect sol state
3726 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3730 HTML-pre: 1. embedded newlines
3762 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3764 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3767 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3772 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3780 HTML-pre: big spaces
3816 <pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n"}}'>
3835 HTML-pre: 2: indented text
3848 HTML-pre: 3: other wikitext
3867 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n* foo\n# bar\n= no-h =\n'' no-italic ''\n[[ NoLink ]]\n"}}'>* foo
3876 ### Definition lists
3884 <dd>Definition</dd></dl>
3889 Definition list for indentation only
3893 <dl><dd>Indented text</dd></dl>
3898 Definition list with no space
3903 <dd>Definition</dd></dl>
3908 Definition list with URL link
3910 ;http://example.com/ :definition
3912 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a></dt>
3913 <dd>definition</dd></dl>
3918 Definition list with bracketed URL link
3920 ;[http://www.example.com/ Example]:Something about it
3922 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3923 <dd>Something about it</dd></dl>
3928 Definition list with wikilink containing colon
3930 ;[[Help:FAQ]]:The least-read page on Wikipedia
3932 <dl><dt><a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
3933 <dd>The least-read page on Wikipedia</dd></dl>
3937 # At Brion's and JeLuF's insistence... :)
3939 Definition list with news link containing colon
3941 ;news:alt.wikipedia.rox :This isn't even a real newsgroup!
3943 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3944 <dd>This isn't even a real newsgroup!</dd></dl>
3947 <dl><dt><a rel="mw:ExtLink" class="external free" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'>This isn't even a real newsgroup!</dd></dl>
3951 Malformed definition list with colon
3953 ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3955 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
3960 Definition lists: colon in external link text
3962 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
3964 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a></dt>
3965 <dd>OK, I made that up</dd></dl>
3970 Definition lists: colon in HTML attribute
3972 ;<b style="display: inline">bold</b>
3974 <dl><dt><b style="display: inline">bold</b></dt></dl>
3979 Definition lists: self-closed tag
3981 ;one<br/>two :two-line fun
3983 <dl><dt>one<br />two</dt>
3984 <dd>two-line fun</dd></dl>
3989 Definition lists: ignore colons inside tags
3991 ;one <b>two : tag <i>fun:</i>:</b>:def
3993 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3999 Definition lists: excess closed tags
4001 ;one</b>two :bad tag fun
4004 <dd>bad tag fun</dd></dl>
4008 <dd>bad tag fun</dd>
4013 T13748: Literal closing tags
4017 <dd>test test test test test</dd>
4019 <dd>test test test test test</dd>
4024 <dd>test test test test test</dd>
4026 <dd>test test test test test</dd>
4032 Definition and unordered list using wiki syntax nested in unordered list using html tags.
4041 <dd>description</dd></dl>
4042 <ul><li>unordered</li></ul>
4048 Definition list with empty definition and following paragraph
4061 Nested definition lists using html syntax
4074 Definition Lists: No nesting: Multiple dd's
4087 Definition Lists: Indentation: Regular
4095 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4100 Definition Lists: Indentation: Missing 1st level
4106 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
4111 Definition Lists: Indentation: Multi-level indent
4115 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
4120 Definition Lists: Hacky use to indent tables
4127 should be left alone
4129 <dl><dd><dl><dd><table>
4134 </td></tr></table></dd></dl></dd></dl>
4136 should be left alone
4141 Definition Lists: Hacky use to indent tables (with content following table)
4146 |} <!--c1--> this text should be part of the dl
4153 </td></tr></tbody></table> this text should be part of the dl</dd></dl>
4160 </td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
4164 Definition Lists: Hacky use to indent tables, with comments (T65979)
4172 should be left alone
4175 <dl><dd><dl><dd><table><tr>
4178 </tr></table><!-- bar --></dd></dl></dd></dl>
4180 should be left alone</p>
4184 Definition Lists: Hacky use to indent tables, with comment before table
4192 <dl><dd><dl><dd><!-- foo --><table><tr>
4194 </tr></table></dd></dl></dd></dl>
4197 # The trailing whitespace in this test is to catch a regression in
4198 # Parsoid after T54473.
4200 Definition Lists: Hacky use to indent tables (WS-insensitive)
4209 </td></tr></table></dd></dl>
4213 <tbody><tr><td>a</td></tr>
4214 </tbody></table></dd></dl>
4217 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4218 ## as an empty dt item. It also ignores all but the last ";" when followed
4219 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4220 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4223 ## Ex: ";;t2 ::d2" is transformed into:
4235 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4236 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4247 ## All Parsoid only definition list tests have this difference.
4249 ## See also: https://phabricator.wikimedia.org/T8569
4250 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4253 Table / list interaction: indented table with lists in table contents
4275 </td></tr></table></dd></dl>
4280 Table / list interaction: lists nested in tables nested in indented lists
4303 </td></tr></table></dd></dl>
4310 Definition Lists: Nesting: Multi-level (Parsoid only)
4338 Definition Lists: Nesting: Test 2
4345 <dl><dd>d2</dd></dl></dd></dl>
4350 Definition Lists: Nesting: Test 3
4355 <dl><dd><dl><dt>t1</dt>
4357 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4362 Definition Lists: Nesting: Test 4
4367 <dl><dd><dl><dd><dl><dt>t3</dt>
4368 <dd>d3</dd></dl></dd></dl></dd></dl>
4373 ## The Parsoid team believes the following three test exposes a
4374 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4375 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4376 ## It also exposes a "misfeature" in tidy, which doesn't like
4377 ## <dl> tags with a single <dt> child; it converts the <dt> into
4378 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4380 Definition Lists: Mixed Lists: Test 1
4386 <dl><dd><dl><dt><ul><li>foo</li>
4387 <li>bar</li></ul></dt></dl>
4388 <dl><dt>baz</dt></dl></dd></dl>
4391 <dl><dd><dl><dt><ul><li>foo</li>
4392 <li>bar</li></ul></dt></dl>
4393 <dl><dt>baz</dt></dl></dd></dl>
4411 Definition Lists: Mixed Lists: Test 2
4416 <ul><li><dl><dd>d1</dd>
4417 <dd>d2</dd></dl></li></ul>
4423 Definition Lists: Mixed Lists: Test 3
4428 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4429 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4435 Definition Lists: Mixed Lists: Test 4
4440 <ul><li><dl><dt>d1</dt>
4443 <dd>d4</dd></dl></li></ul>
4449 Definition Lists: Mixed Lists: Test 5
4455 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4461 Definition Lists: Mixed Lists: Test 6
4466 <ol><li><ul><li><dl><dd>d1
4467 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4473 Definition Lists: Mixed Lists: Test 7
4478 <dl><dd><ul><li>d1</li>
4479 <li>d2</li></ul></dd></dl>
4485 Definition Lists: Mixed Lists: Test 8
4490 <dl><dd><ul><li>d1</li></ul>
4491 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4497 Definition Lists: Mixed Lists: Test 9
4501 <ul><li><dl><dt>foo</dt>
4502 <dd>bar</dd></dl></li></ul>
4508 Definition Lists: Mixed Lists: Test 10
4512 <ul><li><ol><li><dl><dt>foo</dt>
4513 <dd>bar</dd></dl></li></ol></li></ul>
4517 # The Parsoid team disagrees with the PHP parser's seemingly-random
4518 # rules regarding dd/dt on the next few tests. Parsoid is more
4519 # consistent, and recognizes the shared nesting and keeps the
4520 # still-open tags around until the nesting is complete.
4522 # This is a regression test for T175099
4524 Definition Lists: Mixed Lists: Test 11
4531 <ul><li>b</li></ul></dd></dl>
4535 <dd><ul><li>b</li></ul></dd></dl>
4538 # FIXME: Maybe get rid of this test?
4540 Definition Lists: Mixed Lists: Test 12
4545 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4546 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4548 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4551 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo</dt>
4552 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4554 <dd>baz</dd></dl></li></ol></li></ul>
4572 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4577 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4586 Definition Lists: Mixed Lists: Test 13
4591 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4592 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4593 <dl><dt>boo </dt>
4594 <dd>baz</dd></dl></li></ol></li></ul>
4597 # FIXME: Maybe get rid of this test?
4599 # * The test is wrong, there are two colons where there should be :;
4600 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4602 Definition Lists: Weird Ones: Test 1
4604 *#;*::;;foo :bar (who uses this?)
4606 <ul><li><ol><li><dl><dt>foo</dt>
4607 <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>
4625 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4637 Definition Lists: colons occurring in tags
4654 <dt><span>a:b</span></dt>
4655 <dt><div>a:b</div></dt>
4656 <dt><div>a</div></dt>
4660 <dt><i>a:b</i></dt></dl>
4661 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4663 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4665 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4666 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4667 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4668 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4670 <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>
4671 <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>
4672 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4675 # Parsoid's output differs here again because it shares
4676 # nesting between the two lists unlike the PHP parser.
4677 # Unsure which is more desirable.
4679 Definition Lists: colons and tables 1
4691 </td></tr></table></dd></dl>
4695 </td></tr></table></dd></dl>
4701 </td></tr></table></dd>
4705 </td></tr></table></dd></dl>
4708 # FIXME: Does this need a html/php section?
4710 Definition Lists: template interaction
4712 ::{{definition_list}}
4715 ::{{definition_list}}
4720 <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">
4721 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4723 <dl><dd data-parsoid='{}'>one
4724 <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">
4725 </span><dd about="#mwt2">two
4727 <dd>three</dd></dl></dd>
4728 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4736 External links: non-bracketed
4738 Non-bracketed: http://example.com
4740 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4744 # parsoid doesn't explicitly mark autonumbered links, see T55505
4746 External links: numbered
4748 Numbered: [http://example.com]
4749 Numbered: [http://example.net]
4750 Numbered: [http://example.com]
4752 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4753 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4754 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4757 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4758 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4759 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4763 External links: specified text
4765 Specified text: [http://example.com link]
4767 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4772 External links: trail
4774 Linktrails should not work for external links: [http://example.com link]s
4776 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4781 External links: dollar sign in URL
4783 http://example.com/1$2345
4785 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4789 # parsoid doesn't explicitly mark autonumbered links, see T55505
4791 External links: dollar sign in URL (autonumber)
4793 [http://example.com/1$2345]
4795 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4798 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4802 External links: open square bracket forbidden in URL (T6377)
4804 parsoid=wt2html,wt2wt,html2html
4806 http://example.com/1[2345
4808 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4811 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4815 External links: open square bracket forbidden in URL (named) (T6377)
4817 parsoid=wt2html,html2html
4819 [http://example.com/1[2345]
4821 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4824 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4827 # parsoid adds a space before the link name
4829 External links: open square bracket forbidden in URL (named) (T6377)
4832 [http://example.com/1 [2345]
4834 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4839 External links: nowiki in URL link text (T8230)
4841 [http://example.com/ <nowiki>''example site''</nowiki>]
4843 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4848 External links: newline forbidden in text (T8230 regression check)
4850 [http://example.com/ first
4853 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4859 External links: Pipe char between url and text
4861 [http://example.com | link]
4863 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4868 External links: protocol-relative URL in brackets
4870 [//example.com/ Test]
4872 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4876 # parsoid doesn't explicitly mark autonumbered links, see T55505
4878 External links: protocol-relative URL in brackets without text
4882 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4885 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4889 External links: protocol-relative URL in free text is left alone
4893 <p>//example.com/Foo
4898 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4900 foo//example.com/Foo
4902 <p>foo//example.com/Foo
4906 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4908 External links: with no contents
4910 parsoid=wt2html,wt2wt
4912 [http://en.wikipedia.org/wiki/Foo]
4914 [[wikipedia:Foo|Bar]]
4916 [[wikipedia:Foo|<span>Bar</span>]]
4918 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4919 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4920 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4923 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4924 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4925 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4929 External links: Free with trailing punctuation
4939 http://example.com/url_with_(brackets)
4940 (http://example.com/url_without_brackets)
4941 http://example.com/url_with_entity&
4942 http://example.com/url_with_entity&
4943 http://example.com/url_with_entity&
4944 http://example.com/url_with_entity
4945 http://example.com/url_with_entity 
4946 http://example.com/url_with_entity 
4947 http://example.com/url_with_entity<
4948 http://example.com/url_with_entity<
4949 http://example.com/url_with_entity<
4951 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4952 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4953 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4954 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4955 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4956 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4957 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4958 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4959 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4960 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4961 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4962 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4963 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4964 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4965 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4966 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4967 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4968 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4969 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4972 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
4973 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
4974 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
4975 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
4976 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
4977 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
4978 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
4979 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
4980 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4981 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4982 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4983 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4984 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4985 <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>
4986 <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>
4987 <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>
4988 <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>
4989 <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>
4990 <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>
4994 External links: tricky Parsoid html2html case
4996 parsoid=wt2html,wt2wt,html2html
4998 http://example.com/url_with_entity&amp;
5000 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
5003 <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>
5007 External links: Free with trailing quotes (T113666)
5009 '''News:''' Stuff here
5013 <p><b>News:</b> Stuff here
5014 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
5017 <p><b>News:</b> Stuff here</p>
5018 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
5022 External links: with entity
5024 [http:// www.librarieswithoutborders.org Libraries without borders]
5026 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
5029 <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>
5033 External links: Lone protocols are never linked (T105697)
5052 External links: No preceding word characters allowed (T67278)
5054 NOPEhttp://example.com
5055 N0http://example.com
5056 ok:http://example.com
5057 ok-http://example.com
5059 <p>NOPEhttp://example.com
5060 N0http://example.com
5061 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5062 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5067 External links: nofollow domain exception
5069 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5071 <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>.
5078 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5080 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5085 External image from https
5087 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5089 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5094 External image (when not allowed)
5096 wgAllowExternalImages=0
5098 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5100 <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>
5105 Link to non-http image, no img tag
5107 Link to non-http image, no img tag: ftp://example.com/test.jpg
5109 <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>
5114 External links: terminating separator
5116 Terminating separator: http://example.com/thing,
5118 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5123 External links: intervening separator
5125 Intervening separator: http://example.com/1,2,3
5127 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5132 External links: old bug with URL in query
5134 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5136 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5141 External links: old URL-in-URL bug, mixed protocols
5143 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5145 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5149 # Since Parsoid is starting to emit canonical wikitext for links,
5150 # [http://example.com http://example.com] will not RT back to that
5153 External links: URL in text
5157 URL in text: [http://example.com http://example.com]
5159 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
5162 <p>URL in text: <a rel="mw:ExtLink" class="external text" href="http://example.com">http://example.com</a></p>
5166 External links: Clickable images
5168 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5170 <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>
5173 <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>
5177 External links: raw ampersand
5179 Old & use: http://x&y
5181 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5186 External links: encoded ampersand
5188 Old & use: http://x&y
5190 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5193 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
5197 External links: encoded equals (T8102)
5199 http://example.com/?foo=bar
5201 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5204 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5208 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5209 ## does it number them. As discussed in T55505, we can identify
5210 ## autonumbered links via CSS.
5214 External links: [raw ampersand]
5216 Old & use: [http://x&y]
5218 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5221 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5224 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5225 # mode will return the [raw ampersand] wikitext
5227 External links: [encoded ampersand]
5229 parsoid=wt2html,wt2wt,html2html
5231 Old & use: [http://x&y]
5233 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5236 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5240 External links: [raw equals]
5242 [http://example.com/?foo=bar]
5244 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5247 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5250 # note that parsoid html is identical to [raw equals] case; so html2wt
5251 # mode will return the [raw equals] wikitext
5253 External links: [encoded equals] (T8102)
5255 parsoid=wt2html,wt2wt,html2html
5257 [http://example.com/?foo=bar]
5259 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5262 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5265 # xxx parsoid strips the IDN character, so the round-trip tests will
5266 # obviously fail and are disabled. --cscott
5268 External links: [IDN ignored character reference in hostname; strip it right off]
5270 parsoid=wt2html,wt2wt,html2html
5272 [http://e‌xample.com/]
5274 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5277 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5280 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5281 # Where an external link could easily circumvent the sanitization of the text of
5282 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5283 # test demands a higher standard. That's a bit strange.
5287 # http://example.com -> [http://example.com|http://example.com]
5288 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5290 # The first example is sanitized, but the second is not. Any security benefits
5291 # from this production are trivial to circumvent. Either remove this test and
5292 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5293 # the test accordingly.
5297 # xxx parsoid strips the IDN character, so the round-trip tests will
5298 # obviously fail and are disabled. --cscott
5300 External links: IDN ignored character reference in hostname; strip it right off
5302 parsoid=wt2html,html2html
5304 http://e‌xample.com/
5306 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5309 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5313 External links: www.jpeg.org (T2554)
5317 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5321 # parsoid doesn't explicitly mark autonumbered links, see T55505
5323 External links: URL within URL (T2002)
5325 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5327 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5330 <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>
5334 T2361: URL inside bracketed URL
5336 [http://www.example.com/foo http://www.example.com/bar]
5338 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5343 T2361: URL within URL, not bracketed
5345 http://www.example.com/foo?=http://www.example.com/bar
5347 <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>
5352 T2289: ">"-token in URL-tail
5354 http://www.example.com/<hello>
5356 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5361 T2289: literal ">"-token in URL-tail
5363 http://www.example.com/<b>html</b>
5365 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5368 <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>
5372 T2289: ">"-token in bracketed URL
5374 [http://www.example.com/<hello> stuff]
5376 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5381 T2289: literal ">"-token in bracketed URL
5383 [http://www.example.com/<b>html</b> stuff]
5385 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5390 T2289: literal double quote at end of URL
5392 http://www.example.com/"hello"
5394 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5399 T2289: literal double quote in bracketed URL
5401 [http://www.example.com/"hello" stuff]
5403 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5408 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5410 [http://www.example.com test]
5412 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5417 External links: link text with spaces
5419 [http://www.example.com a b c]
5420 [http://www.example.com ''a'' ''b'']
5422 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5423 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5427 # Note edge case difference between PHP and Parsoid here.
5429 External links: wiki links within external link (T5695)
5431 parsoid=wt2html,html2html
5433 [http://example.com [[wikilink]] embedded in ext link]
5435 [http://example.com test [[wikilink]] embedded in ext link]
5437 <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>
5438 </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>
5441 <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>
5442 <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>
5446 T2787: Links with one slash after the url protocol are invalid
5450 [http:/example.com title]
5452 <p>http:/example.com
5453 </p><p>[http:/example.com title]
5458 Bracketed external links with template-generated invalid target
5460 [{{echo|http:/example.com}} title]
5462 <p>[http:/example.com title]
5466 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5468 Broken wikilinks (but not external links) prevent templates from closing
5472 [http://example.com x
5474 {{echo|[http://example.com x}}
5480 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5481 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5483 </p><p>{{echo|[[Foo}}
5486 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5487 <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>
5489 <p>{{echo|[[Foo}}</p>
5493 Wikilinks with embedded newlines are not broken
5504 <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>
5516 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5520 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5521 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5525 T4702: Mismatched <i>, <b> and <a> tags are invalid
5527 ''[http://example.com text'']
5528 [http://example.com '''text]'''
5529 ''Something [http://example.com in italic'']
5530 ''Something [http://example.com mixed''''', even bold]'''
5531 '''''Now [http://example.com both''''']
5533 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5534 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5535 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5536 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5537 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5545 http://www.example.com/?title=AT%26T
5547 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5550 <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>
5553 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5554 # % is actually legal in HTML5. Any change in output would need testing though.
5556 T6781, T7267: %25 in URL
5558 http://www.example.com/?title=100%25_Bran
5560 <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>
5563 <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>
5567 T6781, T7267: %28, %29 in URL
5569 http://www.example.com/?title=Ben-Hur_%281959_film%29
5571 <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>
5574 <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>
5579 T6781: %26 in autonumber URL
5581 [http://www.example.com/?title=AT%26T]
5583 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5586 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5590 T6781, T7267: %26 in autonumber URL
5592 [http://www.example.com/?title=100%25_Bran]
5594 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5597 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5601 T6781, T7267: %28, %29 in autonumber URL
5603 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5605 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5608 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5613 T6781: %26 in bracketed URL
5615 [http://www.example.com/?title=AT%26T link]
5617 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5620 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5624 T6781, T7267: %25 in bracketed URL
5626 [http://www.example.com/?title=100%25_Bran link]
5628 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5633 T6781, T7267: %28, %29 in bracketed URL
5635 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5637 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5640 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5644 External link containing a period in the anchor. (T65947)
5646 [//foo.org/bar#baz. bang]
5648 [//foo.org/bar. bang]
5650 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5651 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5654 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5655 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5659 External link containing a single quote. (T65947)
5663 [//foo.org/bar'baz bang]
5665 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5666 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5669 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5670 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5674 External link containing double-single-quotes in text '' (T6598 sanity check)
5676 Some [http://example.com/ pretty ''italics'' and stuff]!
5678 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5683 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5685 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5687 <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>
5691 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5693 External link containing double-single-quotes with no space separating the url from text in italics
5695 [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]].]
5697 <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>.
5700 <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>
5704 External link with comments in link text
5706 [http://www.google.com Google <!-- comment -->]
5708 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5711 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5715 External link to bare IPv4 address
5717 [http://192.168.0.1 Link]
5719 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5722 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5726 URL-encoding in URL functions (single parameter)
5728 {{localurl:Some page|amp=&}}
5730 <p>/index.php?title=Some_page&amp=&
5735 URL-encoding in URL functions (multiple parameters)
5737 {{localurl:Some page|q=?&=&}}
5739 <p>/index.php?title=Some_page&q=?&amp=&
5746 http://example.com/index.php?foozoid%5B%5D=bar
5748 http://example.com/index.php?foozoid[]=bar
5750 <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>
5751 </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>
5754 <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>
5756 <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>
5760 IPv6 urls, autolink format (T23261)
5762 http://[2404:130:0:1000::187:2]/index.php
5764 Examples from RFC 2373, section 2.2:
5766 *http://[1080::8:800:200C:417A]/unicast
5767 *http://[FF01::101]/multicast
5768 *http://[::1]/loopback
5769 *http://[::]/unspecified
5770 *http://[::13.1.68.3]/ipv4compat
5771 *http://[::FFFF:129.144.52.38]/ipv4compat
5773 Examples from RFC 2732, section 2:
5775 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5776 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5777 *http://[3ffe:2a00:100:7031::1]
5778 *http://[1080::8:800:200C:417A]/foo
5779 *http://[::192.9.5.5]/ipng
5780 *http://[::FFFF:129.144.52.38]:80/index.html
5781 *http://[2010:836B:4179::836B:4179]
5783 <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>
5784 </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:
5786 <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>
5787 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5788 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5789 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5790 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5791 <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>
5792 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5794 <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>
5795 <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>
5796 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5797 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5798 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5799 <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>
5800 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5803 <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>
5805 <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>
5806 <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>
5807 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5808 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5809 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5810 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5811 <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>
5813 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5814 <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>
5815 <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>
5816 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5817 <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>
5818 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5819 <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>
5820 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5824 IPv6 urls, bracketed format (T23261)
5826 [http://[2404:130:0:1000::187:2]/index.php test]
5828 Examples from RFC 2373, section 2.2:
5830 *[http://[1080::8:800:200C:417A] unicast]
5831 *[http://[FF01::101] multicast]
5832 *[http://[::1]/ loopback]
5833 *[http://[::] unspecified]
5834 *[http://[::13.1.68.3] ipv4compat]
5835 *[http://[::FFFF:129.144.52.38] ipv4compat]
5837 Examples from RFC 2732, section 2:
5839 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5840 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5841 *[http://[3ffe:2a00:100:7031::1] 3]
5842 *[http://[1080::8:800:200C:417A]/foo 4]
5843 *[http://[::192.9.5.5]/ipng 5]
5844 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5845 *[http://[2010:836B:4179::836B:4179] 7]
5847 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5848 </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:
5850 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5851 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5852 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5853 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5854 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5855 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5856 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5858 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5859 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5860 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5861 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5862 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5863 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5864 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5867 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5869 <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>
5870 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5871 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5872 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5873 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5874 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5875 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5877 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external mw-magiclink">RFC 2732</a>, section 2:</p>
5878 <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>
5879 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5880 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5881 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5882 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5883 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5884 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5888 Non-extlinks in brackets
5897 [{{echo|foo}} ''bar'']
5898 [{{echo|foo}}l's] errand
5899 [{{echo|foo}}l's errand]
5901 [url=http://example.com]
5902 [http:// bare protocols don't count]
5915 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5916 [http:// bare protocols don't count]
5924 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5925 [<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]
5926 [<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>]
5927 [<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
5928 [<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]
5929 [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>]
5930 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
5931 [http:// bare protocols don't count]</p>
5935 Percent encoding in external links
5937 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5939 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5942 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5946 Use url link syntax for links where the content is equal the link target
5950 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5953 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
5957 Parenthesis in external links, especially URL links
5961 http://example.com/test)
5963 http://example.com/(test)
5965 http://example.com/((test)
5967 (http://example.com/(test))
5969 (http://example.com/(test)))))
5971 http://example.com/a)b
5973 [http://example.com) foo]
5975 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5976 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5977 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5978 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5979 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5980 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5981 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5982 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5985 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
5986 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
5987 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
5988 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
5989 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
5990 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5991 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
5992 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
5996 Parenthesis in external links, w/ transclusion or comment
5998 (http://example.com/{{echo|hi}})
6000 (http://example.com<!-- hi -->)
6002 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
6003 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
6006 <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>
6008 <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>
6012 Serialize <a> tags with invalid link targets as plain text
6014 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
6016 <a rel="mw:WikiLink" href="[[foo]]">text</a>
6017 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
6018 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
6019 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
6022 <nowiki>*</nowiki>text
6023 <nowiki>[[foo]]</nowiki>
6024 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
6028 mw:ExtLink -vs- mw:WikiLink (T94723)
6032 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
6033 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
6034 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6035 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
6037 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6038 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
6046 [[:en:European_Robin|European Robin]]
6047 [[:en:European_Robin|European Robin]]
6051 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
6055 [http://en.wikipedia.org/wiki/European_Robin European Robin]
6057 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
6068 Normal text. '''Bold text.''' Normal text. ''Italic text.''
6070 Normal text. '''''Bold italic text.''''' Normal text.
6072 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6073 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6078 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6079 # parser strips. The wikitext contains just the first half of the bold
6082 Unclosed and unmatched quotes
6084 '''''Bold italic text '''with bold deactivated''' in between.'''''
6086 '''''Bold italic text ''with italic deactivated'' in between.'''''
6090 ..spanning two paragraphs (should not work).'''
6092 '''Bold tag left open
6094 ''Italic tag left open
6098 <!-- Unmatching number of opening, closing tags: -->
6099 '''This year''''s election ''should'' beat '''last year''''s.
6101 ''Tom'''s car is bigger than ''Susan'''s.
6103 Plain ''italic'''s plain
6105 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6106 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6107 </p><p><b>Bold text..</b>
6108 </p><p>..spanning two paragraphs (should not work).
6109 </p><p><b>Bold tag left open</b>
6110 </p><p><i>Italic tag left open</i>
6112 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6113 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6114 </p><p>Plain <i>italic'</i>s plain
6117 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6118 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6119 </p><p><b>Bold text..</b>
6120 </p><p>..spanning two paragraphs (should not work).<b></b>
6121 </p><p><b>Bold tag left open</b>
6122 </p><p><i>Italic tag left open</i>
6125 <!-- Unmatching number of opening, closing tags: -->
6126 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6127 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6128 </p><p>Plain <i>italic'</i>s plain
6135 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6138 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6139 # is the bare minimum required by the spec, see:
6140 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6141 # Parsoid team replies: empty table tags are legal in HTML5
6143 A table with no data.
6156 A table with stray table end tags on start tag line (wt2html)
6160 {|style="color: red;"|}
6162 {|style="color: red;" |}
6166 {|style="color: red;"|} id="foo"
6170 {|style="color: red;" |} id="foo"
6174 <table style="color: red;"></table>
6176 <table style="color: red;">
6182 <table style="color: red;" id="foo">
6188 <table style="color: red;" id="foo">
6197 A table with no data (take 2)
6205 # A table with nothing but a caption is invalid XHTML, we might want to render
6206 # this as <p>caption</p>
6207 # Parsoid team replies: table with only a caption is legal in HTML5
6209 A table with nothing but a caption
6217 </caption><tr><td></td></tr></table>
6220 <table><caption>caption</caption></table>
6224 A table with caption with default-spaced attributes and a table row
6227 |+ style="color: red;" |caption1
6233 <caption style="color: red;">caption1
6242 A table with captions with non-default spaced attributes and a table row
6245 |+style="color: red;"|caption2
6246 |+ style="color: red;"|caption3
6252 <caption style="color: red;">caption2
6254 <caption style="color: red;">caption3
6263 Table td-cell syntax variations
6268 |style='color:red;'|baz
6269 |style='color:red;'||baz
6276 <td>foo bar foo</td>
6279 <td style="color:red;">baz
6281 <td>style='color:red;'</td>
6309 Simple table but with multiple dashes for row wikitext
6328 Multiplication table
6330 {| border="1" cellpadding="2"
6331 |+Multiplication table
6351 <table border="1" cellpadding="2">
6352 <caption>Multiplication table
6399 Accept "||" in table headings
6414 Accept "!!" in table data
6428 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6433 Accept "||" in indented table headings
6443 </th></tr></table></dd></dl>
6448 Accept "!!" in templates
6462 <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>
6466 Accept "!!" in table headings after newline
6483 <p>b!!c</p></th></tr>
6488 Accept "!!" in table data of mixed wikitext / html syntax
6492 <tr><td>b!!c</td></tr>
6498 </th></tr><tr><td>b!!c</td></tr>
6502 <tbody><tr><th>a</th></tr>
6503 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6508 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6525 Accept "| !" at start of line in tables (ignore !-attribute)
6529 |!style="color:red"|bar
6541 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 +/-
6545 |style='color:red;'|+1
6546 |style='color:blue;'|-1
6558 <td style="color:red;">+1
6560 <td style="color:blue;">-1
6584 |rowspan=2|Cell 2, row 1 (and 2)
6595 <td rowspan="2">Cell 2, row 1 (and 2)
6613 {| bgcolor=#ABCDEF border=2
6618 |the original table again
6626 <table bgcolor="#ABCDEF" border="2">
6634 <td>the original table again
6640 Invalid attributes in table cell (T3830)
6654 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6658 |title="foo<nowiki>|</nowiki>" |bar
6659 |title="foo<nowiki>|</nowiki>" bar
6666 <td title="foo|">bar
6668 <td>title="foo|" bar
6673 <tbody><tr><td title="foo">bar</td>
6674 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6675 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6679 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6680 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6681 # *2wt modes will fail.
6683 Table security: embedded pipes
6685 parsoid=wt2html,html2html
6688 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6692 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6693 <td>]" onmouseover="alert(document.cookie)">test
6701 <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>
6705 Element attributes with double ! should not be broken up by <th>
6708 !hi <div class="!!">ha</div> ho
6713 <th>hi <div class="!!">ha</div> ho
6718 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6723 ! and || in element attributes should not be parsed as <th>/<td>
6726 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6731 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6736 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6740 # FIXME: The output seems broken. Filed as T110268.
6742 ! and || in td attributes should not be parsed as <th>/<td>
6747 |style="color: red !important;" data-contrived="put this here ||"|foo
6752 <td>style="color: red !important;" data-contrived="put this here</td>
6758 <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>
6763 Break on | in element attribute in template
6765 parsoid=wt2html,html2html
6767 {{echo|1=<div class="hi|ho">ha</div>}}
6769 <p>ho">ha</div>
6772 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</span>
6776 Break on | in element attribute name in template
6778 {{echo|<div cla|ss="hiho">ha</div>}}
6780 <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>
6784 Don't break on | in extension attribute in template
6786 {{echo|<ref name="hi|ho">ha</ref>}}
6790 <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>
6792 <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>
6795 ## We don't support roundtripping of these attributes in Parsoid.
6796 ## Selective serialization takes care of preventing dirty diffs.
6797 ## But, on edits, we dirty-diff the invalid attribute text.
6799 Invalid text in table attributes should be discarded
6803 {| <span>boo</span> style='border:1px solid black'
6804 | <span>boo</span> style='color:blue' |1
6805 |<span>boo</span> style='color:blue'|2
6808 <table style="border:1px solid black">
6810 <td style="color:blue">1
6812 <td style="color:blue">2
6816 <table style="border:1px solid black">
6818 <td style="color:blue">1</td>
6819 <td style="color:blue">2</td>
6825 Invalid text in table attributes should be preserved by selective serializer
6828 "modes": ["selser"],
6830 ["td:first-child", "text", "abc"],
6831 ["td + td", "text", "xyz"]
6835 {| <span>boo</span> style='border:1px solid black'
6836 | <span>boo</span> style='color:blue' | 1
6837 |<span>boo</span> style='color:blue'| 2
6840 {| <span>boo</span> style='border:1px solid black'
6841 | <span>boo</span> style='color:blue' | abc
6842 |<span>boo</span> style='color:blue'| xyz
6847 1. Template-generated table cell attributes and cell content
6852 || {{table_attribs_5}}
6853 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6854 |align=center {{table_attribs}}
6855 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6860 <td style="color:red;">Foo
6862 <td style="color:red;">Foo
6864 <td>style="color:red;"</td>
6867 <td style="color:red;">Foo
6869 <td align="center" style="color:red;">Foo
6871 <td align="center" style="color:red;">Foo
6877 2. Template-generated table cell attributes and cell content
6880 |{{table_attribs_2}}
6885 <td style="color:red;">Foo
6893 <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>
6894 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6899 3. Template-generated table cell attributes and cell content
6902 !align=center {{table_header_cells}}
6904 |align=center {{table_cells}}
6909 <th align="center" style="color:red;">Foo</th>
6910 <th style="color:red;"><i>Bar</i></th>
6911 <th style="color:brown;"><i>Foo</i> and Baz
6914 <td align="center" style="color:red;">Foo</td>
6915 <td style="color:red;"><i>Bar</i></td>
6916 <td style="color:brown;"><i>Foo</i> and Baz
6921 <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>
6922 <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>
6927 4. Template-generated table cell attributes and cell content inside a templated table
6930 !align=center {{table_header_cells}}
6932 |align=center {{table_cells}}
6937 <th align="center" style="color:red;">Foo</th>
6938 <th style="color:red;"><i>Bar</i></th>
6939 <th style="color:brown;"><i>Foo</i> and Baz
6942 <td align="center" style="color:red;">Foo</td>
6943 <td style="color:red;"><i>Bar</i></td>
6944 <td style="color:brown;"><i>Foo</i> and Baz
6948 <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}}]}'>
6949 <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>
6951 <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>
6955 ## Edge case fix to prevent future regressions
6957 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6960 |{{table_attribs_7}}
6965 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
6967 <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>
6971 Table with row followed by newlines and table heading
6973 parsoid=wt2html,html2html
6991 Table with empty line following the start tag
6993 parsoid=wt2html,html2html
7011 Table attributes with empty value
7013 parsoid=wt2html,html2html
7026 <tbody><tr><td style="">hello</td></tr>
7031 Wikitext table with a lot of comments
7054 Wikitext table comments represented in parsoid dom
7056 {|<!--c1--><!--c2-->
7065 </td></tr></tbody></table>
7067 <table><!--c1--><!--c2-->
7068 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7069 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
7074 Wikitext table with double-line table cell
7091 Table cell with a single comment
7108 Table-cell after a comment-only-empty-line
7125 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7127 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
7133 Build table with {{!}}
7135 {{{!}} class="wikitable"
7138 {{!}}- style="color:red;"
7139 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
7142 <table class="wikitable">
7148 <tr style="color:red;">
7150 <td style="color:red;">second data
7156 Build table with pipe as data
7158 {| class="wikitable"
7161 |- style="color:red;"
7162 |data|| style="color:red;" |second data
7164 | style="color:red;" |data with | || style="color:red;" | second data with |
7166 ||data with | |||second data with |
7169 <table class="wikitable">
7175 <tr style="color:red;">
7177 <td style="color:red;">second data
7180 <td style="color:red;">data with |</td>
7181 <td style="color:red;">second data with |
7184 <td>data with |</td>
7185 <td>second data with |
7191 Build table with wikilink
7193 {| class="wikitable"
7194 !header||second header
7195 |- style="color:red;"
7196 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
7198 |data||second data [[Main Page|link|text with pipe]]
7201 <table class="wikitable">
7206 <tr style="color:red;">
7207 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
7208 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7212 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7217 # The expected HTML structure in this test is debatable. The PHP parser does
7218 # not parse this kind of table at all. The main focus for Parsoid is on
7219 # round-tripping, so this output is ok for now. TODO: revisit!
7221 Wikitext table with html-syntax row
7231 <td>foo</td></tr></tbody></table>
7235 Fostered content in tables: Plain text
7237 parsoid=wt2html,html2html
7255 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7256 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7258 </tr></tbody></table>
7262 Fostered content in tables: Lists
7264 parsoid=wt2html,html2html
7277 <ul><li>a</li></ul><table>
7282 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7283 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7285 </tr></tbody></table>
7289 Template generated table cell with attributes
7293 {{table_attribs_4}} ||a||b
7299 <td style="background-color:#DC241f;" width="10px"></td>
7302 </td></tr></tbody></table>
7305 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7306 <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>
7310 Parsoid: Round-trip tables directly followed by content (T53219)
7312 parsoid=wt2html,wt2wt
7325 </td></tr></tbody></table><p> bar
7329 </td></tr></tbody></table><p><b>quux</b>
7334 Parsoid: Default to a newline after tables in new content (T53219)
7339 <tr><td>foo</td></tr></tbody></table> bar
7341 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7346 <nowiki> </nowiki>bar
7354 Parsoid: Row-syntax table headings followed by comment & table cells
7356 parsoid=wt2html,wt2wt
7360 <!-- foo --> ||baz||quux
7374 <tbody><tr><th>foo</th><th>bar
7375 <!-- foo --></th><td> baz </td><td>quux</td></tr>
7380 Parsoid: Recover better from broken table attributes
7394 </td></tr></tbody></table>
7399 <p>foo</p></td></tr>
7404 Tables: Digest broken attributes on table and tr tag
7415 <tr class='mw-empty-elt'></tr>
7416 <tr class='mw-empty-elt'></tr>
7421 Table with missing opening <tr> tag
7423 parsoid=wt2html,wt2wt
7431 <tbody><tr><td>foo</td>
7436 # T137406: Whitespace in the HTML
7438 1. Generate correct wikitext for tables with thead/tbody/tfoot
7443 <caption>Test</caption>
7505 </td></tr></tbody></table>
7508 # T137406: No whitespace in the HTML
7510 2. Generate correct wikitext for tables with thead/tbody/tfoot
7514 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7524 Wikitext tables can be nested inside HTML tables
7528 <table data-parsoid='{"stx":"html"}'>
7531 <tr><td>foo</td></tr>
7549 Plain link, capitalized
7553 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7558 Plain link, uncapitalized
7562 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7569 [[Main Page|The Main Page]]
7571 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7576 Piped link with comment in link text
7578 [[Main Page|The Main<!--front--> Page]]
7580 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7585 Piped link with multiple pipe characters in link text
7587 [[Main Page||The|Main|Page|]]
7589 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7592 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7596 Piped link with no link text
7598 [[Thomas Bek (bishop of St David's)|]]
7600 <p>[[Thomas Bek (bishop of St David's)|]]
7603 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7607 Piped link with empty link text
7609 [[Main Page|<nowiki/>]] - empty nowiki
7610 [[Main Page| ]] - empty space
7611 [[Main Page| ]] - empty non breaking space
7613 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7614 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7615 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7618 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7619 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7620 <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>
7628 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7633 Broken link with fragment
7635 [[Zigzagzogzagzig#zug]]
7637 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7642 Special page link with fragment
7644 [[Special:Version#anchor]]
7646 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7651 Nonexistent special page link with fragment
7653 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7655 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7662 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7664 <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>
7671 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7673 <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>!!!
7684 T45661: Piped links with identical prefixes
7686 [[prefixed article|prefixed articles with spaces]]
7688 [[prefixed article|prefixed articlesaoeu]]
7690 [[Main Page|Main Page test]]
7692 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7693 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7694 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7700 Link with HTML entity in suffix / tail
7702 [[Main Page]]", [[Main Page]]a
7704 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7707 <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>
7711 Link with 3 brackets
7722 Link with 4 brackets
7726 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7731 Piped link with 3 brackets
7733 [[[main page|the main page]]]
7735 <p>[[[main page|the main page]]]
7740 Piped link with extlink-like text
7743 [[Main Page|This is a [bar]]]
7746 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7747 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7748 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7751 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7752 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7753 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7757 Link with multiple pipes
7759 [[Main Page|The|Main|Page]]
7761 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7766 Anchor containing a #. (T65430)
7768 wgFragmentMode=[ 'html5', 'legacy' ]
7770 [[Main Page#And#Link]]
7772 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7775 <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>
7781 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7783 <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>
7788 Link with space in namespace
7790 [[User talk:Foo bar]]
7792 <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>
7797 MemoryAlpha:AlphaTest
7799 This is an article in the MemoryAlpha namespace
7800 (which shadows the memoryalpha interwiki link).
7804 Namespace takes precedence over interwiki link (T53680)
7806 [[MemoryAlpha:AlphaTest]]
7808 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7812 # The previous test doesn't work correctly in html2*, due to not recognizing the
7813 # link as an internal one. This one checks for the correct behavior.
7815 Link to namespace preferred over interwiki with correct rel attribute
7817 parsoid=html2wt,html2html
7819 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7821 [[MemoryAlpha:AlphaTest]]
7825 Piped link to namespace
7827 [[Meta:Disclaimers|The disclaimers]]
7829 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7836 [[Usually caused by a typo (oops}]]
7838 <p>[[Usually caused by a typo (oops}]]
7845 Just a test of an article title containing a percent.
7849 Link containing % (not as a hex sequence)
7852 [[7% Solution|7%25 Solution]]
7854 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7855 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7858 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7859 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7862 # note that the parsoid HTML is identical to the previous test output,
7863 # so the previous test ensures that the html2wt mode will generate the
7864 # "not as a hex sequence" wikitext.
7866 Link containing % as a single hex sequence interpreted to char
7868 parsoid=wt2wt,wt2html,html2html
7871 [[7%25 Solution|7%25 Solution]]
7873 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7874 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7877 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7878 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7882 Link containing % as a double hex sequence interpreted to hex sequence
7886 <p>[[7%2525 Solution]]
7890 ## Example for such a section: == < ==
7892 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7894 wgFragmentMode=[ 'html5', 'legacy' ]
7896 [[%23%3c]][[%23%3e]]
7898 <p><a href="#<">#<</a><a href="#>">#></a>
7901 <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>
7904 ## Example for such a section: == < ==
7906 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7908 wgFragmentMode=[ 'legacy' ]
7910 [[%23%3c]][[%23%3e]]
7912 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7917 Link containing "<#" and ">#" as a hex sequences
7919 [[%3c%23]][[%3e%23]]
7921 <p>[[%3c%23]][[%3e%23]]
7926 Link containing an equals sign
7928 [[Special:BookSources/isbn=4-00-026157-6]]
7930 <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>
7933 <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>
7939 Just a test of an article title containing a tilde.
7942 # note that links containing signatures, like [[Foo~~~~]], are
7943 # massaged by the pre-save transform (PST) and so the tildes are never
7944 # seen by the parser.
7946 Link containing a tilde
7950 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7953 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7957 Link containing double-single-quotes '' (T6598)
7959 [[Lista d''e paise d''o munno]]
7961 <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>
7964 <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>
7968 Link containing double quotes and spaces
7972 <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>
7975 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
7979 File containing double quotes and spaces
7981 [[File:Cool "Gator".png]]
7983 <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>
7987 Redirect containing double quotes and spaces
7989 #REDIRECT [[Cool "Gator"]]
7991 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7995 Link containing double-single-quotes '' in text (T6598 sanity check)
7997 Some [[Link|pretty ''italics'' and stuff]]!
7999 <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>!
8002 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8006 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8008 ''Some [[Link|pretty ''italics'' and stuff]]!''
8010 <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>
8015 Link with double quotes in title part (literal) and alternate part (interpreted)
8017 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8021 [[''Pentecoste''|Pentecoste]]
8023 [[''Pentecoste''|''Pentecoste'']]
8025 <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>
8026 </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>
8027 </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>
8028 </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>
8031 <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>
8032 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8033 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8034 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8038 Broken image links with HTML captions (T41700)
8040 [[File:Nonexistent|<script></script>]]
8041 [[File:Nonexistent|100x100px|<script></script>]]
8042 [[File:Nonexistent|<]]
8043 [[File:Nonexistent|a<i>b</i>c]]
8045 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8046 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8047 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8048 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8051 <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>
8052 <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>
8053 <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>
8054 <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>
8060 [[http://www.example.com]]
8062 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8065 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
8069 Plain link to URL with link text
8071 [[http://www.example.com Link text]]
8073 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8078 Plain link to protocol-relative URL
8080 [[//www.example.com]]
8082 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8085 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8089 Plain link to protocol-relative URL with link text
8091 [[//www.example.com Link text]]
8093 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8098 Plain link to page with question mark in title
8104 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8105 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8109 # I'm fairly sure the expected result here is wrong.
8110 # We want these to be URL links, not pseudo-pages with URLs for titles....
8111 # However the current output is also pretty screwy.
8114 # I'm changing it to match the current output--it arguably makes more
8115 # sense in the light of the test above. Old expected result was:
8116 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8118 # But I think this test is bordering on "garbage in, garbage out" anyway.
8123 Piped link to URL: [[http://www.example.com|an example URL]]
8125 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8128 <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>
8132 Plain link in template argument
8136 {{echo|[http://www.example.com |123]}}
8138 {{echo|[[http://www.example.com |123]]}}
8140 {{echo|[[http://www.example.com |123]}}
8142 {{echo|[http://www.example.com |123]]}}
8144 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8145 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8146 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8147 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8150 <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>
8152 <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>
8154 <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>
8156 <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>
8160 T2002: [[page|http://url/]] should link to page, not http://url/
8162 [[Main Page|http://url/]]
8164 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8167 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8170 # Parsoid does not mark self-links, by design.
8172 T2337: Escaped self-links should be bold
8176 [[Bug462]] [[Bug462]]
8178 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8181 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8185 Self-link to section should not be bold
8189 [[Main Page#section]]
8191 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8202 Self-link to numeric title
8208 <p><a class="mw-selflink selflink">0</a>
8213 Link to numeric-equivalent title
8219 <p><a href="/wiki/00" title="00">00</a>
8224 <nowiki> inside a link
8226 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8228 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8233 Non-breaking spaces in title
8235 [[ Main Page ]]
8237 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8241 # Add new article for the test below so that it doesn't red-link
8249 Multiple spaces in titles should normalize to a single underscore
8251 parsoid=wt2html,wt2wt
8257 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8258 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8259 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8262 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8263 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8264 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8269 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8275 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8280 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8286 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8291 Internal link with en linktrail: no apostrophes (T29473)
8297 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8302 Internal link with ca linktrail with apostrophes (T29473)
8308 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8313 Internal link with kaa linktrail with apostrophes (T29473)
8319 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8324 Link with multiple ":" in a subpage-supporting namespace (T65636)
8326 [[User:Foo/Test/63636:Bar|Test]]
8328 <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>
8331 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8334 ## Mainly a sanity check for Parsoid
8336 Handle title parsing for subpages
8356 Link to a subpage from a namespace other than main
8363 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8366 <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>
8370 Ensure that transclusion titles are not url-decoded
8372 subpage title=[[Test]]
8375 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8377 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8380 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8384 Purely hash wikilink
8386 title=[[User:Test/123]]
8391 <p><a href="#a">b</a>
8394 <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>
8398 Serialization of purely hash wikilink
8400 title=[[User:Test/123]]
8404 <p><a href="#a">[[</a></p>
8406 [[#a|<nowiki>[[</nowiki>]]
8408 <p><a href="#a">[[</a>
8413 1. Interaction of linktrail and template encapsulation
8417 <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>
8421 2. Interaction of linktrail and template encapsulation
8425 {{echo|Some [[Fool]]}}s
8427 <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>
8431 3. Interaction of linktrail and template encapsulation
8435 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8437 <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>
8447 Internal link with is link prefix
8451 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8453 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8464 Internal link with is link trail and link prefix
8468 [[mótmælendatrú|xxx]]ar
8470 mótmælenda[[söfnuður]]
8471 mótmælenda[[söfnuður|söfnuðir]]
8472 mótmælenda[[söfnuður|söfnuðir]]xxx
8474 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8475 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8476 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8477 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8478 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8483 Parsoid link trail escaping
8485 parsoid=html2wt,html2html
8487 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8493 Parsoid link prefix escaping
8496 parsoid=html2wt,html2html
8498 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8500 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8504 Parsoid link bracket escaping
8506 parsoid=html2wt,html2html
8508 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8509 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8510 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8511 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8512 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8513 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8521 [[[<nowiki/>[[Test]]]]]
8525 [[[[[<nowiki/>[[Test]]]]]]]
8529 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8537 [http://wp.org ''foo'']
8539 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8540 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8541 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8542 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8547 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8549 [[Foo|{{echo|a}} b {{echo|c}}]]
8551 <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>
8555 Link with angle bracket after anchor
8557 wgFragmentMode=[ 'html5', 'legacy' ]
8561 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8564 <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>
8568 Link with angle bracket after anchor (legacy)
8570 wgFragmentMode=[ 'legacy' ]
8574 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8579 ### Interwiki links (see maintenance/interwiki.sql)
8583 Inline interwiki link
8585 parsoid=wt2html,wt2wt,html2html
8587 [[MeatBall:SoftSecurity]]
8589 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8592 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8596 Inline interwiki link with empty title (T4372)
8598 parsoid=wt2html,wt2wt,html2html
8602 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8605 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8608 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8610 Interwiki link encoding conversion (T3636)
8612 parsoid=wt2html,wt2wt
8614 *[[Wikipedia:ro:Olteniţa]]
8615 *[[Wikipedia:ro:Olteniţa]]
8617 <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>
8618 <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>
8622 <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>
8623 <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>
8627 <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>
8628 <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>
8633 Interwiki link with fragment (T4130)
8635 [[MeatBall:SoftSecurity#foo]]
8637 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8642 Link scenarios with escaped fragments
8644 wgFragmentMode=[ 'html5', 'legacy' ]
8647 [[Foo#Is this great?]]
8648 [[meatball:Foo#Is this great?]]
8650 <p><a href="#Is_this_great?">#Is this great?</a>
8651 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8652 <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>
8655 <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>
8656 <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>
8657 <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>
8661 Link scenarios with escaped fragments (legacy)
8663 wgFragmentMode=[ 'legacy' ]
8666 [[Foo#Is this great?]]
8667 [[meatball:Foo#Is this great?]]
8669 <p><a href="#Is_this_great.3F">#Is this great?</a>
8670 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8671 <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>
8675 # Ideally the wikipedia: prefix here should be proto-relative too
8676 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8677 # define the 'en' prefix, and originally the test used 'wikipedia',
8678 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8681 Different interwiki prefixes mapping to the same URL
8689 [[:wikipedia:Foo|Foo]]
8691 [[wikipedia:en:Foo]]
8693 [[:wikipedia:en:Foo]]
8697 <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>
8699 <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>
8701 <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>
8703 <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>
8705 <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>
8707 <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>
8709 <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>
8713 Interwiki links that cannot be represented in wiki syntax
8716 [[meatball:ok#foo|ok with fragment]]
8717 [[meatball:ok_as_well?|ok ending with ? mark]]
8718 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8719 [http://de.wikipedia.org/wiki/#foo is just fragment]
8722 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8723 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8724 <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>
8725 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8726 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8729 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8730 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8731 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
8732 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8733 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8737 Interwiki links: trail
8739 [[wikipedia:Foo|Ba]]r
8741 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8744 <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>
8748 Local interwiki link
8750 parsoid=wt2html,wt2wt,html2html
8752 [[local:Template:Foo]]
8754 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8757 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8760 # Parsoid does not mark self-links, by design.
8762 Local interwiki link: self-link to current page
8765 parsoid=wt2html,wt2wt,html2html
8769 <p><a class="mw-selflink selflink">local:Main Page</a>
8772 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8776 Local interwiki link: prefix only (T66167)
8778 parsoid=wt2html,wt2wt,html2html
8782 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8785 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8789 Local interwiki link: with additional interwiki prefix (T63357)
8791 parsoid=wt2html,wt2wt,html2html
8793 [[local:meatball:Hello]]
8795 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8798 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8802 Multiple local interwiki link prefixes
8804 [[local:local:local:local:mi:local:Foo]]
8806 parsoid=wt2html,wt2wt,html2html
8808 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8811 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8815 ### Interlanguage links
8816 ### Language links (so that searching for '### language' matches..)
8828 <p>Blah blah blah</p>
8829 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8832 ## parsoid html2wt will lose the space variations
8834 Interlanguage link with spacing
8836 parsoid=wt2html,wt2wt,html2html
8844 <p>Blah blah blah</p>
8845 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8849 Double interlanguage link
8858 <p>Blah blah blah</p>
8859 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8860 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8863 ## parsoid html2wt will lose the space variations
8865 Interlanguage link variations
8867 parsoid=wt2html,wt2wt,html2html
8877 <p>Blah blah blah</p>
8878 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8879 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8880 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8884 Escaping of interlanguage links (T129218, T156308)
8888 [[ : zh : Chinese ]]
8891 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8892 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8896 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8897 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8901 Multiple colons escaping interlanguage links
8909 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8914 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8916 [[:::es:Spanish]]</p>
8919 ## parsoid html2wt will normalize the space to _
8921 Space and question mark encoding in interlanguage links (T95473)
8923 parsoid=wt2html,wt2wt,html2html
8931 <p>Blah blah blah</p>
8932 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8936 Interlanguage link, with prefix links
8946 <p>Blah blah blah</p>
8947 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8951 Double interlanguage link, with prefix links (T10897)
8962 <p>Blah blah blah</p>
8963 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8964 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8968 "Extra" interlanguage links (T34189 / gerrit 111390)
8976 <p>Blah blah blah</p>
8977 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8980 ## PHP parser tests script needs an update
8981 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8983 Language links render as inline links if $wgInterwikiMagic=false
8985 wgInterwikiMagic=false
8986 parsoid=wt2html,wt2wt,html2html
8991 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8994 ## PHP parser tests script needs an update
8995 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8997 Language links render as inline links in the Talk namespace
9000 parsoid=wt2html,wt2wt,html2html
9005 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9009 Parsoid-specific test: Wikilinks with should RT properly
9015 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9020 Parsoid T55221: Wikilinks should be properly entity-escaped
9022 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9024 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9025 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9027 He&nbsp;llo [[Foo|He&nbsp;llo]]
9029 He&nbsp;llo He&nbsp;llo
9031 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9032 </p><p>He&nbsp;llo He&nbsp;llo
9036 # html2wt will fail because of title normalization without data-parsoid
9038 Parsoid: handle constructor well
9040 parsoid=wt2html,wt2wt
9046 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9047 </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>
9050 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9052 <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>
9056 Template parameter named "constructor"
9058 {{echo| constructor = |hi}}
9060 <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>
9069 # Note that `ko` isn't a known interlanguage prefix
9071 Parsoid: recognize interlanguage links without a target page
9081 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9083 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9086 # Note that `ko` isn't a known interwiki prefix
9088 Parsoid: recognize interwiki links without a target page
9090 parsoid=wt2html,wt2wt,html2html
9096 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9097 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9100 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9101 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9105 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9109 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9112 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9116 Interlanguage link with preceding local interwiki link (T70085)
9118 parsoid=wt2html,wt2wt,html2html
9121 [[local:es:Spanish]]
9124 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9128 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9132 Looks like an interlanguage link, but is actually a local interwiki
9134 parsoid=wt2html,wt2wt,html2html
9140 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9144 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9148 ### Redirects, Parsoid-only
9152 1. Simple redirect to page
9154 #REDIRECT [[Main Page]]
9156 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9160 2. Other redirect variants
9162 #REDIRECT [[Main_Page]]
9164 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9167 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9168 # This tests the Parsoid bail-out code.
9170 3. Other redirect variants
9174 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9176 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9180 4. Redirect to a templated destination
9182 #REDIRECT [[{{echo|Foo}}bar]]
9184 <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"}]]}'/>
9190 parsoid=wt2html,wt2wt
9195 <li>REDIRECT [[]]</li></ol>
9199 Optional colon in #REDIRECT
9201 # the colon is archaic syntax. we support it for wt2html, but we
9202 # don't care that it roundtrips back to the modern syntax.
9203 parsoid=wt2html,html2html
9205 #REDIRECT:[[Main Page]]
9207 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9211 Whitespace in #REDIRECT with optional colon
9213 # the colon and gratuitous whitespace is archaic syntax. we support
9214 # it for wt2html, but we don't care that it roundtrips back to the
9215 # modern syntax (without extra whitespace)
9216 parsoid=wt2html,html2html
9223 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9227 Piped link in #REDIRECT
9229 # content after piped link is ignored. we support this syntax,
9230 # but don't care that the piped link is lost when we roundtrip this.
9233 #REDIRECT [[Main Page|bar]]
9235 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9239 Redirect to category (T104502)
9241 parsoid=wt2html,wt2wt
9243 #REDIRECT [[Category:Foo]]
9245 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9249 Redirect to category with URL encoding (T104502)
9253 #REDIRECT [[Category%3AFoo]]
9255 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9259 Redirect to category page
9261 #REDIRECT [[:Category:Foo]]
9263 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9267 Redirect to image page (1)
9269 #REDIRECT [[File:Wiki.png]]
9271 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9275 Redirect to image page (2)
9277 #REDIRECT [[Image:Wiki.png]]
9279 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9282 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9283 # Next test confirms this.
9285 Redirect to language (1) (T104918)
9287 parsoid=wt2html,wt2wt,html2html
9289 #REDIRECT [[en:File:Wiki.png]]
9291 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9295 Redirect to language (2) (T104918)
9297 #REDIRECT [[:en:File:Wiki.png]]
9299 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9303 Redirect to interwiki (T104918)
9305 #REDIRECT [[meatball:File:Wiki.png]]
9307 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9311 Non-English #REDIRECT
9315 #TILVÍSUN [[Main Page]]
9317 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9321 Redirect syntax under text isn't considered a redirect
9325 #redirect [[Main Page]]
9328 <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>
9336 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9343 Redirect followed by block on the same line
9347 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9349 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9353 Redirect followed by a newline
9355 #REDIRECT [[Main Page]]
9358 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9363 Redirect followed by multiple newlines
9365 #REDIRECT [[Main Page]]
9370 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9377 Drop duplicate redirects
9381 <link rel="mw:PageProp/redirect" href="./Foo"/>
9382 <link rel="mw:PageProp/redirect" href="./Bar"/>
9383 <link rel="mw:PageProp/redirect" href="./Baz"/>
9402 Broken br tag sanitization
9410 # TODO: Fix html2html mode (T53055)!
9412 Parsoid: Broken br tag recognition
9426 Incorrecly removing closing slashes from correctly formed XHTML
9428 <br style="clear:both;" />
9430 <p><br style="clear:both;" />
9435 Failing to transform badly formed HTML into correct XHTML
9437 <br style="clear: left;">
9438 <br style="clear: right;">
9439 <br style="clear: both;">
9441 <p><br style="clear: left;" />
9442 <br style="clear: right;" />
9443 <br style="clear: both;" />
9447 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9448 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9450 Handling html with a div self-closing tag
9459 <p><div title />
9463 <p><div title=bar />
9464 <div title=bar/>
9466 <div title="bar/"></div>
9470 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9471 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9472 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9473 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9474 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9475 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9479 Handling html with a br self-closing tag
9506 Horizontal ruler (should it add that extra space?)
9515 foo </p><hr /><p> bar
9520 Horizontal ruler -- 4+ dashes render hr
9529 Horizontal ruler -- eats additional dashes on the same line
9538 Horizontal ruler -- does not collapse dashes on consecutive lines
9549 Horizontal ruler -- <4 dashes render as plain text
9558 Horizontal ruler -- Supports content following dashes on same line
9570 ### Block-level elements
9579 <ul><li>Common list</li>
9581 <li>item 3</li></ul>
9592 <ol><li>Numbered list</li>
9594 <li>item 3</li></ol>
9598 # the switch from level 3 to ordered should not introduce a newline between
9609 ***#Number on level 4
9611 **#Number on level 3
9612 **#Number on level 3
9616 #**Level 3, but ordered
9619 <ol><li>with numbers</li></ol>
9620 <ul><li>and bullets</li></ul>
9621 <ol><li>and numbers</li></ol></li>
9623 <ul><li>bullet level 2
9624 <ul><li>bullet level 3
9625 <ol><li>Number on level 4</li></ol></li></ul></li>
9627 <ol><li>Number on level 3</li>
9628 <li>Number on level 3</li></ol></li></ul>
9629 <ol><li>number level 2</li></ol></li>
9631 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9632 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9637 1. Nested mixed wikitext and html list
9640 *<ul><li>ho</li></ul>
9645 <li><ul><li>ho</li></ul></li>
9647 <ul><li>ho</li></ul></li></ul>
9651 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9653 <ul><li>ho</li></ul></li></ul>
9657 2. Nested mixed wikitext and html list (incompatible)
9660 :{{echo|<li>ho</li>}}
9663 <dd><li>ho</li></dd></dl>
9667 <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>
9677 <ul><li>bar</li></ul></li></ul>
9687 <ul><li><ul><li>foo</li></ul></li>
9693 Nested lists 3 (first element empty)
9699 <ul><li>bar</li></ul></li></ul>
9704 Nested lists 4 (first element empty)
9709 <ul><li><ul><li></li></ul></li>
9715 Nested lists 5 (both elements empty)
9720 <ul><li><ul><li></li></ul></li>
9726 Nested lists 6 (both elements empty)
9732 <ul><li></li></ul></li></ul>
9737 Nested lists 7 (skip initial nesting levels)
9741 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9746 Nested lists 8 (multiple nesting transitions)
9754 <ul><li><ul><li>bar</li></ul></li>
9755 <li>baz</li></ul></li>
9761 Nested lists 9 (extension interaction)
9767 <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>
9771 1. Lists with start-of-line-transparent tokens before bullets: Comments
9784 Nested lists 10 (list and span siblings: wt2wt regression)
9789 <ul><li>a <span>x</span>
9790 <ul><li>b <span>y</span></li></ul></li></ul>
9794 2. Lists with start-of-line-transparent tokens before bullets: Template close
9799 <ul><li>foo bar</li>
9805 List items are not parsed correctly following a <pre> block (T2785)
9811 <ul><li><pre>foo</pre></li>
9812 <li><pre>bar</pre></li>
9816 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9817 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9821 # FIXME: Might benefit from a html/parsoid since this has a template
9823 List items from template
9834 *notSOL{{inner list}}
9838 <li>item 2</li></ul>
9841 <li>item 2</li></ul>
9845 <li>item 2</li></ul>
9850 List interrupted by empty line or heading
9858 <ul><li>foo</li></ul>
9859 <ul><li><ul><li>bar</li></ul></li></ul>
9860 <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>
9861 <ul><li>Another list item</li></ul>
9866 Multiple list tags generated by templates
9884 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[0,44,null,null],"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"a\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":1}},"b\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":2}},"c"]}'>a
9885 </li><li about="#mwt1">b
9886 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9890 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9893 <!--This line will NOT split the list-->
9895 <!--This line will NOT split the list either-->
9897 <!--foo--> <!----> <!--This line NOT split the list either-->
9908 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9911 <!--This line will NOT split the list-->
9913 <!--This line will NOT split the list either-->
9915 <!--foo--> <!----> <!--This line NOT split the list
9926 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
9927 # That pass could possibly be removed.
9929 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
9931 parsoid=wt2html,wt2wt
9935 *{{echo|<li>templated li-hack}}
9936 *<!--foo--><li> unsupported li-hack with preceding comments
9939 <li><li>not a li-hack
9944 <li class="mw-empty-elt"></li><li>li-hack</li>
9945 <li class="mw-empty-elt"></li><li>templated li-hack</li>
9946 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
9948 <li class="mw-empty-elt"></li><li>not a li-hack
9953 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
9954 <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>
9955 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
9957 <ul data-parsoid='{"stx":"html"}'>
9958 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
9965 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9994 Parsoid: Test of whitespace serialization with Templated bullets
10001 <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>
10005 # ------------------------------------------------------------------------
10006 # The next set of tests are about Parsoid's ability to handle badly nested
10007 # tags (parse, minimize scope of fixup, and roundtrip back)
10008 # ------------------------------------------------------------------------
10010 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
10011 # Parsoid's list handling is more aware of block structure.
10013 Unbalanced closing block tags break a list
10020 <ul><li>a</li></ul></div><div>
10032 Unbalanced closing non-block tags don't break a list
10040 <ul><li>a<span></span></li>
10045 <li>a<span></span></li>
10051 # Parsoid does some post-dom-building cleanup
10052 # which is why its output differs from Remex.
10054 Unclosed formatting tags that straddle lists are closed and reopened
10056 parsoid=wt2html,wt2wt,html2html
10061 <ol><li><s> a</s></li><s>
10062 </s><li><s>b </s></li></ol>
10064 <ol><li><s> a</s></li>
10065 <li><s>b </s></li></ol>
10068 # Output is ugly because of all the misnested tag fixups.
10069 # Remex is wrapping p-tags around empty elements.
10070 # Parsoid has special-case handling of this pattern of
10071 # wrapping lists in formatting tags.
10072 # FIXME: Should we remove this code from Parsoid? Or add
10073 # special support in Remex? If the latter, maybe just wait
10074 # for Parsoid to become the default parser.
10077 1. List embedded in a formatting tag
10084 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
10094 # Output is ugly because of all the misnested tag fixups
10095 # Remex is wrapping p-tags around empty elements.
10096 # Parsoid has code that strips useless p-tags.
10098 2. List embedded in a formatting tag in a misnested way
10105 </small></p><small></small><ul><small><li>a</li>
10106 </small><li><small>b</small></li></ul>
10112 <li><small>b</small></li>
10120 # Note that the current date is hard-coded as
10121 # 1970-01-01T00:02:03Z (a Thursday)
10122 # when running parser tests. The timezone is also fixed to GMT, so
10123 # local date will be identical to current date.
10126 Magic Word: {{CURRENTDAY}}
10135 Magic Word: {{CURRENTDAY2}}
10144 Magic Word: {{CURRENTDAYNAME}}
10153 Magic Word: {{CURRENTDOW}}
10162 Magic Word: {{CURRENTMONTH}}
10171 Magic Word: {{CURRENTMONTH1}}
10180 Magic Word: {{CURRENTMONTHABBREV}}
10182 {{CURRENTMONTHABBREV}}
10189 Magic Word: {{CURRENTMONTHNAME}}
10191 {{CURRENTMONTHNAME}}
10198 Magic Word: {{CURRENTMONTHNAMEGEN}}
10200 {{CURRENTMONTHNAMEGEN}}
10207 Magic Word: {{CURRENTTIME}}
10216 Magic Word: {{CURRENTHOUR}}
10225 Magic Word: {{CURRENTWEEK}} (T6594)
10234 Magic Word: {{CURRENTYEAR}}
10243 Magic Word: {{CURRENTTIMESTAMP}}
10245 {{CURRENTTIMESTAMP}}
10252 Magic Words LOCAL (UTC)
10256 *{{LOCALMONTHNAME}}
10257 *{{LOCALMONTHNAMEGEN}}
10258 *{{LOCALMONTHABBREV}}
10267 *{{LOCALTIMESTAMP}}
10282 <li>19700101000203</li></ul>
10287 Magic Word: {{FULLPAGENAME}}
10289 title=[[User:Ævar Arnfjörð Bjarmason]]
10290 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10294 <p>User:Ævar Arnfjörð Bjarmason
10299 Magic Word: {{FULLPAGENAMEE}}
10301 title=[[User:Ævar Arnfjörð Bjarmason]]
10302 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10306 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10311 Magic Word: {{TALKSPACE}}
10313 title=[[User:Ævar Arnfjörð Bjarmason]]
10314 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10323 Magic Word: {{TALKSPACE}}, same namespace
10325 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10326 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10335 Magic Word: {{TALKSPACE}}, main namespace
10337 title=[[Parser Test]]
10338 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10347 Magic Word: {{TALKSPACEE}}
10349 title=[[User:Ævar Arnfjörð Bjarmason]]
10350 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10359 Magic Word: {{SUBJECTSPACE}}
10361 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10362 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10371 Magic Word: {{SUBJECTSPACE}}, same namespace
10373 title=[[User:Ævar Arnfjörð Bjarmason]]
10374 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10383 Magic Word: {{SUBJECTSPACE}}, main namespace
10385 title=[[Parser Test]]
10386 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10394 Magic Word: {{SUBJECTSPACEE}}
10396 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10397 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10406 Magic Word: {{NAMESPACE}}
10408 title=[[User:Ævar Arnfjörð Bjarmason]]
10409 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10418 Magic Word: {{NAMESPACEE}}
10420 title=[[User:Ævar Arnfjörð Bjarmason]]
10421 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10430 Magic Word: {{NAMESPACENUMBER}}
10432 title=[[User:Ævar Arnfjörð Bjarmason]]
10433 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10435 {{NAMESPACENUMBER}}
10442 Magic Word: {{SUBPAGENAME}}
10444 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10445 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10454 Magic Word: {{SUBPAGENAMEE}}
10456 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10457 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10466 Magic Word: {{ROOTPAGENAME}}
10468 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10469 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10473 <p>Ævar Arnfjörð Bjarmason
10478 Magic Word: {{ROOTPAGENAMEE}}
10480 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10481 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10485 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10490 Magic Word: {{BASEPAGENAME}}
10492 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10493 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10497 <p>Ævar Arnfjörð Bjarmason
10502 Magic Word: {{BASEPAGENAMEE}}
10504 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10505 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10509 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10514 Magic Word: {{TALKPAGENAME}}
10516 title=[[User:Ævar Arnfjörð Bjarmason]]
10517 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10521 <p>User talk:Ævar Arnfjörð Bjarmason
10526 Magic Word: {{TALKPAGENAMEE}}
10528 title=[[User:Ævar Arnfjörð Bjarmason]]
10529 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10533 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10538 Magic Word: {{SUBJECTPAGENAME}}
10540 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10541 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10543 {{SUBJECTPAGENAME}}
10545 <p>User:Ævar Arnfjörð Bjarmason
10550 Magic Word: {{SUBJECTPAGENAMEE}}
10552 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10553 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10555 {{SUBJECTPAGENAMEE}}
10557 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10562 Magic Word: {{NUMBEROFFILES}}
10564 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10573 Magic Word: {{PAGENAME}}
10575 title=[[User:Ævar Arnfjörð Bjarmason]]
10576 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10580 <p>Ævar Arnfjörð Bjarmason
10585 Magic Word: {{PAGENAME}} with metacharacters
10587 title=[['foo & bar = baz']]
10588 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10592 <p><i>'foo & bar = baz'</i>
10597 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10599 title=[[*RFC 1234 http://example.com/]]
10600 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10604 <p>*RFC 1234 http://example.com/
10609 Magic Word: {{PAGENAMEE}}
10611 title=[[User:Ævar Arnfjörð Bjarmason]]
10612 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10616 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10621 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10623 title=[[*RFC 1234 http://example.com/]]
10624 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10628 <p>*RFC_1234_http://example.com/
10633 Magic Word: {{REVISIONID}}
10635 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10642 flags=vary-revision-id
10646 Magic Word: {{SCRIPTPATH}}
10648 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10656 Magic Word: {{STYLEPATH}}
10658 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10667 Magic Word: {{SERVER}}
10669 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10673 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10678 Magic Word: {{SERVERNAME}}
10680 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10689 Magic Word: {{SITENAME}}
10691 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10700 Magic Word: {{PAGELANGUAGE}}
10703 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10712 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10714 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10723 Case-sensitive magic words, when cased differently, should just be template transclusions
10730 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10731 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10732 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10733 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10738 Case-insensitive magic words should still work with weird casing.
10748 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10752 # From plwiki:PLOS_ONE
10754 Parsoid: Page property magic word with magic word contents
10756 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10758 <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>"}]]}'/>
10761 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10762 # But, this is a limitation of our representation and is documented in
10763 # TemplateHandler.js in processSpecialMagicWord
10765 Parsoid: Template-generated DISPLAYTITLE
10767 {{{{echo|DISPLAYTITLE}}:Foo}}
10771 wgAllowDisplayTitle=true
10772 wgRestrictDisplayTitle=false
10777 <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"}]]}'/>
10781 Namespace 1 {{ns:1}}
10790 Namespace 1 {{ns:01}}
10799 Namespace 0 {{ns:0}} (T6783)
10807 Namespace 0 {{ns:00}} (T6783)
10815 Namespace -1 {{ns:-1}}
10824 Namespace User {{ns:User}}
10833 Namespace User talk {{ns:User_talk}}
10842 Namespace User talk {{ns:uSeR tAlK}}
10851 Namespace File {{ns:File}}
10860 Namespace File {{ns:Image}}
10869 Namespace (lang=de) Benutzer {{ns:User}}
10880 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10886 <p>Benutzer Diskussion
10893 {{urlencode:hi world?!}}
10894 {{urlencode:hi world?!|WIKI}}
10895 {{urlencode:hi world?!|PATH}}
10896 {{urlencode:hi world?!|QUERY}}
10906 Magic Word: prioritize type info over data-parsoid
10910 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10916 Magic Word: serialize on separate line (parsoid)
10918 parsoid=wt2wt,html2wt
10924 foo<meta property="mw:PageProp/notoc"/>bar
10928 Magic Word: rt non-english wikis
10935 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10939 __proto__ is treated as normal wikitext (T105997)
10951 Magic links: internal link to RFC (T2479)
10955 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10958 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10962 Magic links: RFC (T2479)
10966 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10969 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external mw-magiclink">RFC 822</a></p>
10973 Magic links: RFC (T67278)
10975 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10977 <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.
10980 <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>
10984 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10986 RFC      822
10990 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10995 <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>
11001 Magic links: ISBN (T3937)
11005 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11008 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11012 Magic links: ISBN (T67278)
11014 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11016 <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.
11019 <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>
11023 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11025 ISBN      978 0 316 09811 3
11031 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11038 <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>
11046 Magic links: PMID incorrectly converts space to underscore
11050 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11053 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external mw-magiclink">PMID 1234</a></p>
11057 Magic links: PMID (T67278)
11059 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11061 <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.
11064 <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>
11068 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11070 PMID      1234
11074 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11079 <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>
11084 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11085 # since these are ExtLinkText, not MagicLinkText
11087 Magic links: use appropriate serialization for "almost" magic links.
11089 X[[Special:BookSources/0978739256|foo]]
11091 X[https://tools.ietf.org/html/rfc1234 foo]
11093 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11094 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11097 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11098 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11102 Magic links: All disabled (T47942)
11104 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11110 <p>ISBN 0-306-40615-2
11121 Nonexistent template
11123 {{thistemplatedoesnotexist}}
11125 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11130 Template with invalid target containing tags
11132 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11134 <p>{{a<b>b</b>|foo|a=b|a = b}}
11139 Template with invalid target containing unclosed tag
11141 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11143 <p>{{a<b>|foo|a=b|a = b}}</b>
11148 Template with invalid target containing wikilink
11152 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11155 <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>
11159 Template with just whitespace in it, T70421
11163 <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>
11169 This is a test template
11177 <p>This is a test template
11182 Template with explicit namespace
11186 <p>This is a test template
11194 This is a test template with parameter {{{param}}}
11200 {{paramtest|param=foo}}
11202 <p>This is a test template with parameter foo
11207 Template:paramtestnum
11209 [[{{{1}}}|{{{2}}}]]
11213 Template unnamed parameter
11215 {{paramtestnum|Main Page|the main page}}
11217 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11222 Template:templatesimple
11228 Template:templateredirect
11230 #redirect [[Template:templatesimple]]
11234 Template:templateasargtestnum
11240 Template:templateasargtest
11242 {{template{{{templ}}}}}
11246 Template:templateasargtest2
11252 Template with template name as unnamed argument
11254 {{templateasargtestnum|templatesimple}}
11261 Template with template name as argument
11263 {{templateasargtest|templ=simple}}
11270 Template with template name as argument (2)
11272 {{templateasargtest2|templ=templatesimple}}
11279 Template:templateasargtestdefault
11281 {{{{{templ|templatesimple}}}}}
11291 Template with default value
11293 {{templateasargtestdefault}}
11300 Template with default value (value set)
11302 {{templateasargtestdefault|templ=templa}}
11311 {{templateredirect}}
11316 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11320 Template with argument in separate line
11322 {{ templateasargtest |
11330 Template with complex template as argument
11333 param ={{ templateasargtest |
11334 templ = simple }}}}
11336 <p>This is a test template with parameter (test)
11341 Templates with templated name
11343 {{{{echo|echo}}|foo}}
11344 {{{{echo|inner list}} }}
11348 <ul><li>item 1</li></ul>
11351 <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>
11352 <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>
11355 ## Regression test; the output here isn't really that interesting.
11357 Templates with templated name and top level template args
11359 {{1{{2{{{3}}}|4=5}}}}
11361 <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>
11364 # Parsoid markup is deliberate "broken". This is an edge case.
11365 # See long comment in TemplateHandler.js:convertAttribsToString.
11367 Templates with invalid templated targets
11378 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11383 Template with thumb image (with link in description)
11385 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11387 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>
11390 <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>
11392 <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>
11396 Template:complextemplate
11398 {{{1}}} {{paramtest|
11399 param ={{{param}}}}}
11403 Template with complex arguments
11406 param ={{ templateasargtest |
11407 templ = simple }}|[[Template:complextemplate|link]]}}
11409 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11414 T2553: link with two variables in a piped link
11417 |[[{{{1}}}|{{{2}}}]]
11422 <td>[[{{{1}}}|{{{2}}}]]
11427 <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>
11433 Abort table cell attribute parsing on wikilink
11436 |testing [[one|two]] |three||four
11437 |testing one two |three||four
11438 |testing="[[one|two]]" |three||four
11443 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11449 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11455 <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>
11456 <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>
11457 <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>
11462 Don't abort table cell attribute parsing if wikilink is found in template arg
11465 |Test {{#tag:ref|One two "[[three]]" four}}
11469 <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>
11474 Magic variable as template parameter
11476 {{paramtest|param={{SITENAME}}}}
11478 <p>This is a test template with parameter MediaWiki
11485 [[{{{param}}}|link]]
11489 Template parameter as link source
11491 {{linktest|param=Main Page}}
11493 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11498 Template:paramtest2
11500 including another template, {{paramtest|param={{{arg}}}}}
11504 Template passing argument to another template
11506 {{paramtest2|arg='hmm'}}
11508 <p>including another template, This is a test template with parameter 'hmm'
11519 Template as link source
11523 [[{{linktest2}}|Main Page]]
11525 [[{{linktest2}}]]Page
11527 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11528 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11529 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11547 Template infinite loop
11551 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11556 Template from main namespace
11565 Template from non-includable namespace
11567 wgNonincludableNamespaces=10
11571 <p><a href="/wiki/Template:Echo" title="Template:Echo">Template:Echo</a>
11586 T2529: Template with table, not included at beginning of line
11605 T2523: Template shouldn't eat newline (or add an extra one before table)
11625 T2041: Template parameters shown as broken links
11634 Template with targets containing wikilinks
11640 {{[[{{echo|foo}}]]}}
11642 {{{{echo|[[foo}}]]}}
11644 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11645 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11649 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11650 <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>
11651 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11661 Templates: Double quotes as template target
11668 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11672 ## This test is about making sure Parsoid's data-mw is well formed in the
11673 ## face of multiple templates with intersecting and overlapping ranges. The
11674 ## wikitext itself is wretched.
11676 Templates with intersecting and overlapping ranges
11687 </table><p>ho</p><table>
11691 </td></tr></tbody></table>
11693 <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":""}]]}'>
11695 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11697 <tbody><tr><td>hi</td></tr>
11702 Template:MSGNW test
11704 ''None'' of '''this''' should be
11706 but rather passed unmodified
11714 # hmm, fix this or just deprecate msgnw and document its behavior?
11718 {{msgnw:MSGNW test}}
11720 <p>''None'' of '''this''' should be
11722  but rather passed unmodified
11723 {{test}}
11727 <!-- comment -->
11734 {{int:youhavenewmessages|lots of money|not!}}
11736 <p>You have lots of money (not!).
11741 int keyword - non-existing message
11752 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11756 <includeonly> and <noinclude> being included
11767 <onlyinclude>Foo</onlyinclude>bar
11771 <onlyinclude> being included
11783 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11787 <onlyinclude> and <includeonly> being included
11796 <includeonly> and <noinclude> on a page
11798 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11805 Un-closed <noinclude>
11812 <onlyinclude> on a page
11814 <onlyinclude>Foo</onlyinclude>bar
11821 Un-closed <onlyinclude>
11828 Self-closed noinclude, includeonly, onlyinclude tags
11839 Unbalanced includeonly and noinclude tags
11843 |b</noinclude></noinclude>
11844 |c</noinclude></includeonly>
11845 |d</includeonly></includeonly>
11854 <td>c</includeonly>
11856 <td>d</includeonly></includeonly>
11862 Template:Includeonly section
11865 ==Includeonly section==
11871 T8563: Edit link generation for section shown by <includeonly>
11873 {{includeonly section}}
11875 <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>
11876 <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>
11880 # Uses same input as the contents of [[Template:Includeonly section]]
11882 T8563: Section extraction for section shown by <includeonly>
11887 ==Includeonly section==
11895 T8563: Edit link generation for section suppressed by <includeonly>
11898 ==Includeonly section==
11902 <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>
11907 T8563: Section extraction for section suppressed by <includeonly>
11912 ==Includeonly section==
11920 Un-closed <includeonly>
11925 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11928 ## We used to, but no longer wt2wt this test since the default serializer
11929 ## will normalize the include directives to serialize on their own line.
11930 ## Selser will take care of preserving formatting in scenarios where they
11931 ## intermingled with other wikitext.
11933 Includes and comments at SOL
11935 parsoid=wt2html,html2html
11937 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
11944 <includeonly>can have stuff</includeonly>===here===
11947 <h2><span class="mw-headline" id="hu">hu</span></h2>
11952 <h3><span class="mw-headline" id="here">here</span></h3>
11955 <!-- 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>
11957 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11959 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
11962 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3 id="here">here</h3>
11966 # TODO: test with DOM fragment reuse!
11968 Parsoid: DOM fragment reuse
11970 parsoid=wt2wt,wt2html
11972 a{{echo|b<table></table>c}}d
11984 <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>
11986 <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">
11987 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11988 </span><p about="#mwt2">cd</p>
11990 <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">
11992 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11994 </span><p about="#mwt3">b</p>
11998 Parsoid: Merge double tds (T52603)
12003 |{{echo|{{!}} foo}}
12007 <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>
12012 Parsoid: Merge double tds in nested transclusion content (T52603)
12018 |{{echo|{{!}} foo}}
12022 <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}}]}'>
12024 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12030 ### <includeonly> and <noinclude> in attributes
12033 0. includeonly around the entire attribute
12035 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12037 <p><span id="v2">bar</span>
12042 1. includeonly in html attr key
12044 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12046 <p><span id="foo">bar</span>
12051 2. includeonly in html attr value
12053 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12054 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12056 <p><span id="v1">bar</span>
12057 <span id="v1">bar</span>
12062 3. includeonly in part of an attr value
12064 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12066 <p><span style="color:red;">bar</span>
12071 4. includeonly in table attributes
12095 ### Preprocessor precedence tests
12096 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12098 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12100 Preprocessor precedence 1: link is rightmost opening
12106 But close-brace is not a valid character in a link title:
12109 However, we can still tell this was handled as a link in the preprocessor:
12110 {{echo|[[Foo}}|bar]]|bat}}
12112 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12113 </p><p>But close-brace is not a valid character in a link title:
12115 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12119 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12120 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12121 <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>
12125 Preprocessor precedence 2: template is rightmost opening
12134 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12138 Preprocessor precedence 3: language converter is rightmost opening
12154 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12155 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12156 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12160 Preprocessor precedence 4: left-most angle bracket
12171 Template:Precedence5
12177 Preprocessor precedence 5: tplarg takes precedence over template
12179 {{Precedence5|Bullet}}
12181 <ul><li>Bar</li></ul>
12184 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12188 Preprocessor precedence 6: broken link is rightmost opening
12194 {{echo|[[Foo|bar|bat=baz}}
12197 </p><p>{{echo|[[Foo|bar|bat=baz}}
12200 <p>{{echo|[[Foo}}</p>
12201 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12204 # This next test exposes a difference between PHP and Parsoid:
12205 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12206 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12207 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12208 # outer `[[Foo` extends until the `y]]`
12209 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12210 # intermediate result (after template expansion), and link processing
12211 # happens on this intermediate result, which moves the wikilink
12212 # boundary leftward to `[[Foo|Bar]]`
12213 # 2b) Parsoid works in a single step, so it's going to keep the
12214 # wikilink as extending to the `y]]`
12215 # 3a) Then PHP does linktrail processing which slurps up the trailing
12216 # `xy` inside the link.
12217 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12218 # `z` inside the link.
12219 # This is "correct" behavior. Parsoid's basic worldview is that the
12220 # `]]` inside the template shouldn't be allowed to leak out to affect
12221 # the surrounding wikilink. PHP may match Parsoid (in the future)
12222 # if you use {{#balance}} (T114445).
12225 Preprocessor precedence 7: broken template is rightmost opening
12231 [[Foo|{{echo|Bar]]-x}}-y]]-z
12233 Careful: linktrails can move the end of the wikilink:
12234 [[Foo|{{echo|y']]a}}l]]l
12236 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12237 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12238 </p><p>Careful: linktrails can move the end of the wikilink:
12239 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12242 <p>[[Foo|{{echo|Bar]]</p>
12243 <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>
12244 <p>Careful: linktrails can move the end of the wikilink:
12245 <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>
12249 Preprocessor precedence 8: broken language converter is rightmost opening
12260 Template:Preprocessor_precedence_9
12265 ;7: {{{{{{{4}}}}}}}
12269 Preprocessor precedence 9: groups of braces
12271 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12277 <ul><li>Bar</li></ul>
12281 <dd>{Bullet}</dd></dl>
12284 <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}}]}'>
12289 </dl><ul about="#mwt1">
12291 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12300 Template:Preprocessor_precedence_10
12307 ;6: -{{{{{{4}}}}}}-
12308 ;7: -{{{{{{{5}}}}}}}-
12312 Preprocessor precedence 10: groups of braces with leading dash
12316 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12322 <ul><li>Bar-</li></ul>
12329 <ul><li>Bar-</li></ul>
12336 <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}}]}'>
12338 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12341 </dl><ul about="#mwt1">
12343 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12347 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12350 </dl><ul about="#mwt1">
12352 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12356 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12361 Preprocessor precedence 11: found during visual diff testing
12363 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12365 {{echo|-{{echo|-{{echo|x}}}}}}
12367 {{echo|-{{echo|x}}}}
12369 <p><span>-<span>-x</span></span>
12374 <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>
12376 <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>
12378 <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>
12382 Preprocessor precedence 12: broken language converter closed by brace.
12386 This form breaks the template, which is unfortunate:
12387 *{{echo|foo-{bar}bat}}
12389 But if the broken language converter markup is inside an extension
12390 tag, nothing bad happens:
12391 *<nowiki>foo-{bar}bat</nowiki>
12392 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12393 *<pre>foo-{bar}bat</pre>
12394 *{{echo|<pre>foo-{bar}bat</pre>}}
12396 <tag>foo-{bar}bat</tag>
12397 {{echo|<tag>foo-{bar}bat</tag>}}
12400 <p>This form breaks the template, which is unfortunate:
12402 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12403 <p>But if the broken language converter markup is inside an extension
12404 tag, nothing bad happens:
12406 <ul><li>foo-{bar}bat</li>
12407 <li>foo-{bar}bat</li>
12408 <li><pre>foo-{bar}bat</pre></li>
12409 <li><pre>foo-{bar}bat</pre></li></ul>
12410 <pre>'foo-{bar}bat'
12414 <pre>'foo-{bar}bat'
12419 <p>This form breaks the template, which is unfortunate:</p>
12421 <li>{{echo|foo-{bar}bat}}</li>
12423 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12425 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12426 <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>
12427 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12428 <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>
12430 <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>
12434 Preprocessor precedence 13: broken language converter in external link
12438 *[http://example.com/-{foo Example in URL]
12439 *[http://example.com Example in -{link} description]
12440 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12442 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12443 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12444 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12447 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12448 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12449 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12454 Preprocessor precedence 14: broken language converter in comment
12456 *<!--{{foo}}-->...should be ok
12457 *<!---{{foo}}-->...extra dashes
12458 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12460 <ul><li>...should be ok</li>
12461 <li>...extra dashes</li>
12462 <li>foobat...should be ok</li></ul>
12465 <li><!--{{foo}}-->...should be ok</li>
12466 <li><!---{{foo}}-->...extra dashes</li>
12467 <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>
12472 Preprocessor precedence 15: broken brace markup in headings
12474 wgFragmentMode=[ 'html5', 'legacy' ]
12478 __NOTOC__ __NOEDITSECTION__
12487 ===5 foo{{{bar 5===
12492 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12495 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12498 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12501 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12504 <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>
12507 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12511 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12512 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12514 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12516 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12518 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12520 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12522 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12527 Preprocessor precedence 16: matching closing braces to opening braces
12532 -{{{echo|foo}}bar}-
12537 <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>
12541 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12550 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12554 Preprocessor precedence 18: another rightmost wins scenario
12558 {{ -{{{{1|tplarg}}} }} }-
12560 <p>{{ -{tplarg }} }-
12563 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12567 Preprocessor precedence 19: break syntax
12580 ### Token Stream Patcher tests
12582 ### These tests won't always pass wt2wt and other modes because
12583 ### on serialization, the table will be output on a new line.
12584 ### For now, we are blacklisting them, and using this to test selser.
12588 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12590 parsoid=wt2html,wt2wt
12592 {{echo|}}{| width = '100%'
12596 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12597 <tbody><tr><td>foo</td></tr>
12601 ## We used to, but no longer wt2wt this test since the default serializer
12602 ## will normalize the include directives to serialize on their own line.
12603 ## Selser will take care of preserving formatting in scenarios where they
12604 ## intermingled with other wikitext.
12606 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12610 <includeonly>a</includeonly>{| {{{b}}}
12614 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[31,38,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"b\"},\"params\":{},\"i\":0}}]}'>{{{b}}}</span>"},{"html":""}]]}'>
12615 <tbody><tr><td>c</td></tr>
12620 Table wikitext syntax outside wiki-tables
12624 ! not a table heading
12627 | class="foo bar" | baz
12635 ! not a table heading
12638 | class="foo bar" | baz
12647 ### Testing parsing of templates where a template arg
12648 ### has the same name as the template itself.
12654 {{{quote|{{{1}}}}}}
12658 Templates: Template Name/Arg clash: 1. Use of positional param
12667 Templates: Template Name/Arg clash: 2. Use of named param
12669 {{quote|quote=foo}}
12676 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12685 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12689 Templates: 1. Simple use
12698 Templates: 2. Inside a block tag
12700 <div>{{echo|Foo}}</div>
12701 <blockquote>{{echo|Foo}}</blockquote>
12704 <blockquote>Foo</blockquote>
12708 <blockquote><p>Foo</p></blockquote>
12712 Templates: P-wrapping: 1a. Templates on consecutive lines
12723 Templates: P-wrapping: 1b. Templates on consecutive lines
12737 Templates: P-wrapping: 1c. Templates on consecutive lines
12740 {{echo|bar}} <div>baz</div>
12749 bar </p><div>baz</div>
12753 Templates: P-wrapping: 1d. Template preceded by comment-only line
12762 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12766 Templates: Inline Text: 1. Multiple template uses
12768 {{echo|Foo}}bar{{echo|baz}}
12775 Templates: Inline Text: 2. Back-to-back template uses
12777 {{echo|Foo}}{{echo|bar}}
12784 Templates: Block Tags: 1. Multiple template uses
12786 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12788 <div>Foo</div><div>bar</div><div>baz</div>
12793 Templates: Block Tags: 2. Back-to-back template uses
12795 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12797 <div>Foo</div><div>bar</div>
12801 # This is an edge case relating to paragraph wrapping.
12803 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12808 <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
12813 Templates: Links: 1. Simple example
12815 {{echo|[[Foo|bar]]}}
12817 <p><a href="/wiki/Foo" title="Foo">bar</a>
12822 Templates: Links: 2. Generation of link href
12824 [[{{echo|Foo}}|bar]]
12826 <p><a href="/wiki/Foo" title="Foo">bar</a>
12831 Templates: Links: 3. Generation of part of a link href
12833 [[Fo{{echo|o}}|bar]]
12835 [[Foo{{echo|bar}}]]
12837 [[Foo{{echo|bar}}baz]]
12839 [[Foo{{echo|bar}}|bar]]
12841 [[:Foo{{echo|bar}}]]
12843 [[:Foo{{echo|bar}}|bar]]
12845 <p><a href="/wiki/Foo" title="Foo">bar</a>
12846 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12847 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12848 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12849 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12850 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12855 Templates: Links: 4. Multiple templates generating link href
12857 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12859 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12864 Templates: Links: 5. Generation of link text
12866 [[Foo|{{echo|bar}}]]
12868 <p><a href="/wiki/Foo" title="Foo">bar</a>
12873 Templates: Links: 5. Nested templates (only outermost template should be marked)
12875 {{echo|[[{{echo|Foo}}|bar]]}}
12877 <p><a href="/wiki/Foo" title="Foo">bar</a>
12882 Templates: HTML Tag: 1. Generation of HTML attr. key
12884 <div {{echo|style}}="color:red;">foo</div>
12886 <div style="color:red;">foo</div>
12891 Templates: HTML Tag: 2. Generation of HTML attr. value
12893 <div style={{echo|'color:red;'}}>foo</div>
12895 <div style="color:red;">foo</div>
12900 Templates: HTML Tag: 3. Generation of HTML attr key and value
12902 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12904 <div style="color:red;">foo</div>
12909 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12911 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12913 <div title="This is a long title with just one piece templated">foo</div>
12918 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12920 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12922 <div title="This is a long title with just one piece templated">foo</div>
12927 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12929 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12931 <div title="This is a long title with just one piece templated">foo</div>
12935 # SSS FIXME: While it is great we added support for all this,
12936 # do we want to make this part of the spec? Maybe we want to
12937 # deprecate this kind of usage in the future?
12939 Templates: HTML Tag: 7. Generation of partial attribute key string
12941 <div st{{echo|yle}}="color:red;">foo</div>
12943 <div style="color:red;">foo</div>
12948 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12950 <div {{echo|1=id="v1"}}>bar</div>
12952 <div id="v1">bar</div>
12957 Templates: HTML Tag: 9. Multiple template-generated attributes
12959 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12961 <div id="v1" title="foo">bar</div>
12966 Templates: Support for templates generating attributes and content
12968 {| {{mixed_attr_content_template}}
12973 <table style="color:red;" title="T48811">
12983 <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|}"]}'>
12992 Template:attribute_from_template
12998 Table cell with attribute before expanded attribute
13001 | align="center" {{attribute_from_template}} |456
13005 <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>
13010 1. Entities and nowikis inside templated attributes should be handled correctly
13012 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13014 <div style="background:#f9f9f9;">foo</div>
13017 <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>
13021 2. Entities and nowikis inside templated attributes should be handled correctly
13024 |{{table_attribs_3}}
13029 <td style="background:#f9f9f9;">Foo
13034 <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>
13039 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13042 |{{table_attribs_3}}
13047 <td style="background:#f9f9f9;">Foo
13051 <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}}]}'>
13052 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13058 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13061 |{{table_attribs_6}} hi
13066 <td style="background: red;">hi
13071 <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>
13076 Templates: HTML Tables: 1. Generating start of a HTML table
13078 {{echo|<table><tr><td>foo</td>}}</tr></table>
13080 <table><tr><td>foo</td></tr></table>
13085 Templates: HTML Tables: 2a. Generating middle of a HTML table
13087 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13089 <table><tr><td>foo</td></tr></table>
13094 Templates: HTML Tables: 2b. Generating middle of a HTML table
13096 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13098 <table><tr><td>foo</td></tr></table>
13103 Templates: HTML Tables: 3. Generating end of a HTML table
13105 <table><tr>{{echo|<td>foo</td></tr></table>}}
13107 <table><tr><td>foo</td></tr></table>
13112 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13114 {{echo|<table>}}<tr><td>foo</td></tr></table>
13116 <table><tr><td>foo</td></tr></table>
13121 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13123 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13125 <table><tr><td>foo</td></tr></table>
13130 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13132 <table><tr>{{echo|<td>}}foo</td></tr></table>
13134 <table><tr><td>foo</td></tr></table>
13139 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13141 <table><tr><td>foo{{echo|</td>}}</tr></table>
13143 <table><tr><td>foo</td></tr></table>
13148 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13150 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13152 <table><tr><td>foo</td></tr></table>
13157 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13159 <table><tr><td>foo</td></tr>{{echo|</table>}}
13161 <table><tr><td>foo</td></tr></table>
13166 Templates: HTML Tables: 5. Proper fostering of categories from inside
13168 parsoid=wt2html,wt2wt
13170 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13171 <!--Two categories (T52330)-->
13172 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13174 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13175 <!--Two categories (T52330)-->
13176 <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>
13180 Templates: Wiki Tables: 1a. Fostering of entire template content
13188 <tr><td></td></tr></table>
13193 <table><tbody><tr><td></td></tr></tbody></table>
13195 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}},"\n|}"]}'>a</p><table about="#mwt2">
13201 Templates: Wiki Tables: 1b. Fostering of entire template content
13214 <tr><td></td></tr></table>
13222 <tbody><tr><td></td></tr></tbody></table>
13224 <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|}"]}'>
13226 </div><table about="#mwt3">
13232 Templates: Wiki Tables: 2. Fostering of partial template content
13242 <tr><td></td></tr></table>
13247 <div>b</div><table>
13248 <tbody><tr><td></td></tr></tbody></table>
13250 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n<div>b</div>"}},"i":0}},"\n|}"]}'>a</p><div about="#mwt2">b</div><table about="#mwt2">
13257 Templates: Wiki Tables: 3. td-content via multiple templates
13260 {{echo|{{pipe}}a}}{{echo|b}}
13271 Templates: Wiki Tables: 4. Templated tags, no content
13277 <tr><td></td></tr></table>
13282 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13296 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13309 ## This test case is very specific to Parsoid's internals
13310 ## and is hence only tested for Parsoid's code. Parsoid uses
13311 ## a <meta> marker tag for <ref> tags and they are expanded
13312 ## much later. We are verifying that this <meta> tag usage
13313 ## doesn't prevent foster parenting.
13315 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13317 {{PartialTable}}<ref>foo</ref>
13322 <sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></sup><table about="#mwt2">
13326 <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>
13330 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13340 <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{{!}}}"]}'>
13341 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13345 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13350 Templates: Lists: Multi-line list-items via templates
13352 *{{echo|a {{nonexistent|
13354 *{{echo|b {{nonexistent|
13357 <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>
13358 <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>
13363 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13365 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13367 <p><i>ab</i>c<i>d</i>e
13372 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13373 (PHP parser generates misnested html)
13375 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13377 <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>
13381 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13382 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13384 parsoid=wt2html,wt2wt
13386 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13388 <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>
13389 <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>
13390 <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>
13394 Templates: Ugly nesting: 4. Divs opened/closed across templates
13396 a<div>b{{echo|c</div>d}}e
13401 <p>a</p><div>bc</div><p>de
13406 Templates: Ugly templates: 3. newline-only template parameter
13415 # This looks like a bug: a single newline triggers p/br for some reason.
13417 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13426 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13427 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13429 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13435 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>foo"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</table>"}},"i":2}}]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}'>foo
13436 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13440 # T66017 -- ugly wikitext with fostered content generates two template ranges
13441 # that are "identical" and generate nesting cycles in the algorithm
13443 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13445 {{echo|<table><tr><td><table>}}
13449 <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"}'>
13450 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13451 </table></td></tr></tbody></table>
13455 Templates: Parameters substituted at the top-level
13457 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13461 <p><i>who</i> me? <b>never!</b>
13465 <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>
13467 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13471 Templates: Param with empty arg in the final position
13475 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13479 Parser Functions: 1. Simple example
13488 Parser Functions: 2. Nested use (only outermost should be marked up)
13496 ## Note that the templates inside the references are not wrapped
13498 Template nested in extension tag in template
13500 {{echo|hi<ref>[[ho|{{echo|hi}}]]</ref>}}
13501 {{echo|hi<ref>[http://test.com?q={{echo|ho}}]</ref>}}
13504 <p><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[[ho|{{echo|hi}}]]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup>
13505 <span about="#mwt7" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi<ref>[http://test.com?q={{echo|ho}}]</ref>"}},"i":0}}]}'>hi</span><sup about="#mwt7" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="./Main_Page#cite_note-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a></sup></p>
13506 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"stx":"piped","a":{"href":"./Ho"},"sa":{"href":"ho"}}'>hi</a></span></li><li about="#cite_note-2" id="cite_note-2"><a href="./Main_Page#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"><a typeof="mw:ExpandedAttrs" about="#mwt11" rel="mw:ExtLink" class="external autonumber" href="http://test.com?q=ho" data-mw='{"attribs":[[{"txt":"href"},{"html":"http://test.com?q=ho"}]]}'></a></span></li></ol>
13510 ### Pre-save transform tests
13513 pre-save transform: subst:
13519 This is a test template
13523 pre-save transform: normal template
13533 pre-save transform: nonexistent template
13537 {{thistemplatedoesnotexist}}
13539 {{thistemplatedoesnotexist}}
13543 pre-save transform: subst magic variables
13552 # This is T2089, which I fixed. -- wtm
13554 pre-save transform: subst: templates with parameters
13558 {{subst:paramtest|param="something else"}}
13560 This is a test template with parameter "something else"
13564 Template:nowikitest
13566 <nowiki>'''not wiki'''</nowiki>
13570 pre-save transform: nowiki in subst (T3188)
13574 {{subst:nowikitest}}
13576 <nowiki>'''not wiki'''</nowiki>
13580 Template:commenttest
13582 This template has <!-- a comment --> in it.
13586 pre-save transform: comment in subst (T3936)
13590 {{subst:commenttest}}
13592 This template has <!-- a comment --> in it.
13596 pre-save transform: unclosed tag
13600 <nowiki>'''not wiki'''
13602 <nowiki>'''not wiki'''
13606 pre-save transform: mixed tag case
13610 <NOwiki>'''not wiki'''</noWIKI>
13612 <NOwiki>'''not wiki'''</noWIKI>
13616 pre-save transform: unclosed comment in <nowiki>
13620 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13622 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13625 # Leading @ in this template definition works around a limitation
13626 # in parsoid's parserTests which otherwise strips the <span> from the
13627 # result (confusing it for a template wrapper)
13631 @<span onmouseover="alert('crap')">Oh no</span>
13635 (confirming safety of fix for subst T3936)
13637 {{Template:dangerous}}
13639 <p>@<span>Oh no</span>
13644 pre-save transform: comment containing gallery (T7024)
13648 <!-- <gallery>data</gallery> -->
13650 <!-- <gallery>data</gallery> -->
13654 pre-save transform: comment containing extension
13658 <!-- <tag>data</tag> -->
13660 <!-- <tag>data</tag> -->
13664 pre-save transform: comment containing nowiki
13668 <!-- <nowiki>data</nowiki> -->
13670 <!-- <nowiki>data</nowiki> -->
13674 pre-save transform: <noinclude> in subst (T5298)
13684 pre-save transform: <onlyinclude> in subst (T5298)
13688 {{subst:Includes2}}
13696 {{<includeonly>subst:</includeonly>Includes}}
13700 Template:SafeSubstTest
13702 {{<includeonly>safesubst:</includeonly>Includes}}
13706 T24297: safesubst: works during PST
13710 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13716 T24297: safesubst: works during normal parse
13725 subst: does not work during normal parse
13729 <p>{{subst:Includes}}
13734 pre-save transform: context links ("pipe trick")
13738 [[Article (context)|]]
13741 [[Bar:Article (context)|]]
13742 [[:Bar:Article (context)|]]
13744 [[|Article (context)]]
13748 [[Article (context)|Article]]
13749 [[Bar:Article|Article]]
13750 [[:Bar:Article|Article]]
13751 [[Bar:Article (context)|Article]]
13752 [[:Bar:Article (context)|Article]]
13754 [[Article (context)]]
13755 [[Bar:X (Y) Z|X (Y) Z]]
13756 [[:Bar:X (Y) Z|X (Y) Z]]
13760 pre-save transform: context links ("pipe trick") with interwiki prefix
13764 [[interwiki:Article|]]
13765 [[:interwiki:Article|]]
13766 [[interwiki:Bar:Article|]]
13767 [[:interwiki:Bar:Article|]]
13769 [[interwiki:Article|Article]]
13770 [[:interwiki:Article|Article]]
13771 [[interwiki:Bar:Article|Bar:Article]]
13772 [[:interwiki:Bar:Article|Bar:Article]]
13776 pre-save transform: context links ("pipe trick") with parens in title
13778 pst title=[[Somearticle (context)]]
13782 [[Article (context)|Article]]
13786 pre-save transform: context links ("pipe trick") with comma in title
13788 pst title=[[Someplace, Somewhere]]
13791 [[Otherplace, Elsewhere|]]
13792 [[Otherplace, Elsewhere, Anywhere|]]
13794 [[Otherplace, Somewhere|Otherplace]]
13795 [[Otherplace, Elsewhere|Otherplace]]
13796 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13800 pre-save transform: context links ("pipe trick") with parens and comma
13802 pst title=[[Someplace (IGNORED), Somewhere]]
13805 [[Otherplace (place), Elsewhere|]]
13807 [[Otherplace, Somewhere|Otherplace]]
13808 [[Otherplace (place), Elsewhere|Otherplace]]
13812 pre-save transform: context links ("pipe trick") with comma and parens
13814 pst title=[[Who, me? (context)]]
13817 [[Me, Myself, and I (1937 song)|]]
13819 [[Yes, you. (context)|Yes, you.]]
13820 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13824 pre-save transform: context links ("pipe trick") with namespace
13826 pst title=[[Ns:Somearticle]]
13830 [[Ns:Article|Article]]
13834 pre-save transform: context links ("pipe trick") with namespace and parens
13836 pst title=[[Ns:Somearticle (context)]]
13840 [[Ns:Article (context)|Article]]
13844 pre-save transform: context links ("pipe trick") with namespace and comma
13846 pst title=[[Ns:Somearticle, Context, Whatever]]
13850 [[Ns:Article, Context, Whatever|Article]]
13854 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13856 pst title=[[Ns:Somearticle, Context (context)]]
13860 [[Ns:Article (context)|Article]]
13864 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13866 pst title=[[Ns:Somearticle (IGNORED), Context]]
13870 [[Ns:Article, Context|Article]]
13874 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13878 [[Article(context)|]]
13879 [[Bar:Article(context)|]]
13880 [[:Bar:Article(context)|]]
13881 [[|Article(context)]]
13885 [[Article(context)|Article]]
13886 [[Bar:Article(context)|Article]]
13887 [[:Bar:Article(context)|Article]]
13888 [[Article(context)]]
13889 [[Bar:X(Y)Z|X(Y)Z]]
13890 [[:Bar:X(Y)Z|X(Y)Z]]
13894 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13898 [[Article (context)|]]
13899 [[Bar:Article (context)|]]
13900 [[:Bar:Article (context)|]]
13901 [[|Article (context)]]
13905 [[Article (context)|Article]]
13906 [[Bar:Article (context)|Article]]
13907 [[:Bar:Article (context)|Article]]
13908 [[Article (context)]]
13909 [[Bar:X (Y) Z|X (Y) Z]]
13910 [[:Bar:X (Y) Z|X (Y) Z]]
13914 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13918 [[Article(context)|]]
13919 [[Bar:Article(context)|]]
13920 [[:Bar:Article(context)|]]
13921 [[|Article(context)]]
13925 [[Article(context)|Article]]
13926 [[Bar:Article(context)|Article]]
13927 [[:Bar:Article(context)|Article]]
13928 [[Article(context)]]
13929 [[Bar:X(Y)Z|X(Y)Z]]
13930 [[:Bar:X(Y)Z|X(Y)Z]]
13934 pre-save transform: context links ("pipe trick") with commas (T23660)
13938 [[Article (context), context|]]
13939 [[Article (context),context|]]
13940 [[Bar:Article (context), context|]]
13941 [[Bar:Article (context),context|]]
13942 [[:Bar:Article (context), context|]]
13943 [[:Bar:Article (context),context|]]
13945 [[Article (context), context|Article]]
13946 [[Article (context),context|Article]]
13947 [[Bar:Article (context), context|Article]]
13948 [[Bar:Article (context),context|Article]]
13949 [[:Bar:Article (context), context|Article]]
13950 [[:Bar:Article (context),context|Article]]
13954 Parsoid: backwards pipe trick
13961 <p>[[|<b>bar</b>]]</p>
13965 pre-save transform: trim trailing empty lines
13969 Empty lines are trimmed
13975 Empty lines are trimmed
13979 pre-save transform: Signature expansion
13986 * <noinclude>~~~</noinclude>
13987 * <includeonly>~~~</includeonly>
13988 * <onlyinclude>~~~</onlyinclude>
13990 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13991 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13992 * 00:02, 1 January 1970 (UTC)
13993 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13994 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13995 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14000 ParserOutput flags from signature expansion (T84843)
14007 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14008 flags=user-signature
14013 pre-save transform: Signature expansion in nowiki tags (T2093)
14019 <nowiki>~~~~</nowiki>
14021 <includeonly><nowiki>~~~~</nowiki></includeonly>
14023 <noinclude><nowiki>~~~~</nowiki></noinclude>
14025 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14027 {{subst:Foo}} shall be converted to FOO
14029 As well as inside noinclude/onlyinclude
14030 <noinclude>{{subst:Foo}}</noinclude>
14031 <onlyinclude>{{subst:Foo}}</onlyinclude>
14033 But not inside includeonly
14034 <includeonly>{{subst:Foo}}</includeonly>
14038 <nowiki>~~~~</nowiki>
14040 <includeonly><nowiki>~~~~</nowiki></includeonly>
14042 <noinclude><nowiki>~~~~</nowiki></noinclude>
14044 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14046 FOO shall be converted to FOO
14048 As well as inside noinclude/onlyinclude
14049 <noinclude>FOO</noinclude>
14050 <onlyinclude>FOO</onlyinclude>
14052 But not inside includeonly
14053 <includeonly>{{subst:Foo}}</includeonly>
14057 Parsoid: Recognize nowiki with trailing space in tags
14061 <nowiki ><div>[[foo]]</nowiki >
14069 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14076 Parsoid: Recognize nowiki with odd capitalization
14080 <noWikI ><div>[[foo]]</Nowiki >
14082 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14087 Parsoid: Escape nowiki with trailing space in tags
14091 <p><nowiki > foo </nowiki ></p>
14092 <p>a<nowiki />b</p>
14093 <p>c<nowiki/ >d</p>
14095 <nowiki > foo </nowiki >
14103 Parsoid: Escape weird noWikI capitalizations
14107 <p><noWikI > foo </NoWikI ></p>
14109 <noWikI > foo </NoWikI >
14113 ### Message transform tests
14116 message transform: magic variables
14126 message transform: should not transform wiki markup
14136 message transform: <noinclude> in transcluded template (T6926)
14146 message transform: <onlyinclude> in transcluded template (T6926)
14156 {{#special:}} page name, known
14160 {{#special:Recentchanges}}
14162 Special:RecentChanges
14166 {{#special:}} page name with subpage, known
14170 {{#special:Recentchanges/param}}
14172 Special:RecentChanges/param
14176 {{#special:}} page name, unknown
14180 {{#special:foobar nonexistent}}
14182 Special:Foobar nonexistent
14186 {{#speciale:}} page name, known
14190 {{#speciale:Recentchanges}}
14192 Special:RecentChanges
14196 {{#speciale:}} page name with subpage, known
14200 {{#speciale:Recentchanges/param}}
14202 Special:RecentChanges/param
14206 {{#speciale:}} page name, unknown
14210 {{#speciale:foobar nonexistent}}
14212 Special:Foobar_nonexistent
14218 ### For Parsoid-specific tests, see
14219 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14224 parsoid=wt2html,wt2wt,html2html
14226 [[Image:foobar.jpg]]
14228 <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>
14231 <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>
14235 Serialize simple image with span wrapper
14239 <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>
14241 [[File:Foobar.jpg]]
14245 Simple image (using File: namespace, now canonical)
14247 [[File:Foobar.jpg]]
14249 <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>
14252 <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>
14256 Right-aligned image
14258 [[File:Foobar.jpg|right]]
14260 <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>
14263 <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>
14269 [[File:Foobar.jpg|right|Caption text]]
14271 <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>
14274 <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>
14278 Image with caption, T55312 #1
14280 [[File:Foobar.jpg|right|Caption page stuff]]
14282 <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>
14285 <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>
14289 Image with caption, T55312 #2
14291 [[File:Foobar.jpg|right|Caption page=]]
14293 <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>
14296 <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>
14300 Image with caption, T55312 #3
14302 [[File:Foobar.jpg|right|Caption page=stuff]]
14304 <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>
14307 <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>
14311 Image caption with pipe entity
14313 [[File:Foobar.jpg|thumb|one | two]]
14314 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14316 <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>
14317 <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>
14320 <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>
14321 <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>
14325 Allow empty links in image captions (T62753)
14329 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14334 <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>
14337 <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>
14339 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14340 </figcaption></figure>
14344 Titles in unlinked images (T23454)
14346 [[File:Foobar.jpg|link=|stuff]]
14348 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14351 <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>
14355 Link with empty target
14364 Image with link trail
14366 Linktrails should not work for images: [[File:Foobar.jpg]]s
14368 <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
14371 <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>
14375 Image with empty attribute
14377 parsoid=wt2html,wt2wt,html2html
14379 [[File:Foobar.jpg|right||Caption text]]
14381 <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>
14384 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
14388 1. Block image with individual attributes from templates
14390 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14392 <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>
14395 <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>
14399 2. Block Image with individual attributes from templates
14401 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14403 <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>
14406 <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>
14410 3. Inline image with individual attributes from templates
14412 [[File:Foobar.jpg|{{echo|50px}}]]
14414 <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>
14417 <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>
14420 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14421 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14423 Image with multiple attributes from the same template
14425 [[File:Foobar.jpg|{{image_attribs}}]]
14427 <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>
14430 <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>
14434 Image with link tails
14438 123[[File:Foobar.jpg]]456
14439 123[[File:Foobar.jpg|right]]456
14440 123[[File:Foobar.jpg|thumb]]456
14442 <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
14444 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
14445 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
14448 <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
14450 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
14451 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
14454 <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>
14455 <p>123</p><figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure><p>456</p>
14456 <p>123</p><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure><p>456</p>
14460 Image with multiple captions -- only last one is accepted
14462 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14464 <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>
14467 <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>
14471 Image with multiple widths -- use last
14473 [[File:Foobar.jpg|200px|300px|caption]]
14475 <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>
14478 <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>
14482 Image with multiple alignments -- use first (T50664)
14486 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14488 [[File:Foobar.jpg|middle|text-top|caption]]
14490 <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>
14491 <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>
14494 <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>
14495 <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>
14499 Image with width attribute at different positions
14501 [[File:Foobar.jpg|200px|right|Caption]]
14502 [[File:Foobar.jpg|right|200px|Caption]]
14503 [[File:Foobar.jpg|right|Caption|200px]]
14505 <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>
14506 <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>
14507 <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>
14510 <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>
14511 <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>
14512 <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>
14515 # a sad bit of backward-compatibility
14517 Image with size specified with pxpx (T15500, T53628)
14519 parsoid=wt2html,wt2wt,html2html
14521 [[File:Foobar.jpg|20pxpx]]
14522 [[File:Foobar.jpg|200x20pxpx]]
14524 <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>
14525 <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>
14528 <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>
14532 Image with link parameter, wiki target
14534 [[File:Foobar.jpg|link=Main Page]]
14536 <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>
14539 <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>
14542 # parsoid T51293 (part 1)
14544 Image with link parameter, URL target
14546 [[File:Foobar.jpg|link=http://example.com/]]
14548 <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>
14551 <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>
14554 # parsoid T51293 (part 2)
14556 Image with link parameter, protocol-less URL target
14558 [[File:Foobar.jpg|link=//example.com/]]
14560 <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>
14563 <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>
14567 Escaping non-block captions (T107435)
14570 "modes": ["wt2wt"],
14572 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14576 [[Image:Foobar.jpg|caption]]
14578 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14581 # wgExternalLinkTarget not supported by Parsoid
14583 Image with link parameter, wgExternalLinkTarget
14585 [[Image:foobar.jpg|link=http://example.com/]]
14587 wgExternalLinkTarget='foobar'
14589 <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>
14594 Image with link parameter, wgNoFollowLinks set to false
14596 [[Image:foobar.jpg|link=http://example.com/]]
14598 wgNoFollowLinks=false
14600 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14605 Image with link parameter, wgNoFollowDomainExceptions
14607 [[Image:foobar.jpg|link=http://example.com/]]
14609 wgNoFollowDomainExceptions='example.com'
14611 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14615 # wgExternalLinkTarget not supported by Parsoid
14617 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14619 [[Image:foobar.jpg|link=http://example.com/|Title]]
14621 wgExternalLinkTarget='foobar'
14623 <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>
14628 Image with empty link parameter
14630 [[File:Foobar.jpg|link=]]
14632 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14635 <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>
14639 Image with link parameter (wiki target) and unnamed parameter
14641 [[File:Foobar.jpg|link=Main_Page|Title]]
14643 <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>
14646 <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>
14650 Image with link parameter (URL target) and unnamed parameter
14652 [[File:Foobar.jpg|link=http://example.com/|Title]]
14654 <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>
14657 <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>
14661 Thumbnail image with link parameter
14664 parsoid=wt2html,wt2wt,html2html
14666 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14668 <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>
14671 <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>
14675 Manually-specified thumbnail image
14679 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14681 <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>
14684 <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>
14688 Manually-specified thumbnail image with explicit link to wiki page
14691 parsoid=wt2html,wt2wt,html2html
14693 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14695 <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>
14698 <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>
14702 Manually-specified thumbnail image with explicit link to url
14705 parsoid=wt2html,wt2wt,html2html
14707 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14709 <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>
14712 <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>
14716 Manually-specified thumbnail image with explicit no link
14719 parsoid=wt2html,wt2wt,html2html
14721 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14723 <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>
14726 <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>
14730 Manually-specified thumbnail image with explicit link and alt text
14733 parsoid=wt2html,wt2wt,html2html
14735 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14737 <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>
14740 <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>
14744 Image with frame and link
14746 parsoid=wt2html,wt2wt,html2html
14748 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14750 <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>
14753 <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>
14757 Image with frame and link and explicit alt
14759 parsoid=wt2html,wt2wt,html2html
14761 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14763 <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>
14766 <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>
14770 Image with wiki markup in implicit alt
14772 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14774 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14776 <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>
14777 </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>
14780 <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>
14782 <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>
14786 Alt image option should handle most kinds of wikitext without barfing
14788 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14790 <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>
14793 <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>
14797 Image with table with attributes in caption
14799 parsoid=wt2html,html2html
14801 [[File:Foobar.jpg|thumb|
14808 <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>
14809 <table class="123">
14810 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14813 </figcaption></figure>
14817 Image with table with rows from templates in caption
14819 [[File:Foobar.jpg|thumb|
14825 <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>
14827 <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>
14829 </figcaption></figure>
14833 Image with nested tables in caption
14835 [[File:Foobar.jpg|thumb|Foo<br />
14844 <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}'/>
14848 <tbody><tr><td>z</td></tr>
14849 </tbody></table></td></tr>
14851 </figcaption></figure>
14855 Image with heading and horizontal rule in caption
14857 [[File:Foobar.jpg|thumb|
14863 <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>
14866 <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>
14867 <h3 id="Testing">Testing</h3>
14869 <hr data-parsoid='{"extra_dashes":10}'/>
14870 </figcaption></figure>
14873 ###################
14874 # Conflicting image format options.
14875 # First option specified should 'win'.
14876 # All three cases in each test should be identical.
14879 Image with 'frameless' first.
14881 parsoid=wt2html,wt2wt,html2html
14883 [[File:Foobar.jpg|frameless|caption]]
14885 [[File:Foobar.jpg|frameless|frame|caption]]
14887 [[File:Foobar.jpg|frameless|thumb|caption]]
14889 <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>
14890 </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>
14891 </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>
14894 <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>
14895 <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>
14896 <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>
14900 Image with 'frame' first.
14902 parsoid=wt2html,wt2wt,html2html
14904 [[File:Foobar.jpg|frame|caption]]
14905 [[File:Foobar.jpg|frame|frameless|caption]]
14906 [[File:Foobar.jpg|frame|thumb|caption]]
14908 <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>
14909 <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>
14910 <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>
14913 <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>
14914 <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>
14915 <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>
14919 Image with 'thumb' first.
14921 parsoid=wt2html,wt2wt,html2html
14923 [[File:Foobar.jpg|thumb|caption]]
14924 [[File:Foobar.jpg|thumb|frameless|caption]]
14925 [[File:Foobar.jpg|thumb|frame|caption]]
14927 <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>
14928 <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>
14929 <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>
14932 <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>
14933 <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>
14934 <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>
14937 ###################
14939 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14940 # and https://phabricator.wikimedia.org/T64258
14941 # Foobar has actual size of 1941x220
14942 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14943 # a scalable format.
14944 # 2. Framed images always ignore size options; always render at default size.
14945 # 3. "Unspecified format" and border are the only types which can be
14949 Image: unspecified format and border enlarge
14951 parsoid=wt2html,wt2wt,html2html
14953 [[File:Foobar.jpg|2000px]]
14955 [[File:Foobar.jpg|border|2000px]]
14957 <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>
14958 </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>
14961 <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>
14962 <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>
14966 Image: "unspecified format" and border reduce
14968 parsoid=wt2html,wt2wt,html2html
14970 [[File:Foobar.jpg|1000px]]
14972 [[File:Foobar.jpg|border|1000px]]
14974 <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>
14975 </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>
14978 <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>
14979 <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>
14983 Image: thumbs reduce
14985 parsoid=wt2html,wt2wt,html2html
14987 [[File:Foobar.jpg|thumb|50px]]
14989 <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>
14992 <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>
14996 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14998 parsoid=wt2html,wt2wt,html2html
15000 [[File:Foobar.jpg|thumb|2000px]]
15002 [[File:Foobar.svg|thumb|2000px]]
15004 <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>
15005 <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>
15008 <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>
15009 <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>
15013 Image: frameless can reduce in size
15015 parsoid=wt2html,wt2wt,html2html
15017 [[File:Foobar.jpg|frameless|50px]]
15019 <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>
15022 <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>
15026 Image: bitmap frameless can't be enlarged past original size, but vector can
15028 parsoid=wt2html,wt2wt,html2html
15030 [[File:Foobar.jpg|frameless|2000px]]
15032 [[File:Foobar.svg|frameless|2000px]]
15034 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15035 </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>
15038 <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>
15039 <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>
15043 Image: framed images are always unscaled.
15045 parsoid=wt2html,wt2wt,html2html
15047 [[File:Foobar.jpg|frame]]
15049 [[File:Foobar.jpg|frame|50px]]
15051 [[File:Foobar.jpg|frame|50x50px]]
15053 [[File:Foobar.jpg|frame|2000px]]
15055 <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>
15056 <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>
15057 <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>
15058 <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>
15061 <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>
15062 <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>
15063 <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>
15064 <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>
15067 ###################
15070 Link to image page- image page normally doesn't exists, hence edit link
15071 Add test with existing image page
15072 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15076 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15081 T20784 Link to non-existent image page with caption should use caption as link text
15083 [[:Image:test|caption]]
15085 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15090 Frameless image caption with a free URL
15092 [[File:Foobar.jpg|http://example.com]]
15094 <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>
15097 <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>
15101 Thumbnail image caption with a free URL
15105 [[File:Foobar.jpg|thumb|http://example.com]]
15107 <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>
15110 <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>
15114 Thumbnail image caption with a free URL and explicit alt
15117 parsoid=wt2html,wt2wt,html2html
15119 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15121 <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>
15124 <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>
15128 SVG thumbnails with no language set
15131 [[File:Foobar.svg|thumb|caption]]
15133 <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>
15136 <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>
15140 SVG thumbnails with language de
15142 parsoid=wt2html,wt2wt,html2html
15144 [[File:Foobar.svg|thumb|caption|lang=de]]
15146 <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>
15149 <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>
15153 SVG thumbnails with invalid language code
15155 parsoid=wt2html,wt2wt,html2html
15157 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15159 <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>
15162 <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>
15166 T3887: A ISBN with a thumbnail
15168 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15170 <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>
15173 <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>
15177 T3887: A RFC with a thumbnail
15179 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15181 <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>
15184 <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>
15188 T3887: A mailto link with a thumbnail
15190 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15192 <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>
15195 <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>
15198 # Pending resolution to T2368
15200 T2648: Frameless image caption with a link
15202 [[File:Foobar.jpg|text with a [[link]] in it]]
15204 <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>
15207 <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>
15211 T2648: Frameless image caption with a link (suffix)
15213 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15215 <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>
15218 <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>
15222 T2648: Frameless image caption with an interwiki link
15224 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15226 <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>
15229 <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>
15233 T2648: Frameless image caption with a piped interwiki link
15235 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15237 <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>
15240 <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>
15244 T107474: Frameless image caption with <nowiki>
15246 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15248 <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>
15252 Escape HTML special chars in image alt text
15254 [[File:Foobar.jpg|& < > "]]
15256 <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>
15259 <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>
15263 Escape HTML special chars in image alt text with LanguageConverter
15267 [[File:Foobar.jpg|& < > "]]
15269 <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>
15272 <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>
15276 Entities in file name and attributes
15278 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15280 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15283 <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>
15287 T2499: Alt text should have Ӓ, not &1234;
15289 [[File:Foobar.jpg|♀]]
15291 <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>
15294 <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>
15298 Broken image caption with link
15300 parsoid=wt2html,wt2wt,html2html
15302 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15304 <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.
15307 <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>
15311 Image caption containing another image
15313 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15315 <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>
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>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>
15322 Image: caption containing a newline
15324 [[File:Foobar.jpg|This
15327 <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>
15330 <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>
15334 Image: caption containing leading space
15335 (The leading space should not trigger nowiki escaping in wt2wt mode)
15337 [[File:Foobar.jpg|thumb| bar]]
15339 <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>
15342 <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>
15345 # html/php output not have newlines after table, td, th, etc. because
15346 # Linker::makeThumbLink2() replaces the newlines with spaces since
15347 # the table is inside a caption.
15348 # FIXME: Verify if that circa 2004 fix is still required.
15350 Image: caption containing a table
15352 parsoid=wt2html,wt2wt,html2html
15354 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15360 and some more text.]]
15362 <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>
15365 <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
15368 <tr><th>Foo</th><th>Bar</th></tr>
15371 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15375 T5090: External links other than http: in image captions
15377 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15379 <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>
15382 <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>
15388 parsoid=wt2html,wt2wt,html2html
15390 [[Image:foobar.jpg|a|class=b]]
15392 <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>
15395 <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>
15399 Localized image handling (1).
15401 parsoid=wt2html,wt2wt,html2html
15404 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15406 <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>
15409 <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>
15413 Localized image handling (2).
15416 parsoid=wt2html,wt2wt,html2html
15419 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15421 <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>
15424 <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>
15428 Localized image handling (3).
15433 <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>
15435 [[File:Foobar.jpg|بندانگشتی]]
15439 "border", "frameless" and "class" attributes on an image.
15442 parsoid=wt2html,wt2wt,html2html
15444 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15446 <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>
15449 <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>
15452 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15454 Invalid image attributes (T64500)
15457 parsoid=wt2html,wt2wt,html2html
15459 [[File:Foobar.jpg|thumb|float|left|caption]]
15461 [[File:Foobar.jpg|thumb|righ|caption]]
15463 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15465 <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>
15466 <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>
15467 <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>
15470 <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>
15471 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15472 <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>
15478 #REDIRECT [[File:Barfoo.jpg]]
15481 # FIXME: Parsoid should run this test -- but we'd need to teach the
15482 # mockAPI about the redirected Barfoo.jpg image.
15486 [[Image:Barfoo.jpg]]
15488 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15493 Missing image with uploads disabled
15497 [[File:Foobaz.jpg]]
15499 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15502 <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>
15505 # Parsoid-specific testing for images
15506 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15507 # Currently imperfect due to a flaw in the Parsoid testrunner
15509 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15513 Parsoid-specific image handling - simple image with size and middle alignment
15515 [[File:Foobar.jpg|middle|50px]]
15517 <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>
15521 Parsoid-specific image handling - simple image with size, middle alignment, non-standard namespace alias
15523 parsoid=wt2wt,wt2html,html2html
15525 [[Image:Foobar.jpg|middle|50px]]
15527 <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>
15531 Parsoid-specific image handling - simple image with size and middle alignment (existing content)
15533 [[File:Foobar.jpg|50px|middle]]
15535 <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>
15539 Parsoid-specific image handling - simple image with size and middle alignment and non-standard namespace name
15541 parsoid=wt2html,wt2wt,html2html
15543 [[Image:Foobar.jpg|50px|middle]]
15545 <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>
15549 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15551 [[File:Foobar.jpg|500x10px|baseline|caption]]
15553 <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>
15557 Parsoid-specific image handling - simple image with border and size spec
15559 [[File:Foobar.jpg|50px|border|caption]]
15561 <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>
15565 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15567 parsoid=wt2html,html2html
15569 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15571 <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>
15575 Parsoid-specific image handling - thumbnail with halign, valign, and caption (existing content)
15577 parsoid=wt2html,html2html
15579 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15581 <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>
15585 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15587 parsoid=wt2html,html2html
15589 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15591 <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>
15595 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption (existing content)
15597 parsoid=wt2html,html2html
15599 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15601 <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>
15605 Parsoid-specific image handling - framed image with specific size and caption (size is ignored)
15607 parsoid=wt2html,wt2wt,html2html
15609 [[File:Foobar.jpg|frame|500x50px|caption]]
15611 <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>
15615 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption (size is ignored)
15617 parsoid=wt2html,html2html
15619 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15621 <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>
15625 Parsoid-specific image handling - frameless image with specific size, border, and caption
15627 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15629 <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>
15633 Parsoid-specific image handling - simple image with a formatted caption
15635 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15637 <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>
15641 Parsoid-specific image handling - caption with a template in it
15643 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15645 <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>
15649 Parsoid-specific image handling - caption with unbalanced tags in it
15651 parsoid=wt2html,wt2wt,html2html
15654 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15658 <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>
15663 Parsoid-specific image handling - empty caption (1)
15665 parsoid=wt2html,wt2wt
15667 [[File:Foobar.jpg|thumb|]]
15669 <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>
15672 # empty captions don't get serialized unless we're in the "round trip" case
15674 Parsoid-specific image handling - empty caption (2)
15678 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15679 <a href="./File:Foobar.jpg">
15680 <img resource="./File:Foobar.jpg"
15681 src="//example.com/images/3/3a/Foobar.jpg"
15682 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15683 height="25" width="220"/>
15685 <figcaption></figcaption>
15688 [[File:Foobar.jpg|thumb]]
15692 Parsoid-specific image handling - whitespace caption
15694 [[File:Foobar.jpg|thumb| ]]
15696 <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>
15700 Parsoid-specific image handling - lang option
15703 [[File:Foobar.svg|lang=de|caption]]
15707 <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>
15711 ## Edge case bugs in Parsoid from T93580
15713 T93580: 1. Templated <ref> inside block images
15715 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15719 <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>
15721 <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>
15725 T93580: 2. <ref> inside inline images
15727 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15731 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15733 <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>
15737 T93580: 3. Templated <ref> inside inline images
15739 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15743 <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>
15745 <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>
15752 Subpage test/subpage
15760 subpage title=[[Subpage test]]
15764 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15769 Subpage noslash link
15771 subpage title=[[Subpage test]]
15775 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15780 Subpage test/1/2/subpage
15786 Relative subpage noslash link
15788 parsoid=wt2wt,wt2html,html2html
15789 subpage title=[[Subpage test/1/2/3/4]]
15795 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15796 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15799 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15800 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15804 Parsoid: dot-slash prefixed wikilinks
15814 </p><p>[[././baz/]]
15819 </p><p>[[././baz/]]
15824 Render invalid page names as plain text (T53090)
15836 [[foo[http://example.com]xyz]]
15838 [[{{echo|./../foo}}|bar]]
15839 [[{{echo|foo/.}}|bar]]
15840 [[{{echo|foo/..}}|bar]]
15841 [[{{echo|foo~~~~bar}}]]
15842 [[{{echo|foo>bar}}]]
15843 [[{{echo|foo././bar}}]]
15844 [[{{echo|foo{bar}}]]
15845 [[{{echo|foo}bar}}]]
15846 [[{{echo|foo[bar}}]]
15847 [[{{echo|foo]bar}}]]
15848 [[{{echo|foo<bar}}]]
15850 <p>[[./../foo|bar]]
15860 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15861 </p><p>[[./../foo|bar]]
15874 <p>[[./../foo|bar]]
15884 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
15886 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15887 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15888 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15889 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15890 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15891 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15892 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15893 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15894 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15895 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15896 [[<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>
15904 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15909 T2561: {{/Subpage}}
15911 subpage title=[[Page]]
15915 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15923 Category:MediaWiki User's Guide
15931 [[:Category:MediaWiki User's Guide]]
15933 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15942 [[Category:MediaWiki User's Guide]]
15944 cat=MediaWiki_User's_Guide sort=
15946 <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"}}'/>
15950 PAGESINCATEGORY invalid title fatal (r33546 fix)
15952 {{PAGESINCATEGORY:<bogus>}}
15959 Category with different sort key
15963 [[Category:MediaWiki User's Guide|Foo]]
15965 cat=MediaWiki_User's_Guide sort=Foo
15967 <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"}}'/>
15971 Category with identical sort key
15975 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15977 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15979 <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"}}'/>
15983 Category with empty sort key
15988 [[Category:MediaWiki User's Guide|]]
15990 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15994 Category with empty sort key and parentheses
15999 [[Category:Foo (bar)|]]
16001 [[Category:Foo (bar)|Foo]]
16005 Category with link tail
16010 123[[Category:Foo]]456
16012 123[[Category:Foo]]456
16016 Category with template
16021 [[Category:{{echo|Foo}}]]
16023 [[Category:{{echo|Foo}}]]
16027 Category with template in sort key
16032 [[Category:Foo|{{echo|Bar}}]]
16034 [[Category:Foo|{{echo|Bar}}]]
16038 Category with template in sort key and title
16043 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16045 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16048 ## We used to, but no longer wt2wt this test since the default serializer
16049 ## will normalize all categories to serialize on their own line.
16050 ## This wikitext usage is going to be fairly uncommon in production and
16051 ## selser will take care of preserving formatting in those scenarios.
16053 Category / paragraph interactions
16057 Foo [[Category:Baz]] Bar
16059 Foo [[Category:Baz]]
16067 [[Category:Baz]] Bar
16080 {{echo|[[Category:Baz]]}}
16093 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16094 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16095 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16096 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16097 <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>
16098 <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}}]}'/>
16099 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16102 ## We used to, but no longer wt2wt this test since the default serializer
16103 ## will normalize all categories to serialize on their own line.
16104 ## This wikitext usage is going to be fairly uncommon in production and
16105 ## selser will take care of preserving formatting in those scenarios.
16107 ## The whitespace on the empty line is part of the test. Please do not delete
16109 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16115 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16117 {{echo|[[Category:Foo]] and so should this!}}
16119 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16124 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16126 <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>
16129 ## Parsoid will not try to wt2wt this while preserving newlines because
16130 ## it suppresses excess newlines within list items -- and we don't want to
16131 ## introduce a special case just for categories, which is, in reality somewhat
16132 ## odd behavior -- categories are unlikely to be used in list items like this
16133 ## in top-level pages and are only likely to show up in template-generated
16134 ## list items where this RT-ing is a non-issue.
16136 ## The whitespace on the empty line is part of the test. Please do not delete
16138 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16144 [[Category:Foo]] and this should be part of the same list item
16147 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16149 <ul><li>This and this should be part of the same list item</li>
16150 <li>So should this and this should be part of the same list item</li></ul>
16153 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16154 <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>
16158 ## Newlines and categories that follow the last item of a list
16159 ## are treated differently because this (list followed by categories)
16160 ## is an extremely common pattern on wikis.
16162 3. Categories and newlines: newline suppression for last list item should RT properly
16183 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16185 <link rel="mw:PageProp/Category" href="./Category:Bar"/>
16186 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16188 <dl><dd>c</dd></dl>
16190 <link rel="mw:PageProp/Category" href="./Category:C"/>
16192 <dl><dt>d</dt></dl>
16194 <link rel="mw:PageProp/Category" href="./Category:D"/>
16198 4. Categories and newlines: newline suppression for last list item should RT properly
16206 <ul><li><ul><li><ul><li>b</li></ul></li></ul></li></ul></li></ul>
16208 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16211 ## only wt2html for this to make sure the algo only applies to the rightmost path
16213 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16226 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16228 <ul><li>d</li></ul></li></ul>
16229 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16232 ## We used to, but no longer wt2wt this test since the default serializer
16233 ## will normalize all categories to serialize on their own line.
16234 ## This wikitext usage is going to be fairly uncommon in production and
16235 ## selser will take care of preserving formatting in those scenarios.
16237 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16241 *a [[Category:Foo]]
16243 <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>
16246 # This test also demonstrates because of newline+category tunneling
16247 # through the list hander, template wrapping doesn't expand to the
16248 # containing list when the list item swallows the category.
16250 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16255 <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
16256 </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>
16260 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16264 {{echo|[[Category:Foo]]
16268 <ul><li>a</li></ul>
16270 <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">
16271 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16272 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16276 Categories and newlines: migrateTrailingCategories dom pass should not get tripped by comments and whitespace
16280 [[Category:Bar]]<!--boo1--> <!--boo2-->
16281 [[Category:Baz]]<!--boo3--> <!--boo4-->
16283 <ul><li>a</li></ul>
16285 <link rel="mw:PageProp/Category" href="./Category:Bar"/><!--boo1--> <!--boo2-->
16286 <link rel="mw:PageProp/Category" href="./Category:Baz"/><!--boo3--> <!--boo4-->
16290 Categories and newlines: should behave properly with linkprefix (T87753)
16305 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16306 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16310 No regressions on internal links following category (T174639)
16312 parsoid=wt2html,html2html
16314 [[Category:Foo]]<div>a
16319 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16322 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16324 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16327 # Note that Parsoid differs slightly from PHP due to T175421
16329 11. Special case where only newlines separate links (T175416)
16331 parsoid=wt2html,html2html
16335 [[Foo]][[es:Alimento]]
16340 <a href="/wiki/Foo" title="Foo">Foo</a>
16341 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16344 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16346 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16348 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16352 Category links with multiple namespaces
16354 [[Category:Project:Foo]]
16356 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16360 Parsoid: Serialize link to category page with colon escape
16366 [[:Category:Foo|Bar]]
16369 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16370 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16374 # We used to, but no longer wt2wt this test since the default serializer
16375 # will normalize all categories to serialize on their own line.
16376 # This wikitext usage is going to be fairly uncommon in production and
16377 # selser will take care of preventing whitespace insertion if this
16378 # occurs in an article.
16380 # html2html disabled for the same reason (whitespace insertion between
16383 # html2wt disabled because it localizes the "Category" namespace.
16385 Link prefix/suffixes aren't applied to category links
16395 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16399 Link prefix/suffixes aren't applied to language links
16409 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16413 Parsoid: Serialize link to file page with colon escape
16419 [[:File:Foo.png|Bar]]
16422 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16423 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16428 Parsoid: Serialize a genuine category link without colon escape
16433 [[Category:Foo|Bar]]
16435 <link rel="mw:PageProp/Category" href="./Category:Foo">
16436 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16440 Normalize hrefs properly before testing for invalid link targets (T72894)
16444 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16446 [[Category:Toxine bactérienne]]
16450 Parsoid: Defaultsort
16452 {{DEFAULTSORT:Foo}}
16454 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16457 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16458 # But, this is a limitation of our representation and is documented in
16459 # TemplateHandler.js in processSpecialMagicWord
16461 Parsoid: Defaultsort (template-generated)
16463 {{{{echo|DEFAULTSORT}}:Foo}}
16465 <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"}]]}'/>
16469 ### Inter-language links
16472 Interlanguage links
16480 es:Alimento fr:Nourriture zh:食品
16482 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16483 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16484 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16488 Duplicate interlanguage links (T26502)
16499 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16500 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16501 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16502 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16509 Basic section headings
16516 ===Smaller headline===
16519 <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>
16522 <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>
16525 <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>
16531 Section headings with TOC
16534 ===Subheadline 1===
16535 =====Skipping a level=====
16536 ======Skipping a level======
16540 ===Another headline===
16542 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16544 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16546 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16548 <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>
16550 <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>
16557 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16559 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16565 <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>
16566 <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>
16567 <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>
16568 <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>
16569 <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>
16572 <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>
16577 TOC anchors don't collide
16585 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16587 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16588 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16589 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16590 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16594 <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>
16595 <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>
16596 <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>
16597 <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>
16601 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16602 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16604 Handling of sections up to level 6 and beyond
16609 ==Level 2 Heading==
16610 ===Level 3 Heading===
16611 ====Level 4 Heading====
16612 =====Level 5 Heading=====
16613 ======Level 6 Heading======
16614 =======Level 7 Heading=======
16615 ========Level 8 Heading========
16616 =========Level 9 Heading=========
16617 ==========Level 10 Heading==========
16619 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16621 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16623 <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>
16625 <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>
16627 <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>
16629 <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>
16631 <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>
16632 <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>
16633 <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>
16634 <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>
16635 <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>
16649 <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>
16650 <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>
16651 <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>
16652 <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>
16653 <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>
16654 <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>
16655 <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>
16656 <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>
16657 <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>
16658 <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>
16661 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16662 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16663 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16664 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16665 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16666 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16667 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16668 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16669 <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>
16670 <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>
16674 TOC regression (T11764)
16678 ====title 1.1.1====
16683 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16685 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16687 <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>
16689 <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>
16692 <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>
16695 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16697 <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>
16703 <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>
16704 <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>
16705 <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>
16706 <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>
16707 <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>
16708 <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>
16713 TOC for heading containing <span id="..."></span> (T96153)
16716 ==<span id="old-anchor"></span>New title==
16718 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16720 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16724 <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>
16729 TOC with wgMaxTocLevel=3 (T8204)
16735 ====title 1.1.1====
16740 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16742 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16744 <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>
16745 <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>
16748 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16750 <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>
16756 <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>
16757 <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>
16758 <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>
16759 <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>
16760 <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>
16761 <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>
16766 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16772 ====Section 1.1.1====
16773 ====Section 1.1.1.1====
16776 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16778 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16780 <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>
16783 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16787 <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>
16788 <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>
16789 <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>
16790 <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>
16791 <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>
16797 Resolving duplicate section names
16802 <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>
16803 <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>
16808 Resolving duplicate section names with differing case (T12721)
16813 <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>
16814 <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>
16826 Template with sections, __NOTOC__
16833 <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>
16834 <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>
16835 <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>
16836 <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>
16841 __NOEDITSECTION__ keyword
16847 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16848 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16853 Link inside a section heading
16855 ==Section with a [[Main Page|link]] in it==
16857 <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>
16862 TOC regression (T14077)
16869 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16871 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16873 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
16876 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16880 <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>
16881 <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>
16882 <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>
16887 T3219 URL next to image (good)
16889 http://example.com [[File:Foobar.jpg]]
16891 <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>
16894 <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>
16897 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16899 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16901 parsoid=wt2html,html2html
16904 The line above must have a trailing space!
16907 But just in case it doesn't...
16909 <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>
16910 <p>The line above must have a trailing space!
16912 <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>
16913 <p>But just in case it doesn't...
16916 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16917 <p>The line above must have a trailing space!</p>
16918 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16920 <p>But just in case it doesn't...</p>
16924 Header with special characters (T27462)
16926 The tooltips shall not show entities to the user (ie. be double escaped)
16943 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16945 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16947 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16948 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16949 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16950 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16951 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16955 <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>
16958 <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>
16961 <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>
16964 <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>
16967 <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>
16971 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
16973 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
16976 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
16979 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
16982 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
16985 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
16990 Header with space, plus and underscore as entity
16992 Id should not contain + for spaces
16994 ==Space between Text==
16997 ==Space-Entity between Text==
17000 ==Plus+between+Text==
17003 ==Plus-Entity+between+Text==
17006 ==Underscore_between_Text==
17009 ==Underscore-Entity_between_Text==
17012 [[#Space between Text]]
17013 [[#Space-Entity between Text]]
17014 [[#Plus+between+Text]]
17015 [[#Plus-Entity+between+Text]]
17016 [[#Underscore_between_Text]]
17017 [[#Underscore-Entity_between_Text]]
17019 <p>Id should not contain + for spaces
17021 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17023 <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>
17024 <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>
17025 <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>
17026 <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>
17027 <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>
17028 <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>
17032 <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>
17035 <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>
17038 <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>
17041 <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>
17044 <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>
17047 <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>
17049 </p><p><a href="#Space_between_Text">#Space between Text</a>
17050 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17051 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17052 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17053 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17054 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17057 <p>Id should not contain + for spaces</p>
17059 <h2 id="Space_between_Text">Space between Text</h2>
17062 <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>
17065 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
17068 <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>
17071 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
17074 <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>
17077 <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>
17078 <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>
17079 <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>
17080 <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>
17081 <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>
17082 <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>
17085 # Parsoid html2wt disabled because it adds padding spaces around =
17087 Headers with excess '=' characters
17088 (Are similar tests necessary beyond the 1st level?)
17090 parsoid=wt2html,wt2wt,html2html
17094 =''italic'' heading==
17095 ==''italic'' heading=
17097 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17099 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17100 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17101 <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>
17102 <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>
17106 <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>
17107 <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>
17108 <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>
17109 <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>
17112 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17113 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17114 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17115 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17119 HTML headers vs TOC (T25393)
17120 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17132 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17134 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17136 <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>
17137 <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>
17140 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17142 <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>
17143 <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>
17149 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17150 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17151 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17152 <h1><span class="mw-headline" id="Header_2">Header 2
17154 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17155 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17158 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17159 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
17160 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
17162 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17164 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
17165 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
17166 <meta property="mw:PageProp/noeditsection"/>
17170 Single-line or multiline-comments can follow headings
17172 parsoid=wt2html,wt2wt
17180 <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>
17181 <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>
17182 <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>
17185 <h2 id="foo">foo</h2><!---->
17186 <h2 id="bar">bar</h2><!--c1-->
17187 <h2 id="baz">baz</h2><!--
17193 T3219 URL next to image (broken)
17195 http://example.com[[File:Foobar.jpg]]
17197 <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>
17200 <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>
17204 T3186 news: in the middle of text
17206 http://en.wikinews.org/wiki/Wikinews:Workplace
17208 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17214 Namespaced link must have a title
17223 Namespaced link must have a title (bad fragment version)
17225 [[Project:#fragment]]
17227 <p>[[Project:#fragment]]
17233 ### HTML tags and HTML attributes
17237 div with no attributes
17239 <div>HTML rocks</div>
17241 <div>HTML rocks</div>
17246 div with double-quoted attribute
17248 <div id="rock">HTML rocks</div>
17250 <div id="rock">HTML rocks</div>
17255 div with single-quoted attribute
17257 <div id='rock'>HTML rocks</div>
17259 <div id="rock">HTML rocks</div>
17264 div with unquoted attribute
17266 <div id=rock>HTML rocks</div>
17268 <div id="rock">HTML rocks</div>
17273 div with illegal double attributes
17275 <div id="a" id="b">HTML rocks</div>
17277 <div id="b">HTML rocks</div>
17282 div with empty attribute value, space before equals
17284 parsoid=wt2html,html2html
17286 <div class =>HTML rocks</div>
17288 <div class="">HTML rocks</div>
17291 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17295 div with multiple empty attribute values
17297 wgFragmentMode=[ 'html5', 'legacy' ]
17299 parsoid=wt2html,html2html
17301 <div id= title=>HTML rocks</div>
17303 <div id="title=">HTML rocks</div>
17306 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17309 # FIXME Parsoid doesn't actually match PHP here.
17310 # Probably we should use the synthetic <foo /> or <indicator>
17311 # extensions for this test, which are enabled when running parser tests.
17313 Extension tag in attribute value
17315 <span title="<translate>123</translate>">ok</span>
17316 !! html/php+disabled
17317 <p><span title="<translate>123</translate>">ok</span>
17320 <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>
17324 table with multiple empty attribute values
17326 parsoid=wt2html,html2html
17332 <table title="id=">
17338 <table title="id=">
17339 <tbody><tr><td>hi</td></tr>
17344 div with braces in attribute value
17346 <div title="{}">Foo</div>
17348 <div title="{}">Foo</div>
17351 <div title="{}">Foo</div>
17355 div with empty attribute value, no space before equals
17357 parsoid=wt2html,html2html
17359 <div class=>HTML rocks</div>
17361 <div class="">HTML rocks</div>
17364 <div class="">HTML rocks</div>
17368 HTML multiple attributes correction
17370 <p class="error" class="awesome">Awesome!</p>
17372 <p class="awesome">Awesome!</p>
17377 Table multiple attributes correction
17380 !+ class="error" class="awesome"|status
17385 <th class="awesome">status
17393 <DIV ID="x">HTML ROCKS</DIV>
17395 <div id="x">HTML ROCKS</div>
17400 Non-ASCII pseudo-tags are rendered as text
17409 Pseudo-tag with URL 'name' renders as url link
17411 <http://example.com/>
17413 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17418 text with amp in the middle of nowhere
17422 <p>Remember AT&T?
17427 text with character entity: eacute
17429 I always thought é was a cute letter.
17431 <p>I always thought é was a cute letter.
17436 text with entity-escaped character entity-like string: eacute
17438 I always thought &eacute; was a cute letter.
17440 <p>I always thought &eacute; was a cute letter.
17445 text with undefined character entity: xacute
17447 I always thought &xacute; was a cute letter.
17449 <p>I always thought &xacute; was a cute letter.
17456 <data value="5">five</data>
17457 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17458 <mark>This highlighted text</mark>
17460 <p><data value="5">five</data>
17461 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17462 <mark>This highlighted text</mark>
17467 HTML tag with leading space is parsed as text
17471 <p>< div>foo< /div>
17475 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17476 ## the HTML5 parsing spec.
17478 Element with broken attribute syntax
17482 <div style=" style="123">hi</div>
17485 <div style="123">hi</div>
17489 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17490 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17494 ### Nesting tests (see T43545, T52604, T53081)
17497 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17498 # Note that html2wt is considerably more difficult if we use <b> in
17499 # the test case, instead of <small>
17501 Ensure that HTML adoption agency algorithm is properly implemented.
17503 <small>X<small>Y</small>Z</small>
17505 <p><small>X<small>Y</small>Z</small>
17509 # This was T43545 in the PHP parser.
17513 <kbd>X<kbd>Y</kbd>Z</kbd>
17515 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17519 # The following cases were T53081 in the PHP parser.
17520 # Note that there are some other nestable tags (b, i, etc) which are
17521 # not covered; see T53081 for discussion.
17526 <em>X<em>Y</em>Z</em>
17528 <p><em>X<em>Y</em>Z</em>
17533 Nesting of <strong>
17535 <strong>X<strong>Y</strong>Z</strong>
17537 <p><strong>X<strong>Y</strong>Z</strong>
17546 <p><q>X<q>Y</q>Z</q>
17553 <ruby>X<ruby>Y</ruby>Z</ruby>
17555 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17562 <bdo>X<bdo>Y</bdo>Z</bdo>
17564 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17576 [[Media:Foobar.jpg]]
17577 [[Media:Video.ogv]]
17578 [[:Media:Video.ogv]]
17580 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17581 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17582 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17585 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17586 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17587 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv" data-parsoid='{"a":{"namespace":"Media"},"sa":{"namespace":":Media"}}'>Media:Video.ogv</a></p>
17591 Media link with text
17593 [[Media:Foobar.jpg|A neat file to look at]]
17595 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17598 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17601 # FIXME: this is still bad HTML tag nesting
17602 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17603 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17605 Media link with nasty text
17607 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17609 <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>
17612 <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>
17614 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true}'>Safe Link</a></p><div style="display:none" data-parsoid='{"stx":"html"}'><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'>" onmouseover="alert(document.cookie)" onfoo="</a></div>
17619 Media link to nonexistent file (T3702)
17621 [[Media:No such.jpg]]
17622 [[Media:No_such file.jpg]]
17624 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17625 <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>
17628 <p><a rel="mw:MediaLink" href="./Special:FilePath/No_such.jpg" title="No such.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"fileName":"No_such.jpg"},"sa":{"fileName":"No such.jpg"}}'>Media:No such.jpg</a>
17629 <a rel="mw:MediaLink" href="./Special:FilePath/No_such_file.jpg" title="No such file.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"fileName":"No_such_file.jpg"},"sa":{"fileName":"No_such file.jpg"}}'>Media:No_such file.jpg</a></p>
17633 Image link to nonexistent file (T3850 - good)
17635 [[File:No_such.jpg]]
17637 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17640 <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>
17644 :Image link to nonexistent file (T3850 - bad)
17646 [[:Image:No such.jpg]]
17648 <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>
17651 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17655 Character reference normalization in link text (T3938)
17657 [[Main Page|this&that]]
17659 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17666 Test for unicode normalization
17668 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17672 (T21451) Links should refer to the normalized form.
17680 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17681 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17682 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17683 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17684 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17689 Empty attribute crash test (T4067)
17691 <font color="">foo</font>
17693 <p><font color="">foo</font>
17698 Empty attribute crash test single-quotes (T4067)
17700 <font color=''>foo</font>
17702 <p><font color="">foo</font>
17707 Attribute test: equals, then nothing
17709 parsoid=wt2html,html2html
17711 <font color=>foo</font>
17713 <p><font color="">foo</font>
17716 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17720 Attribute test: unquoted value
17722 parsoid=wt2html,html2html
17724 <font color=x>foo</font>
17726 <p><font color="x">foo</font>
17729 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17733 Attribute test: unquoted but illegal value (hash)
17735 <font color=#x>foo</font>
17737 <p><font color="#x">foo</font>
17741 # Parsoid does not serialize to empty attribute syntax,
17742 # so wt2wt and html2wt cases are skipped
17744 Attribute test: no value (T54330)
17746 parsoid=wt2html,html2html
17748 <font color>foo</font>
17750 <p><font color="">foo</font>
17753 <p><font color="">foo</font></p>
17757 T4095: link with three closing brackets
17761 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17764 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17768 T4095: link with pipe and three closing brackets
17770 [[Main Page|link]]]
17772 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17775 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17779 T4095: link with pipe and three closing brackets, version 2
17781 [[Main Page|[http://example.com/]]]
17783 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17786 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17795 Template:Dangerous attribute
17797 " onmouseover="alert(document.cookie)
17801 Template:Dangerous style attribute
17803 border-size: expression(alert(document.cookie))
17809 <div style="float: right; {{{1}}}">Magic div</div>
17813 T4304: HTML attribute safety (safe template; regression T4309)
17815 <div title="{{test}}"></div>
17817 <div title="This is a test template"></div>
17820 <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>
17823 # Parsoid has enough context to handle this case
17825 T4304: HTML attribute safety (dangerous template; 2309)
17827 <div title="{{dangerous attribute}}"></div>
17829 <div title=""></div>
17832 <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>
17836 T4304: HTML attribute safety (dangerous style template; 2309)
17838 <div style="{{dangerous style attribute}}"></div>
17840 <div style="/* insecure input */"></div>
17843 <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>
17847 T4304: HTML attribute safety (safe parameter; 2309)
17849 {{div style|width: 200px}}
17851 <div style="float: right; width: 200px">Magic div</div>
17854 <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>
17858 T4304: HTML attribute safety (unsafe parameter; 2309)
17860 {{div style|width: expression(alert(document.cookie))}}
17862 <div style="/* insecure input */">Magic div</div>
17865 <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>
17868 ## Parsoid output here differs; needs investigation.
17870 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17872 {{div style|"><script>alert(document.cookie)</script>}}
17874 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17878 ## Parsoid output here differs; needs investigation.
17880 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17882 {{div style|" ><script>alert(document.cookie)</script>}}
17884 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17889 T4304: HTML attribute safety (link)
17891 <div title="[[Main Page]]"></div>
17893 <div title="[[Main Page]]"></div>
17896 <div title="[[Main Page]]"></div>
17900 T4304: HTML attribute safety (italics)
17902 <div title="''foobar''"></div>
17904 <div title="''foobar''"></div>
17909 T4304: HTML attribute safety (bold)
17911 <div title="'''foobar'''"></div>
17913 <div title="'''foobar'''"></div>
17918 T4304: HTML attribute safety (ISBN)
17920 <div title="ISBN 1234567890"></div>
17922 <div title="ISBN 1234567890"></div>
17927 T4304: HTML attribute safety (RFC)
17929 <div title="RFC 1234"></div>
17931 <div title="RFC 1234"></div>
17936 T4304: HTML attribute safety (PMID)
17938 <div title="PMID 1234567890"></div>
17940 <div title="PMID 1234567890"></div>
17945 T4304: HTML attribute safety (web link)
17947 <div title="http://example.com/"></div>
17949 <div title="http://example.com/"></div>
17954 T4304: HTML attribute safety (named web link)
17956 <div title="[http://example.com/ link]"></div>
17958 <div title="[http://example.com/ link]"></div>
17961 <div title="[http://example.com/ link]"></div>
17965 T5244: HTML attribute safety (extension; safe)
17967 <div style="<nowiki>background:blue</nowiki>"></div>
17969 <div style="background:blue"></div>
17972 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17976 T5244: HTML attribute safety (extension; unsafe)
17978 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17980 <div style="/* insecure input */"></div>
17983 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17986 # More MSIE fun discovered by Tom Gilder
17989 MSIE CSS safety test: spurious slash
17991 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17993 <div style="/* insecure input */">evil</div>
17996 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18000 MSIE CSS safety test: hex code
18002 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18004 <div style="/* insecure input */">evil</div>
18007 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18011 MSIE CSS safety test: comment in url
18013 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18015 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18018 <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>
18022 MSIE CSS safety test: comment in expression
18024 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18026 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18029 <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>
18033 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18035 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18037 <p style="/* invalid control char */">A</p>
18040 <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>
18044 MSIE 6 CSS safety test: Fullwidth (T57332)
18046 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18047 <div style="top:EXPRESSION(alert())">B</div>
18049 <p style="/* insecure input */">A</p>
18050 <div style="/* insecure input */">B</div>
18053 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18054 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18058 MSIE 6 CSS safety test: IPA extensions (T57332)
18060 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18061 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18063 <div style="/* insecure input */">A</div>
18064 <p style="/* insecure input */">B</p>
18067 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18068 <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>
18072 MSIE 6 CSS safety test: sup/sub script (T57332)
18074 <div style="background-image:url⁽javascript:alert())">A</div>
18075 <div style="background-image:url₍javascript:alert())">B</div>
18076 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18078 <div style="/* insecure input */">A</div>
18079 <div style="/* insecure input */">B</div>
18080 <p style="/* insecure input */">C</p>
18083 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18084 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18085 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18091 parsoid=wt2html,html2html
18094 title="data:text/html,<img src=1 onerror=alert(1)>"
18095 style="-o-link:attr(title);-o-link-source:current">X</div>
18097 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18100 <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>
18104 MSIE 6 CSS safety test: Repetition markers (T57332)
18106 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18107 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18108 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18109 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18110 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18111 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18112 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18114 <p style="/* insecure input */">A</p>
18115 <p style="/* insecure input */">B</p>
18116 <p style="/* insecure input */">C</p>
18117 <p style="/* insecure input */">D</p>
18118 <p style="/* insecure input */">E</p>
18119 <p style="/* insecure input */">F</p>
18120 <p style="/* insecure input */">G</p>
18123 <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>
18124 <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>
18125 <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>
18126 <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>
18127 <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>
18128 <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>
18129 <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>
18133 Table attribute legitimate extension
18136 !+ style="<nowiki>color:blue</nowiki>"|status
18141 <th style="color:blue">status
18147 Table attribute safety
18150 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
18155 <th style="/* insecure input */">status
18161 CSS line continuation 1
18163 <div style="background-image: u\ rl(test.jpg);"></div>
18165 <div style="/* insecure input */"></div>
18170 CSS line continuation 2
18172 <div style="background-image: u\ rl(test.jpg); "></div>
18174 <div style="/* invalid control char */"></div>
18185 Expansion of multi-line templates in attribute values (T8255)
18187 <div style="background: {{identity|#00FF00}}">-</div>
18189 <div style="background: #00FF00">-</div>
18194 Expansion of multi-line templates in attribute values (T8255 sanity check)
18196 <div style="background:
18199 <div style="background: #00FF00">-</div>
18202 <div style="background:
18207 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18209 <div style="background: #00FF00">-</div>
18211 <div style="background: #00FF00">-</div>
18216 Tags which are hidden from tidiers cannot pass through the Sanitizer
18218 <mw:toc><script>alert();</script></mw:toc>
18220 <p><mw:toc><script>alert();</script></mw:toc>
18225 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18229 Parser hook: empty input
18240 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18243 ## Don't expect parsoid to rt this form.
18245 Parser hook: empty input using terminated empty elements
18247 parsoid=wt2html,html2html
18258 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18262 Parser hook: empty input using terminated empty elements (space before)
18273 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18277 Parser hook: basic input
18288 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18291 ## Don't expect parsoid to rt this form.
18293 Parser hook: case insensitive
18295 parsoid=wt2html,html2html
18306 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18309 ## Don't expect parsoid to rt this form.
18311 Parser hook: case insensitive, redux
18313 parsoid=wt2html,html2html
18324 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18328 Parser hook: nested tags
18330 <tag><tag></tag></tag>
18339 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18343 Parser hook: basic arguments
18345 <tag width="200" height="100" depth="50" square=""></tag>
18358 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18361 ## Don't expect parsoid to rt this form.
18363 Parser hook: basic arguments, variations
18365 parsoid=wt2html,html2html
18367 <tag width=200 height = "100" depth = '50' square></tag>
18380 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18384 Parser hook: argument containing a forward slash (T7344)
18386 <tag filename="/tmp/bla"></tag>
18391 'filename' => '/tmp/bla',
18396 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18399 ## Don't expect parsoid to rt this form.
18401 Parser hook: empty input using terminated empty elements (T4374)
18403 parsoid=wt2html,html2html
18415 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18418 ## </tag> should be output literally since there is no matching tag that begins it
18419 ## Don't expect parsoid to rt this form.
18421 Parser hook: basic arguments using terminated empty elements (T4374)
18425 <tag width=200 height = "100" depth = '50' square/>
18442 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":null}' about="#mwt2"></pre><p>other stuff
18446 ## Don't expect parsoid to rt this form.
18448 Parser hook: Don't allow unclosed extension tags
18454 this is a '''test'''
18456 <p>test <tag>123
18457 </p><p>this is a <b>test</b>
18460 <p>test <tag>123</p>
18462 <p>this is a <b>test</b></p>
18466 Parser hook: horizontal rule inside extension tag that outputs <pre>
18487 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18491 Parser hook: static parser hook not inside a comment
18493 <statictag>hello, world</statictag>
18495 <statictag action="flush" />
18501 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18502 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18506 Parser hook: static parser hook inside a comment
18508 <!-- <statictag>hello, world</statictag> -->
18509 <statictag action="flush" />
18514 <!-- <statictag>hello, world</statictag> -->
18515 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18518 # Nested template calls; this case was broken by Parser.php rev 1.506,
18522 Template:One-parameter
18524 (My parameter is: {{{1}}})
18528 Template:Map-one-parameter
18530 {{{{{1}}}|{{{2}}}}}
18534 Nested template calls
18536 {{Map-one-parameter|One-parameter|param}}
18538 <p>(My parameter is: param)
18547 # Remex wraps empty tag runs with p-tags.
18548 # Parsoid strips them out during p-wrapping.
18550 Sanitizer: Closing of open tags
18552 <s></s><table></table>
18554 <p><s></s></p><table></table>
18556 <s></s><table></table>
18560 Sanitizer: Closing of open but not closed tags
18569 Sanitizer: Closing of closed but not open tags
18575 <p class="mw-empty-elt">
18581 Sanitizer: Closing of closed but not open table tags
18585 Table not started</td></tr></table>
18587 <p>Table not started
18592 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18594 wgFragmentMode=[ 'html5', 'legacy' ]
18596 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18598 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18601 <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>
18605 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18607 wgFragmentMode=[ 'legacy' ]
18609 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18611 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18615 # In HTML5, the restrictions are that id must contain at least one character,
18616 # and must not contain any space characters.
18618 Sanitizer: Validating the contents of the id attribute (T6515)
18622 <br id="" /><br id="a space" />
18627 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18629 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18633 <br id="foo" /><br id="foo" />
18635 Something need to be done. foo-2 ?
18639 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18642 <meta itemprop="hello" content="world">
18643 <meta http-equiv="refresh" content="5">
18644 <meta itemprop="hello" http-equiv="refresh" content="5">
18645 <link itemprop="hello" href="{{SERVER}}">
18646 <link rel="stylesheet" href="{{SERVER}}">
18647 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18651 <p> <meta itemprop="hello" content="world" />
18652 <meta http-equiv="refresh" content="5">
18653 <meta itemprop="hello" content="5" />
18654 <link itemprop="hello" href="http://example.org" />
18655 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18656 <link itemprop="hello" href="http://example.org" />
18663 Sanitizer: Strip comments from CSS attributes
18665 parsoid=wt2html,wt2wt
18667 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18669 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18672 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18676 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18678 [[meatball:Soft"Security]]
18680 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18683 <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>
18687 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18689 [[meatball:Foo<Bar]]
18690 [[meatball:Foo>Bar]]
18691 [[meatball:Foo<bar]]
18692 [[meatball:Foo>bar]]
18694 <p>[[meatball:Foo<Bar]]
18695 [[meatball:Foo>Bar]]
18696 [[meatball:Foo<bar]]
18697 [[meatball:Foo>bar]]
18700 <p>[[meatball:Foo<Bar]]
18701 [[meatball:Foo>Bar]]
18702 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18703 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18707 Language converter: output gets cut off unexpectedly (T7757)
18711 this bit is safe: }-
18713 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18715 then we get cut off here: }-
18717 all additional text is vanished
18719 <p>this bit is safe: }-
18720 </p><p>but if we add a conversion instance: xxx
18721 </p><p>then we get cut off here: }-
18722 </p><p>all additional text is vanished
18725 <p>this bit is safe: }-</p>
18726 <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>
18727 <p>then we get cut off here: }-</p>
18728 <p>all additional text is vanished</p>
18732 Language converter glossary rules inside attributes (T119158)
18734 language=sr variant=sr-el
18736 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18738 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18741 </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>
18744 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18746 <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>
18750 Self closed html pairs (T7487)
18752 <center><font id="bug" />Centered text</center>
18753 <div><font id="bug2" />In div text</div>
18755 <center><font id="bug"></font>Centered text</center>
18756 <div><font id="bug2"></font>In div text</div>
18760 Punctuation: nbsp before exclamation
18764 <p>C'est grave !
18769 Punctuation: CSS !important (T13874)
18771 <div style="width:50% !important">important</div>
18773 <div style="width:50% !important">important</div>
18778 Punctuation: CSS ! important (T13874; with space after)
18780 <div style="width:50% ! important">important</div>
18782 <div style="width:50% ! important">important</div>
18787 HTML bullet list, closed tags (T7497)
18800 <ul data-parsoid='{"stx":"html"}'>
18801 <li data-parsoid='{"stx":"html"}'>One</li>
18802 <li data-parsoid='{"stx":"html"}'>Two</li>
18808 HTML bullet list, unclosed tags (T7497)
18820 <ul data-parsoid='{"stx":"html"}'>
18821 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18822 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18828 HTML ordered list, closed tags (T7497)
18841 <ol data-parsoid='{"stx":"html"}'>
18842 <li data-parsoid='{"stx":"html"}'>One</li>
18843 <li data-parsoid='{"stx":"html"}'>Two</li>
18849 HTML ordered list, unclosed tags (T7497)
18862 <ol data-parsoid='{"stx":"html"}'>
18863 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18864 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18870 HTML nested bullet list, closed tags (T7497)
18893 <ul data-parsoid='{"stx":"html"}'>
18894 <li data-parsoid='{"stx":"html"}'>One</li>
18895 <li data-parsoid='{"stx":"html"}'>Two:
18896 <ul data-parsoid='{"stx":"html"}'>
18897 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18898 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18905 HTML nested bullet list, open tags (T7497)
18927 HTML nested ordered list, closed tags (T7497)
18952 HTML nested ordered list, open tags (T7497)
18989 HTML ordered list item with parameters oddity
18991 <ol><li id="fragment">One</li>
18994 <ol><li id="fragment">One</li>
18999 # parsoid doesn't explicitly mark autonumbered links, see T55505
19001 T7918: autonumbering
19003 [http://first/] [http://second] [ftp://ftp]
19007 [mailto:enclosed@mail.tld With target]
19009 [mailto:enclosed@mail.tld]
19011 mailto:inline@mail.tld
19013 <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>
19014 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19015 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19016 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19017 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19020 <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>
19021 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
19022 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
19023 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
19024 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19029 # Security and HTML correctness
19030 # From Nick Jenkins' fuzz testing
19034 Fuzz testing: Parser13
19048 # Note that Parsoid output differs from the PHP parser here: the PHP
19049 # parser breaks the URL for the magic word, while in Parsoid the URL
19050 # production takes precedence.
19052 Fuzz testing: Parser14
19057 <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>
19058 http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
19060 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19066 <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>
19067 http://</p><div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
19069 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19073 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
19074 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19078 Fuzz testing: Parser14-table
19080 parsoid=wt2html,html2html
19085 <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>
19086 <table style="__TOC__">
19091 <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>
19092 <table style="__TOC__">
19099 <table style="__TOC__"></table>
19102 # Known to produce bogus xml (extra </td>)
19103 # Don't add the html/php section since it generates broken HTML
19105 Fuzz testing: Parser16
19122 Fuzz testing: Parser21
19125 !irc://{{ftp://a" onmouseover="alert('hello world');"
19130 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19140 Fuzz testing: Parser22
19142 http://===r:::https://b
19146 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19154 # Known to produce bad XML for now
19156 Fuzz testing: Parser24
19163 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19164 <br style="onmouseover='alert(document.cookie);' " />
19166 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19171 <u class="|">}}}} >
19172 <br style="onmouseover='alert(document.cookie);'" />
19174 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19182 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19183 <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>"}'/>}}}} >
19184 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/></u></p><p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true,"autoInsertedStart":true}'>MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p><table data-parsoid='{"autoInsertedEnd":true}'>
19188 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19191 # Note: the current result listed for this is not what the original one was,
19192 # but the original bug was JavaScript injection, which is fixed in any case.
19193 # It's not clear that the original result listed was any more correct than the
19194 # current one. Original result:
19197 # <li class="||">
19198 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19200 Fuzz testing: Parser25 (T8055)
19206 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19208 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19211 <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"]}'>
19212 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19216 Fuzz testing: URL adjacent extension (with space, clean)
19218 http://example.com <nowiki>junk</nowiki>
19220 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19223 <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>
19227 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19229 http://example.com<nowiki>junk</nowiki>
19231 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19234 <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>
19238 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19240 http://example.com<pre>junk</pre>
19242 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19245 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19247 <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>
19251 Fuzz testing: image with bogus manual thumbnail
19253 [[Image:foobar.jpg|thumbnail= ]]
19255 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19258 <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>
19261 # Parsoid will emit the newline literally in wt2wt; see next test case.
19263 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19267 <pre dir=" "></pre>
19269 <pre dir=" "></pre>
19272 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19273 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19277 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19281 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19282 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19292 Templates in extension attributes are not expanded
19294 <pre dir="{{echo|ltr}}"></pre>
19296 <pre dir="{{echo|ltr}}"></pre>
19299 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19303 Parsing optional HTML elements (T8171)
19308 <td> Some tabular data</td>
19309 <td> More tabular data ...
19310 <td> And yet som tabular data</td>
19316 <td> Some tabular data</td>
19317 <td> More tabular data ...
19318 </td><td> And yet som tabular data</td>
19325 Correct handling of <td>, <tr> (T8171)
19330 <td> Some tabular data</td>
19331 <td> More tabular data ...</td>
19332 <td> And yet som tabular data</td>
19338 <td> Some tabular data</td>
19339 <td> More tabular data ...</td>
19340 <td> And yet som tabular data</td>
19348 Parsing crashing regression (fr:JavaScript)
19352 <p></body></x>
19357 Inline wiki vs wiki block nesting
19363 <p><b>Bold paragraph</b>
19364 </p><p>New wiki paragraph
19368 # FIXME: The current php output is documented
19369 # and desired output is the parsoid target.
19371 Inline HTML vs wiki block nesting
19377 <p><b>Bold paragraph
19378 </p><p>New wiki paragraph</b>
19381 <p><b>Bold paragraph</b>
19382 </p><p>New wiki paragraph
19386 # Original result was this:
19387 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19389 # While that might be marginally more intuitive, maybe, the six-apostrophe
19390 # construct is clearly pathological and the result stated here (which is what
19391 # the parser actually does) is about as reasonable as anything.
19393 Mixing markup for italics and bold
19396 '''bold''''''bold''bolditalics'''''
19398 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19406 Article for special page transclusion test
19410 Special page transclusion
19413 {{Special:Prefixindex/Xyzzyx}}
19415 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19421 Special page transclusion twice (T7021)
19424 {{Special:Prefixindex/Xyzzyx}}
19425 {{Special:Prefixindex/Xyzzyx}}
19427 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19429 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19435 Transclusion of default MediaWiki message
19437 {{MediaWiki:Mainpage}}
19444 Transclusion of nonexistent MediaWiki message
19446 {{MediaWiki:Mainpagexxx}}
19448 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19453 Transclusion of MediaWiki message with underscore
19455 {{MediaWiki:history_short}}
19462 Transclusion of MediaWiki message with space
19464 {{MediaWiki:history short}}
19471 Invalid header with following text
19481 Section extraction test (section 0)
19501 Section extraction test (section 1)
19523 Section extraction test (section 2)
19544 Section extraction test (section 3)
19564 Section extraction test (section 4)
19588 Section extraction test (section 5)
19608 Section extraction test (section 6)
19629 Section extraction test (section 7)
19649 Section extraction test (section 8)
19669 Section extraction test (section 9)
19690 Section extraction test (section 10)
19710 Section extraction test (nonexistent section 11)
19729 Section extraction test with bogus heading (section 1)
19734 ==bogus== not a legal section
19738 ==bogus== not a legal section
19742 Section extraction test with bogus heading (section 2)
19747 ==bogus== not a legal section
19754 Section extraction test with comment after heading (section 1)
19766 Section extraction test with comment after heading (section 2)
19778 Section extraction test with bogus <nowiki> heading (section 1)
19783 ==bogus== <nowiki>not a legal section</nowiki>
19787 ==bogus== <nowiki>not a legal section</nowiki>
19791 Section extraction test with bogus <nowiki> heading (section 2)
19796 ==bogus== <nowiki>not a legal section</nowiki>
19802 # Formerly testing for T4587, now resolved by the use of unmarked sections
19803 # instead of respecting commented sections
19805 Section extraction prefixed by comment (section 1)
19816 Section extraction prefixed by comment (section 2)
19826 # Formerly testing for T4607, now resolved by the use of unmarked sections
19827 # instead of respecting HTML-style headings
19829 Section extraction, mixed wiki and html (section 1)
19845 Section extraction, mixed wiki and html (section 2)
19861 # Formerly testing for T5342
19863 Section extraction, heading surrounded by <noinclude>
19867 <noinclude>==unmarked==</noinclude>
19873 # Test behavior of T21910
19875 Sectiion with all-equals
19880 The line above must have a trailing space
19883 But just in case it doesn't...
19887 But just in case it doesn't...
19891 Section replacement test (section 0)
19922 Section replacement test (section 1)
19951 Section replacement test (section 2)
19981 Section replacement test (section 3)
20012 Section replacement test (section 4)
20039 Section replacement test (section 5)
20070 Section replacement test (section 6)
20100 Section replacement test (section 7)
20131 Section replacement test (section 8)
20162 Section replacement test (section 9)
20191 Section replacement test (section 10)
20221 Section replacement test with initial whitespace (T15728)
20225 Preformatted initial line
20229 Preformatted initial line
20236 Section extraction, heading followed by pre with 20 spaces (T8398)
20248 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20261 Section extraction, <pre> around bogus header (T12309)
20278 Section replacement, <pre> around bogus header (T12309)
20299 Handling of 
 in URLs
20303 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20306 <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>
20310 Handling of %0A in URLs
20314 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20317 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20320 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20322 5 quotes, code coverage +1 line
20332 # same html as previous, but wikitext adjusted to match parsoid html2wt
20333 # note that wt2html and html2html will put the <i> before the <b>
20335 5 quotes, code coverage +1 line w/ nowiki (1)
20337 parsoid=wt2wt,html2wt
20339 '''''<nowiki/>'''''
20344 <p><b><i></i></b></p>
20347 # same as previous, just swapping the <i> and <b>
20349 5 quotes, code coverage +1 line w/ nowiki (2)
20351 '''''<nowiki/>'''''
20356 <p><i><b></b></i></p>
20360 Special:Search page linking.
20364 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20369 {{!}} is a magic word
20371 {{!}} is a magic word there and {{!}} is still a magic word here
20372 | is not a magic word here but {{!}} is still a magic word here
20374 <p>| is a magic word there and | is still a magic word here
20375 | is not a magic word here but | is still a magic word here
20378 <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
20379 | 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>
20385 title=[[Parser test]]
20399 *{{SUBJECTPAGENAME}}
20400 *{{SUBJECTPAGENAMEE}}
20403 *{{NAMESPACENUMBER}}
20408 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20410 <ul><li>Parser test</li>
20411 <li>Parser_test</li>
20412 <li>Parser test</li>
20413 <li>Parser_test</li>
20414 <li>Parser test</li>
20415 <li>Parser_test</li>
20416 <li>Parser test</li>
20417 <li>Parser_test</li>
20418 <li>Parser test</li>
20419 <li>Parser_test</li>
20420 <li>Talk:Parser test</li>
20421 <li>Talk:Parser_test</li>
20422 <li>Parser test</li>
20423 <li>Parser_test</li>
20431 <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>
20434 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20437 Gallery with valid attributes
20439 <gallery type="123" summary="345">
20440 File:File:Foobar.jpg
20443 <ul class="gallery mw-gallery-traditional" type="123">
20444 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20445 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20446 <div class="gallerytext">
20452 <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"}}'>
20453 <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>
20457 ## Parsoid thinks the "centre" here is a property, not a caption.
20462 "modes": ["wt2html"],
20463 "nativeGallery": true
20471 image4 |300px| centre
20472 image5.svg| http://///////
20477 <ul class="gallery mw-gallery-traditional">
20478 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20479 <div class="thumb" style="height: 150px;">Image1.png</div>
20480 <div class="gallerytext">
20483 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20484 <div class="thumb" style="height: 150px;">Image2.gif</div>
20485 <div class="gallerytext">
20488 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20489 <div class="thumb" style="height: 150px;">Image3</div>
20490 <div class="gallerytext">
20493 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20494 <div class="thumb" style="height: 150px;">Image4</div>
20495 <div class="gallerytext">
20500 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20501 <div class="thumb" style="height: 150px;">Image5.svg</div>
20502 <div class="gallerytext">
20503 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20507 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20508 <div class="thumb" style="height: 150px;">* image6</div>
20509 <div class="gallerytext">
20515 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20516 <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>
20517 <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>
20518 <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>
20519 <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>
20520 <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>
20521 <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>
20526 Gallery (with options, html)
20529 "modes": ["wt2html", "html2html"],
20530 "nativeGallery": true
20533 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20534 File:Nonexistent.jpg|caption
20535 File:Nonexistent.jpg
20536 image:foobar.jpg|some '''caption''' [[Main Page]]
20538 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20541 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20542 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20543 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20544 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20545 <div class="gallerytext">
20550 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20551 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20552 <div class="gallerytext">
20555 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20556 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
20557 <div class="gallerytext">
20558 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20562 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20563 <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>
20564 <div class="gallerytext">
20567 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20568 <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>
20569 <div class="gallerytext">
20577 <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":{}}'>
20578 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20579 <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>
20580 <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>
20581 <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>
20582 <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>
20583 <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>
20588 Gallery (with options, extsrc)
20591 "nativeGallery": false
20594 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20595 File:Nonexistent.jpg|caption
20596 File:Nonexistent.jpg
20597 image:foobar.jpg|some '''caption''' [[Main Page]]
20599 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20602 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20603 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20604 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20605 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20606 <div class="gallerytext">
20611 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20612 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20613 <div class="gallerytext">
20616 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20617 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
20618 <div class="gallerytext">
20619 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20623 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20624 <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>
20625 <div class="gallerytext">
20628 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20629 <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>
20630 <div class="gallerytext">
20638 <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"}}'>
20639 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20640 <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>
20641 <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>
20642 <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>
20643 <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>
20644 <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>
20649 Gallery (without px units)
20651 <gallery widths="70" heights="40">
20655 <ul class="gallery mw-gallery-traditional">
20656 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20657 <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>
20658 <div class="gallerytext">
20664 <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"}}'>
20665 <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>
20670 Gallery (with invalid units)
20672 <gallery widths="70em" heights="40em">
20676 <ul class="gallery mw-gallery-traditional">
20677 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20678 <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>
20679 <div class="gallerytext">
20685 <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"}}'>
20686 <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>
20691 Gallery with link that has fragment
20694 "modes": ["wt2html", "html2html"],
20695 "nativeGallery": true
20699 image:foobar.jpg|link=Main_Page
20700 image:foobar.jpg|link=Main_Page#section
20701 image:foobar.jpg|link=Main Page#section|caption
20704 <ul class="gallery mw-gallery-traditional">
20705 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20706 <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>
20707 <div class="gallerytext">
20710 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20711 <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>
20712 <div class="gallerytext">
20715 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20716 <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>
20717 <div class="gallerytext">
20725 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20726 <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>
20727 <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>
20728 <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>
20732 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20734 Gallery with template inside caption
20737 "nativeGallery": true
20740 <gallery caption="{{echo|hi}}">
20741 File:Foobar.jpg|{{echo|ho}}
20744 <ul class="gallery mw-gallery-traditional">
20745 <li class='gallerycaption'>{{echo|hi}}</li>
20746 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20747 <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>
20748 <div class="gallerytext">
20756 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20757 <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>
20758 <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>
20763 Gallery with wikitext inside caption
20766 "nativeGallery": true
20770 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20771 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20774 <ul class="gallery mw-gallery-traditional">
20775 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20776 <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>
20777 <div class="gallerytext">
20778 <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>
20782 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20783 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
20784 <div class="gallerytext">
20785 <p>This is a test template
20792 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20793 <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>
20794 <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>
20799 Gallery (with showfilename option)
20802 "nativeGallery": true
20805 <gallery showfilename="">
20806 File:Nonexistent.jpg|caption
20807 File:Nonexistent.jpg
20808 File:Foobar.jpg|some '''caption''' [[Main Page]]
20812 <ul class="gallery mw-gallery-traditional">
20813 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20814 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20815 <div class="gallerytext">
20816 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20821 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20822 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20823 <div class="gallerytext">
20824 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20828 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20829 <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>
20830 <div class="gallerytext">
20831 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20832 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20836 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20837 <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>
20838 <div class="gallerytext">
20839 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20846 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20847 <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>
20848 <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>
20849 <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>
20850 <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>
20854 ## Should Parsoid be preserving these variations? See T151367
20856 Gallery (with namespace-less filenames)
20859 "modes": ["wt2html", "html2html"],
20860 "nativeGallery": true
20864 File:Nonexistent.jpg
20870 <ul class="gallery mw-gallery-traditional">
20871 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20872 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20873 <div class="gallerytext">
20876 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20877 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20878 <div class="gallerytext">
20881 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20882 <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>
20883 <div class="gallerytext">
20886 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20887 <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>
20888 <div class="gallerytext">
20894 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20895 <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>
20896 <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>
20897 <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>
20898 <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>
20903 Gallery override link with wikilink (T36852)
20906 "nativeGallery": true
20910 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20913 <ul class="gallery mw-gallery-traditional">
20914 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20915 <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>
20916 <div class="gallerytext">
20922 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20923 <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>
20928 Gallery override link with absolute external link (T36852)
20931 "nativeGallery": true
20935 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20938 <ul class="gallery mw-gallery-traditional">
20939 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20940 <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>
20941 <div class="gallerytext">
20947 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20948 <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>
20953 Gallery override link with absolute external link with LanguageConverter
20958 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20961 <ul class="gallery mw-gallery-traditional">
20962 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20963 <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>
20964 <div class="gallerytext">
20972 <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"}}'>
20973 <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>
20978 Gallery override link with malicious javascript (T36852)
20981 "modes": ["wt2html", "html2html"],
20982 "nativeGallery": true
20986 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20989 <ul class="gallery mw-gallery-traditional">
20990 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20991 <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>
20992 <div class="gallerytext">
20998 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20999 <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>
21003 # Note that parsoid uses the invalid link as a caption, PHP does not.
21005 Gallery with invalid title as link (T45964)
21008 "modes": ["wt2html", "html2html"],
21009 "nativeGallery": true
21013 File:Foobar.jpg|link=<
21016 <ul class="gallery mw-gallery-traditional">
21017 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21018 <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>
21019 <div class="gallerytext">
21025 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21026 <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>
21031 Serialize gallery without attrs in data-mw
21034 "modes": ["html2wt"],
21035 "nativeGallery": true
21038 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21039 <li class="gallerycaption">123</li>
21040 <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>
21043 <gallery caption="123">
21049 Gallery with class and style attributes
21052 "nativeGallery": true
21055 <gallery class="center" style="text-align: center;">
21059 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21060 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21061 <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>
21062 <div class="gallerytext">
21068 <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":{}}'>
21069 <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>
21074 Gallery in slideshow mode
21077 "nativeGallery": true
21080 <gallery mode="slideshow" showthumbnails="">
21084 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21085 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21086 <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>
21087 <div class="gallerytext">
21093 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21094 <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>
21099 Serialize gallery image captions on a line
21102 "modes": ["html2wt"],
21103 "nativeGallery": true
21106 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21107 <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>
21108 <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>
21112 File:Foobar.jpg| hi ho
21113 File:Foobar.jpg|hi<br />ho
21118 HTML Hex character encoding (spells the word "JavaScript")
21120 parsoid=wt2html,wt2wt,html2html
21122 JavaScript
21124 <p>JavaScript
21127 <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>
21131 HTML Hex character encoding bogus encoding (T28437 regression check)
21135 <p>&#xsee;&#XSEE;
21140 HTML Hex character encoding mixed case
21142 parsoid=wt2html,wt2wt,html2html
21149 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21152 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21153 # Note that U+000C (form feed) is not a valid XML character, so
21154 # it is banned even though allowed in HTML5.
21156 Illegal character references (T106578)
21161 ; Control (low): 
21162 ; Control (high):  Ÿ
21163 ; Surrogate: ��
21164 ; This is an okay astral character: 💩
21172 <dt>Control (low)</dt>
21174 <dt>Control (high)</dt>
21175 <dd>&#x7F; &#x9F;</dd>
21177 <dd>&#xD83D;&#xDCA9;</dd>
21178 <dt>This is an okay astral character</dt>
21179 <dd>💩</dd></dl>
21183 __FORCETOC__ override
21195 ISBN 978-0-1234-56 789
21197 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21200 <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>
21204 ISBN followed by 5 spaces
21215 ISBN ISBN 1234567890
21217 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21220 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21223 # Uppercase X and lowercase x as well
21234 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21235 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21236 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21237 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21238 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21239 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21242 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21243 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21244 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21245 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21246 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21247 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21251 ISBN with empty prefix (parsoid test)
21255 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21258 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21262 T24905: <abbr> followed by ISBN followed by </a>
21264 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21266 <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>
21269 <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>
21277 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21280 <p>RFC <a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external mw-magiclink">RFC 1234</a></p>
21284 Double RFC with a wiki link
21288 <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>
21291 <p>RFC <a rel="mw:WikiLink" href="./RFC_1234" title="RFC 1234">RFC 1234</a></p>
21299 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21302 <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>
21306 Centre-aligned image
21308 [[Image:foobar.jpg|centre]]
21310 <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>
21313 <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>
21319 [[Image:foobar.jpg|none]]
21321 <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>
21324 <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>
21328 Width + Height sized image (using px) (height is ignored)
21330 [[Image:foobar.jpg|640x480px]]
21332 <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>
21335 <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>
21339 Width-sized image (using px, no following whitespace)
21341 [[Image:foobar.jpg|640px]]
21343 <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>
21346 <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>
21350 Width-sized image (using px, with following whitespace - test regression from r39467)
21352 [[Image:foobar.jpg|640px ]]
21354 <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>
21357 <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>
21361 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21363 [[Image:foobar.jpg| 640px]]
21365 <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>
21368 <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>
21372 Image with page parameter
21376 [[File:LoremIpsum.djvu|page=2]]
21378 <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>
21381 <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>
21385 Another italics / bold test
21393 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21399 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21402 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21406 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21408 Images with the "|" character in the comment
21410 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21412 <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>
21415 <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>
21419 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21421 <html><script>alert(1);</script></html>
21423 <p><html><script>alert(1);</script></html>
21428 HTML with raw HTML ($wgRawHtml==true)
21432 <html><script>alert(1);</script></html>
21434 <p><script>alert(1);</script>
21439 Parents of subpages, one level up
21441 subpage title=[[Subpage test/L1/L2/L3]]
21445 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">L2</a>
21451 Parents of subpages, one level up, not named
21453 subpage title=[[Subpage test/L1/L2/L3]]
21457 <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>
21464 Parents of subpages, two levels up
21466 subpage title=[[Subpage test/L1/L2/L3]]
21472 <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
21473 </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>
21478 Parents of subpages, two levels up, without trailing slash or name.
21480 subpage title=[[Subpage test/L1/L2/L3]]
21489 Parents of subpages, two levels up, with lots of extra trailing slashes.
21491 subpage title=[[Subpage test/L1/L2/L3]]
21495 <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>
21500 Subpage test/L1/L2/L3Sibling
21506 Transclusion of a sibling page (one level up)
21508 subpage title=[[Subpage test/L1/L2/L3]]
21517 Transclusion of a child page
21519 subpage title=[[Subpage test/L1/L2]]
21527 # This is wt2html only in Parsoid because we add <nowiki>
21528 # because of {{..}} and we don't expect to fix that to
21529 # eliminate the nowikis selective for {{..}} markup.
21531 Non-transclusion because of too many up levels
21533 subpage title=[[Subpage test/L1/L2/L3]]
21536 {{../../../../More than parent}}
21538 <p>{{../../../../More than parent}}
21541 <p>{{../../../../More than parent}}</p>
21545 Definition list code coverage
21559 <dl><dt>title </dt><dd>def</dd>
21560 <dt>title </dt><dd>def</dd>
21561 <dt>title</dt><dd>def</dd></dl>
21565 Don't fall for the self-closing div
21567 <div>hello world</div/>
21569 <div>hello world</div>
21578 <p>[[:Template:Msg]]
21587 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21591 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21593 Always escape literal '>' in output, not just after '<'
21607 <p>This is a test template
21608 This is a test template
21620 Inclusion of !userCanEdit() content
21624 <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>
21630 Out-of-order TOC heading levels
21639 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
21641 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21643 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21644 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21647 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21649 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21650 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21656 <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>
21657 <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>
21658 <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>
21659 <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>
21660 <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>
21661 <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>
21667 ISBN with a dummy number
21677 ISBN with space-delimited number
21681 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21684 <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>
21689 ISBN with multiple spaces, no number
21708 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21709 </p><p>ISBN 12345678901
21712 <p>ISBN 123456789</p>
21714 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21716 <p>ISBN 12345678901</p>
21721 ISBN with trailing year (T9110)
21723 ISBN 1-234-56789-0 - 2006
21725 ISBN 1 234 56789 0 - 2006
21727 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21728 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21731 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21733 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21740 wgFragmentMode=[ 'html5', 'legacy' ]
21742 {{anchorencode:foo bar©#%n}}
21747 <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>
21751 anchorencode (legacy)
21753 wgFragmentMode=[ 'legacy' ]
21755 {{anchorencode:foo bar©#%n}}
21757 <p>foo_bar.C2.A9.23.25n
21762 anchorencode trims spaces
21764 wgFragmentMode=[ 'html5', 'legacy' ]
21766 {{anchorencode: __pretty__please__}}
21771 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21775 anchorencode deals with links
21777 wgFragmentMode=[ 'html5', 'legacy' ]
21779 {{anchorencode: [[hello|world]] [[hi]]}}
21784 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21788 anchorencode deals with templates
21790 wgFragmentMode=[ 'html5', 'legacy' ]
21792 {{anchorencode: {{Foo}} x}}
21797 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21801 anchorencode encodes like the TOC generator: (T20431)
21803 wgFragmentMode=[ 'html5', 'legacy' ]
21805 ===_ +:.3A%3A _ &&]] x===
21806 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21809 <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>
21810 <p>+:.3A%3A_&&]]_x
21813 <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>
21814 <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>
21815 <meta property="mw:PageProp/noeditsection"/>
21819 anchorencode encodes like the TOC generator: (T20431) (legacy)
21821 wgFragmentMode=[ 'legacy' ]
21823 ===_ +:.3A%3A&&]]===
21824 {{anchorencode: _ +:.3A%3A&&]] }}
21827 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21828 <p>.2B:.3A.253A.26.26.5D.5D
21833 T8200: blockquotes and paragraph formatting
21854 T10293: Use of center tag ruins paragraph formatting
21875 Parsing of overlapping (improperly nested) inline html tags
21877 <span><s>x</span></s>
21879 <p><span><s>x</span></s></span>
21882 <p><span><s>x</s></span>
21887 ### Language variants related tests
21890 # Parsoid does not mark self-links.
21891 # Parsoid does not convert links; PHP will do any necessary redirects.
21894 Self-link in language variants
21896 title=[[Dunav]] language=sr
21898 Both [[Dunav]] and [[Дунав]] are names for this river.
21900 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21903 <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>
21913 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21915 title=[[Duna]] language=sr
21917 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21919 <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.
21922 <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>
21926 Link to a section of a variant of this title shouldn't be parsed as self-link
21928 title=[[Duna]] language=sr
21930 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21932 <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.
21935 <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>
21939 Link to pages in language variants
21943 Main Page can be written as [[Маин Паге]]
21945 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21948 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21953 Multiple links to pages in language variants
21957 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21959 <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>.
21962 <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>
21967 Simple template in language variants
21973 <p>This is a test template
21979 Template with explicit namespace in language variants
21985 <p>This is a test template
21991 Basic test for template parameter in language variants
21995 {{парамтест|param=foo}}
21997 <p>This is a test template with parameter foo
22002 Simple category in language variants
22006 [[Category:МедиаWики Усер'с Гуиде]]
22008 cat=МедиаWики_Усер'с_Гуиде sort=
22010 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22025 ## We used to, but no longer wt2wt this test since the default serializer
22026 ## will normalize all categories to serialize on their own line.
22027 ## This wikitext usage is going to be fairly uncommon in production and
22028 ## selser will take care of preserving formatting in those scenarios.
22030 Don't convert blue categorylinks to another variant (T35210)
22036 [[A]][[Category:分类]]
22040 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22041 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22045 Stripping -{}- tags (language variants)
22049 Latin proverb: -{Ne nuntium necare}-
22051 <p>Latin proverb: Ne nuntium necare
22054 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22059 Prevent conversion with -{}- tags (language variants)
22061 language=sr variant=sr-ec
22063 Latinski: -{Ne nuntium necare}-
22065 <p>Латински: Ne nuntium necare
22068 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22073 Prevent conversion of text with -{}- tags (language variants)
22075 language=sr variant=sr-ec
22077 Latinski: -{Ne nuntium necare}-
22079 <p>Латински: Ne nuntium necare
22082 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22087 Prevent conversion of links with -{}- tags (language variants)
22089 language=sr variant=sr-ec
22093 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22096 <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>
22101 -{}- tags within headlines (within html for parserConvert())
22103 wgFragmentMode=[ 'html5', 'legacy' ]
22105 language=sr variant=sr-ec
22109 Note that even an unprotected headline ID is not affected by language
22114 <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>
22115 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22118 <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>
22121 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
22123 <p>Note that even an unprotected headline ID is not affected by language
22126 <h2 id="Latinski">Latinski</h2>
22130 Explicit definition of language variant alternatives
22132 language=zh variant=zh-tw
22134 -{zh:China;zh-tw:Taiwan}-, not China
22136 <p>Taiwan, not China
22139 <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>
22143 Filter syntax for language variants
22145 language=zh variant=zh-tw
22147 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22149 <p>fooblog, WEBJOURNAL, WEBLOGquux
22152 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22155 # Note that Parsoid post-processing for language variants needs to
22156 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22158 Conversion around HTML tags
22160 language=sr variant=sr-ec
22162 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22163 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22166 <span title="ЛаCтин">ски</span>
22169 <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"}]}'/>
22170 <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>
22174 Explicit session-wise two-way language variant mapping (A flag and - flag)
22176 language=zh variant=zh-tw
22178 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22180 Taiwan is not China.
22182 But -{A|zh:China; zh-tw:Taiwan}- is China,
22184 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22186 and -{China}- is China.
22188 <p>This is Taiwan, but we'll forget that now.
22189 </p><p>Taiwan is not China.
22190 </p><p>But Taiwan is Taiwan,
22191 </p><p>(This should be stripped!)
22192 </p><p>and China is China.
22195 <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>
22196 <p>Taiwan is not China.</p>
22197 <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>
22198 <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>
22199 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22203 Explicit session-wise one-way language variant mapping (A flag and - flag)
22205 language=zh variant=zh-tw
22207 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22209 COUNTRY is China or Taiwan.
22211 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22213 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22215 and -{COUNTRY}- is COUNTRY.
22217 <p>This is Taiwan, but we'll forget that now.
22218 </p><p>COUNTRY is China or Taiwan.
22219 </p><p>But Taiwan is Taiwan,
22220 </p><p>(This should be stripped!)
22221 </p><p>and COUNTRY is COUNTRY.
22224 <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>
22225 <p>COUNTRY is China or Taiwan.</p>
22226 <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>
22227 <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>
22228 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22232 Explicit session-wise two-way language variant mapping (H flag for hide)
22234 language=zh variant=zh-tw
22236 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22240 <p>(This should be stripped!)
22241 </p><p>Taiwan is Taiwan.
22244 <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>
22245 <p>Taiwan is China.</p>
22249 Explicit session-wise one-way language variant mapping (H flag for hide)
22251 language=zh variant=zh-tw
22253 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22255 COUNTRY is Taiwan or China.
22257 <p>(This should be stripped!)
22258 </p><p>Taiwan is Taiwan or China.
22261 <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>
22262 <p>COUNTRY is Taiwan or China.</p>
22265 ## Note that parsoid test runner does not support 'showtitle' option.
22267 Adding explicit conversion rule for title (T flag)
22269 language=zh variant=zh-tw showtitle
22271 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22276 <p>Should be stripped!
22277 </p><p>Taiwan is China.
22280 <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>
22281 <p>Taiwan is China.</p>
22285 Code coverage: T combined with H flag
22287 language=zh variant=zh-tw showtitle
22289 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22294 <p>Should be stripped!
22295 </p><p>Taiwan is Taiwan.
22298 <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>
22299 <p>Taiwan is China.</p>
22303 Code coverage: T with no variants
22305 language=zh variant=zh-tw showtitle
22307 -{H|zh:China; zh-tw:Taiwan}-
22308 Taiwan is China.-{T|Taiwan is China}-
22315 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22316 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22320 Code coverage: rules with no variants
22322 language=zh variant=zh-tw
22324 -{H|zh:China; zh-tw:Taiwan}-
22335 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22337 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22338 Taiwan is China.</p>
22343 Code coverage: D flag for conversion rule
22345 language=zh variant=zh-tw
22347 -{D|zh-cn:XA; zh-tw:YA}-
22348 -{A;D|zh-cn:XB; zh-tw:YB}-
22349 -{D;H|zh-cn:XC; zh-tw:YC}-
22351 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22357 XA XB XC YA YB YC FOO BAR BAT 012345
22362 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22366 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22369 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22370 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22371 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22372 <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>
22373 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22374 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22375 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22376 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22380 Code coverage: N flag for conversion rule
22382 language=zh variant=zh-cn
22392 </p><p>српски (ћирилица)
22395 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22396 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22397 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22400 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22402 Code coverage: N flag for conversion rule (wt2html only)
22404 language=zh variant=zh-cn
22405 parsoid=wt2html,html2html
22412 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22416 Testing that changing the language variant here in the tests actually works
22418 language=zh variant=zh showtitle
22420 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22423 <p>Should be stripped!
22426 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22430 Recursive conversion of alt and title attrs shouldn't clear converter state
22432 language=zh variant=zh-cn
22435 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22436 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22440 Should be stripped<span title="Exclamation">!</span>
22443 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22444 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>
22448 T26072: more test on conversion rule for title
22450 language=zh variant=zh-tw showtitle
22452 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22454 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22457 <p>This should be stripped!
22458 </p><p>This won't take interferes with the title rule.
22461 <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>
22462 <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>
22466 Partly disable title conversion if variant == main language code
22468 language=zh variant=zh title=[[ZH]] showtitle
22470 -{T|zh-cn:CN;zh-tw:TW}-
22476 <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>
22480 Partly disable title conversion if variant == main language code, more
22482 language=zh variant=zh title=[[ZH]] showtitle
22490 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22494 Raw output of variant escape tags (R flag)
22496 language=zh variant=zh-tw
22498 Raw: -{R|zh:China;zh-tw:Taiwan}-
22500 <p>Raw: zh:China;zh-tw:Taiwan
22503 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22506 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22508 Raw output of variant escape tags (R flag) (wt2html only)
22510 language=zh variant=zh-tw
22511 parsoid=wt2html,html2html
22513 -{Variant}- -{D|syntax}- -{D;R|options}-
22515 <p>Variant syntax options
22518 <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>
22522 Nested markup inside raw output of variant escape tags (R flag)
22524 language=zh variant=zh-tw
22526 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22528 <p>Nested raw: nested Taiwan nested
22531 <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>
22535 Nested markup and spaces inside raw output of variant escape tags (R flag)
22537 language=zh variant=zh-tw
22539 X-{ outer -{ inner }- outer }-X
22541 <p>X outer inner outer X
22544 <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>
22548 Templates inside raw output of variant escape tags (R flag)
22550 language=zh variant=zh-tw
22552 Nested raw: -{R|nested {{echo|hi}} templates}-
22554 <p>Nested raw: nested hi templates
22557 <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>
22561 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22563 language=zh variant=zh-cn
22565 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22570 <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>
22574 Conversion rules from [numeric-only string] to [something else] (T48634)
22576 language=zh variant=zh-cn
22578 -{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
22583 <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>
22587 Two-way converter rule entries with an empty value should be ignored (T53551)
22589 language=zh variant=zh-cn
22591 -{H|zh-cn:foo;zh-tw:;}-foobar
22596 <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>
22600 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22602 language=zh variant=zh-cn
22604 -{H|=>zh-cn:foo;}-foobar
22609 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22613 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22615 language=zh variant=zh-cn
22622 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22626 Nested using of manual convert syntax
22628 language=zh variant=zh-hk
22630 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22632 <p>Nested: Hello Hong Kong!
22635 <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>
22639 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22641 language=zh variant=zh-cn
22643 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22645 <p><span title="X">A</span>
22648 <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>
22652 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22654 language=zh variant=zh-cn
22656 -{<span title="-{X}-">A</span>}-
22657 !! html/php+disabled
22658 <p><span title="X">A</span>
22661 <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>
22664 # Parsoid and PHP disagree on how to parse this example: Parsoid
22665 # insists that the content of a language converter element be a valid
22666 # DOM fragment or attribute string
22668 Language converter markup with block content
22670 language=zh variant=zh-cn
22672 <span>a-{b<div>c}-d
22674 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22676 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22681 </span></div></span></div></span>
22683 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><div typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[10,16,5,0]}'>c</div>"}}'></div><p>d</p>
22685 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><div typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[50,56,5,0]}'>c</div>"}}'></div><p>d</p>
22687 <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>
22691 LanguageConverter selser (1)
22693 language=zh variant=zh-cn
22695 "modes": ["wt2wt", "selser"],
22697 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22707 LanguageConverter selser (2)
22709 language=zh variant=zh-cn
22711 "modes": ["wt2wt", "selser"],
22713 ["span[class='x']", "contents", "text", "-{foo}-"],
22714 ["a", "contents", "text", "-{"],
22715 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22719 <span class="x">TEXT1</span>
22720 [http://example.com TEXT2]
22724 <span class="x"><nowiki>-{foo}-</nowiki></span>
22725 [http://example.com -{]
22726 [[Foo|<nowiki>-{</nowiki>]]
22727 {{1x|<nowiki>-{</nowiki>}}
22730 # Tests LanguageVariantText in ConstrainedText
22732 LanguageConverter selser (3)
22734 language=zh variant=zh-cn
22736 "modes": ["wt2wt", "selser"],
22738 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22739 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22750 |<nowiki/>-{edited}-
22754 # Tests LanguageVariantText._fromSelSer
22756 LanguageConverter selser (4)
22758 language=zh variant=zh-cn
22760 "modes": ["wt2wt", "selser"],
22762 ["td > span.x", "remove"]
22768 |<span class="x">Foo</span>-{Bar}-
22769 ||<span class="x">Foo</span>-{Bar}-
22779 # Since Parsoid is starting to emit canonical wikitext for links,
22780 # [http://example.com http://example.com] will not RT back to that
22782 # Parsoid does not language-convert links (it is done in a
22783 # post-processing step)
22785 Proper conversion of text in external links
22787 language=sr variant=sr-ec
22790 http://www.google.com
22791 gopher://www.google.com
22792 [http://www.google.com http://www.google.com]
22793 [gopher://www.google.com gopher://www.google.com]
22794 [https://www.google.com irc://www.google.com]
22795 [ftp://www.google.com www.google.com/ftp://dir]
22796 [//www.google.com www.google.com]
22798 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22799 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22800 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22801 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22802 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22803 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22804 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22807 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22808 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22809 <a rel="mw:ExtLink" class="external text" href="http://www.google.com">http://www.google.com</a>
22810 <a rel="mw:ExtLink" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22811 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22812 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22813 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22817 Do not convert roman numbers to language variants
22819 language=sr variant=sr-ec
22823 <p>Фридрих IV је цар.
22826 <p>Fridrih IV je car.</p>
22830 Unclosed language converter markup "-{"
22841 Don't convert raw rule "-{R|=>}-" to "=>"
22850 <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>
22854 Don't break link parsing if language converter markup is in the caption.
22856 language=sr variant=sr-ec
22858 [[Main Page|-{R|main page}-]]
22860 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22863 <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>
22867 T146304: Don't break template parsing if language converter markup is in the parameter.
22869 language=sr variant=sr-ec
22876 <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>
22880 T146305: Don't break image parsing if language converter markup is in the caption.
22884 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22886 <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>
22889 <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>
22893 T146305: Don't break image parsing if nested language converter markup is in the caption.
22895 language=zh variant=zh-cn
22897 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22899 <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>
22902 <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>
22905 # XXX html2wt disabled because rich markup in alt is not preserved.
22907 Don't break gallery if language converter markup is inside.
22912 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22913 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22916 <ul class="gallery mw-gallery-traditional">
22917 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22918 <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>
22919 <div class="gallerytext">
22920 <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>
22924 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22925 <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>
22926 <div class="gallerytext">
22927 <p>This is a test template
22934 <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"}}'>
22935 <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>
22936 <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>
22941 T153135: Don't break list handling if language converter markup is in the item.
22943 language=zh variant=zh-cn
22945 ;-{zh-cn:AAA;zh-tw:BBB}-
22949 <dt>foo:bar</dt></dl>
22952 <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>
22953 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22957 // Note that parsoid does not protect colons unless language converter
22958 // markup is properly nested, because it is a backtracking parser.
22960 T153135: Unclosed markup in definition list (code coverage)
22962 language=zh variant=zh-cn
22967 <dl><dt><b>foo:bar</b></dt><b>
22968 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
22971 <dl><dt data-parsoid='{"dsr":[0,11,1,0]}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
22972 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22973 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22978 T153135: Nested language converter markup in definition list (code coverage)
22980 language=zh variant=zh-cn
22982 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22984 <dl><dt>AAA foo:bar bat:baz</dt>
22988 <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>
22989 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22993 # html2wt mode disabled due to <nowiki> insertion.
22995 T153140: Don't break table handling if language converter markup is in the cell.
22997 language=sr variant=sr-ec
22998 parsoid=wt2html,wt2wt,html2html
23015 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23022 Language converter tricky html2wt cases (1)
23025 parsoid=html2wt,wt2wt
23027 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23029 -{<nowiki>}-</nowiki>}-
23036 Language converter tricky html2wt cases (2)
23039 parsoid=html2wt,wt2wt
23043 <nowiki>-{foo}-</nowiki>
23045 <p>-{foo}-
23050 Language converter tricky html2wt cases (3)
23053 parsoid=html2wt,wt2wt
23055 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23056 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23057 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23063 -{<nowiki>-{foo}-</nowiki>}-
23067 </p><p>-{foo}-
23072 Language converter tricky html2wt cases (4)
23075 parsoid=html2wt,wt2wt
23077 <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>
23085 # Note that the <nowiki> escaping added by parsoid for source text,
23086 # destination text, and language names only works on the PHP side
23087 # for *destination text*. (HTML entity escaping wouldn't work
23088 # any better.) This is probably a bug, at least for source texts.
23089 # (For language names PHP uses a precise regexp based on the languages
23090 # it currently knows have variants, which is fragile since this set
23091 # can grow/shrink over time.)
23093 Language converter tricky html2wt cases (5)
23095 language=zh variant=zh-cn
23097 <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>
23098 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23099 <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>
23100 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23103 -{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
23105 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23107 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23109 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23112 !! html/php+disabled
23113 <p>foobat;xyz=>zh-cn:abc
23117 </p><p>a:b=>c 0;zh-tw:bar
23122 T179579: Nowiki and lc interaction
23129 -{123<nowiki>|</nowiki>456}-
23131 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23133 <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>
23137 T2529: Uncovered bullet
23147 T2529: Uncovered bullet in a deeply nested list
23149 *******Foo {{bullet}}
23151 <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>
23157 T2529: Uncovered table already at line-start
23180 T2529: Uncovered bullet in parser function result
23182 *Foo {{lc:{{bullet}} }}
23190 T7678: Double-parsed template argument
23192 {{lc:{{{1}}}|hello}}
23199 T7678: Double-parsed template invocation
23201 {{lc:{{paramtest {{!}} param = hello }} }}
23203 <p>{{paramtest | param = hello }}
23208 Case insensitivity of parser functions for non-ASCII characters (T10143)
23211 title=[[Main Page]]
23213 {{PRVNÍVELKÉ:ěščř}}
23214 {{prvnívelké:ěščř}}
23234 Morwen/13: Unclosed link followed by heading
23241 <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>
23246 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23253 <h1><span class="mw-headline" id="heading">heading</span></h1>
23258 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23265 <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>
23280 Paragraphs inside divs (no extra line breaks)
23292 Paragraphs inside divs (extra line break on open)
23307 Paragraphs inside divs (extra line break on close)
23322 Paragraphs inside divs (extra line break on open and close)
23338 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23339 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23341 Nesting tags, paragraphs on lines which begin with <div>
23343 <div></div><strong>A
23346 <div></div><p><strong>A
23347 </strong></p><strong></strong><p><strong>B</strong>
23356 # T8200: <blockquote> should behave like <div> with respect to line breaks
23358 T8200: paragraphs inside blockquotes (no extra line breaks)
23360 <blockquote>Line one
23362 Line two</blockquote>
23364 <blockquote>Line one
23365 Line two</blockquote>
23368 <blockquote><p>Line one
23369 Line two</p></blockquote>
23373 T8200: paragraphs inside blockquotes (extra line break on open)
23378 Line two</blockquote>
23383 Line two</blockquote>
23389 Line two</p></blockquote>
23392 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23394 T8200: paragraphs inside blockquotes (extra line break on close)
23396 <blockquote>Line one
23401 <blockquote>Line one
23407 <blockquote><p>Line one
23414 T8200: paragraphs inside blockquotes (extra line break on open and close)
23430 # FIXME: Why does/should the blockquote+div combo suppress p-wrapping here?
23432 Paragraphs inside blockquotes/divs (no extra line breaks)
23434 <blockquote><div>Line one
23436 Line two</div></blockquote>
23438 <blockquote><div>Line one
23439 Line two</div></blockquote>
23444 Paragraphs inside blockquotes/divs (extra line break on open)
23449 Line two</div></blockquote>
23454 Line two</div></blockquote>
23459 Paragraphs inside blockquotes/divs (extra line break on close)
23461 <blockquote><div>Line one
23464 </div></blockquote>
23466 <blockquote><div>Line one
23469 </div></blockquote>
23474 Paragraphs inside blockquotes/divs (extra line break on open and close)
23480 </div></blockquote>
23486 </div></blockquote>
23491 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23493 wgLinkHolderBatchSize=0
23499 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23500 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23501 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23506 Free external link invading image caption
23508 [[Image:Foobar.jpg|thumb|http://x|hello]]
23510 <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>
23513 <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>
23517 T17196: localised external link numbers
23521 [http://en.wikipedia.org/]
23523 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23526 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23530 Multibyte character in padleft
23532 {{padleft:-Hello|7|Æ}}
23537 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23541 Multibyte character in padright
23543 {{padright:Hello-|7|Æ}}
23548 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23552 formatdate parser function
23554 {{#formatdate:2009-03-24}}
23556 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23561 formatdate parser function, with default format
23563 {{#formatdate:2009-03-24|mdy}}
23565 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23570 Spacing of numbers in formatted dates
23572 {{#formatdate:January 15}}
23574 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23579 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
23581 language=nl title=[[MediaWiki:Common.css]]
23583 {{#formatdate:2009-03-24|dmy}}
23585 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23598 Edit comment with link
23602 I like the [[Main Page]] a lot
23604 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23608 Edit comment with link and link text
23612 I like the [[Main Page|best pages]] a lot
23614 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23618 Edit comment with link and link text with suffix
23622 I like the [[Main Page|best page]]s a lot
23624 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23628 Edit comment with section link (non-local, eg in history list)
23630 comment title=[[Main Page]]
23632 /* External links */ removed bogus entries
23634 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23638 Edit comment with section link and text before it (non-local, eg in history list)
23640 comment title=[[Main Page]]
23642 pre-comment text /* External links */ removed bogus entries
23644 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>
23648 Edit comment with section link (local, eg in diff view)
23650 comment local title=[[Main Page]]
23652 /* External links */ removed bogus entries
23654 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23658 Edit comment with subpage link (T16080)
23662 title=[[Subpage test]]
23664 Poked at a [[/subpage]] here...
23666 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23670 Edit comment with subpage link and link text (T16080)
23674 title=[[Subpage test]]
23676 Poked at a [[/subpage|neat little page]] here...
23678 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23682 Edit comment with bogus subpage link in non-subpage NS (T16080)
23685 title=[[Subpage test]]
23687 Poked at a [[/subpage]] here...
23689 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23693 Edit comment with bare anchor link (local, as on diff)
23697 title=[[Main Page]]
23701 <a href="#section">#section</a>
23705 Edit comment with bare anchor link (non-local, as on history)
23708 title=[[Main Page]]
23712 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23716 Anchor starting with underscore
23722 <p><a href="#_ref">One</a>
23725 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23729 Id starting with underscore
23731 <div id="_ref"></div>
23733 <div id="_ref"></div>
23738 Edit comment with link with more than one pipe (T99346)
23742 [[Main Page|Many|pipes]]
23744 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23748 Complex edit comment with link with more than one pipe (T99346)
23752 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23754 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..."
23758 Space normalisation on autocomment (T24784)
23761 title=[[Main Page]]
23763 /* __hello__world__ */
23765 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23769 percent-encoding and + signs in comments (T28410)
23773 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23775 <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>
23778 # Parsoid doesn't support this yet: see T75581
23779 # but it *should* omit the 'src' attribute if the image is bad.
23780 # PHP side of tests was disabled in
23781 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23782 # because of issues in the PHP parserTests infrastructure
23783 # (but the output below is indeed what the PHP side emits)
23785 Bad images - basic functionality
23788 !! html/php+disabled
23790 <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>
23794 Bad images - T18039: text after bad image disappears
23799 !! html/php+disabled
23805 <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>
23810 Verify that displaytitle works (T24501) no displaytitle
23814 wgAllowDisplayTitle=true
23815 wgRestrictDisplayTitle=false
23817 this is not the the title
23820 <p>this is not the the title
23825 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23830 wgAllowDisplayTitle=true
23831 wgRestrictDisplayTitle=false
23833 this is not the the title
23834 {{DISPLAYTITLE:whatever}}
23837 <p>this is not the the title
23842 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23847 wgAllowDisplayTitle=true
23848 wgRestrictDisplayTitle=true
23850 this is not the the title
23851 {{DISPLAYTITLE:whatever}}
23854 <p>this is not the the title
23859 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23864 wgAllowDisplayTitle=true
23865 wgRestrictDisplayTitle=true
23867 this is not the the title
23868 {{DISPLAYTITLE:screen}}
23871 <p>this is not the the title
23876 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23881 wgAllowDisplayTitle=false
23883 this is not the the title
23884 {{DISPLAYTITLE:screen}}
23887 <p>this is not the the title
23888 <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>
23893 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23898 wgAllowDisplayTitle=false
23900 this is not the the title
23903 <p>this is not the the title
23908 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23913 wgAllowDisplayTitle=true
23914 wgRestrictDisplayTitle=true
23916 this is not the the title
23917 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23919 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23920 <p>this is not the the title
23925 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23930 wgAllowDisplayTitle=true
23931 wgRestrictDisplayTitle=true
23933 this is not the the title
23934 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23936 <span style="color: red;">s</span>creen
23937 <p>this is not the the title
23942 Page status indicators: Empty name is invalid
23946 <indicator name=" "></indicator>
23947 <indicator></indicator>
23949 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23950 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23955 Page status indicators: Weird syntaxes that are okay
23959 <indicator name="empty" />
23960 <indicator name="name"></indicator>
23969 Page status indicators: Torture test
23973 <indicator name="01">hello world</indicator>
23974 <indicator name="02">[[Main Page]]</indicator>
23975 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23976 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23977 <indicator name="05">*foo
23979 <indicator name="06"><nowiki>foo</nowiki></indicator>
23980 <indicator name="07"> Preformatted</indicator>
23981 <indicator name="08"><div>Broken tag</indicator>
23982 <indicator name="09">{| class=wikitable
23985 <indicator name="10">Two
23987 paragraphs</indicator>
23990 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23991 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" />
23992 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>
23993 05=<ul><li>foo</li>
23997 07=<pre>Preformatted
23999 08=<div>Broken tag</div>
24001 09=<table class="wikitable">
24018 preload: check <noinclude> and <includeonly>
24022 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24028 preload: check <onlyinclude>
24032 Goodbye <onlyinclude>Hello world</onlyinclude>
24038 preload: can pass tags through if we want to
24042 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24044 <includeonly>Hello world</includeonly>
24048 preload: check that it doesn't try to do tricks
24052 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24054 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24058 Play a bit with r67090 and T5158
24060 <div style="width:50% !important"> </div>
24061 <div style="width:50% !important"> </div>
24062 <div style="width:50% !important"> </div>
24063 <div style="border : solid;"> </div>
24065 <div style="width:50% !important"> </div>
24066 <div style="width:50% !important"> </div>
24067 <div style="width:50% !important"> </div>
24068 <div style="border : solid;"> </div>
24071 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24072 <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>
24073 <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>
24074 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24079 French spaces in wikitext
24081 foo ! bar ? bat 50 % is less than 75 %.
24083 Hello : this ; is « something ‹ else › again »
24085 <p>foo ! bar ? bat 50 % is less than 75 %.
24086 </p><p>Hello : this ; is « something ‹ else › again »
24090 # It would be reasonable for Parsoid and PHP to differ here.
24091 # The PHP behavior is arguably a bug.
24093 Corner case: french spaces in definition list
24097 <dl><dt>foo </dt>
24102 T5158: Test for French spaces in attributes
24104 <br style=" clear : both ; " />
24106 <p><br style="clear : both ;" />
24111 HTML5 data attributes
24113 <span data-foo="bar">Baz</span>
24114 <p data-abc-def_hij="">Quuz</p>
24116 <p><span data-foo="bar">Baz</span>
24118 <p data-abc-def_hij="">Quuz</p>
24121 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24122 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24126 Strip reserved data attributes
24128 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24130 <div data-ok="fred">d</div>
24133 <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>
24137 percent-encoding and + signs in internal links (T28410)
24139 [[User:+%]] [[Page+title%]]
24140 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24141 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24142 [[%33%45]] [[%33%45+]]
24144 <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>
24145 <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>
24146 <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>
24147 <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>
24150 <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>
24151 <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>
24152 <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>
24153 <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>
24157 Special characters in embedded file links (T29679)
24159 [[File:Contains & ampersand.jpg]]
24160 [[File:Does not exist.jpg|Title with & ampersand]]
24162 <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>
24163 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24166 <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>
24167 <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>
24171 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24173 Text's been normalized?
24175 <p>Text's been normalized?
24180 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24182 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24184 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24189 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24191 [http://www.example.org/ ideograms]
24193 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24198 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24200 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24202 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24226 T33098 Template which includes system messages which includes the template
24230 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24231 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24236 T33490 Turkish: ucfirst 'blah'
24247 T33490 Turkish: ucfirst 'ix'
24258 T33490 Turkish: lcfirst 'BLAH'
24269 T33490 Turkish: ucfırst (with a dotless i)
24275 <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>
24280 T33490 ucfırst (with a dotless i) with English language
24286 <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>
24290 # Note that Parsoid doesn't emit an explicit TOC.
24291 # Note also that the html2wt direction tends to emit an extra newline
24292 # between the __TOC__ magicword and the first heading unless *both*
24293 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24297 T28375: TOC with italics
24299 title=[[Main Page]]
24302 ==''Lost'' episodes==
24304 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24306 <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>
24310 <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>
24313 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24314 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24318 T28375: TOC with bold
24320 title=[[Main Page]]
24323 =='''should be bold''' then normal text==
24325 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24327 <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>
24331 <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>
24334 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24335 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24339 T35845: Headings become cursive in TOC when they contain an image
24341 title=[[Main Page]]
24344 ==Image [[Image:foobar.jpg]]==
24346 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24348 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24352 <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>
24355 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24356 <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>
24360 T35845 (2): Headings become bold in TOC when they contain a blockquote
24362 title=[[Main Page]]
24365 ==<blockquote>Quote</blockquote>==
24367 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24369 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24373 <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>
24376 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24378 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24382 <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>
24384 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24385 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24389 Unclosed tags in TOC
24391 wgFragmentMode=[ 'html5', 'legacy' ]
24393 title=[[Main Page]]
24397 <small>Hanc marginis exiguitas non caperet.</small>
24400 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24402 <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>
24406 <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>
24407 <p><small>Hanc marginis exiguitas non caperet.</small>
24411 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24412 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24413 <p><small>Hanc marginis exiguitas non caperet.</small>
24418 Multiple tags in TOC
24421 ==<i>Foo</i> <b>Bar</b>==
24423 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24425 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24427 <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>
24428 <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>
24432 <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>
24433 <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>
24436 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24438 <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>
24439 <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>
24443 <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>
24444 <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>
24446 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24447 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24449 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24452 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24453 # html5 tag parsing.
24455 Tags with parameters in TOC
24460 ==<sup class="in-h2">Hello</sup>==
24462 ==<sup class="a > b">Evilbye</sup>==
24464 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24466 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24467 <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>
24471 <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>
24472 <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>
24475 <meta property="mw:PageProp/toc" />
24476 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24478 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24482 span tags with directionality in TOC
24485 ==<span dir="ltr">C++</span>==
24487 ==<span dir="rtl">זבנג!</span>==
24489 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24491 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24493 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24495 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24497 <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>
24498 <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>
24499 <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>
24500 <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>
24501 <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>
24505 <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>
24506 <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>
24507 <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>
24508 <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>
24509 <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>
24512 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24513 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24514 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24515 <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>
24516 <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>
24517 <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>
24521 T74884: bdi element in ToC
24524 ==<bdi>test</bdi>==
24526 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24528 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24532 <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>
24535 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24536 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24540 T35715: s/strike element in ToC
24543 ==<s>test</s> test <strike>test</strike>==
24545 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24547 <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>
24551 <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>
24554 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24555 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24559 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24564 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24566 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24570 <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>
24573 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24574 <h2 id="x" data-parsoid='{}'>x</h2>
24580 == {{int:headline_sample}} ==
24584 T34057: Title needed when expanding <h> nodes.
24586 title=[[Main Page]]
24590 <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>
24595 Strip marker in urlencode
24597 {{urlencode:x<nowiki/>y}}
24598 {{urlencode:x<nowiki/>y|wiki}}
24599 {{urlencode:x<nowiki/>y|path}}
24600 {{urlencode:x<pre id="one">two</pre>y}}
24628 Strip marker in formatNum
24630 {{formatnum:1<nowiki/>2}}
24631 {{formatnum:1<nowiki/>2|R}}
24639 Check noCommafy in formatNum
24643 {{formatnum:123456.78}}
24644 {{formatnum:123456.78|NOSEP}}
24652 Wrong option for formatNum (T58199)
24654 {{formatnum:1,234.56|Random}}
24655 {{formatnum:1,234.56|EVERYTHING}}
24656 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24665 Strip marker in grammar
24669 {{grammar:elative|foo<nowiki/>bar}}
24676 Strip marker in padleft
24678 {{padleft:|2|x<nowiki/>y}}
24685 Strip marker in padright
24687 {{padright:|2|x<nowiki/>y}}
24694 Strip marker in anchorencode
24696 {{anchorencode:x<nowiki/>y}}
24701 <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>
24705 nowiki inside link inside heading (T20295)
24707 ==[[foo|x<nowiki>y</nowiki>z]]==
24709 <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>
24714 new support for bdi element (T33817)
24716 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24718 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24723 Ignore pipe between table row attributes
24727 |- id=foo | style='color: red'
24735 <tr id="foo" style="color: red">
24742 Language parser function
24751 Padleft and padright (default 0-padding)
24760 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24761 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24765 Padleft and padright (partial fill)
24767 {{padleft:xyz|6|ab}}
24768 {{padright:xyz|6|ab}}
24774 <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>
24775 <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>
24779 Padleft and padright as substr
24781 {{padleft:|3|abcde}}
24782 {{padright:|3|abcde}}
24788 <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>
24789 <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>
24793 Padleft and padright with non-numerical length (T180403)
24795 {{padleft:abcdef|junk}}
24796 {{padright:abcdef|junk}}
24804 Special parser function
24806 {{#special:RandomPage}}
24807 {{#special:BaDtItLe}}
24808 {{#special:Foobar}}
24817 T36939 - Case insensitive link parsing ([HttP://])
24819 [HttP://MediaWiki.Org/]
24821 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24824 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24828 T36939 - Case insensitive link parsing ([HttP:// title])
24830 [HttP://MediaWiki.Org/ MediaWiki]
24832 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24837 T36939 - Case insensitive link parsing (HttP://)
24839 HttP://MediaWiki.Org/
24841 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24844 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24862 <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>
24863 <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>
24864 <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>
24865 <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>
24866 <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>
24872 ### Parsoid-specific tests
24873 ### Parsoid-PHP parser incompatibilities
24876 1. SOL-sensitive wikitext tokens as template-args
24878 parsoid=wt2html,wt2wt
24884 <span about="#mwt1" typeof="mw:Transclusion">
24885 </span><ul about="#mwt1"><li>a</li>
24887 <span about="#mwt2" typeof="mw:Transclusion">
24888 </span><ol about="#mwt2"><li>a</li>
24890 <span about="#mwt3" typeof="mw:Transclusion">
24891 </span><dl about="#mwt3"><dd>a</dd>
24895 #### -----------------------------------------------------------------
24896 #### Parsoid-specific functionality tests
24897 #### -----------------------------------------------------------------
24899 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24900 # We know wt2wt will fail, but we expect selser to pass.
24901 # Due to the nature of our testing, wt2wt and selser tests will enter the
24902 # blacklist and we'll catch selser regressions based on changes to the
24903 # blacklist entries for selser tests.
24905 1. Bad treebuilder fixup of formatting elt is cleaned up
24907 parsoid=wt2html,wt2wt
24912 [[Image:Foobar.jpg|right|Test]]
24919 <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>
24926 2. Bad treebuilder fixup of formatting elt is cleaned up
24928 parsoid=wt2html,wt2wt
24930 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24932 <small>[[Image:Foobar.jpg|right|300px]]</small>
24936 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><b>caption</b></figcaption></figure>
24938 <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>
24942 3. Bad treebuilder fixup of formatting elt is cleaned up
24944 parsoid=wt2html,wt2wt
24946 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24948 <p><small><b>foo</b></small></p>
24949 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><small><b>caption</b></small></figcaption></figure>
24950 <p><small><b>bar</b></small></p>
24954 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24956 parsoid=wt2html,wt2wt
24958 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24960 <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>
24963 #### ----------------------------------------------------------------
24964 #### Parsoid-only testing of Parsoid's impl of LST
24965 #### Not implemented yet, see
24966 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24967 #### ----------------------------------------------------------------
24969 ## We still need to support serializing the older format while content is stored.
24971 LST Sections: Backwards compatibility
24974 "suppressErrors": true,
24975 "modes": ["html2wt"]
24978 <section begin="2011-05-16" />
24979 <section end="2014-04-10 (MW 1.23wmf22)" />
24981 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24982 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24986 LST Sections: Newfangled approach
24988 <section begin="2011-05-16" />
24989 <section end="2014-04-10 (MW 1.23wmf22)" />
24991 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24993 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24997 #--------- Test stripping of empty nodes in template content ----------
25000 Empty LI and TR nodes should be stripped from template content
25005 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
25009 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
25022 Empty LI and TR nodes should not be stripped from top-level content
25036 <li class='mw-empty-elt'></li>
25041 <tr class='mw-empty-elt'></tr>
25050 Empty TR nodes should not be stripped if they have any attributes set
25052 {{EmptyTRWithHTMLAttrTest}}
25054 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
25055 <tr align='center'></tr>
25056 <tr><td>foo</td></tr>
25057 <tr align='center'></tr>
25058 <tr><td>bar</td></tr>
25062 #### ----------------------------------------------------------------
25063 #### The following section of tests are primarily to test
25064 #### wikitext escaping capabilities of Parsoid. Given that
25065 #### escaping can be done any number of ways, the wikitext (input)
25066 #### is always adjusted to reflect how Parsoid adds nowiki
25069 #### We are marking several tests as parsoid-only since the
25070 #### HTML in the result section is different from what the
25071 #### PHP parser generates for it.
25072 #### ----------------------------------------------------------------
25075 #### --------------- Headings ---------------
25077 #### 1. Nested inside html <h1>=foo=</h1>
25078 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25079 #### 3. Nested inside html with wikitext split by html tags
25080 #### 4. No escape needed
25081 #### 5. Empty headings <h1></h1>
25082 #### 6. Heading chars in SOL context
25083 #### ----------------------------------------
25085 Headings: 0. Unnested
25095 <p>=foo<i>a</i>=</p>
25097 <nowiki>=foo=</nowiki>
25099 <nowiki> </nowiki>=foo=
25101 <nowiki>=foo=</nowiki>
25103 =foo''a''<nowiki>=</nowiki>
25106 # New headings and existing headings are handled differently
25108 Headings: 1. Nested inside html
25116 <h1 data-parsoid=''>=foo=</h1>
25117 <h2 data-parsoid=''>=foo=</h2>
25118 <h3 data-parsoid=''>=foo=</h3>
25119 <h4 data-parsoid=''>=foo=</h4>
25120 <h5 data-parsoid=''>=foo=</h5>
25121 <h6 data-parsoid=''>=foo=</h6>
25129 =<nowiki>=foo=</nowiki>=
25130 ==<nowiki>=foo=</nowiki>==
25131 ===<nowiki>=foo=</nowiki>===
25132 ====<nowiki>=foo=</nowiki>====
25133 =====<nowiki>=foo=</nowiki>=====
25134 ======<nowiki>=foo=</nowiki>======
25139 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25148 <nowiki>*</nowiki>bar
25154 <nowiki>=bar=</nowiki>
25158 Headings: 3. Nested inside html with wikitext split by html tags
25162 <h1>=<b>bold</b>foo=</h1>
25164 = ='''bold'''foo= =
25168 Headings: 4a. No escaping needed (testing just h1 and h2)
25179 <h1><i>=</i>foo=</h1>
25199 Headings: 4b. No escaping needed (inside p-tags)
25216 Headings: 4c. Short headings (1)
25223 <nowiki>===</nowiki>
25229 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25231 Headings: 4d. Short headings (2)
25233 parsoid=wt2html,html2html
25244 <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>
25245 <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>
25246 <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>
25251 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25252 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25253 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25257 Headings: 5. Empty headings
25261 <h1 data-parsoid='{}'></h1>
25263 <h2 data-parsoid='{}'></h2>
25265 <h3 data-parsoid='{}'></h3>
25267 <h4 data-parsoid='{}'></h4>
25269 <h5 data-parsoid='{}'></h5>
25271 <h6 data-parsoid='{}'></h6>
25281 =====<nowiki/>=====
25283 ======<nowiki/>======
25287 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25297 <nowiki>=a=</nowiki>
25299 <nowiki>=a=</nowiki>
25301 <nowiki>=a=</nowiki>
25305 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25318 <nowiki>=a=</nowiki>
25321 <nowiki>=a=</nowiki>
25324 <nowiki>=a=</nowiki>
25329 Headings: 6c. Heading chars in SOL context (leading newline break)
25337 <nowiki>=b=</nowiki>
25341 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25345 <!--c0--><p>=a=</p>
25347 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25349 <!--c0--><nowiki>=a=</nowiki>
25351 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25355 Headings: 6d. Heading chars in SOL context (No escaping needed)
25365 Headings: 7. Insert a newline between new content and headings
25371 <h2 data-parsoid='{}'>A</h2>
25372 <p data-parsoid='{}'>a</p>
25383 Headings: Used as horizontal rule
25385 wgFragmentMode=[ 'html5', 'legacy' ]
25391 <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>
25394 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25397 #### --------------- Lists ---------------
25398 #### 0. Outside nests (*foo, etc.)
25399 #### 1. Nested inside html <ul><li>*foo</li></ul>
25400 #### 2. Inside definition lists
25401 #### 3. Only bullets at start should be escaped
25402 #### 4. No escapes needed
25403 #### 5. No unnecessary escapes
25404 #### 6. Escape bullets in SOL position
25405 #### 7. Escape bullets in a multi-line context
25406 #### ----------------------------------------
25409 Lists: 0. Outside nests
25419 <nowiki>*</nowiki>foo
25421 <nowiki>#</nowiki>foo
25423 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25426 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25427 ## to test wikitext escaping, and insignificant whitespace diffs
25428 ## cause PHP parser tests to barf
25430 Lists: 1. Nested inside html (No unnecessary escapes)
25439 <li data-parsoid='{}'>*foo</li>
25440 <li data-parsoid='{}'>#foo</li>
25441 <li data-parsoid='{}'>:foo</li>
25442 <li data-parsoid='{}'>;foo</li>
25450 <li data-parsoid='{}'>*foo</li>
25451 <li data-parsoid='{}'>#foo</li>
25452 <li data-parsoid='{}'>:foo</li>
25453 <li data-parsoid='{}'>;foo</li>
25460 *<nowiki>*foo</nowiki>
25461 *<nowiki>#foo</nowiki>
25462 *<nowiki>:foo</nowiki>
25463 *<nowiki>;foo</nowiki>
25469 #<nowiki>*foo</nowiki>
25470 #<nowiki>#foo</nowiki>
25471 #<nowiki>:foo</nowiki>
25472 #<nowiki>;foo</nowiki>
25476 Lists: 2. Inside definition lists
25480 <dl><dt>;foo</dt></dl>
25481 <dl><dt>:foo</dt></dl>
25484 <dl><dd>:foo</dd></dl>
25488 ; <nowiki>:foo</nowiki>
25490 ; <nowiki>:foo</nowiki>
25497 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25503 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25507 *<nowiki>*foo</nowiki>''it''*bar
25511 Lists: 4. No escapes needed
25524 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25528 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25542 Lists: 5. No unnecessary escapes
25546 <ul><li> bar <span>[[foo]]</span></li></ul>
25547 <ul><li> =bar <span>[[foo]]</span></li></ul>
25548 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25549 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25550 <ul><li> =bar <span>foo]]</span>=</li></ul>
25551 <ul><li> <s></s>: a</li></ul>
25552 <ul><li> <i>* foo</i></li></ul>
25555 * bar <span><nowiki>[[foo]]</nowiki></span>
25557 * =bar <span><nowiki>[[foo]]</nowiki></span>
25559 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25561 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25563 * =bar <span>foo]]</span>=
25571 Lists: 6. Escape bullets in SOL position
25575 <p><!--cmt-->*foo</p>
25577 <!--cmt--><nowiki>*</nowiki>foo
25581 Lists: 7. Escape bullets in a multi-line context
25590 <nowiki>*</nowiki>b
25594 Lists: 8. Escape colons only if not present in tags
25598 <dl><dt>a:b<i>c:d</i></dt></dl>
25600 ; <nowiki>a:b</nowiki>''c:d''
25603 #### --------------- HRs ---------------
25604 #### 1. Single line
25605 #### -----------------------------------
25608 HRs: 1. Single line
25616 ----<nowiki>----</nowiki>
25621 #### --------------- Tables ---------------
25622 #### 1a. Simple example
25623 #### 1b. No escaping needed (!foo)
25624 #### 1c. No escaping needed (|foo)
25625 #### 1d. No escaping needed (|}foo)
25627 #### 2a. Nested in td (<td>foo|bar</td>)
25628 #### 2b. Nested in td (<td>foo||bar</td>)
25629 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25631 #### 3a. Nested in th (<th>foo!bar</th>)
25632 #### 3b. Nested in th (<th>foo!!bar</th>)
25633 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25637 #### 4c. No escaping needed
25638 #### --------------------------------------
25641 Tables: 1a. Simple example
25649 <nowiki>{|</nowiki>
25654 Tables: 1b. No escaping needed
25665 Tables: 1c. No escaping needed
25676 Tables: 1d. No escaping needed
25687 Tables: 2a. Nested in td
25692 <td>foo|bar</td></tr>
25693 <tr><td>x<div>a|b</div></td>
25697 |<nowiki>foo|bar</nowiki>
25699 |x<div><nowiki>a|b</nowiki></div>
25707 <td>x<div>a|b</div>
25708 </td></tr></tbody></table>
25712 Tables: 2b. Nested in td
25718 <td>a<i>b||c</i></td>
25719 <td>a<i><div>b||c</div></i></td>
25720 </tr></tbody></table>
25723 |<nowiki>foo||bar</nowiki>
25724 |a''<nowiki>b||c</nowiki>''
25725 |a''<div><nowiki>b||c</nowiki></div>''
25734 <td>a<i><div>b||c</div></i>
25740 Tables: 2c. Nested in td -- no escaping needed
25756 Tables: 3a. Nested in th
25772 Tables: 3b. Nested in th
25777 <tr><th>foo!!bar</th>
25778 <th><i>foo|bar</i></th>
25779 <th><i>foo!!bar</i></th>
25780 <th><i><span>foo!!bar</span></i></th>
25781 </tr></tbody></table>
25784 !<nowiki>foo!!bar</nowiki>
25785 !''<nowiki>foo|bar</nowiki>''
25786 !''<nowiki>foo!!bar</nowiki>''
25787 !''<span><nowiki>foo!!bar</nowiki></span>''
25796 <th><i>foo!!bar</i>
25798 <th><i><span>foo!!bar</span></i>
25804 Tables: 3c. Nested in th
25809 <tr><th>foo||bar</th>
25810 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25811 </tr></tbody></table>
25814 !<nowiki>foo||bar</nowiki>
25815 !<nowiki>foo||bar</nowiki>
25828 Tables: 4a. Escape -
25844 |<nowiki>-bar</nowiki>
25849 Tables: 4b. Escape +
25865 |<nowiki>+bar</nowiki>
25870 Tables: 4c. No escaping needed
25875 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25876 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25882 <div>a|b</div></td>
25927 Tables: 4d. No escaping needed
25932 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25933 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25934 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25945 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25955 Tables: 5. Empty table cells should get whitespace to avoid need for nowikis
25959 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
25961 <table><tr><td></td><td align="center"></td><td></td></tr></table>
25963 <table><tr><td></td><td align="center" data-parsoid='{"stx":"row", "startTagSrc":"{{!}}{{!}}"}'></td><td data-parsoid='{"stx":"row"}'></td></tr></table>
25965 <table><tr><th></th><th align="center" data-parsoid='{"stx":"row"}'></th><th data-parsoid='{"stx":"row"}'></th></tr></table>
25968 | || align="center" | ||
25978 | {{!}}{{!}} align="center" | ||
25982 ! !! align="center" | !!
25988 <td align="center"></td>
25990 </td></tr></tbody></table>
25995 <td align="center">
25998 </td></tr></tbody></table>
26002 <td align="center"></td>
26004 </td></tr></tbody></table>
26008 <th align="center"></th>
26010 </th></tr></tbody></table>
26014 T97430: Don't emit empty nowiki pairs around marker meta tags
26018 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26019 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
26021 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
26022 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
26026 Unclosed xmlish element in table line shouldn't eat end delimiters
26031 <tbody><tr><td> <foo</td>
26032 <td> bar></td></tr>
26049 #### --------------- Links ----------------
26050 #### 1. Quote marks in link text
26051 #### 2. Wikilinks: Escapes needed
26052 #### 3. Wikilinks: No escapes needed
26053 #### 4. Extlinks: Escapes needed
26054 #### 5. Extlinks: No escapes needed
26055 #### --------------------------------------
26057 Links 1. WikiLinks: No escapes needed
26061 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
26062 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
26063 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
26067 [[Foo|x [Foobar] x]]
26069 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
26070 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
26071 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
26076 Links 2. WikiLinks: Escapes needed
26080 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
26081 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
26082 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
26083 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
26084 <a href="Foo" rel="mw:WikiLink">|Bar</a>
26085 <a href="Foo" rel="mw:WikiLink">]]bar</a>
26086 <a href="Foo" rel="mw:WikiLink">[[bar</a>
26087 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
26088 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
26089 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
26091 [[Foo|<nowiki>Foobar]</nowiki>]]
26092 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
26093 [[Foo|<nowiki>[[Bar]]</nowiki>]]
26094 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
26095 [[Foo|<nowiki>|Bar</nowiki>]]
26096 [[Foo|<nowiki>]]bar</nowiki>]]
26097 [[Foo|<nowiki>[[bar</nowiki>]]
26098 [[Foo|<nowiki>x [[ y</nowiki>]]
26099 [[Foo|<nowiki>x ]] y</nowiki>]]
26100 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
26102 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
26103 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
26104 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
26105 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
26106 <a href="/wiki/Foo" title="Foo">|Bar</a>
26107 <a href="/wiki/Foo" title="Foo">]]bar</a>
26108 <a href="/wiki/Foo" title="Foo">[[bar</a>
26109 <a href="/wiki/Foo" title="Foo">x [[ y</a>
26110 <a href="/wiki/Foo" title="Foo">x ]] y</a>
26111 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
26116 Links 3. WikiLinks: No escapes needed
26120 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
26121 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
26126 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
26127 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26132 Links 4. ExtLinks: Escapes needed
26136 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26137 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26138 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26139 <p>[http://google.com]</p>
26140 <p>[http://google.com google]</p>
26141 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26142 <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>
26144 [http://google.com <nowiki>[google]</nowiki>]
26145 [http://google.com <nowiki>google]</nowiki>]
26146 [http://google.com <nowiki>goog] le</nowiki>]
26148 <nowiki>[http://google.com]</nowiki>
26150 <nowiki>[http://google.com google]</nowiki>
26152 [http://google.com<nowiki>]</nowiki>
26154 [{{echo|http://google.com}}<nowiki>]</nowiki>
26156 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26157 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26158 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26159 </p><p>[http://google.com]
26160 </p><p>[http://google.com google]
26161 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26162 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26167 Links 5. ExtLinks: No escapes needed
26171 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26172 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26174 [http://google.com [google]
26176 [[http://google.com]]
26178 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26179 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26184 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26188 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26189 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26190 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26191 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26192 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26193 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26194 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26195 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26196 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26197 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26198 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26199 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26200 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26203 x<nowiki/>http://example.com<nowiki/>y
26204 http://example.com<nowiki/>?x
26205 http://example.com<nowiki/>&x
26206 http://example.com<nowiki/>'x
26207 http://example.com<nowiki/>,x
26208 http://example.com<nowiki/>.x
26209 http://example.com<nowiki/>;x
26210 http://example.com<nowiki/>:x
26211 http://example.com<nowiki/>;x
26212 http://example.com<nowiki/>!x
26213 http://example.com<nowiki/>=x
26214 http://example.com<nowiki/>(x)
26215 http://example.com(x<nowiki/>)
26219 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26224 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26226 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26227 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26228 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26229 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26230 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26236 "http://example.com"
26237 (http://example.com)
26238 (http://example.com) foo
26239 http://example.com,
26240 http://example.com, foo
26243 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26245 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26246 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26247 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26248 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26249 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26254 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26258 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26259 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26261 http://example.com.,;:!?\
26262 -http://example.com:
26264 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26265 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26270 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26274 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26275 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26276 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26280 X<nowiki/>RFC 123<nowiki/>y
26284 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26288 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26289 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26290 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26297 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26298 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26299 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26304 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26308 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26309 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26310 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26314 X<nowiki/>PMID 123<nowiki/>y
26318 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26322 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26323 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26324 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26331 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26332 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26333 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26338 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26342 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26343 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26344 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26347 ISBN 1234567890<nowiki/>1
26348 ISBN 1234567890<nowiki/>x
26349 a<nowiki/>ISBN 1234567890<nowiki/>b
26353 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26357 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26361 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26366 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26370 <p>this is not a link: http://example.com
26373 this is not a link: <nowiki>http://example.com</nowiki>
26377 Links 15. Link trails can't become link prefixes.
26382 <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>
26384 [[Söfnuður]]-[[00]]
26386 <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>
26390 #### --------------- Quotes ---------------
26391 #### 1. Quotes inside <b> and <i>
26392 #### 2. Link fragments separated by <i> and <b> tags
26393 #### 3. Link fragments inside <i> and <b>
26394 #### 4. No escaping needed
26395 #### --------------------------------------
26397 1a. Quotes inside <b> and <i>
26408 <b>foo'<i>bar'</i>baz</b>
26417 <i>fools'<span> errand</span></i>
26418 <i><span>fool</span>'s errand</i>
26419 '<i>foo</i> bar '<i>baz</i>
26420 a|!*#-:;+-~[]{}b'<i>x</i>
26424 ''<nowiki>''foo''</nowiki>''
26425 ''<nowiki>'''foo'''</nowiki>''
26427 '''<nowiki/>'foo''''
26428 '''<nowiki>''foo''</nowiki>'''
26429 '''<nowiki>'''foo'''</nowiki>'''
26430 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26431 '''foo'''<nowiki/>'s
26437 '''foo'''<nowiki/>'
26438 ''''foo'''<nowiki/>'
26439 ''fools'<span> errand</span>''
26440 ''<span>fool</span>'s errand''
26441 '<nowiki/>''foo'' bar '''baz''
26442 a|!*#-:;+-~[]{}b'''x''
26446 1b. Quotes inside <b> and <i> with other tags on same line
26450 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26451 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26452 <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>
26453 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26454 '<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>
26455 '<i>foo</i> <div title="name">test</div>
26456 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26457 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26458 <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>
26461 '''a'' foo ''[[bar]]''
26462 ''a''' foo ''[[bar]]''
26463 ''a''' foo '''{{echo|[[bar]]}}'''
26464 [[foo]] x'''[[bar]]''
26465 '''foo'' <ref>test</ref>
26466 '''foo'' <div title="name">test</div>
26467 '''foo'' and <br> bar
26472 2. Link fragments separated by <i> and <b> tags
26476 <p>[[<i>foo</i>hello]]</p>
26477 <p>[[<b>foo</b>hello]]</p>
26479 [[''foo''<nowiki>hello]]</nowiki>
26481 [['''foo'''<nowiki>hello]]</nowiki>
26484 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26485 # this is one of the shortcomings of this format
26487 3. Link fragments inside <i> and <b>
26491 <p><i>[[foo</i>]]</p>
26492 <p><b>[[foo</b>]]</p>
26494 ''[[foo''<nowiki>]]</nowiki>
26496 '''[[foo'''<nowiki>]]</nowiki>
26500 4. No escaping needed
26504 <p>'<span><i>bar</i></span>'
26505 '<span><b>bar</b></span>'
26509 '<span>''bar''</span>'
26510 '<span>'''bar'''</span>'
26514 #### ----------- Paragraphs ---------------
26515 #### 1. No unnecessary escapes
26516 #### --------------------------------------
26519 1. No unnecessary escapes
26523 <p>bar <span>[[foo]]</span>
26524 </p><p>=bar <span>[[foo]]</span>
26525 </p><p>[[bar <span>[[foo]]</span>
26526 </p><p>]]bar <span>[[foo]]</span>
26527 </p><p>=bar <span>foo]]</span>=
26530 bar <span><nowiki>[[foo]]</nowiki></span>
26532 =bar <span><nowiki>[[foo]]</nowiki></span>
26534 [[bar <span><nowiki>[[foo]]</nowiki></span>
26536 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26538 =bar <span>foo]]</span><nowiki>=</nowiki>
26541 #### ----------------------- PRE --------------------------
26543 1. Leading whitespace in SOL context should be escaped
26566 <nowiki> </nowiki>a
26568 <nowiki> </nowiki> a
26572 <nowiki> </nowiki> a
26574 <nowiki> </nowiki>a
26577 <nowiki> </nowiki>b
26600 2. Leading whitespace in non-indent-pre contexts should not be escaped
26604 <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>
26605 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26606 <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>
26616 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26635 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26639 <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>
26641 [[File:Foobar.jpg|thumb|caption]]
26645 5. Nowiki escaping should account for indent-pres
26655 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26669 Whitespace scrubbing in SOL position should account for SOL-sensitive wikitext markup
26672 "modes": ["html2wt"],
26673 "scrubWikitext": true
26681 <p><link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}"> *foo</p>
26682 <p> <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid="{}">*foo</p>
26683 <p> <!--boo-->*foo</p>
26684 <p><!--boo--> *foo</p>
26685 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> foo</p>
26686 <p><!--a--> <!--b--> <!--c--> <!--d--> <!--e--> *foo</p>
26702 <nowiki>*</nowiki>foo
26704 <nowiki/><!--boo-->*foo
26706 <!--boo--><nowiki/>*foo
26708 <!--a--><!--b--><!--c--><!--d--><!--e-->foo
26710 <!--a--><nowiki/><!--b--><!--c--><!--d--><!--e-->*foo
26713 #### --------------- Behavior Switches --------------------
26716 1. Valid behavior switches should be escaped
26723 <nowiki>__TOC__</nowiki>
26724 ''<nowiki>__TOC__</nowiki>''
26728 2. Invalid behavior switches should not be escaped
26739 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26741 Behavior switches should be SOL-transparent
26745 <meta property="mw:PageProp/toc" />
26747 <!-- this one's bogus -->
26750 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26752 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26756 <!-- this one's bogus -->
26765 #### --------------- HTML tags ---------------
26768 #### 3. multi-line html tag
26769 #### 4. extension tags
26770 #### -----------------------------------------
26776 <a href="http://google.com">google</a>
26778 <a href="http://google.com">google</a>
26786 <ul><li> <div>foo</div></li>
26787 <li> <div style="color:red">foo</div></li>
26788 <li> <td></li></ul>
26791 * <nowiki><div>foo</div></nowiki>
26792 * <nowiki><div style="color:red">foo</div></nowiki>
26793 * <nowiki><td></nowiki>
26797 3. multi-line html tag
26816 <p><ref>foo</ref>
26817 </p><p><ref>bar
26818 </p><p>baz</ref>
26821 <nowiki><ref>foo</ref></nowiki>
26823 <nowiki><ref>bar</nowiki>
26825 baz<nowiki></ref></nowiki>
26829 Parsoid: newline inducing block nodes don't suppress <nowiki>
26835 <nowiki> </nowiki>a
26840 #### --------------- Others ---------------
26846 <p><nowiki>foo</nowiki>
26849 <nowiki>foo</nowiki>
26852 ## The quote-char in the input is necessary for triggering the bug
26854 (T54035) Nowiki-escaping should not get tripped by " :" in text
26863 #----------- End of wikitext escaping tests --------------
26867 Tag-like HTML structures are passed through as text
26889 </p><p>1<d e>f
26894 HTML tag with necessary entities in attributes
26896 <span title="&amp;">foo</span>
26898 <p><span title="&amp;">foo</span>
26903 HTML tag with 'unnecessary' entity encoding in attributes
26905 <span title="&">foo</span>
26907 <p><span title="&">foo</span>
26912 HTML tag with broken attribute value quoting
26914 parsoid=wt2html,html2html
26916 <span title="Hello world>Foo</span>
26918 <p><span title="Hello world">Foo</span>
26921 <p><span title="Hello world">Foo</span></p>
26925 Self-closed tag with broken attribute value quoting
26927 parsoid=wt2html,html2html
26929 <div title="Hello world />Foo
26931 <div title="Hello world"></div><p>Foo
26934 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26938 Table with broken attribute value quoting
26940 parsoid=wt2html,html2html
26943 | title="Hello world|Foo
26948 <td title="Hello world">Foo
26954 <td title="Hello world">Foo
26960 Table with broken attribute value quoting on consecutive lines
26962 parsoid=wt2html,html2html
26965 | title="Hello world|Foo
26966 | style="color:red|Bar
26971 <td title="Hello world">Foo
26973 <td style="color:red">Bar
26979 <td title="Hello world">Foo
26980 </td><td style="color: red">Bar
26981 </td></tr></tbody></table>
26986 Accept empty td cell attribute
26989 | align="center" |foo|| |
26994 <td align="center">foo</td>
27001 Non-empty attributes in th-cells
27004 !Foo!! style="color: red" |Bar
27010 <th style="color: red">Bar
27016 Accept empty attributes in th-cells
27031 Empty table rows go away
27052 ### Parsoid-centric tests for testing RTing of inter-element separators
27053 ### Edge cases not tested by existing parser tests and specific to
27054 ### Parsoid-specific serialization strategies.
27058 RT-ed inter-element separators should be valid separators
27070 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
27074 # Parsoid-only test of a DOM pass
27076 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
27088 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
27089 <p>bar</p></small></td></tr>
27093 <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>
27097 # Note that the "style" attribute is really a template parameter here.
27098 # The = would have to be {{=}} if you wanted the literal.
27100 Empty TD followed by TD with tpl-generated attribute
27105 |{{echo|style='color:red'}}|foo
27119 Indented table with an empty td
27137 ## We have some newline diffs RT-ing this edge case
27138 ## and it is not important enough -- we seem to be emitting
27139 ## at most 2 newlines after a </tr> and this is unrelated to
27140 ## the issue from T85627 that this is testing.
27142 Indented table with blank lines in between (T85627)
27161 Indented block & table
27175 <div data-parsoid='{"stx":"html"}'>foo</div>
27177 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27182 Indent and comment before table row
27197 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27198 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27202 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27204 Empty TR followed by a template-generated TR
27210 {{echo|<tr><td>foo</td></tr>}}
27215 <tr class='mw-empty-elt'></tr>
27216 <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}}]}'>
27221 ## PHP and parsoid output differ for this, and since this is primarily
27222 ## for testing Parsoid's serializer, marking this Parsoid only
27224 Empty TR followed by mixed-ws-comment line should RT correctly
27237 <tr class='mw-empty-elt'></tr>
27240 <!--c--> </tr><!--d-->
27246 Multi-line image caption generated by templates with/without trailing newlines
27248 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27249 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27251 <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>
27252 <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>
27256 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27260 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27262 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27264 <includeonly>foo</includeonly>
27272 ## PHP emits broken html for this, and since this is primarily
27273 ## a Parsoid serializer test, marking this Parsoid only
27275 Improperly nested inline or quotes tags with whitespace in between
27277 <span> <s>x</span> </s>
27280 <p><span> <s>x</s></span><s> </s>
27281 <b> <i>x</i></b><i> </i>
27286 Encapsulate protected attributes from wt
27288 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27290 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27294 <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>
27296 <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">
27297 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'>ok</td></tr>
27301 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27302 ## Having nested or stray pre tags results in the attempt to add duplicates,
27303 ## causing an assertion fail. This test tries to prevent that situation.
27305 Ensure ParagraphWrapper can deal with stray closing pre tags
27315 1. Ensure fostered text content is wrapped in element nodes
27319 <table>hi</table><table>ho</table>
27321 hi<table></table>ho<table></table>
27323 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>hi</span><table data-parsoid='{"stx":"html"}'></table><span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'>ho</span><table data-parsoid='{"stx":"html"}'></table>
27327 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27329 parsoid=wt2html,wt2wt
27339 </td></tr></tbody></table>
27341 <span data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true}'> || ||
27342 </span><table data-parsoid='{"stx":"html"}'>
27343 <tbody><tr data-parsoid='{"stx":"html","autoInsertedEnd":true}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true}'> a
27344 </td></tr></tbody></table>
27348 Encapsulation properly handles null DSR information from foster box
27350 parsoid=wt2html,wt2wt
27352 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27354 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>foo<tr><td>bar</td></tr></table>"}},"i":0}}]}">foo</span><table><tbody><tr><td>bar</td></tr></tbody></table>
27358 1. Encapsulate foster-parented transclusion content
27360 parsoid=wt2wt,wt2html
27362 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27364 foo<table><tbody><tr><td>bar</td></tr></tbody></table>
27366 <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<tr><td>bar</td></tr>"}},"i":0}},"</table>"]}'>foo</span><table about="#mwt2" data-parsoid='{"stx":"html}'><tbody><tr><td>bar</td></tr></tbody></table>
27370 2. Encapsulate foster-parented transclusion content
27372 parsoid=wt2wt,wt2html
27374 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27376 <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>
27387 3. Encapsulate foster-parented transclusion content
27389 parsoid=wt2wt,wt2html
27391 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27393 <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>"]}">
27406 4. Encapsulate foster-parented transclusion content
27408 parsoid=wt2wt,wt2html
27410 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27412 <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>"]}">
27425 5. Encapsulate foster-parented transclusion content
27427 parsoid=wt2wt,wt2html
27429 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27431 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27433 <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}'>foo</span><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table>
27437 6. Encapsulate foster-parented transclusion content
27439 parsoid=wt2wt,wt2html
27441 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27443 foo<table><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p>ok</p>
27445 <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}'>foo</span><table about="#mwt2" data-parsoid='{"stx":"html"}'><tbody><tr><td><div><p>foo</p></div></td></tr></tbody></table><p data-parsoid='{"stx":"html"}'>ok</p>
27449 7. Encapsulate foster-parented transclusion content
27451 parsoid=wt2wt,wt2html
27453 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27455 <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>
27465 # Note that the wt is broken on purpose: the = should be {{=}} if you
27466 # don't want it to be a template parameter key.
27468 8. Encapsulate foster-parented transclusion content
27470 parsoid=wt2wt,wt2html
27473 }}{|{{echo|style='color:red'}}
27484 </td></tr></tbody></table>
27486 <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">
27487 </span><span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE","pi":[[{"k":"style","named":true}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"style":{"wt":"'color:red'"}},"i":0}},"\n|-\n|b\n|}"]}'>{{{1}}}</span><table about="#mwt3">
27490 </td></tr></tbody></table>
27494 9. Encapsulate foster-parented transclusion content
27496 parsoid=wt2wt,wt2html
27498 <table>{{echo|hi</table>hello}}
27500 hi<table></table><p>hello
27503 <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"firstWikitextNode":"TABLE_html","pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi</table>hello"}},"i":0}}]}'>hi</span><table about="#mwt2"></table><p about="#mwt2">hello</p>
27507 Table in fosterable position
27518 <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">
27520 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27526 # Parsoid only for T66747
27528 Properly encapsulate empty-content transclusions in fosterable positions
27536 <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"}]]}'>
27542 Always encapsulate foster box when template range is expanded to table
27555 T115289: Unclosed table
27557 {{echo|<table>}}<!--c-->[[Category:Two]]
27559 <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>
27563 T115289: Don't migrate newlines out of tables with fostered content
27565 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27567 <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>
27571 T73074: More fostering fun
27573 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27575 <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>
27579 Support <object> element with .data attribute
27583 <object data="test.swf"></object>
27585 <object data="test.swf"></object>
27589 Don't block XML namespace declaration
27591 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27593 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27596 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27599 # -----------------------------------------------------------------
27600 # The following section of tests are primarily to spec requirements
27601 # around Parsoid's serialization (old, new, edited content)
27603 # All these tests are marked Parsoid html2wt and html2html only
27604 # ----------------------------------------------------------------
27607 Ignore rel attribute in a-tags during serialization to url-links
27611 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27612 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27613 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27615 http://en.wikipedia.org/wiki/Foobar
27616 http://en.wikipedia.org/wiki/Foobar
27617 http://en.wikipedia.org/wiki/Foobar
27620 # 'mi' is a localinterwiki prefix as well as a language
27622 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27626 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27632 Parsoid should accept interwiki shortcuts
27636 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27637 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27638 <a href='./fr:Foo'>Foo</a></p>
27639 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27640 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27641 <a href='fr%3AFoo'>Foo</a></p>
27642 <p><a href='FR%3AFoo'>Foo</a>
27643 <a href='./FR:Foo'>Foo</a></p>
27658 Parsoid should not accept invalid interwiki shortcuts
27662 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27663 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27664 <a href='news:Foo'>Foo</a></p>
27673 New wikilinks should be serialized properly
27677 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27678 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27679 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27680 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27681 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27685 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27686 http://en.wikipedia.org/wiki/Foo
27687 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27691 New wiki links (href variations)
27695 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27696 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27697 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27698 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27703 [[Toxine bactérienne]]
27707 New wiki links (content string variations)
27711 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27712 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27713 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27717 [[Foo_bar|./Foo_bar]]
27721 New category links (href variations)
27725 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27726 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27727 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27729 [[Category:Toxine bactérienne]]
27730 [[Category:Toxine bactérienne]]
27731 [[Category:Toxine bactérienne]]
27735 New sol transparent links don't need indent-pre nowiki protection
27740 <link rel="mw:PageProp/redirect" href="./Main_Page">
27741 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27742 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27744 #WEITERLEITUNG [[Main Page]]
27745 <!-- this is good --> [[Category:Good]]
27746 <!-- this is great --> [[Kategorie:Great]]
27750 New interlanguage links (href variations)
27754 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27755 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27756 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27758 [[es:Toxine bactérienne]]
27759 [[es:Toxine_bactérienne]]
27760 [[es:Toxine_bactérienne]]
27764 Image: Modifying size of an image (1)
27767 "modes": ["wt2wt"],
27769 ["img[height]", "attr", "height", "22"],
27770 ["img[width]", "attr", "width", "200"]
27774 [[Image:Foobar.jpg|230x230px]]
27776 [[Image:Foobar.jpg|200x200px]]
27780 Image: Modifying size of an image (2)
27783 "modes": ["wt2wt"],
27785 ["img[height]", "attr", "height", "100"],
27786 ["img[width]", "attr", "width", "500"]
27790 [[Image:Foobar.jpg|230x230px]]
27792 [[Image:Foobar.jpg|500x500px]]
27795 # Change in size is ignored so long as class='mw-default-size'
27797 Image: Modifying size of an image (3)
27800 "modes": ["wt2wt"],
27802 ["figure[class]", "removeClass", "mw-default-size"],
27803 ["figure img", "attr", "height", "19"],
27804 ["figure img", "attr", "width", "170"]
27808 [[Image:Foobar.jpg|thumb]]
27810 [[Image:Foobar.jpg|thumb|170x170px]]
27814 Image: Modifying alignment of an image (T50665)
27817 "modes": ["wt2wt"],
27819 ["figure[class]", "removeClass", "mw-halign-right"],
27820 ["figure[class]", "addClass", "mw-halign-left"]
27824 [[Image:Foobar.jpg|thumb|caption|right]]
27826 [[Image:Foobar.jpg|thumb|caption|left]]
27830 Image: Modifying mw-default-size of an frameless image (T64805)
27833 "modes": ["wt2wt"],
27835 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27839 [[Image:Foobar.jpg|frameless|right]]
27841 [[Image:Foobar.jpg|frameless|right|220x220px]]
27845 Image: Modifying valign of an image (T51221)
27848 "modes": ["wt2wt"],
27850 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27851 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27855 [[File:Foobar.jpg|20px|middle]]
27857 [[File:Foobar.jpg|20px|text-top]]
27861 Image: Modifying alt attribute of an image (T58400)
27864 "modes": ["wt2wt"],
27866 ["img[alt]", "attr", "alt", "some alternate edited text"]
27870 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27872 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27876 Image: Modifying caption of an image
27879 "modes": ["wt2wt"],
27881 ["figcaption", "text", "new caption"]
27885 [[Image:Foobar.jpg|thumb|original caption]]
27887 [[Image:Foobar.jpg|thumb|new caption]]
27891 Image: empty alt attribute (T50924)
27895 [[File:Foobar.jpg|thumb|alt=|bar]]
27897 <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>
27901 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27907 <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>
27909 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27913 Image: Block level image should have \n before and after
27916 [[File:Foobar.jpg|right|thumb|150x150px]]
27920 <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>
27925 Image: New block level image should have \n before and after (existing content)
27928 [[File:Foobar.jpg|right|thumb|150x150px]]
27932 <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>
27937 Image: upright option (parsoid)
27939 [[File:Foobar.jpg|thumb|upright|caption]]
27940 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27941 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27943 <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>
27944 <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>
27945 <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>
27949 Image: upright option is ignored on inline and frame images (parsoid)
27951 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27953 <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>
27957 Image: in template parameter with empty parameter
27959 {{echo|[[File:Foobar.jpg|link=]]}}
27961 <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>
27965 Image: from basic HTML (1)
27969 <span typeof="mw:Image">
27970 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27973 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27977 Image: from basic HTML (2)
27981 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27983 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27987 Image: from basic HTML (3)
27991 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27993 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27997 Image: from basic HTML (4)
28001 <img src="./File:Foobar.jpg">
28003 [[File:Foobar.jpg|link=]]
28007 Image: Invalid title as link
28009 [[File:Foobar.jpg|link=<]]
28011 <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>
28014 <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>
28018 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
28023 <li><p>foo</p></li>
28030 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
28034 <ul> <li>foo</li></ul>
28040 Don't strip leading whitespace when handling indent-pre suppressing tags
28045 <tr><td> indented row</td></tr>
28048 <b>This is very bold of you!</b>
28051 indented cell (no pre-wrapping!)
28061 '''This is very bold of you!'''
28065 indented cell (no pre-wrapping!)
28073 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
28095 <nowiki> </nowiki></span>bar2
28098 <nowiki> </nowiki><span>bar</span>
28101 <nowiki> </nowiki><span>foo</span>
28106 Lists: Dont insert newlines in a serialized list item.
28110 <ul><li>a<br>b</li><li>c</li></ul>
28117 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
28120 "modes": ["html2wt"],
28121 "scrubWikitext": false
28124 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28125 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28127 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28128 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28130 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
28132 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28134 == hello there [[Category:A1]] ==
28136 == [[Category:A2]] hi pal ==
28138 == <!--foo--> [[Category:A3]] how goes it ==
28140 == it goes well [[Category:A4]] <!--bar--> ==
28142 ==howdy [[Category:A5]]==
28148 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
28151 "modes": ["html2wt"],
28152 "scrubWikitext": true
28155 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
28156 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
28158 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
28159 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
28161 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28169 <!--foo-->[[Category:A3]]
28174 [[Category:A4]] <!--bar-->
28182 Headings: Don't hoist metas that come from templates
28185 "modes": ["html2wt"],
28186 "scrubWikitext": true
28189 <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>
28191 == {{echo|foo [[Category:Foo]]}} ==
28195 Headings: Category in ref isn't hoisted
28198 "modes": ["html2wt"],
28199 "scrubWikitext": true
28202 <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>
28204 <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>
28207 [[Category:Baz]] </ref> ==
28213 Parsoid: Serialize positional parameters with = in them as named parameter
28217 <p about="#mwt1" typeof="mw:Transclusion"
28218 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28220 <p about="#mwt1" typeof="mw:Transclusion"
28221 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28223 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28224 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28225 <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>
28229 {{echo|1=f=oo|2=bar}}
28231 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28232 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28233 {{echo|<nowiki>f=oo</nowiki>|bar}}
28237 Parsoid: Serialize positional parameters with = in extlink as named parameter
28241 <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>
28243 {{echo|1=http://stuff?is=ok}}
28247 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28251 <div>a<p>b</p></div>
28272 Substrings resembling wikitext in hrefs should not get nowiki escapes
28276 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28282 Enforce single-line context in the serializer
28289 <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">
28290 </span><span about="#mwt1">you</span> </h2>
28292 <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>
28294 <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
28295 there</span></li></ol>
28307 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28314 </tbody></table></dd></dl>
28318 == hi {{bogus|there
28329 * foo '''bar''' baz
28341 Serialize new placeholder space without spans
28345 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28347 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28349 <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>
28355 <ref>foo : bar</ref>ok
28359 #-----------------------
28360 # Tag minimization tests
28361 #-----------------------
28364 1. I/B quote minimization: wikitext-only tags should be combined
28368 <p><i>A</i><i>B</i></p>
28369 <p><b>A</b><b>B</b></p>
28370 <p><i>A</i><b><i>B</i></b></p>
28371 <p><b>A</b><i><b>B</b></i></p>
28372 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28373 <p><i><b>A</b></i><i><b>B</b></i></p>
28374 <p><i><b>A</b></i><b><i>B</i></b></p>
28375 <p><b><i>A</i></b><i><b>B</b></i></p>
28395 2. I/B quote minimization: wikitext and html tags should not be combined
28399 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28400 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28404 ''A''<nowiki/>'''<i>B</i>'''
28408 3. I/B quote minimization: templated content stops minimization
28412 <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>
28413 <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>
28415 ''A''{{echo|''B''}}
28417 ''A''{{echo|'''''B'''''}}
28421 4. I/B quote minimization: new content should be mimimized with adjacent old content
28425 <p><i>A</i><i>B</i></p>
28426 <p><b>A</b><b>B</b></p>
28427 <p><i>A</i><b><i>B</i></b></p>
28437 5a. Merge adjacent quote nodes if they've been edited
28440 "modes": ["wt2wt", "selser"],
28442 ["p", "contents", "remove", ":contains('b')"]
28452 5b. Merge adjacent quote nodes if they've been edited
28455 "modes": ["wt2wt", "selser"],
28461 ''a''<span id="x">b</span>''c''
28467 1. Merge adjacent link nodes as long as at least one element is new
28470 "modes": ["html2wt"],
28471 "scrubWikitext": true
28474 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28475 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28476 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28480 [[Football|Foot]][[Football|ball]]
28484 2. Merge adjacent link nodes and enable additional normalizations
28487 "modes": ["html2wt"],
28488 "scrubWikitext": true
28491 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28497 3. Don't merge adjacent link nodes if scrubWikitext is false
28500 "modes": ["html2wt"],
28501 "scrubWikitext": false
28504 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28506 [[Football|Foot]][[Football|ball]]
28510 1. Move format tags outside of WikiLink
28513 "modes": ["html2wt"],
28514 "scrubWikitext": true
28517 <a rel="mw:WikiLink" href="./Football"><i>Football</i></a>
28518 <a rel="mw:WikiLink" href="./Football"><i><b>Football</b></i></a>
28519 <a rel="mw:WikiLink" href="./Football"><u><i><b>Football</b></i></u></a>
28522 '''''[[Football]]'''''
28523 <u>'''''[[Football]]'''''</u>
28527 2. Move format tags outside of WikiLink with mergable A tags
28530 "modes": ["html2wt"],
28531 "scrubWikitext": true
28534 <a rel="mw:WikiLink" href="./Football"><i><b>Foot</b></i></a><a rel="mw:WikiLink" href="./Football"><i><b>ball</b></i></a>
28536 '''''[[Football]]'''''
28540 3. Move format tags outside of WikiLink while preserving formats already outside WikiLink
28543 "modes": ["html2wt"],
28544 "scrubWikitext": true
28547 <font color="red"><a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><u><b>Foo</b></u></a></font>
28549 <font color="red"><u>'''[[Foo]]'''</u></font>
28553 4. Do not move format tags outside of WikiLink which includes attributes color, style and class
28556 "modes": ["html2wt"],
28557 "scrubWikitext": true
28560 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><font color="red">Foo</font></a>
28561 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span style="color: blue; font-size: 46px;">Foo></span></a>
28562 <a rel="mw:WikiLink" href="./Foo" title="Foo" class="mw-redirect"><span class="Bar">Foo</span></a>
28564 [[Foo|<font color="red">Foo</font>]]
28565 [[Foo|<span style="color: blue; font-size: 46px;">Foo></span>]]
28566 [[Foo|<span class="Bar">Foo</span>]]
28570 5. T194083 Regression test: Manual edit test that also enables scrubWikitext to move format tags outside wikilinks
28573 "modes": ["selser"],
28574 "scrubWikitext": true,
28576 ["a", "html", "<i>Foo</i>"]
28586 6. Regression test: Manual edit test to ensure diff markers are not lost
28589 "modes": ["selser"],
28590 "scrubWikitext": true,
28592 ["i", "wrap", "<a href='./Foo' rel='mw:WikiLink'></a>"]
28601 #------------------------------
28602 # End of tag minimization tests
28603 #------------------------------
28606 T56262: New entities
28610 <span typeof="mw:Entity"> </span>
28615 ## Note that there is no wikitext output for 'unknownproperty' ##
28616 ## Unknown magic words are silently dropped ##
28623 <meta property='mw:PageProp/toc' />
28624 <meta property='mw:PageProp/notoc' />
28625 <meta property='mw:PageProp/forcetoc' />
28626 <meta property='mw:PageProp/index' />
28627 <meta property='mw:PageProp/noindex' />
28628 <meta property='mw:PageProp/nogallery' />
28629 <meta property='mw:PageProp/noeditsection' />
28630 <meta property='mw:PageProp/notitleconvert' />
28631 <meta property='mw:PageProp/nocontentconvert' />
28632 <meta property='mw:PageProp/unknownproperty' />
28642 __NOCONTENTCONVERT__
28646 Consecutive <pre>s should not get merged
28648 parsoid=html2wt,html2html
28650 <pre>a</pre><pre>b</pre>
28678 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28682 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28684 [[Special:BookSources/1234567890|ISBN 1234567895]]
28688 Edited RFC links not serializable as RFC links should serialize as extlinks
28692 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28694 [https://tools.ietf.org/html/rfc123 New RFC]
28698 Edited PMID links not serializable as PMID links should serialize as extlinks
28702 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28704 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28708 WTS of autolinks with trailing/surrounding context
28712 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28713 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28714 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28715 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28716 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28717 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28719 http://cscott.net'''foo'''
28721 http://cscott.net<b>foo</b>
28723 '''http://cscott.net'''
28725 '''http://cscott.net '''
28727 '''http://cscott.net<nowiki/>x'''
28729 http://cscott.net<nowiki/>x
28733 WTS of autolinks with nowikis (round-trip)
28735 x<nowiki/>http://cscott.net<nowiki/>x
28737 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28740 # this is the "easy" test because it leaves in place all the
28741 # data-parsoid information indicating this is an autolink
28743 WTS of autolinks with escapes (editing)
28746 "modes": ["wt2wt"],
28748 [ "span", "remove" ]
28752 x<nowiki/>http://cscott.net<nowiki/>x
28754 x<nowiki/>http://cscott.net<nowiki/>x
28758 WTS of edited autolink-like text (T103364)
28761 "modes": ["wt2wt"],
28763 [ "span[typeof]", "removeAttr", "typeof" ]
28767 Not a link: <nowiki>http://example.com</nowiki>.
28769 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28773 WTS of newly-authored autolink-like text (T103364)
28777 <p>http://example.com is not a link.</p>
28779 <nowiki>http://example.com</nowiki> is not a link.
28783 WTS of autolink-like text after an autolink (T108563)
28787 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28789 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28793 Magic links inside links (not autolinked)
28795 [[Foo|http://example.com]]
28798 [[Foo|ISBN 123456789x]]
28800 [http://foo.com http://example.com]
28801 [http://foo.com RFC 1234]
28802 [http://foo.com PMID 1234]
28803 [http://foo.com ISBN 123456789x]
28805 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28806 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28807 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28808 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28809 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28810 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28811 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28812 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28815 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28816 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28817 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28818 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28820 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28821 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28822 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28823 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28827 Magic links inside image captions (autolinked)
28829 [[File:Foobar.jpg|thumb|http://example.com]]
28830 [[File:Foobar.jpg|thumb|RFC 1234]]
28831 [[File:Foobar.jpg|thumb|PMID 1234]]
28832 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28834 <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>
28835 <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>
28836 <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>
28837 <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>
28839 <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>
28840 <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>
28841 <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>
28842 <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>
28846 WTS of magic word text (T109371)
28851 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28852 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28854 <nowiki>RFC 1234</nowiki>
28856 [http://foo.com RFC 1234]
28862 Edited Redirect link should emit a non-piped wikitext link
28866 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28872 T75121: Infer extension name from typeOf if data-mw is not present
28874 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28876 <div typeOf="mw:Extension/foo"></div>
28881 # Note that the <p> wrapping isn't present in PHP parser output
28882 # The important thing for this test is that P-wrapping doesn't
28883 # interfere with the <nowiki> protection for leading - in <td>
28884 # (which isn't necessary for <th>).
28886 T88318: p-wrapped dash in table.
28888 parsoid=html2wt,wt2wt
28891 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28892 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28893 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28900 |<nowiki>-</nowiki>
28901 |<nowiki>- </nowiki>
28921 <td><small>-</small>
28928 </td></tr></tbody></table>
28932 T149209: WTS: Handle newlines in table cells properly
28940 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28942 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28948 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
28950 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
28972 T149209: Selser: Handle newlines in table cells properly
28975 "modes": ["selser"],
28977 [ "#h1", "html", "a\nb\n" ],
28978 [ "#h2", "html", "a\nb\n" ],
28979 [ "#c1", "html", "a\nb\n" ],
28980 [ "#c2", "html", "<p>a</p>" ],
28981 [ "#c3", "html", "<p>a</p>" ],
28982 [ "#c4", "html", "edit-me<p>a</p>" ]
28987 ! id="h1" |edit-me!!1
28989 ! id="h2" |edit-me||2
28991 | id="c1" |edit-me||3
28993 | id="c2" |edit-me||4
28995 | id="c3" |edit-me||p||q||r
28997 | id="c4" |edit-me||p||q||r
29026 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
29031 <td id='mwAc'>foo</td>
29032 <td id='serialize-this'>bar</td>
29037 | id="serialize-this" |bar
29042 Parsoid-like element ids should not be serialized to wikitext unless shadowed
29046 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
29048 <div id="hello">ok</div>
29052 Testing serialization after deletion in references
29055 "modes": ["wt2wt"],
29061 hi <ref><div id="x">ho</div></ref>
29071 Testing serialization after deletion of table cells
29074 "modes": ["wt2wt", "selser"],
29082 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
29092 Testing selser after addition of new row before first row (T125419)
29095 "modes": ["wt2wt", "selser"],
29097 [ "tr", "before", "<tr><td>X</td></tr>" ]
29113 Serialize new table rows in a HTML table using HTML tags
29116 "modes": ["wt2wt", "selser"],
29118 [ "tr", "before", "<tr><td>X</td></tr>" ]
29122 <table><tr><td>a</td></tr></table>
29124 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
29128 Serialize new table cells in a HTML row using HTML tags
29131 "modes": ["wt2wt", "selser"],
29133 [ "td", "before", "<td>X</td>" ]
29137 <table><tr><td>a</td></tr></table>
29139 <table><tr><td>X</td><td>a</td></tr></table>
29143 Serialize wikitext list items as HTML list items when embedded in a HTML list
29147 <ul data-parsoid='{"stx": "html"}'>
29148 <li data-parsoid='{}'>a</li>
29158 # SSS FIXME: Is this actually a good thing given the
29159 # odd nested list output that is generated by MW?
29160 # <ul><li>foo<ul>..</ul></li></ul> instead of
29161 # <ul><li>foo</li><ul>..</ul></ul>
29163 Wikitext lists can be nested inside HTML lists
29167 <ul data-parsoid='{"stx": "html"}'>
29168 <li data-parsoid='{"stx": "html"}'>a
29169 <ul><li>b</li></ul>
29173 <ul data-parsoid='{"stx": "html"}'>
29175 <ul><li>y</li></ul>
29196 "modes": ["wt2wt"],
29198 [ "#xyz", "before", "<b>before</b> stuff " ],
29199 [ "#xyz", "after", " stuff <i>after</i>" ],
29200 [ "#xyz", "html", "x <b>y</b> z" ]
29204 <span id="xyz">hello</span>
29206 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
29210 Never serialize a-tag as html, regardless of what data-parsoid has to say
29212 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29214 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
29219 ## SSS FIXME: This is broken output nevertheless.
29220 ## What might be a reasonable non-broken output for this?
29221 ## This is an edge case unlikely to be seen in production
29222 ## that I am not wasting more time on this right now.
29224 Never serialize a-tag as html, no matter what attributes it has
29226 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29228 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
29230 [http://boo.org http://boohoo.org]
29233 # Misnested is an indication that selser can reuse the source but these have
29234 # shown to sneak through on occasion. See T101768.
29235 # The original wikitext here is: [http://test.com [[one]] two three]
29237 Strip span tags added to mark misnested links
29241 <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>
29243 [http://test.com][[one]] two three
29247 Catch regression when unpacking misnested links
29251 {{echo|hi}}[http://example.com [[ho]]]
29253 <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>
29257 Catch regression when unpacking with trailing content
29259 {{echo|Foo <references/> bar}}
29261 <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>
29265 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
29269 <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|}"]}'>
29281 ## This test verifies the presence and computation of this attribute indirectly
29282 ## by making an edit and ensuring that the serialization is correct (which it would be
29283 ## only if firstWikitextNode is properly set).
29285 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
29288 "modes": ["wt2wt"],
29290 [ "div#x", "remove" ],
29291 [ "div", "before", "<div>new</div>" ]
29295 <div id="x">foo</div>
29297 {{echo|<div>boo</div>
29305 {{echo|<div>boo</div>
29311 # --------------------------------------------
29312 # Tests spec'ing wikitext serialization norms |
29313 # --------------------------------------------
29316 Serialize multi-line indent-pre starting with wikitext syntax
29330 1. Categories should always be serialized on their own line
29334 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
29342 2. Categories that are part of templates should not introduce a line break
29344 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
29346 <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>
29349 # Careful while editing these next 2 tests. There are \u200f characters
29350 # before and after the <link> tags in the HTML and following some
29351 # of the categories in wikitext
29352 # Do not remove these characters in edits.
29354 # As part of the serialization, these bidi characters will get stripped.
29356 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
29359 "modes": ["html2wt"],
29360 "scrubWikitext": true
29363 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
29364 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
29367 [[קטגוריה: שיטות משפט]]
29371 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
29374 "modes": ["html2wt"],
29375 "scrubWikitext": true
29378 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
29385 Lists: Add space after bullets
29392 <li><span> baz</span></li>
29397 * <span> baz</span>
29401 1. Headings: Add space before/after == (T53744)
29408 <h2><span> baz</span></h2>
29416 == <span> baz</span> ==
29420 2. Headings: Add space before/after == even after hoisted content
29423 "modes": ["html2wt"],
29424 "scrubWikitext": true
29427 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29435 1. Headings: suppress newly created empty headings
29438 "modes": ["html2wt"],
29439 "scrubWikitext": true
29447 2. Headings: don't suppress empty headings if scrubWikitext is false
29457 3. Headings: suppress empty headings on edits
29460 "modes": ["selser"],
29461 "scrubWikitext": true,
29467 ==<span id="x">foo</span>==
29472 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29475 "modes": ["html2wt"],
29476 "scrubWikitext": true
29479 <h2>foo<br/>bar</h2>
29480 <h2>foo <span><br/>bar</span> baz</h2>
29484 == foo <span> bar</span> baz ==
29488 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29491 "modes": ["html2wt"],
29492 "scrubWikitext": false
29495 <h2>foo<br/>bar</h2>
29501 1. WT Quote Tags: suppress newly created empty style tags
29504 "modes": ["html2wt"],
29505 "scrubWikitext": true
29513 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29519 ''<nowiki/>'''''<nowiki/>'''
29523 3. WT Quote Tags: suppress empty style tags on edits
29526 "modes": ["selser"],
29527 "scrubWikitext": true,
29533 '''<span id="x">foo</span>'''
29538 1. Anchors: suppress newly created empty anchors
29541 "modes": ["html2wt"],
29542 "scrubWikitext": true
29545 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29550 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29553 "modes": ["html2wt"],
29554 "scrubWikitext": false
29557 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29563 3. Anchors: suppress empty anchors on edits
29566 "modes": ["selser"],
29567 "scrubWikitext": true,
29573 [[Test|<span id="x">foo</span>]]
29578 3a. Anchors: do not suppress numbered extlinks
29581 "modes": ["wt2wt"],
29582 "scrubWikitext": true
29587 <a rel="mw:ExtLink" href="http://foo.com"></a>
29591 3b. Anchors: do not suppress numbered extlinks
29594 "modes": ["wt2wt"],
29595 "scrubWikitext": true,
29601 [http://foo.com <span id="x">foo</span>]
29607 Normalizations should be restricted to edited content
29610 "modes": ["selser"],
29611 "scrubWikitext": true,
29613 [ "h1", "before", "<i></i>"]
29627 1. Multiple normalizations (html2wt)
29630 "modes": ["html2wt"],
29631 "scrubWikitext": true
29635 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29636 </a><b><i></i></b>x</p>
29645 2. Multiple normalizations (selser)
29648 "modes": ["selser"],
29649 "scrubWikitext": true,
29651 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29655 <span id="x">foo</span>
29657 <span id="x">foo</span>
29663 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29666 "modes": ["html2wt"],
29667 "scrubWikitext": true
29679 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29686 <nowiki> </nowiki>hi
29688 <nowiki> </nowiki> hello
29692 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29695 "modes": ["html2wt"],
29696 "scrubWikitext": true
29705 baz bang</td></tr></table>
29711 bar<span>boo</span></p>
29727 bar<span>boo</span>
29731 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29734 "modes": ["selser"],
29735 "scrubWikitext": true,
29737 [ "p", "html", " a\n b" ]
29748 1. New links that end in spaces
29751 "modes": ["html2wt"],
29752 "scrubWikitext": false
29755 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29756 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29757 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29759 [[Berlin ]]<nowiki/>is the capital of Germany.
29763 [[Boston ]] is a city.
29767 2. New links that end in spaces
29770 "modes": ["html2wt"],
29771 "scrubWikitext": true
29774 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29775 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29776 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29778 [[Berlin]] is the capital of Germany.
29782 [[Boston]] is a city.
29786 1. Table cells with escapable prefixes
29789 "modes": ["html2wt"],
29790 "scrubWikitext": false
29794 <tr><td>a</td></tr>
29795 <tr><td>-</td></tr>
29796 <tr><td>+</td></tr>
29802 |<nowiki>-</nowiki>
29804 |<nowiki>+</nowiki>
29809 2. Table cells with escapable prefixes
29812 "modes": ["html2wt"],
29813 "scrubWikitext": true
29817 <tr><td>a</td></tr>
29818 <tr><td>-</td></tr>
29819 <tr><td>+</td></tr>
29832 3a. Table cells with escapable prefixes after edits
29835 "modes": ["selser"],
29836 "scrubWikitext": true,
29838 [ "table tbody tr:first-child td:first-child", "remove"]
29852 3b. Table cells with escapable prefixes after edits
29855 "modes": ["selser"],
29856 "scrubWikitext": true,
29858 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29865 |<span id="x">foo</span>+
29874 # FIXME: This test will fail because
29875 # normalization doesn't realize that the id attribute
29876 # will eliminate the escapable scenario
29878 4a. Table cells without escapable prefixes after edits
29881 "modes": ["selser"],
29882 "scrubWikitext": true,
29884 [ "#x", "html", "-" ]
29897 ## This tests normalizer's ability to discriminate between
29898 ## cells having identical content.
29900 4b. Table cells without escapable prefixes after edits
29903 "modes": ["selser"],
29904 "scrubWikitext": true,
29906 [ "td", "html", "-" ]
29919 ## This tests normalizer's ability to not be tripped by
29920 ## comments (and whitespace)
29922 4c. Table cells without escapable prefixes after edits
29925 "modes": ["selser"],
29926 "scrubWikitext": true,
29928 [ "table tbody tr td:first-child", "remove" ]
29943 ## This tests normalizer's ability to handle HTML cells
29945 4d. Table cells without escapable prefixes after edits
29948 "modes": ["selser"],
29949 "scrubWikitext": true,
29951 [ "td", "html", "-" ]
29956 <tr><td>a</td></tr>
29960 <tr><td>-</td></tr>
29964 ## T111151 Remove font elements without attributes
29966 5a. font tags without attributes should be dropped in scrubWikitext mode
29969 "modes": ["html2wt"],
29970 "scrubWikitext": true
29974 <font><font>bar</font></font>
29975 <font class="x">boo</font>
29979 <font class="x">boo</font>
29983 5b. font tags should not be dropped without scrubWikitext being enabled
29986 "modes": ["html2wt"],
29987 "scrubWikitext": false
29996 Escape nowiki DOM elements
30000 <nowiki><i>foo</i></nowiki>
30002 <nowiki>''foo''</nowiki>
30005 # This is meant to be an interim fix while we go about figuring out
30006 # how to not introduce these trailing <nowiki/>s in the first place.
30008 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
30012 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
30014 <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>
30015 <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>
30029 New list is serialized on newlines
30033 <p>The quick brown fox jumps over the lazy dog.</p><ul>
30037 </ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
30039 The quick brown fox jumps over the lazy dog.
30045 The quick onyx goblin jumps over the lazy dwarf.
30049 New lists in formatting elements serialized w/o newlines
30061 <small><ul><li>hi</li></ul></small>
30073 New list in table doesn't need newlines
30077 <table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
30086 # ---------------------------------------------------
30087 # End of tests spec'ing wikitext serialization norms |
30088 # ---------------------------------------------------
30092 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
30100 <td><b>c</b><p>d</p></td>
30119 Anchor without href scenarios
30121 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
30124 <a class="no">dice</a>
30129 <span name="foo"></span>
30133 New transclusion added after a list should be serialized after the list
30137 <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>
30143 # -----------------------------------------------------------------
30144 # End of section for Parsoid-only html2wt tests for serialization
30146 # -----------------------------------------------------------------
30148 # -----------------------------------------------------------------
30149 # The following section of tests are primarily to spec behavior of
30150 # the selective serializer. All these tests have manual selser
30151 # changes. The automated selser changes for all tests handle the
30152 # wide variation of changes, but these tests here capture specs
30153 # deterministically.
30154 # ----------------------------------------------------------------
30158 Selser: New comments should not be lost
30161 "modes": ["selser"],
30163 [ "#a", "after", "<!--c1-->" ],
30164 [ "#b", "before", "<!--c2-->" ]
30168 <span id="a">a</span>
30170 <span id="b">b</span>
30172 <span id="a">a</span><!--c1-->
30174 <!--c2--><span id="b">b</span>
30179 Selser: Check for validity of DSR before using it
30182 "modes": ["selser"],
30184 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
30188 <span id="a">a</span>
30190 {{DISPLAYTITLE:foo}}
30191 <span id="a">a</span>
30195 1. DOMDiff: Changes to <ref> content should be looked up using id
30198 "modes": ["selser"],
30200 ["#X", "after", "bar"],
30201 ["#Y", "after", "baz"]
30205 X <ref><span id="X">foo</span></ref>
30208 <ref name="a"><span id="Y">foo</span></ref>
30211 X <ref><span id="X">foo</span>bar</ref>
30214 <ref name="a"><span id="Y">foo</span>baz</ref>
30219 2. DOMDiff: Changes to <ref> content should be looked up using id
30222 "modes": ["selser"],
30224 ["#Z", "after", "bar"]
30228 A <ref>foo bar for a</ref>
30229 B <ref group="X" name="b" />
30233 <references group="X">
30234 <ref name="b"><span id="Z">foo</span></ref>
30237 A <ref>foo bar for a</ref>
30238 B <ref group="X" name="b" />
30242 <references group="X">
30243 <ref name="b"><span id="Z">foo</span>bar</ref>
30248 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
30251 "modes": ["selser"],
30253 [ "div:first-child", "text", "bar" ]
30257 <div style="{{1x|color:red;}}%">foo</div>
30259 <div style="{{1x|color:red;}}%">bar</div>
30271 <li class="mw-empty-elt"></li>
30272 <li class="mw-empty-elt"></li>
30279 [[File:Thumb.png|thumb]]
30281 <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>
30283 <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>
30287 unclosed internal link XSS (T137264)
30289 [[#%3Cscript%3Ealert(1)%3C/script%3E|
30291 <p>[[#<script>alert(1)</script>|
30294 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
30298 Validating that <style> isn't eaten by tidy (T167349)
30303 <style>.foo::before { content: "<foo>"; }</style>
30304 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30308 <style>.foo::before { content: "<foo>"; }</style>
30309 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
30314 Validating that <style> isn't wrapped in a paragraph (T186965)
30318 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30320 <style>.foo::before { content: "<foo>"; }</style>
30322 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30324 But if it's on a line with other content, let it be wrapped.
30326 <style>.foo::before { content: "<foo>"; }</style> bar
30328 foo <style>.foo::before { content: "<foo>"; }</style>
30330 foo <style>.foo::before { content: "<foo>"; }</style> bar
30332 And the same if we have non-paragraph-breaking whitespace
30335 <style>.foo::before { content: "<foo>"; }</style>
30338 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30340 <style>.foo::before { content: "<foo>"; }</style>
30341 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
30342 <p>But if it's on a line with other content, let it be wrapped.
30343 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
30344 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
30345 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
30346 </p><p>And the same if we have non-paragraph-breaking whitespace
30348 <style>.foo::before { content: "<foo>"; }</style>
30354 Validating that <link> isn't wrapped in a paragraph (T186965)
30358 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30360 <link rel="foo" href="bar"/>
30362 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30364 But if it's on a line with other content, let it be wrapped.
30366 <link rel="foo" href="bar"/> bar
30368 foo <link rel="foo" href="bar"/>
30370 foo <link rel="foo" href="bar"/> bar
30372 And the same if we have non-paragraph-breaking whitespace
30375 <link rel="foo" href="bar"/>
30378 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
30380 <link rel="foo" href="bar"/>
30381 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
30382 <p>But if it's on a line with other content, let it be wrapped.
30383 </p><p><link rel="foo" href="bar"/> bar
30384 </p><p>foo <link rel="foo" href="bar"/>
30385 </p><p>foo <link rel="foo" href="bar"/> bar
30386 </p><p>And the same if we have non-paragraph-breaking whitespace
30388 <link rel="foo" href="bar"/>
30394 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
30396 wgFragmentMode=[ 'html5', 'legacy' ]
30398 ==A&B&C&amp;D&amp;amp;E==
30399 [[#A&B&C&amp;D&amp;amp;E]]
30401 <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>
30402 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
30405 <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>
30406 <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>
30410 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
30412 wgFragmentMode=[ 'legacy' ]
30414 ==A&B&C&amp;D&amp;amp;E==
30415 [[#A&B&C&amp;D&amp;amp;E]]
30417 <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>
30418 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
30423 Decoding of HTML entities in embedded HTML tags
30425 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30427 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
30430 <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>
30434 Decoding of HTML entities in indicator names for IDs (T104196)
30436 parsoid=wt2html,html2html
30439 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30441 1&2&3&4&amp;5=Indicator
30444 <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>
30447 # this version of the test strips out the ambiguity so Parsoid rts cleanly
30449 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
30453 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
30455 1&2&3&4&amp;5=Indicator
30458 <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>
30461 # This fragment mode is what Parsoid supports.
30463 HTML5 ids: fallback to legacy
30465 wgFragmentMode=[ 'html5', 'legacy' ]
30477 ==Hey < # " > % : '==
30478 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30480 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30482 <!-- These two links should produce identical HTML -->
30483 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30486 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30488 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30489 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30490 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30491 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30492 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30493 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30497 <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>
30498 <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>
30499 <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>
30500 <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>
30501 <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>
30502 <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>
30503 <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>
30504 </p><p>💩 <span id="💩"></span>
30505 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30508 <h2 id="Foo_bar">Foo bar</h2>
30510 <h2 id="foo_Bar_2">foo Bar</h2>
30512 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
30514 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
30516 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
30518 <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>
30519 <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>
30521 <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>
30523 <!-- These two links should produce identical HTML -->
30524 <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>
30527 # Parsoid doesn't support this mode
30529 HTML5 ids: legacy with a fallback to modern
30531 wgFragmentMode=[ 'legacy', 'html5' ]
30543 ==Hey < # " > % : '==
30544 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30546 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30548 <!-- These two links should produce identical HTML -->
30549 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30552 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30554 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30555 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30556 <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>
30557 <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>
30558 <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>
30559 <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>
30563 <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>
30564 <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>
30565 <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>
30566 <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>
30567 <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>
30568 <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>
30569 <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>
30570 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30571 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30575 # Parsoid doesn't support this mode.
30577 HTML5 ids: no legacy
30579 wgFragmentMode=[ 'html5' ]
30591 ==Hey < # " > % : '==
30592 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30594 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30596 <!-- These two links should produce identical HTML -->
30597 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30600 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30602 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30603 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30604 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30605 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30606 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30607 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30611 <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>
30612 <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>
30613 <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>
30614 <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>
30615 <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>
30616 <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>
30617 <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>
30618 </p><p>💩 <span id="💩"></span>
30619 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30624 T90902: Normalize weird characters in section IDs
30626 wgFragmentMode=[ 'html5', 'legacy' ]
30632 <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>
30633 <p><a href="#Foo_bar">#Foo bar</a>
30636 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
30637 <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>
30641 T51672: Test for brackets in attributes of elements in external link texts
30643 [http://example.com/ link <span title="title with [brackets]">span</span>]
30644 [http://example.com/ link <span title="title with [brackets]">span</span>]
30647 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30648 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30651 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30652 <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>
30656 T72875: Test for brackets in attributes of elements in internal link texts
30658 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30659 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30662 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30663 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30666 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30667 <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>
30671 T179544: {{anchorencode:}} output should be always usable in links
30673 wgFragmentMode=[ 'html5' ]
30675 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30677 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30680 <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>
30683 ## ------------------------------
30684 ## Parsoid section-wrapping tests
30685 ## ------------------------------
30687 Section wrapping for well-nested sections (no leading content)
30690 "wrapSections": true
30711 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30714 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30717 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30720 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30723 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30726 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30733 Section wrapping for well-nested sections (with leading content)
30736 "wrapSections": true
30741 Para 2 with a <div>nested in it</div>
30754 <section data-mw-section-id="0"><p>Para 1.</p>
30756 <p>Para 2 with a </p><div>nested in it</div>
30760 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30763 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30766 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30769 </section></section>
30773 Section wrapping with template-generated sections (good nesting 1)
30776 "wrapSections": true
30793 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30796 <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">
30797 </span><p about="#mwt1">b</p>
30798 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30801 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30805 # In this example, the template scope is mildly expanded to incorporate the
30806 # trailing newline after the transclusion since that is part of section 1.1.1
30808 Section wrapping with template-generated sections (good nesting 2)
30811 "wrapSections": true,
30812 "modes": ["wt2html", "wt2wt"]
30827 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30830 <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">
30831 </span><p about="#mwt1">b</p><span about="#mwt1">
30832 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30833 </span><p about="#mwt1">d</p><span about="#mwt1">
30834 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30838 # In this example, the template scope is mildly expanded to incorporate the
30839 # trailing newline after the transclusion since that is part of section 1.2.1
30841 Section wrapping with template-generated sections (good nesting 3)
30844 "wrapSections": true,
30845 "modes": ["wt2html", "wt2wt"]
30863 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30866 <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">
30867 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
30868 </span><p about="#mwt1">b</p><span about="#mwt1">
30869 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30870 </span><p about="#mwt1">c</p><span about="#mwt1">
30871 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30872 </span><p about="#mwt1">d</p><span about="#mwt1">
30873 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
30877 # Because of section-wrapping and template-wrapping interactions,
30878 # the scope of the template is expanded so that the template markup
30879 # is valid in the presence of <section> tags.
30880 # This exercises the s1 is null scenario in the wrapSections code
30882 Section wrapping with template-generated sections (bad nesting 1)
30885 "wrapSections": true
30899 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30902 <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"]}'>
30903 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
30904 </span><p about="#mwt1">b
30905 </p><span about="#mwt1">
30907 </span><p about="#mwt1">c</p><span about="#mwt1">
30908 </span></section></div></section>
30911 # Because of section-wrapping and template-wrapping interactions,
30912 # the scope of the template is expanded so that the template markup
30913 # is valid in the presence of <section> tags.
30914 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30916 Section wrapping with template-generated sections (bad nesting 2)
30919 "wrapSections": true
30937 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30940 </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">
30941 </span><p about="#mwt1">b</p><span about="#mwt1">
30942 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
30943 </span><p about="#mwt1">c</p><span about="#mwt1">
30945 </span><p about="#mwt1">d</p><span about="#mwt1">
30947 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
30951 # Because of section-wrapping and template-wrapping interactions,
30952 # additional template wrappers are added to <section> tags
30953 # so that template wrapping semantics are valid whether section
30954 # tags are retained or stripped. But, the template scope can expand
30955 # greatly when accounting for section tags.
30956 # This exercises the s1 and s2 are in different subtrees scenario
30958 Section wrapping with template-generated sections (bad nesting 3)
30961 "wrapSections": true,
30962 "modes": ["wt2html", "wt2wt"]
30980 <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>
30983 <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">
30984 </span><p about="#mwt1">b</p><span about="#mwt1">
30985 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
30986 </span><p about="#mwt1">c</p>
30989 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
30994 Section wrapping with uneditable lead section + div wrapping multiple sections
30997 "wrapSections": true
31002 <div style="border:1px solid red;">
31019 <section data-mw-section-id="-1"><p>foo</p>
31021 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31022 <section data-mw-section-id="1"><h1 id="1">1</h1>
31025 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31028 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31032 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31035 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31037 </section></section>
31041 Section wrapping with editable lead section + div overlapping multiple sections
31044 "wrapSections": true
31051 <div style="border:1px solid red;">
31068 <section data-mw-section-id="0"><p>foo</p>
31070 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
31072 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
31075 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
31078 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
31083 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
31086 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
31088 </section></section>
31092 HTML header tags should not be wrapped in section tags
31095 "wrapSections": true
31108 <section data-mw-section-id="0"><p>foo</p>
31110 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
31112 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
31114 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
31116 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
31120 Lead section containing only whitespace and comments.
31123 "wrapSections": true
31127 <!-- this is a comment, presumably significant to editors -->
31134 <section data-mw-section-id="0" data-parsoid="{}">
31135 <!-- this is a comment, presumably significant to editors -->
31136 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
31139 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
31144 Pseudo-sections emitted by templates should have id -2
31147 "wrapSections": true
31157 <section data-mw-section-id="-1"><p>foo</p>
31158 </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}}]}'>
31159 <section data-mw-section-id="-1"><h2 id="a">a</h2>
31160 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
31161 </section></div><span about="#mwt1">
31165 ##########################################################################
31166 Tests demonstrating white-space insensitivity in input wikitext
31167 for wikitext headings, wikitext list items, and wikitext table captions,
31168 headings, and cells. HTML versions of the same should preserve whitespace.
31169 ##########################################################################
31171 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
31174 "modes": ["wt2html"],
31175 "preserveIEW": true
31179 == <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
31180 == <!--c1--> <!--c2--> Tabs <!--c3--><!--c4--> ==
31181 == <!--Headings with fallback ids--> Личная жизнь ==
31182 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
31183 ; <!--term to define--> term : <!--term's definition--> definition
31185 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
31187 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
31189 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31191 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
31193 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
31196 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
31199 <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>
31200 <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>
31201 <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>
31202 <ul><li>List item</li></ul>
31203 <dl><dt>term </dt>
31204 <dd>definition</dd></dl>
31206 <caption>Table Caption
31209 <th>Table Heading 1</th>
31210 <th>Table Heading 2
31213 <td>Table Cell 1</td>
31217 <td>class="foo"</td>
31221 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
31222 </td></tr></tbody></table>
31225 <td>Table Cell 1</td>
31227 </td></tr></tbody></table> foo</dd></dl>
31229 <meta property="mw:PageProp/notoc">
31230 <h2 id="Spaces"><!--c1--><!--c2-->Spaces<!--c3--><!--c4--></h2>
31231 <h2 id="Tabs"><!--c1--><!--c2-->Tabs<!--c3--><!--c4--></h2>
31232 <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>
31233 <ul><li><!--c1--><!--c2-->List item<!--c3--><!--c4--></li></ul>
31234 <dl><dt><!--term to define-->term </dt><dd><!--term's definition-->definition</dd></dl>
31236 <caption><!--c1--><!--c2-->Table Caption<!--c3--><!--c4--></caption>
31238 <th><!--c1--><!--c2-->Table Heading 1<!--c3--><!--c4--></th><th>Table Heading 2<!--c5--></th></tr>
31240 <td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31242 <td>class="foo"</td><td><!--c1--><!--c2-->Table Cell 3<!--c3--><!--c4--></td></tr>
31244 <td><!--c1-->testing <a rel="mw:WikiLink" href="./One" title="One">two</a> <!--c2--> | <!--c3--> some content</td></tr>
31247 <tbody><tr><td><!--c1--><!--c2-->Table Cell 1<!--c3--><!--c4--></td><td>Table Cell 2<!--c5--></td></tr>
31248 </tbody></table><p> foo </p><!--c1--></dd></dl>
31251 # Looks like <caption> is not accepted in HTML
31253 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
31256 "modes": ["wt2html"],
31257 "preserveIEW": true
31261 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31262 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31264 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
31265 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
31268 <h2><span class="mw-headline" id="Heading"> Heading </span></h2>
31269 <ul><li> List item </li></ul>
31271 <tbody><tr><th> Table Heading </th><th></th></tr>
31272 <tr><td> Table Cell </td><th></th></tr>
31275 <meta property="mw:PageProp/notoc"/>
31276 <h2 id="Heading"> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
31277 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
31279 <tbody><tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> </th><th></th></tr>
31280 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> </td><th></th></tr>
31285 Do not trim whitespace in links and quotes
31288 "modes": ["wt2html"],
31289 "preserveIEW": true
31292 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
31293 [[Foo| some text ]]
31295 <p>foo <i> italic </i> and <b> bold </b>
31296 <a href="/wiki/Foo" title="Foo"> some text </a>
31299 <p>foo <i> <!--c1--> italic <!--c2--> </i> and <b> <!--c3--> bold <!--c4--> </b>
31300 <a rel="mw:WikiLink" href="./Foo" title="Foo"> some text </a></p>
31304 Remove p tags surrounding a single element in a figcaption
31308 [[File:Foobar.jpg|right|200x200px|Caption]]
31310 <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>
31314 Selser preserves lack of newline before list and allows newline after the list
31317 "modes": ["selser"],
31318 "scrubWikitext": true,
31320 [ "ul", "after", "<p>footer</p>" ]
31337 Selser does not introduce newlines between unedited paragraph preceding the list
31340 "modes": ["selser"],
31342 [ "table tbody tr td p:last-child", "empty" ]
31364 Selser does not introduce newlines between unedited paragraph following the list
31367 "modes": ["selser"],
31369 [ "table tbody tr td p:first-child", "empty" ]
31391 Remove a list item but do not insert newline above list
31394 "modes": ["selser"],
31396 [ "ul li:last-child", "remove" ]